fix to avoid reading gaswater parameters if oil is present
This commit is contained in:
parent
809c1d3f1b
commit
249983c52a
@ -241,9 +241,7 @@ public:
|
||||
this->enableKrwScaling_ = hasKR("W") || this->enableThreePointKrwScaling();
|
||||
this->enablePcScaling_ = hasPC("W") || fp.has_double("SWATINIT");
|
||||
}
|
||||
else {
|
||||
assert(twoPhaseSystemType == EclGasOilSystem);
|
||||
|
||||
else if (twoPhaseSystemType == EclGasOilSystem) {
|
||||
this->setEnableThreePointKrwScaling(hasKR("ORG"));
|
||||
this->setEnableThreePointKrnScaling(hasKR("GR"));
|
||||
|
||||
@ -251,6 +249,10 @@ public:
|
||||
this->enableKrwScaling_ = hasKR("O") || this->enableThreePointKrwScaling();
|
||||
this->enablePcScaling_ = hasPC("G");
|
||||
}
|
||||
else {
|
||||
assert(twoPhaseSystemType == EclGasWaterSystem);
|
||||
//TODO enable endpoint scaling for gaswater system
|
||||
}
|
||||
|
||||
if (enablePcScaling_ && enableLeverettScaling_) {
|
||||
throw std::runtime_error {
|
||||
|
@ -367,7 +367,7 @@ public:
|
||||
EclOilWaterSystem);
|
||||
}
|
||||
|
||||
if (hasGas && hasWater) {
|
||||
if (hasGas && hasWater && !hasOil) {
|
||||
auto gasWaterDrainParams = std::make_shared<GasWaterEpsTwoPhaseParams>();
|
||||
gasWaterDrainParams->setConfig(gasWaterConfig);
|
||||
gasWaterDrainParams->setUnscaledPoints(gasWaterUnscaledPointsVector_[satRegionIdx]);
|
||||
@ -410,7 +410,7 @@ public:
|
||||
EclGasOilSystem);
|
||||
}
|
||||
|
||||
if (hasGas && hasWater) {
|
||||
if (hasGas && hasWater && !hasOil) {
|
||||
auto gasWaterImbParamsHyst = std::make_shared<GasWaterEpsTwoPhaseParams>();
|
||||
gasWaterImbParamsHyst->setConfig(gasWaterConfig);
|
||||
gasWaterImbParamsHyst->setUnscaledPoints(gasWaterUnscaledPointsVector_[imbRegionIdx]);
|
||||
@ -430,7 +430,7 @@ public:
|
||||
if (hasOil && hasWater)
|
||||
oilWaterParams[elemIdx]->finalize();
|
||||
|
||||
if (hasGas && hasWater)
|
||||
if (hasGas && hasWater && !hasOil)
|
||||
gasWaterParams[elemIdx]->finalize();
|
||||
}
|
||||
|
||||
@ -952,8 +952,9 @@ private:
|
||||
const Opm::EclipseState& eclState,
|
||||
unsigned satRegionIdx)
|
||||
{
|
||||
if (!hasGas || !hasWater)
|
||||
// we don't read anything if either the gas or the water phase is not active
|
||||
//if (!hasGas || !hasWater)
|
||||
if (hasOil)
|
||||
// we don't read anything if oil is present
|
||||
return;
|
||||
|
||||
dest[satRegionIdx] = std::make_shared<GasWaterEffectiveTwoPhaseParams>();
|
||||
@ -1029,8 +1030,9 @@ private:
|
||||
const Opm::EclipseState& /* eclState */,
|
||||
unsigned satRegionIdx)
|
||||
{
|
||||
if (!hasGas || !hasWater)
|
||||
// we don't read anything if either the water or the oil phase is not active
|
||||
//if (!hasGas || !hasWater)
|
||||
if (hasOil)
|
||||
// we don't read anything if oil phase is active
|
||||
return;
|
||||
|
||||
dest[satRegionIdx] = std::make_shared<EclEpsScalingPoints<Scalar> >();
|
||||
|
Loading…
Reference in New Issue
Block a user