Merge pull request #5126 from daavid00/pcogGasWaterOutput

Write pc for watergas systems
This commit is contained in:
Bård Skaflestad 2024-01-30 17:40:56 +01:00 committed by GitHub
commit adc8b968e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 0 deletions

View File

@ -446,6 +446,7 @@ assignToSolution(data::Solution& sol)
DataEntry{"OIL_DEN", UnitSystem::measure::density, density_[oilPhaseIdx]},
DataEntry{"OIL_VISC", UnitSystem::measure::viscosity, viscosity_[oilPhaseIdx]},
DataEntry{"PBUB", UnitSystem::measure::pressure, bubblePointPressure_},
DataEntry{"PCGW", UnitSystem::measure::pressure, pcgw_},
DataEntry{"PCOG", UnitSystem::measure::pressure, pcog_},
DataEntry{"PCOW", UnitSystem::measure::pressure, pcow_},
DataEntry{"PDEW", UnitSystem::measure::pressure, dewPointPressure_},
@ -1240,6 +1241,10 @@ doAllocBuffers(const unsigned bufferSize,
relativePermeability_[gasPhaseIdx].resize(bufferSize, 0.0);
}
if (FluidSystem::phaseIsActive(gasPhaseIdx) && FluidSystem::phaseIsActive(waterPhaseIdx) && rstKeywords["PCGW"] > 0) {
rstKeywords["PCGW"] = 0;
pcgw_.resize(bufferSize, 0.0);
}
if (FluidSystem::phaseIsActive(oilPhaseIdx) && FluidSystem::phaseIsActive(waterPhaseIdx) && rstKeywords["PCOW"] > 0) {
rstKeywords["PCOW"] = 0;
pcow_.resize(bufferSize, 0.0);

View File

@ -449,6 +449,7 @@ protected:
ScalarBuffer cUrea_;
ScalarBuffer cBiofilm_;
ScalarBuffer cCalcite_;
ScalarBuffer pcgw_;
ScalarBuffer pcow_;
ScalarBuffer pcog_;

View File

@ -365,6 +365,10 @@ public:
this->rv_[globalDofIdx] = getValue(fs.Rv());
Valgrind::CheckDefined(this->rv_[globalDofIdx]);
}
if (!this->pcgw_.empty()) {
this->pcgw_[globalDofIdx] = getValue(fs.pressure(gasPhaseIdx)) - getValue(fs.pressure(waterPhaseIdx));
Valgrind::CheckDefined(this->pcgw_[globalDofIdx]);
}
if (!this->pcow_.empty()) {
this->pcow_[globalDofIdx] = getValue(fs.pressure(oilPhaseIdx)) - getValue(fs.pressure(waterPhaseIdx));
Valgrind::CheckDefined(this->pcow_[globalDofIdx]);