From e14f8637f1bc6eee6ab54674bf8087dce6975538 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Tue, 21 Mar 2023 09:08:10 +0100 Subject: [PATCH] output average pressure in all cells unconditionaly for for the co2store option --- ebos/ecloutputblackoilmodule.hh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ebos/ecloutputblackoilmodule.hh b/ebos/ecloutputblackoilmodule.hh index abb1d6b42..5190c6830 100644 --- a/ebos/ecloutputblackoilmodule.hh +++ b/ebos/ecloutputblackoilmodule.hh @@ -1017,11 +1017,17 @@ private: this->dynamicPoreVolume_[globalDofIdx] = pv; Scalar hydrocarbon = 0.0; - if (FluidSystem::phaseIsActive(oilPhaseIdx)) - hydrocarbon += getValue(fs.saturation(oilPhaseIdx)); - if (FluidSystem::phaseIsActive(gasPhaseIdx)) - hydrocarbon += getValue(fs.saturation(gasPhaseIdx)); + if (!this->eclState_.runspec().co2Storage()) { + // Common case. Hydrocarbon volume is fraction occupied by actual hydrocarbons. + if (FluidSystem::phaseIsActive(oilPhaseIdx)) + hydrocarbon += getValue(fs.saturation(oilPhaseIdx)); + if (FluidSystem::phaseIsActive(gasPhaseIdx)) + hydrocarbon += getValue(fs.saturation(gasPhaseIdx)); + } else { + // CO2 storage: Hydrocarbon volume is full pore-volume. + hydrocarbon = 1.0; + } this->hydrocarbonPoreVolume_[globalDofIdx] = pv * hydrocarbon; if (FluidSystem::phaseIsActive(oilPhaseIdx)) {