diff --git a/ebos/eclgenericoutputblackoilmodule.cc b/ebos/eclgenericoutputblackoilmodule.cc index 6cb6a74ec..d95a2c237 100644 --- a/ebos/eclgenericoutputblackoilmodule.cc +++ b/ebos/eclgenericoutputblackoilmodule.cc @@ -681,6 +681,8 @@ assignToSolution(data::Solution& sol) {"PPCW", UnitSystem::measure::pressure, data::TargetType::RESTART_SOLUTION, ppcw_}, {"PRESROCC", UnitSystem::measure::pressure, data::TargetType::RESTART_SOLUTION, minimumOilPressure_}, {"PRESSURE", UnitSystem::measure::pressure, data::TargetType::RESTART_SOLUTION, oilPressure_}, + {"PCOW", UnitSystem::measure::pressure, data::TargetType::RESTART_SOLUTION, pcow_}, + {"PCOG", UnitSystem::measure::pressure, data::TargetType::RESTART_SOLUTION, pcog_}, {"PRES_OVB", UnitSystem::measure::pressure, data::TargetType::RESTART_SOLUTION, overburdenPressure_}, {"RS", UnitSystem::measure::gas_oil_ratio, data::TargetType::RESTART_SOLUTION, rs_}, {"RSSAT", UnitSystem::measure::gas_oil_ratio, data::TargetType::RESTART_AUXILIARY, gasDissolutionFactor_}, @@ -1094,6 +1096,15 @@ doAllocBuffers(unsigned bufferSize, relativePermeability_[gasPhaseIdx].resize(bufferSize, 0.0); } + if (FluidSystem::phaseIsActive(oilPhaseIdx) && FluidSystem::phaseIsActive(waterPhaseIdx) && rstKeywords["PCOW"] > 0) { + rstKeywords["PCOW"] = 0; + pcow_.resize(bufferSize, 0.0); + } + if (FluidSystem::phaseIsActive(oilPhaseIdx) && FluidSystem::phaseIsActive(gasPhaseIdx) && rstKeywords["PCOG"] > 0) { + rstKeywords["PCOG"] = 0; + pcog_.resize(bufferSize, 0.0); + } + if (rstKeywords["PBPD"] > 0) { rstKeywords["PBPD"] = 0; bubblePointPressure_.resize(bufferSize, 0.0); diff --git a/ebos/eclgenericoutputblackoilmodule.hh b/ebos/eclgenericoutputblackoilmodule.hh index 5a4f94b05..6727c026f 100644 --- a/ebos/eclgenericoutputblackoilmodule.hh +++ b/ebos/eclgenericoutputblackoilmodule.hh @@ -450,6 +450,8 @@ protected: ScalarBuffer cUrea_; ScalarBuffer cBiofilm_; ScalarBuffer cCalcite_; + ScalarBuffer pcow_; + ScalarBuffer pcog_; std::array saturation_; std::array invB_; diff --git a/ebos/ecloutputblackoilmodule.hh b/ebos/ecloutputblackoilmodule.hh index a606c13ca..7fa50a8dc 100644 --- a/ebos/ecloutputblackoilmodule.hh +++ b/ebos/ecloutputblackoilmodule.hh @@ -281,6 +281,14 @@ public: this->rv_[globalDofIdx] = getValue(fs.Rv()); Valgrind::CheckDefined(this->rv_[globalDofIdx]); } + if (!this->pcow_.empty()) { + this->pcow_[globalDofIdx] = getValue(fs.pressure(oilPhaseIdx)) - getValue(fs.pressure(waterPhaseIdx)); + Valgrind::CheckDefined(this->pcow_[globalDofIdx]); + } + if (!this->pcog_.empty()) { + this->pcog_[globalDofIdx] = getValue(fs.pressure(gasPhaseIdx)) - getValue(fs.pressure(oilPhaseIdx)); + Valgrind::CheckDefined(this->pcog_[globalDofIdx]); + } if (!this->rvw_.empty()) { this->rvw_[globalDofIdx] = getValue(fs.Rvw());