Merge d2b69158bd
into 9a0ccfd853
This commit is contained in:
commit
0ab3bcd3f1
@ -178,8 +178,8 @@ applySwatinit(unsigned elemIdx,
|
|||||||
|
|
||||||
Scalar pcowAtSw = pc[oilPhaseIdx] - pc[waterPhaseIdx];
|
Scalar pcowAtSw = pc[oilPhaseIdx] - pc[waterPhaseIdx];
|
||||||
constexpr const Scalar pcowAtSwThreshold = 1.0; //Pascal
|
constexpr const Scalar pcowAtSwThreshold = 1.0; //Pascal
|
||||||
// avoid divison by very small number
|
// avoid divison by very small number and avoid negative PCW at connate Sw
|
||||||
if (std::abs(pcowAtSw) > pcowAtSwThreshold) {
|
if (pcowAtSw > pcowAtSwThreshold) {
|
||||||
// Scale max. capillary pressure to honor SWATINIT value
|
// Scale max. capillary pressure to honor SWATINIT value
|
||||||
Scalar newMaxPcow = elemScaledEpsInfo.maxPcow * (pcow/pcowAtSw);
|
Scalar newMaxPcow = elemScaledEpsInfo.maxPcow * (pcow/pcowAtSw);
|
||||||
|
|
||||||
@ -206,6 +206,8 @@ applySwatinit(unsigned elemIdx,
|
|||||||
*oilWaterEclEpsConfig_,
|
*oilWaterEclEpsConfig_,
|
||||||
EclTwoPhaseSystemType::OilWater);
|
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};
|
return {Sw, newSwatInit};
|
||||||
|
Loading…
Reference in New Issue
Block a user