Merge pull request #796 from totto82/2p_solvent

Support gas-water-solvent
This commit is contained in:
Tor Harald Sandve 2023-05-23 15:05:40 +02:00 committed by GitHub
commit 58f985a741

View File

@ -226,8 +226,13 @@ public:
Evaluation So = 1.0 - Sw - Sg;
// deal with solvent
if constexpr (enableSolvent)
So -= priVars.makeEvaluation(Indices::solventSaturationIdx, timeIdx);
if constexpr (enableSolvent) {
if (FluidSystem::phaseIsActive(oilPhaseIdx)) {
So -= priVars.makeEvaluation(Indices::solventSaturationIdx, timeIdx);
} else if (FluidSystem::phaseIsActive(gasPhaseIdx)) {
Sg -= priVars.makeEvaluation(Indices::solventSaturationIdx, timeIdx);
}
}
if (FluidSystem::phaseIsActive(waterPhaseIdx))
fluidState_.setSaturation(waterPhaseIdx, Sw);