From d9b981e0591cfc60dcf9801007c6cef995de6a50 Mon Sep 17 00:00:00 2001 From: hnil Date: Tue, 21 May 2019 22:33:14 +0200 Subject: [PATCH] made onephase water runs possible --- opm/models/blackoil/blackoilintensivequantities.hh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/opm/models/blackoil/blackoilintensivequantities.hh b/opm/models/blackoil/blackoilintensivequantities.hh index bd59dbec3..1f1ca165f 100644 --- a/opm/models/blackoil/blackoilintensivequantities.hh +++ b/opm/models/blackoil/blackoilintensivequantities.hh @@ -205,9 +205,13 @@ public: // update the Saturation functions for the blackoil solvent module. asImp_().solventPostSatFuncUpdate_(elemCtx, dofIdx, timeIdx); - const Evaluation& SoMax = - Opm::max(fluidState_.saturation(oilPhaseIdx), - elemCtx.problem().maxOilSaturation(globalSpaceIdx)); + Evaluation SoMax=0; + //const Evaluation& + if(FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)){ + SoMax = + Opm::max(fluidState_.saturation(oilPhaseIdx), + elemCtx.problem().maxOilSaturation(globalSpaceIdx)); + } // take the meaning of the switiching primary variable into account for the gas // and oil phase compositions @@ -287,7 +291,9 @@ public: typename FluidSystem::template ParameterCache paramCache; paramCache.setRegionIndex(pvtRegionIdx); - paramCache.setMaxOilSat(SoMax); + if(FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)){ + paramCache.setMaxOilSat(SoMax); + } paramCache.updateAll(fluidState_); // compute the phase densities and transform the phase permeabilities into mobilities