mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-08 07:23:02 -06:00
fix for relative change calculation for gas-water system
This commit is contained in:
parent
25393cddee
commit
e25b78f106
@ -455,7 +455,10 @@ namespace Opm {
|
||||
oilSaturationNew -= saturationsNew[FluidSystem::waterPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx) && priVarsNew.primaryVarsMeaning() == PrimaryVariables::Sw_po_Sg) {
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx) &&
|
||||
FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx) &&
|
||||
priVarsNew.primaryVarsMeaning() == PrimaryVariables::Sw_po_Sg) {
|
||||
assert(Indices::compositionSwitchIdx >= 0 );
|
||||
saturationsNew[FluidSystem::gasPhaseIdx] = priVarsNew[Indices::compositionSwitchIdx];
|
||||
oilSaturationNew -= saturationsNew[FluidSystem::gasPhaseIdx];
|
||||
}
|
||||
@ -484,8 +487,10 @@ namespace Opm {
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx) &&
|
||||
FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx) &&
|
||||
priVarsOld.primaryVarsMeaning() == PrimaryVariables::Sw_po_Sg)
|
||||
{
|
||||
assert(Indices::compositionSwitchIdx >= 0 );
|
||||
saturationsOld[FluidSystem::gasPhaseIdx] = priVarsOld[Indices::compositionSwitchIdx];
|
||||
oilSaturationOld -= saturationsOld[FluidSystem::gasPhaseIdx];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user