mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fix gaswater case for handling of only water case
This commit is contained in:
parent
a8fa4ee2e8
commit
ed732c4c32
@ -548,11 +548,16 @@ public:
|
|||||||
|
|
||||||
// special case cells with almost only water
|
// special case cells with almost only water
|
||||||
// use both saturations (if the phase is enabled)
|
// use both saturations (if the phase is enabled)
|
||||||
if (sw >= thresholdWaterFilledCell) {
|
// if dissolved gas in water is enabled we shouldn't enter
|
||||||
|
// here but instead switch to Rsw as primary variable
|
||||||
|
// as sw >= 1.0 -> gas <= 0 (i.e. gas phase disappears)
|
||||||
|
if (sw >= thresholdWaterFilledCell && !FluidSystem::enableDissolvedGasInWater()) {
|
||||||
|
|
||||||
// make sure water saturations does not exceed 1.0
|
// make sure water saturations does not exceed 1.0
|
||||||
if constexpr (waterEnabled)
|
if constexpr (waterEnabled) {
|
||||||
(*this)[Indices::waterSwitchIdx] = 1.0;
|
(*this)[Indices::waterSwitchIdx] = 1.0;
|
||||||
|
assert(primaryVarsMeaningWater() == WaterMeaning::Sw);
|
||||||
|
}
|
||||||
// the hydrocarbon gas saturation is set to 0.0
|
// the hydrocarbon gas saturation is set to 0.0
|
||||||
if constexpr (compositionSwitchEnabled)
|
if constexpr (compositionSwitchEnabled)
|
||||||
(*this)[Indices::compositionSwitchIdx] = 0.0;
|
(*this)[Indices::compositionSwitchIdx] = 0.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user