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