From 88d67684f6ac0611a6bbf46a39abe31f448a8750 Mon Sep 17 00:00:00 2001 From: goncalvesmachadoc Date: Wed, 6 Jul 2022 11:14:45 +0200 Subject: [PATCH] fix wbp --- ebos/ecloutputblackoilmodule.hh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ebos/ecloutputblackoilmodule.hh b/ebos/ecloutputblackoilmodule.hh index 1a38da2dc..5c658792d 100644 --- a/ebos/ecloutputblackoilmodule.hh +++ b/ebos/ecloutputblackoilmodule.hh @@ -675,8 +675,15 @@ public: if (this->gasConnectionSaturations_.count(cartesianIdx) > 0) { this->gasConnectionSaturations_[cartesianIdx] = getValue(fs.saturation(gasPhaseIdx)); } - if (this->wbpData_.count(cartesianIdx) > 0) - this->wbpData_[cartesianIdx] = getValue(fs.pressure(oilPhaseIdx)); + if (this->wbpData_.count(cartesianIdx) > 0) { + if (FluidSystem::phaseIsActive(oilPhaseIdx)) { + this->wbpData_[cartesianIdx] = getValue(fs.pressure(oilPhaseIdx)); + } else if (FluidSystem::phaseIsActive(gasPhaseIdx)) { + this->wbpData_[cartesianIdx] = getValue(fs.pressure(gasPhaseIdx)); + } else if (FluidSystem::phaseIsActive(waterPhaseIdx)) { + this->wbpData_[cartesianIdx] = getValue(fs.pressure(waterPhaseIdx)); + } + } // tracers const auto& tracerModel = simulator_.problem().tracerModel();