当前位置: 首页>>代码示例>>C++>>正文


C++ Params::approach方法代码示例

本文整理汇总了C++中Params::approach方法的典型用法代码示例。如果您正苦于以下问题:C++ Params::approach方法的具体用法?C++ Params::approach怎么用?C++ Params::approach使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Params的用法示例。


在下文中一共展示了Params::approach方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: updateHysteresis

    static void updateHysteresis(Params &params, 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;
        }
        }
    }
开发者ID:jokva,项目名称:opm-material,代码行数:30,代码来源:EclTwoPhaseMaterial.hpp

示例2: relativePermeabilities

    static void relativePermeabilities(ContainerT &values,
                                       const Params &params,
                                       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;
        }
    }
开发者ID:chflo,项目名称:opm-material,代码行数:30,代码来源:EclMultiplexerMaterial.hpp

示例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;
        }
    }
开发者ID:OPM,项目名称:opm-material,代码行数:32,代码来源:EclMultiplexerMaterial.hpp

示例4: capillaryPressures

    static void capillaryPressures(ContainerT &values,
                                   const Params &params,
                                   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;
        }

        }
    }
开发者ID:jokva,项目名称:opm-material,代码行数:39,代码来源:EclTwoPhaseMaterial.hpp

示例5: updateHysteresis

    static void updateHysteresis(Params &params, 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;
        }
    }
开发者ID:chflo,项目名称:opm-material,代码行数:24,代码来源:EclMultiplexerMaterial.hpp


注:本文中的Params::approach方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。