mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-26 03:00:17 -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
|
||||
// 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
|
||||
if constexpr (waterEnabled)
|
||||
if constexpr (waterEnabled) {
|
||||
(*this)[Indices::waterSwitchIdx] = 1.0;
|
||||
assert(primaryVarsMeaningWater() == WaterMeaning::Sw);
|
||||
}
|
||||
// the hydrocarbon gas saturation is set to 0.0
|
||||
if constexpr (compositionSwitchEnabled)
|
||||
(*this)[Indices::compositionSwitchIdx] = 0.0;
|
||||
|
Loading…
Reference in New Issue
Block a user