mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-01 03:56:55 -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 So3 = 1.0 - Sg - solventSaturation_();
|
||||
|
||||
//water disappears
|
||||
if(Sw < -eps && So3 > 0.0 && Sg > 0.0 && FluidSystem::enableVaporizedWater()) {
|
||||
Scalar po = (*this)[Indices::pressureSwitchIdx];
|
||||
if(Sw < -eps && FluidSystem::enableVaporizedWater()) {
|
||||
Scalar pg = 0.0;
|
||||
Scalar T = asImp_().temperature_();
|
||||
std::array<Scalar, numPhases> pC = { 0.0 };
|
||||
const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx);
|
||||
computeCapillaryPressures_(pC, So3, Sg + solventSaturation_(), /*Sw=*/ 0.0, matParams);
|
||||
Scalar pg = po + (pC[gasPhaseIdx] - pC[oilPhaseIdx]);
|
||||
if constexpr (waterEnabled && gasEnabled && !oilEnabled) {
|
||||
// twophase water-gas system
|
||||
pg = (*this)[Indices::pressureSwitchIdx];
|
||||
}
|
||||
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_,
|
||||
T,
|
||||
pg);
|
||||
|
Loading…
Reference in New Issue
Block a user