本文整理汇总了C++中Params::Sogcr方法的典型用法代码示例。如果您正苦于以下问题:C++ Params::Sogcr方法的具体用法?C++ Params::Sogcr怎么用?C++ Params::Sogcr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Params
的用法示例。
在下文中一共展示了Params::Sogcr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: krn
static Evaluation krn(const Params ¶ms,
const FluidState &fluidState)
{
typedef MathToolbox<Evaluation> Toolbox;
typedef MathToolbox<typename FluidState::Scalar> FsToolbox;
// the Eclipse docu is inconsistent here: In some places the connate water
// saturation is represented by "Swl", in others "Swco" is used.
Scalar Swco = params.Swl();
Scalar Sowcr = params.Sowcr();
Scalar Sogcr = params.Sogcr();
Scalar Som = std::min(Sowcr, Sogcr); // minimum residual oil saturation
Scalar eta = params.eta(); // exponent of the beta term
const Evaluation& Sw = FsToolbox::template toLhs<Evaluation>(fluidState.saturation(waterPhaseIdx));
const Evaluation& So = FsToolbox::template toLhs<Evaluation>(fluidState.saturation(oilPhaseIdx));
const Evaluation& Sg = FsToolbox::template toLhs<Evaluation>(fluidState.saturation(gasPhaseIdx));
Evaluation SSw;
if (Sw > Swco)
SSw = (Sw - Swco)/(1 - Swco - Som);
else
SSw = 0.0;
Evaluation SSo;
if (So > Som)
SSo = (So - Som)/(1 - Swco - Som);
else
SSo = 0.0;
Evaluation SSg = Sg/(1 - Swco - Som);
Scalar krocw = OilWaterMaterialLaw::twoPhaseSatKrn(params.oilWaterParams(), Swco);
Evaluation krow = OilWaterMaterialLaw::twoPhaseSatKrn(params.oilWaterParams(), Sw);
Evaluation krog = GasOilMaterialLaw::twoPhaseSatKrw(params.gasOilParams(), 1 - Sg);
Evaluation beta = Toolbox::pow(SSo/((1 - SSw)*(1 - SSg)), eta);
return beta*krow*krog/krocw;
}