mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fix for gas-water system
This commit is contained in:
parent
abcf933673
commit
abd775fe21
@ -86,8 +86,10 @@ class BlackOilPrimaryVariables : public FvBasePrimaryVariables<TypeTag>
|
||||
enum { pressureSwitchIdx = Indices::pressureSwitchIdx };
|
||||
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 gasEnabled = Indices::gasEnabled;
|
||||
static const bool oilEnabled = Indices::oilEnabled;
|
||||
|
||||
// phase indices from the fluid system
|
||||
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
|
||||
@ -315,7 +317,13 @@ public:
|
||||
else if (primaryVarsMeaning() == Sw_po_Sg) {
|
||||
if (waterEnabled)
|
||||
(*this)[waterSaturationIdx] = FsToolbox::value(fluidState.saturation(waterPhaseIdx));
|
||||
if (gasEnabled && waterEnabled && !oilEnabled) {
|
||||
//-> water-gas system
|
||||
(*this)[pressureSwitchIdx] = FsToolbox::value(fluidState.pressure(gasPhaseIdx));
|
||||
}
|
||||
else if (oilEnabled) {
|
||||
(*this)[pressureSwitchIdx] = FsToolbox::value(fluidState.pressure(oilPhaseIdx));
|
||||
}
|
||||
if( compositionSwitchEnabled )
|
||||
(*this)[compositionSwitchIdx] = FsToolbox::value(fluidState.saturation(gasPhaseIdx));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user