Avoid negative PCW for mixed-wet Pc curves
This commit is contained in:
parent
2d33b520f1
commit
d2b69158bd
@ -178,8 +178,8 @@ applySwatinit(unsigned elemIdx,
|
||||
|
||||
Scalar pcowAtSw = pc[oilPhaseIdx] - pc[waterPhaseIdx];
|
||||
constexpr const Scalar pcowAtSwThreshold = 1.0; //Pascal
|
||||
// avoid divison by very small number
|
||||
if (std::abs(pcowAtSw) > pcowAtSwThreshold) {
|
||||
// avoid divison by very small number and avoid negative PCW at connate Sw
|
||||
if (pcowAtSw > pcowAtSwThreshold) {
|
||||
// Scale max. capillary pressure to honor SWATINIT value
|
||||
Scalar newMaxPcow = elemScaledEpsInfo.maxPcow * (pcow/pcowAtSw);
|
||||
|
||||
@ -206,6 +206,8 @@ applySwatinit(unsigned elemIdx,
|
||||
*oilWaterEclEpsConfig_,
|
||||
EclTwoPhaseSystemType::OilWater);
|
||||
}
|
||||
// Find Sw from unscaled curve if PCW at connate Sw would be negative (i.e., do no respect SWATINIT in this case)
|
||||
if (pcowAtSw < 0.0) newSwatInit = true;
|
||||
}
|
||||
|
||||
return {Sw, newSwatInit};
|
||||
|
Loading…
Reference in New Issue
Block a user