mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fix for gaswater system with water evaporation
This commit is contained in:
parent
6fe6fbf141
commit
45a968fe46
@ -498,14 +498,23 @@ public:
|
|||||||
|
|
||||||
Scalar So = 1.0 - Sw - Sg - solventSaturation_();
|
Scalar So = 1.0 - Sw - Sg - solventSaturation_();
|
||||||
Scalar So3 = 1.0 - Sg - solventSaturation_();
|
Scalar So3 = 1.0 - Sg - solventSaturation_();
|
||||||
|
|
||||||
//water disappears
|
//water disappears
|
||||||
if(Sw < -eps && So3 > 0.0 && Sg > 0.0 && FluidSystem::enableVaporizedWater()) {
|
if(Sw < -eps && FluidSystem::enableVaporizedWater()) {
|
||||||
Scalar po = (*this)[Indices::pressureSwitchIdx];
|
Scalar pg = 0.0;
|
||||||
Scalar T = asImp_().temperature_();
|
Scalar T = asImp_().temperature_();
|
||||||
std::array<Scalar, numPhases> pC = { 0.0 };
|
if constexpr (waterEnabled && gasEnabled && !oilEnabled) {
|
||||||
const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx);
|
// twophase water-gas system
|
||||||
computeCapillaryPressures_(pC, So3, Sg + solventSaturation_(), /*Sw=*/ 0.0, matParams);
|
pg = (*this)[Indices::pressureSwitchIdx];
|
||||||
Scalar pg = po + (pC[gasPhaseIdx] - pC[oilPhaseIdx]);
|
}
|
||||||
|
else if (So3 > 0.0 && Sg > 0.0) {
|
||||||
|
// threephase case
|
||||||
|
std::array<Scalar, numPhases> pC = { 0.0 };
|
||||||
|
const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx);
|
||||||
|
computeCapillaryPressures_(pC, So3, Sg + solventSaturation_(), /*Sw=*/ 0.0, matParams);
|
||||||
|
Scalar po = (*this)[Indices::pressureSwitchIdx];
|
||||||
|
pg = po + (pC[gasPhaseIdx] - pC[oilPhaseIdx]);
|
||||||
|
}
|
||||||
Scalar RvwSat = FluidSystem::gasPvt().saturatedWaterVaporizationFactor(pvtRegionIdx_,
|
Scalar RvwSat = FluidSystem::gasPvt().saturatedWaterVaporizationFactor(pvtRegionIdx_,
|
||||||
T,
|
T,
|
||||||
pg);
|
pg);
|
||||||
|
Loading…
Reference in New Issue
Block a user