本文整理汇总了C++中Params::approach方法的典型用法代码示例。如果您正苦于以下问题:C++ Params::approach方法的具体用法?C++ Params::approach怎么用?C++ Params::approach使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Params
的用法示例。
在下文中一共展示了Params::approach方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateHysteresis
static void updateHysteresis(Params ¶ms, const FluidState &fluidState)
{
typedef MathToolbox<typename FluidState::Scalar> FsToolbox;
switch (params.approach()) {
case EclTwoPhaseGasOil: {
Scalar So = FsToolbox::scalarValue(fluidState.saturation(oilPhaseIdx));
params.oilWaterParams().update(/*pcSw=*/0.0, /*krwSw=*/0.0, /*krnSw=*/0.0);
params.gasOilParams().update(/*pcSw=*/So, /*krwSw=*/So, /*krnSw=*/So);
break;
}
case EclTwoPhaseOilWater: {
Scalar Sw = FsToolbox::scalarValue(fluidState.saturation(waterPhaseIdx));
params.oilWaterParams().update(/*pcSw=*/Sw, /*krwSw=*/Sw, /*krnSw=*/Sw);
params.gasOilParams().update(/*pcSw=*/0.0, /*krwSw=*/0.0, /*krnSw=*/0.0);
break;
}
case EclTwoPhaseGasWater: {
Scalar Sw = FsToolbox::scalarValue(fluidState.saturation(waterPhaseIdx));
params.oilWaterParams().update(/*pcSw=*/Sw, /*krwSw=*/Sw, /*krnSw=*/0);
params.gasOilParams().update(/*pcSw=*/1.0, /*krwSw=*/0.0, /*krnSw=*/Sw);
break;
}
}
}
示例2: relativePermeabilities
static void relativePermeabilities(ContainerT &values,
const Params ¶ms,
const FluidState &fluidState)
{
switch (params.approach()) {
case EclStone1Approach:
Stone1Material::relativePermeabilities(values,
params.template getRealParams<EclStone1Approach>(),
fluidState);
break;
case EclStone2Approach:
Stone2Material::relativePermeabilities(values,
params.template getRealParams<EclStone2Approach>(),
fluidState);
break;
case EclDefaultApproach:
DefaultMaterial::relativePermeabilities(values,
params.template getRealParams<EclDefaultApproach>(),
fluidState);
break;
case EclTwoPhaseApproach:
TwoPhaseMaterial::relativePermeabilities(values,
params.template getRealParams<EclTwoPhaseApproach>(),
fluidState);
break;
}
}
示例3: setGasOilHysteresisParams
/*
* Hysteresis parameters for gas-oil
* @see EclHysteresisTwoPhaseLawParams::pcSwMdc(...)
* @see EclHysteresisTwoPhaseLawParams::krnSwMdc(...)
* \param params Parameters
*/
static void setGasOilHysteresisParams(const Scalar& pcSwMdc,
const Scalar& krnSwMdc,
Params& params)
{
switch (params.approach()) {
case EclStone1Approach:
Stone1Material::setGasOilHysteresisParams(pcSwMdc, krnSwMdc,
params.template getRealParams<EclStone1Approach>());
break;
case EclStone2Approach:
Stone2Material::setGasOilHysteresisParams(pcSwMdc, krnSwMdc,
params.template getRealParams<EclStone2Approach>());
break;
case EclDefaultApproach:
DefaultMaterial::setGasOilHysteresisParams(pcSwMdc, krnSwMdc,
params.template getRealParams<EclDefaultApproach>());
break;
case EclTwoPhaseApproach:
TwoPhaseMaterial::setGasOilHysteresisParams(pcSwMdc, krnSwMdc,
params.template getRealParams<EclTwoPhaseApproach>());
break;
}
}
示例4: capillaryPressures
static void capillaryPressures(ContainerT &values,
const Params ¶ms,
const FluidState &fluidState)
{
typedef typename std::remove_reference<decltype(values[0])>::type Evaluation;
typedef MathToolbox<typename FluidState::Scalar> FsToolbox;
switch (params.approach()) {
case EclTwoPhaseGasOil: {
const Evaluation& So =
FsToolbox::template decay<Evaluation>(fluidState.saturation(oilPhaseIdx));
values[oilPhaseIdx] = 0.0;
values[gasPhaseIdx] = GasOilMaterialLaw::twoPhaseSatPcnw(params.gasOilParams(), So);
break;
}
case EclTwoPhaseOilWater: {
const Evaluation& Sw =
FsToolbox::template decay<Evaluation>(fluidState.saturation(waterPhaseIdx));
values[waterPhaseIdx] = 0.0;
values[oilPhaseIdx] = OilWaterMaterialLaw::twoPhaseSatPcnw(params.oilWaterParams(), Sw);
break;
}
case EclTwoPhaseGasWater: {
const Evaluation& Sw =
FsToolbox::template decay<Evaluation>(fluidState.saturation(waterPhaseIdx));
values[waterPhaseIdx] = 0.0;
values[gasPhaseIdx] =
OilWaterMaterialLaw::twoPhaseSatPcnw(params.oilWaterParams(), Sw)
+ GasOilMaterialLaw::twoPhaseSatPcnw(params.gasOilParams(), 0.0);
break;
}
}
}
示例5: updateHysteresis
static void updateHysteresis(Params ¶ms, const FluidState &fluidState)
{
switch (params.approach()) {
case EclStone1Approach:
Stone1Material::updateHysteresis(params.template getRealParams<EclStone1Approach>(),
fluidState);
break;
case EclStone2Approach:
Stone2Material::updateHysteresis(params.template getRealParams<EclStone2Approach>(),
fluidState);
break;
case EclDefaultApproach:
DefaultMaterial::updateHysteresis(params.template getRealParams<EclDefaultApproach>(),
fluidState);
break;
case EclTwoPhaseApproach:
TwoPhaseMaterial::updateHysteresis(params.template getRealParams<EclTwoPhaseApproach>(),
fluidState);
break;
}
}