made onephase water runs possible

This commit is contained in:
hnil 2019-05-21 22:33:14 +02:00 committed by Atgeirr Flø Rasmussen
parent c1640aaf3e
commit d9b981e059

View File

@ -205,9 +205,13 @@ public:
// update the Saturation functions for the blackoil solvent module. // update the Saturation functions for the blackoil solvent module.
asImp_().solventPostSatFuncUpdate_(elemCtx, dofIdx, timeIdx); asImp_().solventPostSatFuncUpdate_(elemCtx, dofIdx, timeIdx);
const Evaluation& SoMax = Evaluation SoMax=0;
Opm::max(fluidState_.saturation(oilPhaseIdx), //const Evaluation&
elemCtx.problem().maxOilSaturation(globalSpaceIdx)); 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 // take the meaning of the switiching primary variable into account for the gas
// and oil phase compositions // and oil phase compositions
@ -287,7 +291,9 @@ public:
typename FluidSystem::template ParameterCache<Evaluation> paramCache; typename FluidSystem::template ParameterCache<Evaluation> paramCache;
paramCache.setRegionIndex(pvtRegionIdx); paramCache.setRegionIndex(pvtRegionIdx);
paramCache.setMaxOilSat(SoMax); if(FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)){
paramCache.setMaxOilSat(SoMax);
}
paramCache.updateAll(fluidState_); paramCache.updateAll(fluidState_);
// compute the phase densities and transform the phase permeabilities into mobilities // compute the phase densities and transform the phase permeabilities into mobilities