fix for gas-water system, set gas saturation

This commit is contained in:
Paul Egberts 2021-08-01 21:20:35 +02:00
parent abd775fe21
commit a217974f9d

View File

@ -96,8 +96,10 @@ class BlackOilIntensiveQuantities
enum { dimWorld = GridView::dimensionworld }; enum { dimWorld = GridView::dimensionworld };
enum { compositionSwitchIdx = Indices::compositionSwitchIdx }; enum { compositionSwitchIdx = Indices::compositionSwitchIdx };
static const bool compositionSwitchEnabled = Indices::gasEnabled; static const bool compositionSwitchEnabled = Indices::compositionSwitchIdx >= 0;
static const bool waterEnabled = Indices::waterEnabled; static const bool waterEnabled = Indices::waterEnabled;
static const bool gasEnabled = Indices::gasEnabled;
static const bool oilEnabled = Indices::oilEnabled;
using Toolbox = MathToolbox<Evaluation>; using Toolbox = MathToolbox<Evaluation>;
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>; using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
@ -167,6 +169,9 @@ public:
Sg = 0.0; Sg = 0.0;
} }
} }
if (gasEnabled && waterEnabled && !oilEnabled) {
Sg = 1.0 - Sw;
}
Valgrind::CheckDefined(Sg); Valgrind::CheckDefined(Sg);
Valgrind::CheckDefined(Sw); Valgrind::CheckDefined(Sw);