mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fix initialization for the single phase cases
This commit is contained in:
parent
390a5a4b82
commit
c316865681
@ -2702,7 +2702,7 @@ private:
|
|||||||
//////
|
//////
|
||||||
// set phase pressures
|
// set phase pressures
|
||||||
//////
|
//////
|
||||||
Scalar pressure = pressureData[dofIdx]; // oil pressure or gas pressure if oil is not enabled
|
Scalar pressure = pressureData[dofIdx]; // oil pressure (or gas pressure for water-gas system or water pressure for single phase)
|
||||||
|
|
||||||
// this assumes that capillary pressures only depend on the phase saturations
|
// this assumes that capillary pressures only depend on the phase saturations
|
||||||
// and possibly on temperature. (this is always the case for ECL problems.)
|
// and possibly on temperature. (this is always the case for ECL problems.)
|
||||||
@ -2719,6 +2719,9 @@ private:
|
|||||||
dofFluidState.setPressure(phaseIdx, pressure + (pc[phaseIdx] - pc[oilPhaseIdx]));
|
dofFluidState.setPressure(phaseIdx, pressure + (pc[phaseIdx] - pc[oilPhaseIdx]));
|
||||||
else if (Indices::gasEnabled)
|
else if (Indices::gasEnabled)
|
||||||
dofFluidState.setPressure(phaseIdx, pressure + (pc[phaseIdx] - pc[gasPhaseIdx]));
|
dofFluidState.setPressure(phaseIdx, pressure + (pc[phaseIdx] - pc[gasPhaseIdx]));
|
||||||
|
else if (Indices::waterEnabled)
|
||||||
|
//single (water) phase
|
||||||
|
dofFluidState.setPressure(phaseIdx, pressure);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FluidSystem::enableDissolvedGas())
|
if (FluidSystem::enableDissolvedGas())
|
||||||
|
Loading…
Reference in New Issue
Block a user