commit
961ddcbd37
@ -448,10 +448,11 @@ private:
|
|||||||
+ (oilEnabled?1:0)
|
+ (oilEnabled?1:0)
|
||||||
+ (waterEnabled?1:0);
|
+ (waterEnabled?1:0);
|
||||||
|
|
||||||
if (numEnabled < 2)
|
if (numEnabled == 0) {
|
||||||
throw std::runtime_error("At least two fluid phases must be enabled. (Is: "+std::to_string(numEnabled)+")");
|
throw std::runtime_error("At least one fluid phase must be enabled. (Is: "+std::to_string(numEnabled)+")");
|
||||||
|
} else if (numEnabled == 1) {
|
||||||
if (numEnabled == 2) {
|
threePhaseApproach_ = Opm::EclMultiplexerApproach::EclOnePhaseApproach;
|
||||||
|
} else if ( numEnabled == 2) {
|
||||||
threePhaseApproach_ = Opm::EclTwoPhaseApproach;
|
threePhaseApproach_ = Opm::EclTwoPhaseApproach;
|
||||||
if (!gasEnabled)
|
if (!gasEnabled)
|
||||||
twoPhaseApproach_ = Opm::EclTwoPhaseOilWater;
|
twoPhaseApproach_ = Opm::EclTwoPhaseOilWater;
|
||||||
@ -1051,6 +1052,11 @@ private:
|
|||||||
realParams.finalize();
|
realParams.finalize();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case EclOnePhaseApproach: {
|
||||||
|
// Nothing to do, no parameters.
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,6 +155,10 @@ public:
|
|||||||
params.template getRealParams<EclTwoPhaseApproach>(),
|
params.template getRealParams<EclTwoPhaseApproach>(),
|
||||||
fluidState);
|
fluidState);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EclOnePhaseApproach:
|
||||||
|
values[0] = 0.0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,6 +192,10 @@ public:
|
|||||||
TwoPhaseMaterial::oilWaterHysteresisParams(pcSwMdc, krnSwMdc,
|
TwoPhaseMaterial::oilWaterHysteresisParams(pcSwMdc, krnSwMdc,
|
||||||
params.template getRealParams<EclTwoPhaseApproach>());
|
params.template getRealParams<EclTwoPhaseApproach>());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EclOnePhaseApproach:
|
||||||
|
// Do nothing.
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,6 +229,10 @@ public:
|
|||||||
TwoPhaseMaterial::setOilWaterHysteresisParams(pcSwMdc, krnSwMdc,
|
TwoPhaseMaterial::setOilWaterHysteresisParams(pcSwMdc, krnSwMdc,
|
||||||
params.template getRealParams<EclTwoPhaseApproach>());
|
params.template getRealParams<EclTwoPhaseApproach>());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EclOnePhaseApproach:
|
||||||
|
// Do nothing.
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,6 +266,10 @@ public:
|
|||||||
TwoPhaseMaterial::gasOilHysteresisParams(pcSwMdc, krnSwMdc,
|
TwoPhaseMaterial::gasOilHysteresisParams(pcSwMdc, krnSwMdc,
|
||||||
params.template getRealParams<EclTwoPhaseApproach>());
|
params.template getRealParams<EclTwoPhaseApproach>());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EclOnePhaseApproach:
|
||||||
|
// Do nothing.
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,6 +303,10 @@ public:
|
|||||||
TwoPhaseMaterial::setGasOilHysteresisParams(pcSwMdc, krnSwMdc,
|
TwoPhaseMaterial::setGasOilHysteresisParams(pcSwMdc, krnSwMdc,
|
||||||
params.template getRealParams<EclTwoPhaseApproach>());
|
params.template getRealParams<EclTwoPhaseApproach>());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EclOnePhaseApproach:
|
||||||
|
// Do nothing.
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -407,7 +427,16 @@ public:
|
|||||||
params.template getRealParams<EclTwoPhaseApproach>(),
|
params.template getRealParams<EclTwoPhaseApproach>(),
|
||||||
fluidState);
|
fluidState);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EclOnePhaseApproach:
|
||||||
|
values[0] = 1.0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw std::logic_error("Not implemented: relativePermeabilities() option for unknown EclMultiplexerApproach (="
|
||||||
|
+ std::to_string(params.approach()) + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -44,7 +44,8 @@ enum EclMultiplexerApproach {
|
|||||||
EclDefaultApproach,
|
EclDefaultApproach,
|
||||||
EclStone1Approach,
|
EclStone1Approach,
|
||||||
EclStone2Approach,
|
EclStone2Approach,
|
||||||
EclTwoPhaseApproach
|
EclTwoPhaseApproach,
|
||||||
|
EclOnePhaseApproach
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -125,6 +126,10 @@ public:
|
|||||||
case EclTwoPhaseApproach:
|
case EclTwoPhaseApproach:
|
||||||
realParams_ = ParamPointerType(new TwoPhaseParams, Deleter< TwoPhaseParams > () );
|
realParams_ = ParamPointerType(new TwoPhaseParams, Deleter< TwoPhaseParams > () );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EclOnePhaseApproach:
|
||||||
|
// Do nothing, no parameters.
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ public:
|
|||||||
setReservoirTemperature(eclState.getTableManager().rtemp());
|
setReservoirTemperature(eclState.getTableManager().rtemp());
|
||||||
|
|
||||||
// this fluidsystem only supports two or three phases
|
// this fluidsystem only supports two or three phases
|
||||||
assert(numActivePhases_ >= 2 && numActivePhases_ <= 3);
|
assert(numActivePhases_ >= 1 && numActivePhases_ <= 3);
|
||||||
|
|
||||||
setEnableDissolvedGas(deck.hasKeyword("DISGAS"));
|
setEnableDissolvedGas(deck.hasKeyword("DISGAS"));
|
||||||
setEnableVaporizedOil(deck.hasKeyword("VAPOIL"));
|
setEnableVaporizedOil(deck.hasKeyword("VAPOIL"));
|
||||||
|
@ -57,11 +57,14 @@ public:
|
|||||||
{
|
{
|
||||||
// THCONR + THCONSF approach.
|
// THCONR + THCONSF approach.
|
||||||
Scalar lambdaRef = params.referenceTotalThermalConductivity();
|
Scalar lambdaRef = params.referenceTotalThermalConductivity();
|
||||||
Scalar alpha = params.dTotalThermalConductivity_dSg();
|
|
||||||
|
|
||||||
static constexpr int gasPhaseIdx = FluidSystem::gasPhaseIdx;
|
static constexpr int gasPhaseIdx = FluidSystem::gasPhaseIdx;
|
||||||
const Evaluation& Sg = Opm::decay<Evaluation>(fluidState.saturation(gasPhaseIdx));
|
if (FluidSystem::phaseIsActive(gasPhaseIdx)) {
|
||||||
return lambdaRef*(1.0 - alpha*Sg);
|
Scalar alpha = params.dTotalThermalConductivity_dSg();
|
||||||
|
const Evaluation& Sg = Opm::decay<Evaluation>(fluidState.saturation(gasPhaseIdx));
|
||||||
|
return lambdaRef*(1.0 - alpha*Sg);
|
||||||
|
} else {
|
||||||
|
return lambdaRef;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
Loading…
Reference in New Issue
Block a user