EclTwoPhaseApproach: reduce redundancy in entries
we already know it's 'ecl and twophase'
This commit is contained in:
parent
ad69ef3ac4
commit
603ca3476a
@ -747,11 +747,11 @@ private:
|
||||
} else if ( numEnabled == 2) {
|
||||
threePhaseApproach_ = EclMultiplexerApproach::TwoPhase;
|
||||
if (!gasEnabled)
|
||||
twoPhaseApproach_ = EclTwoPhaseApproach::EclTwoPhaseOilWater;
|
||||
twoPhaseApproach_ = EclTwoPhaseApproach::OilWater;
|
||||
else if (!oilEnabled)
|
||||
twoPhaseApproach_ = EclTwoPhaseApproach::EclTwoPhaseGasWater;
|
||||
twoPhaseApproach_ = EclTwoPhaseApproach::GasWater;
|
||||
else if (!waterEnabled)
|
||||
twoPhaseApproach_ = EclTwoPhaseApproach::EclTwoPhaseGasOil;
|
||||
twoPhaseApproach_ = EclTwoPhaseApproach::GasOil;
|
||||
}
|
||||
else {
|
||||
assert(numEnabled == 3);
|
||||
@ -1268,7 +1268,7 @@ private:
|
||||
|
||||
EclMultiplexerApproach threePhaseApproach_ = EclMultiplexerApproach::Default;
|
||||
// this attribute only makes sense for twophase simulations!
|
||||
enum EclTwoPhaseApproach twoPhaseApproach_ = EclTwoPhaseApproach::EclTwoPhaseGasOil;
|
||||
enum EclTwoPhaseApproach twoPhaseApproach_ = EclTwoPhaseApproach::GasOil;
|
||||
|
||||
std::vector<MaterialLawParams> materialLawParams_;
|
||||
|
||||
|
@ -133,7 +133,7 @@ public:
|
||||
using Evaluation = typename std::remove_reference<decltype(values[0])>::type;
|
||||
|
||||
switch (params.approach()) {
|
||||
case EclTwoPhaseApproach::EclTwoPhaseGasOil: {
|
||||
case EclTwoPhaseApproach::GasOil: {
|
||||
const Evaluation& So =
|
||||
decay<Evaluation>(fluidState.saturation(oilPhaseIdx));
|
||||
|
||||
@ -142,7 +142,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case EclTwoPhaseApproach::EclTwoPhaseOilWater: {
|
||||
case EclTwoPhaseApproach::OilWater: {
|
||||
const Evaluation& Sw =
|
||||
decay<Evaluation>(fluidState.saturation(waterPhaseIdx));
|
||||
|
||||
@ -151,7 +151,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case EclTwoPhaseApproach::EclTwoPhaseGasWater: {
|
||||
case EclTwoPhaseApproach::GasWater: {
|
||||
const Evaluation& Sw =
|
||||
decay<Evaluation>(fluidState.saturation(waterPhaseIdx));
|
||||
|
||||
@ -321,7 +321,7 @@ public:
|
||||
using Evaluation = typename std::remove_reference<decltype(values[0])>::type;
|
||||
|
||||
switch (params.approach()) {
|
||||
case EclTwoPhaseApproach::EclTwoPhaseGasOil: {
|
||||
case EclTwoPhaseApproach::GasOil: {
|
||||
const Evaluation& So =
|
||||
decay<Evaluation>(fluidState.saturation(oilPhaseIdx));
|
||||
|
||||
@ -330,7 +330,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case EclTwoPhaseApproach::EclTwoPhaseOilWater: {
|
||||
case EclTwoPhaseApproach::OilWater: {
|
||||
const Evaluation& Sw =
|
||||
decay<Evaluation>(fluidState.saturation(waterPhaseIdx));
|
||||
|
||||
@ -339,7 +339,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case EclTwoPhaseApproach::EclTwoPhaseGasWater: {
|
||||
case EclTwoPhaseApproach::GasWater: {
|
||||
const Evaluation& Sw =
|
||||
decay<Evaluation>(fluidState.saturation(waterPhaseIdx));
|
||||
|
||||
@ -393,21 +393,21 @@ public:
|
||||
static void updateHysteresis(Params& params, const FluidState& fluidState)
|
||||
{
|
||||
switch (params.approach()) {
|
||||
case EclTwoPhaseApproach::EclTwoPhaseGasOil: {
|
||||
case EclTwoPhaseApproach::GasOil: {
|
||||
Scalar So = scalarValue(fluidState.saturation(oilPhaseIdx));
|
||||
|
||||
params.gasOilParams().update(/*pcSw=*/So, /*krwSw=*/So, /*krnSw=*/So);
|
||||
break;
|
||||
}
|
||||
|
||||
case EclTwoPhaseApproach::EclTwoPhaseOilWater: {
|
||||
case EclTwoPhaseApproach::OilWater: {
|
||||
Scalar Sw = scalarValue(fluidState.saturation(waterPhaseIdx));
|
||||
|
||||
params.oilWaterParams().update(/*pcSw=*/Sw, /*krwSw=*/Sw, /*krnSw=*/Sw);
|
||||
break;
|
||||
}
|
||||
|
||||
case EclTwoPhaseApproach::EclTwoPhaseGasWater: {
|
||||
case EclTwoPhaseApproach::GasWater: {
|
||||
Scalar Sw = scalarValue(fluidState.saturation(waterPhaseIdx));
|
||||
|
||||
params.gasWaterParams().update(/*pcSw=*/1.0, /*krwSw=*/0.0, /*krnSw=*/Sw);
|
||||
|
@ -34,9 +34,9 @@
|
||||
namespace Opm {
|
||||
|
||||
enum class EclTwoPhaseApproach {
|
||||
EclTwoPhaseGasOil,
|
||||
EclTwoPhaseOilWater,
|
||||
EclTwoPhaseGasWater
|
||||
GasOil,
|
||||
OilWater,
|
||||
GasWater
|
||||
};
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user