diff --git a/opm/material/common/MathToolbox.hpp b/opm/material/common/MathToolbox.hpp index dfbb9c976..64875a5f7 100644 --- a/opm/material/common/MathToolbox.hpp +++ b/opm/material/common/MathToolbox.hpp @@ -123,7 +123,7 @@ public: * in scalar computations. */ template - static LhsEval toLhs(Scalar value) + static LhsEval decay(Scalar value) { static_assert(std::is_floating_point::value, "The left-hand side must be a primitive floating point type!"); diff --git a/opm/material/constraintsolvers/ComputeFromReferencePhase.hpp b/opm/material/constraintsolvers/ComputeFromReferencePhase.hpp index 49fa8a52a..e9ec8aa9a 100644 --- a/opm/material/constraintsolvers/ComputeFromReferencePhase.hpp +++ b/opm/material/constraintsolvers/ComputeFromReferencePhase.hpp @@ -152,7 +152,7 @@ public: ComponentVector fugVec; for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) { const auto& fug = fluidState.fugacity(refPhaseIdx, compIdx); - fugVec[compIdx] = FsToolbox::template toLhs(fug); + fugVec[compIdx] = FsToolbox::template decay(fug); } CompositionFromFugacities::solve(fluidState, paramCache, phaseIdx, fugVec); diff --git a/opm/material/constraintsolvers/MiscibleMultiPhaseComposition.hpp b/opm/material/constraintsolvers/MiscibleMultiPhaseComposition.hpp index 1e2581c20..d993dd768 100644 --- a/opm/material/constraintsolvers/MiscibleMultiPhaseComposition.hpp +++ b/opm/material/constraintsolvers/MiscibleMultiPhaseComposition.hpp @@ -192,7 +192,7 @@ public: // coefficients of the components cannot depend on // composition, i.e. the parameters in the cache are valid for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) { - Evaluation fugCoeff = FsToolbox::template toLhs( + Evaluation fugCoeff = FsToolbox::template decay( FluidSystem::fugacityCoefficient(fluidState, paramCache, phaseIdx, compIdx)); fluidState.setFugacityCoefficient(phaseIdx, compIdx, fugCoeff); } diff --git a/opm/material/densead/Math.hpp b/opm/material/densead/Math.hpp index c076d015a..28306fb92 100644 --- a/opm/material/densead/Math.hpp +++ b/opm/material/densead/Math.hpp @@ -437,19 +437,19 @@ public: template static typename std::enable_if::value, LhsEval>::type - toLhs(const Evaluation& eval) + decay(const Evaluation& eval) { return eval; } template static typename std::enable_if::value, LhsEval>::type - toLhs(const Evaluation&& eval) + decay(const Evaluation&& eval) { return eval; } template static typename std::enable_if::value, LhsEval>::type - toLhs(const Evaluation& eval) + decay(const Evaluation& eval) { return eval.value; } // comparison diff --git a/opm/material/fluidmatrixinteractions/BrooksCorey.hpp b/opm/material/fluidmatrixinteractions/BrooksCorey.hpp index 2de3e46d3..5855a0817 100644 --- a/opm/material/fluidmatrixinteractions/BrooksCorey.hpp +++ b/opm/material/fluidmatrixinteractions/BrooksCorey.hpp @@ -155,7 +155,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); assert(0 <= Sw && Sw <= 1); @@ -200,8 +200,8 @@ public: typedef MathToolbox FsToolbox; Evaluation pC = - FsToolbox::template toLhs(fs.pressure(Traits::nonWettingPhaseIdx)) - - FsToolbox::template toLhs(fs.pressure(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.pressure(Traits::nonWettingPhaseIdx)) + - FsToolbox::template decay(fs.pressure(Traits::wettingPhaseIdx)); return twoPhaseSatSw(params, pC); } @@ -240,7 +240,7 @@ public: typedef MathToolbox FsToolbox; const auto& Sw = - FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatKrw(params, Sw); } @@ -277,7 +277,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - 1.0 - FsToolbox::template toLhs(fs.saturation(Traits::nonWettingPhaseIdx)); + 1.0 - FsToolbox::template decay(fs.saturation(Traits::nonWettingPhaseIdx)); return twoPhaseSatKrn(params, Sw); } diff --git a/opm/material/fluidmatrixinteractions/EclDefaultMaterial.hpp b/opm/material/fluidmatrixinteractions/EclDefaultMaterial.hpp index 6b07dd057..360a107c4 100644 --- a/opm/material/fluidmatrixinteractions/EclDefaultMaterial.hpp +++ b/opm/material/fluidmatrixinteractions/EclDefaultMaterial.hpp @@ -163,7 +163,7 @@ public: { typedef MathToolbox FsToolbox; - const auto& Sw = 1.0 - FsToolbox::template toLhs(fs.saturation(gasPhaseIdx)); + const auto& Sw = 1.0 - FsToolbox::template decay(fs.saturation(gasPhaseIdx)); return GasOilMaterialLaw::twoPhaseSatPcnw(params.gasOilParams(), Sw); } @@ -182,7 +182,7 @@ public: { typedef MathToolbox FsToolbox; - const auto& Sw = FsToolbox::template toLhs(fs.saturation(waterPhaseIdx)); + const auto& Sw = FsToolbox::template decay(fs.saturation(waterPhaseIdx)); return OilWaterMaterialLaw::twoPhaseSatPcnw(params.oilWaterParams(), Sw); } @@ -263,7 +263,7 @@ public: { typedef MathToolbox FsToolbox; - const Evaluation& Sw = 1 - FsToolbox::template toLhs(fluidState.saturation(gasPhaseIdx)); + const Evaluation& Sw = 1 - FsToolbox::template decay(fluidState.saturation(gasPhaseIdx)); return GasOilMaterialLaw::twoPhaseSatKrn(params.gasOilParams(), Sw); } @@ -276,7 +276,7 @@ public: { typedef MathToolbox FsToolbox; - const Evaluation& Sw = FsToolbox::template toLhs(fluidState.saturation(waterPhaseIdx)); + const Evaluation& Sw = FsToolbox::template decay(fluidState.saturation(waterPhaseIdx)); return OilWaterMaterialLaw::twoPhaseSatKrw(params.oilWaterParams(), Sw); } @@ -294,8 +294,8 @@ public: Evaluation Sw = Toolbox::max(Evaluation(Swco), - FsToolbox::template toLhs(fluidState.saturation(waterPhaseIdx))); - Evaluation Sg = FsToolbox::template toLhs(fluidState.saturation(gasPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(waterPhaseIdx))); + Evaluation Sg = FsToolbox::template decay(fluidState.saturation(gasPhaseIdx)); Evaluation Sw_ow = Sg + Sw; Evaluation So_go = 1.0 - Sw_ow; diff --git a/opm/material/fluidmatrixinteractions/EclStone1Material.hpp b/opm/material/fluidmatrixinteractions/EclStone1Material.hpp index 46793e37b..ebb329acb 100644 --- a/opm/material/fluidmatrixinteractions/EclStone1Material.hpp +++ b/opm/material/fluidmatrixinteractions/EclStone1Material.hpp @@ -161,7 +161,7 @@ public: { typedef MathToolbox FsToolbox; - const auto& Sw = 1.0 - FsToolbox::template toLhs(fs.saturation(gasPhaseIdx)); + const auto& Sw = 1.0 - FsToolbox::template decay(fs.saturation(gasPhaseIdx)); return GasOilMaterialLaw::twoPhaseSatPcnw(params.gasOilParams(), Sw); } @@ -180,7 +180,7 @@ public: { typedef MathToolbox FsToolbox; - const auto& Sw = FsToolbox::template toLhs(fs.saturation(waterPhaseIdx)); + const auto& Sw = FsToolbox::template decay(fs.saturation(waterPhaseIdx)); Valgrind::CheckDefined(Sw); const auto& result = OilWaterMaterialLaw::twoPhaseSatPcnw(params.oilWaterParams(), Sw); Valgrind::CheckDefined(result); @@ -264,7 +264,7 @@ public: { typedef MathToolbox FsToolbox; - const Evaluation& Sw = 1 - FsToolbox::template toLhs(fluidState.saturation(gasPhaseIdx)); + const Evaluation& Sw = 1 - FsToolbox::template decay(fluidState.saturation(gasPhaseIdx)); return GasOilMaterialLaw::twoPhaseSatKrn(params.gasOilParams(), Sw); } @@ -277,7 +277,7 @@ public: { typedef MathToolbox FsToolbox; - const Evaluation& Sw = FsToolbox::template toLhs(fluidState.saturation(waterPhaseIdx)); + const Evaluation& Sw = FsToolbox::template decay(fluidState.saturation(waterPhaseIdx)); return OilWaterMaterialLaw::twoPhaseSatKrw(params.oilWaterParams(), Sw); } @@ -299,8 +299,8 @@ public: // oil relperm at connate water saturations (with Sg=0) Scalar krocw = params.krocw(); - const Evaluation& Sw = FsToolbox::template toLhs(fluidState.saturation(waterPhaseIdx)); - const Evaluation& Sg = FsToolbox::template toLhs(fluidState.saturation(gasPhaseIdx)); + const Evaluation& Sw = FsToolbox::template decay(fluidState.saturation(waterPhaseIdx)); + const Evaluation& Sg = FsToolbox::template decay(fluidState.saturation(gasPhaseIdx)); Evaluation kro_ow = OilWaterMaterialLaw::twoPhaseSatKrn(params.oilWaterParams(), Sw); Evaluation kro_go = GasOilMaterialLaw::twoPhaseSatKrw(params.gasOilParams(), 1 - Sg - Swco); diff --git a/opm/material/fluidmatrixinteractions/EclStone2Material.hpp b/opm/material/fluidmatrixinteractions/EclStone2Material.hpp index a1bd9d295..ad80732d3 100644 --- a/opm/material/fluidmatrixinteractions/EclStone2Material.hpp +++ b/opm/material/fluidmatrixinteractions/EclStone2Material.hpp @@ -162,7 +162,7 @@ public: { typedef MathToolbox FsToolbox; - const auto& Sw = 1.0 - FsToolbox::template toLhs(fs.saturation(gasPhaseIdx)); + const auto& Sw = 1.0 - FsToolbox::template decay(fs.saturation(gasPhaseIdx)); return GasOilMaterialLaw::twoPhaseSatPcnw(params.gasOilParams(), Sw); } @@ -181,7 +181,7 @@ public: { typedef MathToolbox FsToolbox; - const auto& Sw = FsToolbox::template toLhs(fs.saturation(waterPhaseIdx)); + const auto& Sw = FsToolbox::template decay(fs.saturation(waterPhaseIdx)); Valgrind::CheckDefined(Sw); const auto& result = OilWaterMaterialLaw::twoPhaseSatPcnw(params.oilWaterParams(), Sw); Valgrind::CheckDefined(result); @@ -265,7 +265,7 @@ public: { typedef MathToolbox FsToolbox; - const Evaluation& Sw = 1 - FsToolbox::template toLhs(fluidState.saturation(gasPhaseIdx)); + const Evaluation& Sw = 1 - FsToolbox::template decay(fluidState.saturation(gasPhaseIdx)); return GasOilMaterialLaw::twoPhaseSatKrn(params.gasOilParams(), Sw); } @@ -278,7 +278,7 @@ public: { typedef MathToolbox FsToolbox; - const Evaluation& Sw = FsToolbox::template toLhs(fluidState.saturation(waterPhaseIdx)); + const Evaluation& Sw = FsToolbox::template decay(fluidState.saturation(waterPhaseIdx)); return OilWaterMaterialLaw::twoPhaseSatKrw(params.oilWaterParams(), Sw); } @@ -292,8 +292,8 @@ public: typedef MathToolbox FsToolbox; Scalar Swco = params.Swl(); - const Evaluation& Sw = FsToolbox::template toLhs(fluidState.saturation(waterPhaseIdx)); - const Evaluation& Sg = FsToolbox::template toLhs(fluidState.saturation(gasPhaseIdx)); + const Evaluation& Sw = FsToolbox::template decay(fluidState.saturation(waterPhaseIdx)); + const Evaluation& Sg = FsToolbox::template decay(fluidState.saturation(gasPhaseIdx)); Scalar krocw = OilWaterMaterialLaw::twoPhaseSatKrn(params.oilWaterParams(), Swco); Evaluation krow = OilWaterMaterialLaw::twoPhaseSatKrn(params.oilWaterParams(), Sw); diff --git a/opm/material/fluidmatrixinteractions/EclTwoPhaseMaterial.hpp b/opm/material/fluidmatrixinteractions/EclTwoPhaseMaterial.hpp index cd238ea5c..0711149ee 100644 --- a/opm/material/fluidmatrixinteractions/EclTwoPhaseMaterial.hpp +++ b/opm/material/fluidmatrixinteractions/EclTwoPhaseMaterial.hpp @@ -133,7 +133,7 @@ public: switch (params.approach()) { case EclTwoPhaseGasOil: { const Evaluation& So = - FsToolbox::template toLhs(fluidState.saturation(oilPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(oilPhaseIdx)); values[oilPhaseIdx] = 0.0; values[gasPhaseIdx] = GasOilMaterialLaw::twoPhaseSatPcnw(params.gasOilParams(), So); @@ -142,7 +142,7 @@ public: case EclTwoPhaseOilWater: { const Evaluation& Sw = - FsToolbox::template toLhs(fluidState.saturation(waterPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(waterPhaseIdx)); values[waterPhaseIdx] = 0.0; values[oilPhaseIdx] = OilWaterMaterialLaw::twoPhaseSatPcnw(params.oilWaterParams(), Sw); @@ -151,7 +151,7 @@ public: case EclTwoPhaseGasWater: { const Evaluation& Sw = - FsToolbox::template toLhs(fluidState.saturation(waterPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(waterPhaseIdx)); values[waterPhaseIdx] = 0.0; values[gasPhaseIdx] = @@ -262,7 +262,7 @@ public: switch (params.approach()) { case EclTwoPhaseGasOil: { const Evaluation& So = - FsToolbox::template toLhs(fluidState.saturation(oilPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(oilPhaseIdx)); values[oilPhaseIdx] = GasOilMaterialLaw::twoPhaseSatKrw(params.gasOilParams(), So); values[gasPhaseIdx] = GasOilMaterialLaw::twoPhaseSatKrn(params.gasOilParams(), So); @@ -271,7 +271,7 @@ public: case EclTwoPhaseOilWater: { const Evaluation& Sw = - FsToolbox::template toLhs(fluidState.saturation(waterPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(waterPhaseIdx)); values[waterPhaseIdx] = OilWaterMaterialLaw::twoPhaseSatKrw(params.oilWaterParams(), Sw); values[oilPhaseIdx] = OilWaterMaterialLaw::twoPhaseSatKrn(params.oilWaterParams(), Sw); @@ -280,7 +280,7 @@ public: case EclTwoPhaseGasWater: { const Evaluation& Sw = - FsToolbox::template toLhs(fluidState.saturation(waterPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(waterPhaseIdx)); values[waterPhaseIdx] = OilWaterMaterialLaw::twoPhaseSatKrw(params.oilWaterParams(), Sw); values[gasPhaseIdx] = GasOilMaterialLaw::twoPhaseSatKrn(params.gasOilParams(), Sw); diff --git a/opm/material/fluidmatrixinteractions/LinearMaterial.hpp b/opm/material/fluidmatrixinteractions/LinearMaterial.hpp index 2a33294da..8719124b1 100644 --- a/opm/material/fluidmatrixinteractions/LinearMaterial.hpp +++ b/opm/material/fluidmatrixinteractions/LinearMaterial.hpp @@ -106,7 +106,7 @@ public: for (unsigned phaseIdx = 0; phaseIdx < Traits::numPhases; ++phaseIdx) { const Evaluation& S = - FsToolbox::template toLhs(state.saturation(phaseIdx)); + FsToolbox::template decay(state.saturation(phaseIdx)); Valgrind::CheckDefined(S); values[phaseIdx] = @@ -140,7 +140,7 @@ public: for (unsigned phaseIdx = 0; phaseIdx < Traits::numPhases; ++phaseIdx) { const Evaluation& S = - FsToolbox::template toLhs(state.saturation(phaseIdx)); + FsToolbox::template decay(state.saturation(phaseIdx)); Valgrind::CheckDefined(S); values[phaseIdx] = Toolbox::max(Toolbox::min(S,1.0),0.0); @@ -155,7 +155,7 @@ public: { typedef MathToolbox FsToolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); Valgrind::CheckDefined(Sw); const Evaluation& wPhasePressure = @@ -163,7 +163,7 @@ public: (1.0 - Sw)*params.pcMinSat(Traits::wettingPhaseIdx); const Evaluation& Sn = - FsToolbox::template toLhs(fs.saturation(Traits::nonWettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::nonWettingPhaseIdx)); Valgrind::CheckDefined(Sn); const Evaluation& nPhasePressure = @@ -236,7 +236,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return Toolbox::max(0.0, Toolbox::min(1.0, Sw)); } @@ -259,7 +259,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sn = - FsToolbox::template toLhs(fs.saturation(Traits::nonWettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::nonWettingPhaseIdx)); return Toolbox::max(0.0, Toolbox::min(1.0, Sn)); } @@ -285,7 +285,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sg = - FsToolbox::template toLhs(fs.saturation(Traits::gasPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::gasPhaseIdx)); return Toolbox::max(0.0, Toolbox::min(1.0, Sg)); } @@ -301,7 +301,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sn = - FsToolbox::template toLhs(fs.saturation(Traits::nonWettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::nonWettingPhaseIdx)); Valgrind::CheckDefined(Sn); const Evaluation& nPhasePressure = @@ -309,7 +309,7 @@ public: (1.0 - Sn)*params.pcMinSat(Traits::nonWettingPhaseIdx); const Evaluation& Sg = - FsToolbox::template toLhs(fs.saturation(Traits::gasPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::gasPhaseIdx)); Valgrind::CheckDefined(Sg); const Evaluation& gPhasePressure = diff --git a/opm/material/fluidmatrixinteractions/NullMaterial.hpp b/opm/material/fluidmatrixinteractions/NullMaterial.hpp index 8bb825d89..71c8c60bf 100644 --- a/opm/material/fluidmatrixinteractions/NullMaterial.hpp +++ b/opm/material/fluidmatrixinteractions/NullMaterial.hpp @@ -120,7 +120,7 @@ public: for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { const Evaluation& S = - FsToolbox::template toLhs(fluidState.saturation(phaseIdx)); + FsToolbox::template decay(fluidState.saturation(phaseIdx)); values[phaseIdx] = Toolbox::max(Toolbox::min(S, 1.0), 0.0); } } @@ -186,7 +186,7 @@ public: typedef MathToolbox Toolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fluidState.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(Traits::wettingPhaseIdx)); return Toolbox::max(0.0, Toolbox::min(1.0, Sw)); } @@ -211,7 +211,7 @@ public: typedef MathToolbox Toolbox; const Evaluation& Sn = - FsToolbox::template toLhs(fluidState.saturation(Traits::nonWettingPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(Traits::nonWettingPhaseIdx)); return Toolbox::max(0.0, Toolbox::min(1.0, Sn)); } @@ -238,7 +238,7 @@ public: typedef MathToolbox Toolbox; const Evaluation& Sg = - FsToolbox::template toLhs(fluidState.saturation(Traits::gasPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(Traits::gasPhaseIdx)); return Toolbox::max(0.0, Toolbox::min(1.0, Sg)); } diff --git a/opm/material/fluidmatrixinteractions/ParkerLenhard.hpp b/opm/material/fluidmatrixinteractions/ParkerLenhard.hpp index 8e634ceda..922a0f44d 100644 --- a/opm/material/fluidmatrixinteractions/ParkerLenhard.hpp +++ b/opm/material/fluidmatrixinteractions/ParkerLenhard.hpp @@ -381,7 +381,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatPcnw(params, Sw); } @@ -456,7 +456,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatKrw(params, Sw); } @@ -480,7 +480,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatKrn(params, Sw); } diff --git a/opm/material/fluidmatrixinteractions/PiecewiseLinearTwoPhaseMaterial.hpp b/opm/material/fluidmatrixinteractions/PiecewiseLinearTwoPhaseMaterial.hpp index 18f499a15..2fae67af5 100644 --- a/opm/material/fluidmatrixinteractions/PiecewiseLinearTwoPhaseMaterial.hpp +++ b/opm/material/fluidmatrixinteractions/PiecewiseLinearTwoPhaseMaterial.hpp @@ -133,7 +133,7 @@ public: { typedef MathToolbox FsToolbox; const auto& Sw = - FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatPcnw(params, Sw); } @@ -181,7 +181,7 @@ public: { typedef MathToolbox FsToolbox; const auto& Sw = - FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatKrw(params, Sw); } @@ -203,7 +203,7 @@ public: { typedef MathToolbox FsToolbox; const auto& Sw = - FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatKrn(params, Sw); } diff --git a/opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp b/opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp index 06a38f6bf..a0a02fd1d 100644 --- a/opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp +++ b/opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp @@ -175,7 +175,7 @@ public: { typedef MathToolbox FsToolbox; - const auto& Sw = FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + const auto& Sw = FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatPcnw(params, Sw); } @@ -212,8 +212,8 @@ public: typedef MathToolbox FsToolbox; const Evaluation& pC = - FsToolbox::template toLhs(fs.pressure(Traits::nonWettingPhaseIdx)) - - FsToolbox::template toLhs(fs.pressure(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.pressure(Traits::nonWettingPhaseIdx)) + - FsToolbox::template decay(fs.pressure(Traits::wettingPhaseIdx)); return twoPhaseSatSw(params, pC); } @@ -283,7 +283,7 @@ public: { typedef MathToolbox FsToolbox; - const auto& Sw = FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + const auto& Sw = FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatKrw(params, Sw); } @@ -333,7 +333,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - 1.0 - FsToolbox::template toLhs(fs.saturation(Traits::nonWettingPhaseIdx)); + 1.0 - FsToolbox::template decay(fs.saturation(Traits::nonWettingPhaseIdx)); return twoPhaseSatKrn(params, Sw); } diff --git a/opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp b/opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp index 6d554bf28..f7ea2fbe5 100644 --- a/opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp +++ b/opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp @@ -164,7 +164,7 @@ public: { typedef MathToolbox FsToolbox; - const auto& Sw = FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + const auto& Sw = FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatPcnw(params, Sw); } @@ -226,8 +226,8 @@ public: typedef MathToolbox FsToolbox; const Evaluation& pC = - FsToolbox::template toLhs(fs.pressure(Traits::nonWettingPhaseIdx)) - - FsToolbox::template toLhs(fs.pressure(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.pressure(Traits::nonWettingPhaseIdx)) + - FsToolbox::template decay(fs.pressure(Traits::wettingPhaseIdx)); return twoPhaseSatSw(params, pC); } @@ -299,7 +299,7 @@ public: { typedef MathToolbox FsToolbox; - const auto& Sw = FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + const auto& Sw = FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatKrw(params, Sw); } @@ -337,7 +337,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - 1.0 - FsToolbox::template toLhs(fs.saturation(Traits::nonWettingPhaseIdx)); + 1.0 - FsToolbox::template decay(fs.saturation(Traits::nonWettingPhaseIdx)); return twoPhaseSatKrn(params, Sw); } diff --git a/opm/material/fluidmatrixinteractions/SplineTwoPhaseMaterial.hpp b/opm/material/fluidmatrixinteractions/SplineTwoPhaseMaterial.hpp index 626ab8e49..e4d8f7be8 100644 --- a/opm/material/fluidmatrixinteractions/SplineTwoPhaseMaterial.hpp +++ b/opm/material/fluidmatrixinteractions/SplineTwoPhaseMaterial.hpp @@ -129,7 +129,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fluidState.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatPcnw(params, Sw); } @@ -200,7 +200,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fluidState.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatKrw(params, Sw); } @@ -241,7 +241,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sn = - FsToolbox::template toLhs(fluidState.saturation(Traits::nonWettingPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(Traits::nonWettingPhaseIdx)); return twoPhaseSatKrn(params, 1.0 - Sn); } diff --git a/opm/material/fluidmatrixinteractions/ThreePhaseParkerVanGenuchten.hpp b/opm/material/fluidmatrixinteractions/ThreePhaseParkerVanGenuchten.hpp index a6b5c10fb..29dc3f7af 100644 --- a/opm/material/fluidmatrixinteractions/ThreePhaseParkerVanGenuchten.hpp +++ b/opm/material/fluidmatrixinteractions/ThreePhaseParkerVanGenuchten.hpp @@ -129,8 +129,8 @@ public: // sum of liquid saturations const auto& St = - FsToolbox::template toLhs(fluidState.saturation(wettingPhaseIdx)) - + FsToolbox::template toLhs(fluidState.saturation(nonWettingPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(wettingPhaseIdx)) + + FsToolbox::template decay(fluidState.saturation(nonWettingPhaseIdx)); Evaluation Se = (St - params.Swrx())/(1. - params.Swrx()); @@ -182,7 +182,7 @@ public: typedef MathToolbox Toolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fluidState.saturation(wettingPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(wettingPhaseIdx)); Evaluation Se = (Sw-params.Swr())/(1.-params.Snr()); Scalar PC_VG_REG = 0.01; @@ -281,7 +281,7 @@ public: typedef MathToolbox Toolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fluidState.saturation(wettingPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(wettingPhaseIdx)); // transformation to effective saturation const Evaluation& Se = (Sw - params.Swr()) / (1-params.Swr()); @@ -312,9 +312,9 @@ public: typedef MathToolbox Toolbox; const Evaluation& Sn = - FsToolbox::template toLhs(fluidState.saturation(nonWettingPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(nonWettingPhaseIdx)); const Evaluation& Sw = - FsToolbox::template toLhs(fluidState.saturation(wettingPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(wettingPhaseIdx)); Evaluation Swe = Toolbox::min((Sw - params.Swr()) / (1 - params.Swr()), 1.); Evaluation Ste = Toolbox::min((Sw + Sn - params.Swr()) / (1 - params.Swr()), 1.); @@ -360,7 +360,7 @@ public: typedef MathToolbox Toolbox; const Evaluation& Sg = - FsToolbox::template toLhs(fluidState.saturation(gasPhaseIdx)); + FsToolbox::template decay(fluidState.saturation(gasPhaseIdx)); const Evaluation& Se = Toolbox::min(((1-Sg) - params.Sgr()) / (1 - params.Sgr()), 1.); // regularization diff --git a/opm/material/fluidmatrixinteractions/VanGenuchten.hpp b/opm/material/fluidmatrixinteractions/VanGenuchten.hpp index 7c39e619c..7cc3d2645 100644 --- a/opm/material/fluidmatrixinteractions/VanGenuchten.hpp +++ b/opm/material/fluidmatrixinteractions/VanGenuchten.hpp @@ -171,7 +171,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); assert(0 <= Sw && Sw <= 1); @@ -218,8 +218,8 @@ public: typedef MathToolbox FsToolbox; Evaluation pC = - FsToolbox::template toLhs(fs.pressure(Traits::nonWettingPhaseIdx)) - - FsToolbox::template toLhs(fs.pressure(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.pressure(Traits::nonWettingPhaseIdx)) + - FsToolbox::template decay(fs.pressure(Traits::wettingPhaseIdx)); return twoPhaseSatSw(params, pC); } @@ -261,7 +261,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - FsToolbox::template toLhs(fs.saturation(Traits::wettingPhaseIdx)); + FsToolbox::template decay(fs.saturation(Traits::wettingPhaseIdx)); return twoPhaseSatKrw(params, Sw); } @@ -292,7 +292,7 @@ public: typedef MathToolbox FsToolbox; const Evaluation& Sw = - 1.0 - FsToolbox::template toLhs(fs.saturation(Traits::nonWettingPhaseIdx)); + 1.0 - FsToolbox::template decay(fs.saturation(Traits::nonWettingPhaseIdx)); return twoPhaseSatKrn(params, Sw); } diff --git a/opm/material/fluidstates/FluidStateCompositionModules.hpp b/opm/material/fluidstates/FluidStateCompositionModules.hpp index b90dff3c0..6079b9e64 100644 --- a/opm/material/fluidstates/FluidStateCompositionModules.hpp +++ b/opm/material/fluidstates/FluidStateCompositionModules.hpp @@ -140,7 +140,7 @@ public: sumMoleFractions_[phaseIdx] = 0; for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) { moleFraction_[phaseIdx][compIdx] = - FsToolbox::template toLhs(fs.moleFraction(phaseIdx, compIdx)); + FsToolbox::template decay(fs.moleFraction(phaseIdx, compIdx)); averageMolarMass_[phaseIdx] += moleFraction_[phaseIdx][compIdx]*FluidSystem::molarMass(compIdx); sumMoleFractions_[phaseIdx] += moleFraction_[phaseIdx][compIdx]; diff --git a/opm/material/fluidstates/FluidStateDensityModules.hpp b/opm/material/fluidstates/FluidStateDensityModules.hpp index 5356c76f6..9d9eb2bdd 100644 --- a/opm/material/fluidstates/FluidStateDensityModules.hpp +++ b/opm/material/fluidstates/FluidStateDensityModules.hpp @@ -85,7 +85,7 @@ public: typedef typename FluidState::Scalar FsScalar; typedef Opm::MathToolbox FsToolbox; for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { - density_[phaseIdx] = FsToolbox::template toLhs(fs.density(phaseIdx)); + density_[phaseIdx] = FsToolbox::template decay(fs.density(phaseIdx)); } } diff --git a/opm/material/fluidstates/FluidStateEnthalpyModules.hpp b/opm/material/fluidstates/FluidStateEnthalpyModules.hpp index f68afbf15..f94d6d4d1 100644 --- a/opm/material/fluidstates/FluidStateEnthalpyModules.hpp +++ b/opm/material/fluidstates/FluidStateEnthalpyModules.hpp @@ -78,7 +78,7 @@ public: typedef typename FluidState::Scalar FsScalar; typedef Opm::MathToolbox FsToolbox; for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { - enthalpy_[phaseIdx] = FsToolbox::template toLhs(fs.enthalpy(phaseIdx)); + enthalpy_[phaseIdx] = FsToolbox::template decay(fs.enthalpy(phaseIdx)); } } diff --git a/opm/material/fluidstates/FluidStatePressureModules.hpp b/opm/material/fluidstates/FluidStatePressureModules.hpp index d94040a28..bbb4e501e 100644 --- a/opm/material/fluidstates/FluidStatePressureModules.hpp +++ b/opm/material/fluidstates/FluidStatePressureModules.hpp @@ -73,7 +73,7 @@ public: typedef typename FluidState::Scalar FsScalar; typedef Opm::MathToolbox FsToolbox; for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { - pressure_[phaseIdx] = FsToolbox::template toLhs(fs.pressure(phaseIdx)); + pressure_[phaseIdx] = FsToolbox::template decay(fs.pressure(phaseIdx)); } } diff --git a/opm/material/fluidstates/FluidStateSaturationModules.hpp b/opm/material/fluidstates/FluidStateSaturationModules.hpp index 79f04c846..30406979d 100644 --- a/opm/material/fluidstates/FluidStateSaturationModules.hpp +++ b/opm/material/fluidstates/FluidStateSaturationModules.hpp @@ -73,7 +73,7 @@ public: typedef typename FluidState::Scalar FsScalar; typedef Opm::MathToolbox FsToolbox; for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { - saturation_[phaseIdx] = FsToolbox::template toLhs(fs.saturation(phaseIdx)); + saturation_[phaseIdx] = FsToolbox::template decay(fs.saturation(phaseIdx)); } } diff --git a/opm/material/fluidstates/FluidStateTemperatureModules.hpp b/opm/material/fluidstates/FluidStateTemperatureModules.hpp index 3a48ca656..ec48b6cf5 100644 --- a/opm/material/fluidstates/FluidStateTemperatureModules.hpp +++ b/opm/material/fluidstates/FluidStateTemperatureModules.hpp @@ -127,7 +127,7 @@ public: { typedef Opm::MathToolbox FsToolbox; - temperature_ = FsToolbox::template toLhs(fs.temperature(/*phaseIdx=*/0)); + temperature_ = FsToolbox::template decay(fs.temperature(/*phaseIdx=*/0)); #ifndef NDEBUG typedef Opm::MathToolbox Toolbox; diff --git a/opm/material/fluidstates/FluidStateViscosityModules.hpp b/opm/material/fluidstates/FluidStateViscosityModules.hpp index 7b6184523..7cea3e279 100644 --- a/opm/material/fluidstates/FluidStateViscosityModules.hpp +++ b/opm/material/fluidstates/FluidStateViscosityModules.hpp @@ -72,7 +72,7 @@ public: typedef typename FluidState::Scalar FsScalar; typedef Opm::MathToolbox FsToolbox; for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { - viscosity_[phaseIdx] = FsToolbox::template toLhs(fs.viscosity(phaseIdx)); + viscosity_[phaseIdx] = FsToolbox::template decay(fs.viscosity(phaseIdx)); } } diff --git a/opm/material/fluidsystems/BlackOilFluidSystem.hpp b/opm/material/fluidsystems/BlackOilFluidSystem.hpp index b4b69acc4..8a3a9a7f9 100644 --- a/opm/material/fluidsystems/BlackOilFluidSystem.hpp +++ b/opm/material/fluidsystems/BlackOilFluidSystem.hpp @@ -56,7 +56,7 @@ LhsEval getRs_(typename std::enable_if::value, const F typedef Opm::MathToolbox FsToolbox; const auto& XoG = - FsToolbox::template toLhs(fluidState.massFraction(FluidSystem::oilPhaseIdx, + FsToolbox::template decay(fluidState.massFraction(FluidSystem::oilPhaseIdx, FluidSystem::gasCompIdx)); return FluidSystem::convertXoGToRs(XoG, regionIdx); } @@ -65,10 +65,10 @@ template auto getRs_(typename std::enable_if::value, const FluidState&>::type fluidState, OPM_UNUSED unsigned regionIdx) -> decltype(Opm::MathToolbox - ::template toLhs(fluidState.Rs())) + ::template decay(fluidState.Rs())) { typedef Opm::MathToolbox FsToolbox; - return FsToolbox::template toLhs(fluidState.Rs()); + return FsToolbox::template decay(fluidState.Rs()); } template @@ -78,7 +78,7 @@ LhsEval getRv_(typename std::enable_if::value, const F typedef Opm::MathToolbox FsToolbox; const auto& XgO = - FsToolbox::template toLhs(fluidState.massFraction(FluidSystem::gasPhaseIdx, + FsToolbox::template decay(fluidState.massFraction(FluidSystem::gasPhaseIdx, FluidSystem::oilCompIdx)); return FluidSystem::convertXgOToRv(XgO, regionIdx); } @@ -87,10 +87,10 @@ template auto getRv_(typename std::enable_if::value, const FluidState&>::type fluidState, OPM_UNUSED unsigned regionIdx) -> decltype(Opm::MathToolbox - ::template toLhs(fluidState.Rv())) + ::template decay(fluidState.Rv())) { typedef Opm::MathToolbox FsToolbox; - return FsToolbox::template toLhs(fluidState.Rv()); + return FsToolbox::template decay(fluidState.Rv()); } } @@ -560,8 +560,8 @@ public: typedef Opm::MathToolbox FsToolbox; - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); switch (phaseIdx) { case oilPhaseIdx: { @@ -572,7 +572,7 @@ public: // interpolate between the saturated and undersaturated quantities to // avoid a discontinuity const auto& Rs = Opm::BlackOil::template getRs_(fluidState, regionIdx); - const auto& alpha = FsToolbox::template toLhs(fluidState.saturation(gasPhaseIdx))/1e-4; + const auto& alpha = FsToolbox::template decay(fluidState.saturation(gasPhaseIdx))/1e-4; const auto& bSat = oilPvt_->saturatedInverseFormationVolumeFactor(regionIdx, T, p); const auto& bUndersat = oilPvt_->inverseFormationVolumeFactor(regionIdx, T, p, Rs); return alpha*bSat + (1.0 - alpha)*bUndersat; @@ -596,7 +596,7 @@ public: // interpolate between the saturated and undersaturated quantities to // avoid a discontinuity const auto& Rv = Opm::BlackOil::template getRv_(fluidState, regionIdx); - const auto& alpha = FsToolbox::template toLhs(fluidState.saturation(oilPhaseIdx))/1e-4; + const auto& alpha = FsToolbox::template decay(fluidState.saturation(oilPhaseIdx))/1e-4; const auto& bSat = gasPvt_->saturatedInverseFormationVolumeFactor(regionIdx, T, p); const auto& bUndersat = gasPvt_->inverseFormationVolumeFactor(regionIdx, T, p, Rv); return alpha*bSat + (1.0 - alpha)*bUndersat; @@ -635,8 +635,8 @@ public: typedef Opm::MathToolbox FsToolbox; - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); switch (phaseIdx) { case oilPhaseIdx: return oilPvt_->saturatedInverseFormationVolumeFactor(regionIdx, T, p); @@ -659,8 +659,8 @@ public: typedef Opm::MathToolbox FsToolbox; - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); // for the fugacity coefficient of the oil component in the oil phase, we use // some pseudo-realistic value for the vapor pressure to ease physical @@ -699,8 +699,8 @@ public: const auto& x_oGSat = convertXoGToxoG(X_oGSat, regionIdx); const auto& x_oOSat = 1.0 - x_oGSat; - const auto& p_o = FsToolbox::template toLhs(fluidState.pressure(oilPhaseIdx)); - const auto& p_g = FsToolbox::template toLhs(fluidState.pressure(gasPhaseIdx)); + const auto& p_o = FsToolbox::template decay(fluidState.pressure(oilPhaseIdx)); + const auto& p_g = FsToolbox::template decay(fluidState.pressure(gasPhaseIdx)); return phi_oO*p_o*x_oOSat / (p_g*x_gOSat); } @@ -736,8 +736,8 @@ public: const auto& X_oGSat = convertRsToXoG(R_sSat, regionIdx); const auto& x_oGSat = convertXoGToxoG(X_oGSat, regionIdx); - const auto& p_o = FsToolbox::template toLhs(fluidState.pressure(oilPhaseIdx)); - const auto& p_g = FsToolbox::template toLhs(fluidState.pressure(gasPhaseIdx)); + const auto& p_o = FsToolbox::template decay(fluidState.pressure(oilPhaseIdx)); + const auto& p_g = FsToolbox::template decay(fluidState.pressure(gasPhaseIdx)); return phi_gG*p_g*x_gGSat / (p_o*x_oGSat); } @@ -785,8 +785,8 @@ public: typedef Opm::MathToolbox FsToolbox; - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); switch (phaseIdx) { case oilPhaseIdx: { @@ -797,7 +797,7 @@ public: // interpolate between the saturated and undersaturated quantities to // avoid a discontinuity const auto& Rs = Opm::BlackOil::template getRs_(fluidState, regionIdx); - const auto& alpha = FsToolbox::template toLhs(fluidState.saturation(gasPhaseIdx))/1e-4; + const auto& alpha = FsToolbox::template decay(fluidState.saturation(gasPhaseIdx))/1e-4; const auto& muSat = oilPvt_->saturatedViscosity(regionIdx, T, p); const auto& muUndersat = oilPvt_->viscosity(regionIdx, T, p, Rs); return alpha*muSat + (1.0 - alpha)*muUndersat; @@ -822,7 +822,7 @@ public: // interpolate between the saturated and undersaturated quantities to // avoid a discontinuity const auto& Rv = Opm::BlackOil::template getRv_(fluidState, regionIdx); - const auto& alpha = FsToolbox::template toLhs(fluidState.saturation(oilPhaseIdx))/1e-4; + const auto& alpha = FsToolbox::template decay(fluidState.saturation(oilPhaseIdx))/1e-4; const auto& muSat = gasPvt_->saturatedViscosity(regionIdx, T, p); const auto& muUndersat = gasPvt_->viscosity(regionIdx, T, p, Rv); return alpha*muSat + (1.0 - alpha)*muUndersat; @@ -864,8 +864,8 @@ public: typedef Opm::MathToolbox FsToolbox; - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); switch (phaseIdx) { case oilPhaseIdx: return oilPvt_->saturatedGasDissolutionFactor(regionIdx, T, p); @@ -895,7 +895,7 @@ public: typedef Opm::MathToolbox FsToolbox; - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); switch (phaseIdx) { case oilPhaseIdx: return oilPvt_->saturationPressure(regionIdx, T, Opm::BlackOil::template getRs_(fluidState, regionIdx)); diff --git a/opm/material/fluidsystems/BrineCO2FluidSystem.hpp b/opm/material/fluidsystems/BrineCO2FluidSystem.hpp index 21f791334..d9518dc63 100644 --- a/opm/material/fluidsystems/BrineCO2FluidSystem.hpp +++ b/opm/material/fluidsystems/BrineCO2FluidSystem.hpp @@ -239,15 +239,15 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const LhsEval& temperature = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const LhsEval& pressure = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const LhsEval& temperature = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const LhsEval& pressure = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == liquidPhaseIdx) { // use normalized composition for to calculate the density // (the relations don't seem to take non-normalized // compositions too well...) - LhsEval xlBrine = LhsToolbox::min(1.0, LhsToolbox::max(0.0, FsToolbox::template toLhs(fluidState.moleFraction(liquidPhaseIdx, BrineIdx)))); - LhsEval xlCO2 = LhsToolbox::min(1.0, LhsToolbox::max(0.0, FsToolbox::template toLhs(fluidState.moleFraction(liquidPhaseIdx, CO2Idx)))); + LhsEval xlBrine = LhsToolbox::min(1.0, LhsToolbox::max(0.0, FsToolbox::template decay(fluidState.moleFraction(liquidPhaseIdx, BrineIdx)))); + LhsEval xlCO2 = LhsToolbox::min(1.0, LhsToolbox::max(0.0, FsToolbox::template decay(fluidState.moleFraction(liquidPhaseIdx, CO2Idx)))); LhsEval sumx = xlBrine + xlCO2; xlBrine /= sumx; xlCO2 /= sumx; @@ -266,8 +266,8 @@ public: // use normalized composition for to calculate the density // (the relations don't seem to take non-normalized // compositions too well...) - LhsEval xgBrine = LhsToolbox::min(1.0, LhsToolbox::max(0.0, FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, BrineIdx)))); - LhsEval xgCO2 = LhsToolbox::min(1.0, LhsToolbox::max(0.0, FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, CO2Idx)))); + LhsEval xgBrine = LhsToolbox::min(1.0, LhsToolbox::max(0.0, FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, BrineIdx)))); + LhsEval xgCO2 = LhsToolbox::min(1.0, LhsToolbox::max(0.0, FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, CO2Idx)))); LhsEval sumx = xgBrine + xgCO2; xgBrine /= sumx; xgCO2 /= sumx; @@ -292,8 +292,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const LhsEval& temperature = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const LhsEval& pressure = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const LhsEval& temperature = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const LhsEval& pressure = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == liquidPhaseIdx) { // assume pure brine for the liquid phase. TODO: viscosity @@ -330,8 +330,8 @@ public: // as the relative fluid compositions are observed, return LhsToolbox::createConstant(1.0); - const LhsEval& temperature = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const LhsEval& pressure = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const LhsEval& temperature = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const LhsEval& pressure = FsToolbox::template decay(fluidState.pressure(phaseIdx)); assert(temperature > 0); assert(pressure > 0); @@ -377,8 +377,8 @@ public: { typedef MathToolbox FsToolbox; - const LhsEval& temperature = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const LhsEval& pressure = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const LhsEval& temperature = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const LhsEval& pressure = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == liquidPhaseIdx) return BinaryCoeffBrineCO2::liquidDiffCoeff(temperature, pressure); @@ -399,11 +399,11 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const LhsEval& temperature = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const LhsEval& pressure = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const LhsEval& temperature = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const LhsEval& pressure = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == liquidPhaseIdx) { - const LhsEval& XlCO2 = FsToolbox::template toLhs(fluidState.massFraction(phaseIdx, CO2Idx)); + const LhsEval& XlCO2 = FsToolbox::template decay(fluidState.massFraction(phaseIdx, CO2Idx)); const LhsEval& result = liquidEnthalpyBrineCO2_(temperature, pressure, Brine_IAPWS::salinity, @@ -412,8 +412,8 @@ public: return result; } else { - const LhsEval& XCO2 = FsToolbox::template toLhs(fluidState.massFraction(gasPhaseIdx, CO2Idx)); - const LhsEval& XBrine = FsToolbox::template toLhs(fluidState.massFraction(gasPhaseIdx, BrineIdx)); + const LhsEval& XCO2 = FsToolbox::template decay(fluidState.massFraction(gasPhaseIdx, CO2Idx)); + const LhsEval& XBrine = FsToolbox::template decay(fluidState.massFraction(gasPhaseIdx, BrineIdx)); LhsEval result = LhsToolbox::createConstant(0); result += XBrine * Brine::gasEnthalpy(temperature, pressure); @@ -462,8 +462,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const LhsEval& temperature = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const LhsEval& pressure = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const LhsEval& temperature = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const LhsEval& pressure = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if(phaseIdx == liquidPhaseIdx) return H2O::liquidHeatCapacity(temperature, pressure); diff --git a/opm/material/fluidsystems/H2OAirFluidSystem.hpp b/opm/material/fluidsystems/H2OAirFluidSystem.hpp index 9d9c80094..39da5d0dd 100644 --- a/opm/material/fluidsystems/H2OAirFluidSystem.hpp +++ b/opm/material/fluidsystems/H2OAirFluidSystem.hpp @@ -264,10 +264,10 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); LhsEval p; if (isCompressible(phaseIdx)) - p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); else { // random value which will hopefully cause things to blow // up if it is used in a calculation! @@ -278,7 +278,7 @@ public: LhsEval sumMoleFrac = 0; for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) - sumMoleFrac += FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, compIdx)); + sumMoleFrac += FsToolbox::template decay(fluidState.moleFraction(phaseIdx, compIdx)); if (phaseIdx == liquidPhaseIdx) { @@ -291,8 +291,8 @@ public: const LhsEval& rholH2O = H2O::liquidDensity(T, p); const LhsEval& clH2O = rholH2O/H2O::molarMass(); - const auto& xlH2O = FsToolbox::template toLhs(fluidState.moleFraction(liquidPhaseIdx, H2OIdx)); - const auto& xlAir = FsToolbox::template toLhs(fluidState.moleFraction(liquidPhaseIdx, AirIdx)); + const auto& xlH2O = FsToolbox::template decay(fluidState.moleFraction(liquidPhaseIdx, H2OIdx)); + const auto& xlAir = FsToolbox::template decay(fluidState.moleFraction(liquidPhaseIdx, AirIdx)); return clH2O*(H2O::molarMass()*xlH2O + Air::molarMass()*xlAir)/sumMoleFrac; } @@ -303,16 +303,16 @@ public: // for the gas phase assume an ideal gas return IdealGas::molarDensity(T, p) - * FsToolbox::template toLhs(fluidState.averageMolarMass(gasPhaseIdx)) + * FsToolbox::template decay(fluidState.averageMolarMass(gasPhaseIdx)) / LhsToolbox::max(1e-5, sumMoleFrac); LhsEval partialPressureH2O = - FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, H2OIdx)) - *FsToolbox::template toLhs(fluidState.pressure(gasPhaseIdx)); + FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, H2OIdx)) + *FsToolbox::template decay(fluidState.pressure(gasPhaseIdx)); LhsEval partialPressureAir = - FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, AirIdx)) - *FsToolbox::template toLhs(fluidState.pressure(gasPhaseIdx)); + FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, AirIdx)) + *FsToolbox::template decay(fluidState.pressure(gasPhaseIdx)); return H2O::gasDensity(T, partialPressureH2O) + Air::gasDensity(T, partialPressureAir); } @@ -330,8 +330,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == liquidPhaseIdx) { @@ -377,9 +377,9 @@ public: phiIJ *= phiIJ; phiIJ /= std::sqrt(8*(1 + M[i]/M[j])); - divisor += FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, j))*phiIJ; + divisor += FsToolbox::template decay(fluidState.moleFraction(phaseIdx, j))*phiIJ; } - const auto& xAlphaI = FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, i)); + const auto& xAlphaI = FsToolbox::template decay(fluidState.moleFraction(phaseIdx, i)); muResult += xAlphaI*mu[i]/divisor; } return muResult; @@ -400,8 +400,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); assert(0 <= compIdx && compIdx < numComponents); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == liquidPhaseIdx) { if (compIdx == H2OIdx) @@ -423,8 +423,8 @@ public: { typedef Opm::MathToolbox FsToolbox; - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == liquidPhaseIdx) return BinaryCoeff::H2O_Air::liquidDiffCoeff(T, p); @@ -441,8 +441,8 @@ public: { typedef Opm::MathToolbox FsToolbox; - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); Valgrind::CheckDefined(T); Valgrind::CheckDefined(p); @@ -457,11 +457,11 @@ public: LhsEval result = 0.0; result += H2O::gasEnthalpy(T, p) * - FsToolbox::template toLhs(fluidState.massFraction(gasPhaseIdx, H2OIdx)); + FsToolbox::template decay(fluidState.massFraction(gasPhaseIdx, H2OIdx)); result += Air::gasEnthalpy(T, p) * - FsToolbox::template toLhs(fluidState.massFraction(gasPhaseIdx, AirIdx)); + FsToolbox::template decay(fluidState.massFraction(gasPhaseIdx, AirIdx)); return result; } OPM_THROW(std::logic_error, "Invalid phase index " << phaseIdx); @@ -478,9 +478,9 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); const LhsEval& temperature = - FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); + FsToolbox::template decay(fluidState.temperature(phaseIdx)); const LhsEval& pressure = - FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == liquidPhaseIdx) return H2O::liquidThermalConductivity(temperature, pressure); @@ -489,9 +489,9 @@ public: if (useComplexRelations){ const LhsEval& xAir = - FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, AirIdx)); + FsToolbox::template decay(fluidState.moleFraction(phaseIdx, AirIdx)); const LhsEval& xH2O = - FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, H2OIdx)); + FsToolbox::template decay(fluidState.moleFraction(phaseIdx, H2OIdx)); LhsEval lambdaAir = xAir*lambdaDryAir; // Assuming Raoult's, Daltons law and ideal gas diff --git a/opm/material/fluidsystems/H2OAirMesityleneFluidSystem.hpp b/opm/material/fluidsystems/H2OAirMesityleneFluidSystem.hpp index 0a0bfd592..da9a24948 100644 --- a/opm/material/fluidsystems/H2OAirMesityleneFluidSystem.hpp +++ b/opm/material/fluidsystems/H2OAirMesityleneFluidSystem.hpp @@ -205,13 +205,13 @@ public: { typedef Opm::MathToolbox FsToolbox; - const LhsEval& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); + const LhsEval& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); if (phaseIdx == waterPhaseIdx) { // See: Ochs 2008 const LhsEval& p = H2O::liquidIsCompressible() - ? FsToolbox::template toLhs(fluidState.pressure(phaseIdx)) + ? FsToolbox::template decay(fluidState.pressure(phaseIdx)) : 1e100; const LhsEval& rholH2O = H2O::liquidDensity(T, p); @@ -220,24 +220,24 @@ public: // this assumes each dissolved molecule displaces exactly one // water molecule in the liquid return - clH2O*(H2O::molarMass()*FsToolbox::template toLhs(fluidState.moleFraction(waterPhaseIdx, H2OIdx)) + - Air::molarMass()*FsToolbox::template toLhs(fluidState.moleFraction(waterPhaseIdx, airIdx)) + - NAPL::molarMass()*FsToolbox::template toLhs(fluidState.moleFraction(waterPhaseIdx, NAPLIdx))); + clH2O*(H2O::molarMass()*FsToolbox::template decay(fluidState.moleFraction(waterPhaseIdx, H2OIdx)) + + Air::molarMass()*FsToolbox::template decay(fluidState.moleFraction(waterPhaseIdx, airIdx)) + + NAPL::molarMass()*FsToolbox::template decay(fluidState.moleFraction(waterPhaseIdx, NAPLIdx))); } else if (phaseIdx == naplPhaseIdx) { // assume pure NAPL for the NAPL phase const LhsEval& p = NAPL::liquidIsCompressible() - ? FsToolbox::template toLhs(fluidState.pressure(phaseIdx)) + ? FsToolbox::template decay(fluidState.pressure(phaseIdx)) : 1e100; return NAPL::liquidDensity(T, p); } assert (phaseIdx == gasPhaseIdx); - const LhsEval& pg = FsToolbox::template toLhs(fluidState.pressure(gasPhaseIdx)); - const LhsEval& pH2O = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, H2OIdx))*pg; - const LhsEval& pAir = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, airIdx))*pg; - const LhsEval& pNAPL = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, NAPLIdx))*pg; + const LhsEval& pg = FsToolbox::template decay(fluidState.pressure(gasPhaseIdx)); + const LhsEval& pH2O = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, H2OIdx))*pg; + const LhsEval& pAir = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, airIdx))*pg; + const LhsEval& pNAPL = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, NAPLIdx))*pg; return H2O::gasDensity(T, pH2O) + Air::gasDensity(T, pAir) + @@ -252,8 +252,8 @@ public: { typedef Opm::MathToolbox FsToolbox; - const LhsEval& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const LhsEval& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const LhsEval& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const LhsEval& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == waterPhaseIdx) { // assume pure water viscosity @@ -291,9 +291,9 @@ public: NAPL::molarMass() }; - const LhsEval& xgAir = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, airIdx)); - const LhsEval& xgH2O = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, H2OIdx)); - const LhsEval& xgNapl = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, NAPLIdx)); + const LhsEval& xgAir = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, airIdx)); + const LhsEval& xgH2O = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, H2OIdx)); + const LhsEval& xgNapl = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, NAPLIdx)); const LhsEval& xgAW = xgAir + xgH2O; const LhsEval& muAW = (mu[airIdx]*xgAir + mu[H2OIdx]*xgH2O)/xgAW; const LhsEval& MAW = (xgAir*Air::molarMass() + xgH2O*H2O::molarMass())/xgAW; @@ -319,8 +319,8 @@ public: #if 0 typedef Opm::MathToolbox FsToolbox; - const LhsEval& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const LhsEval& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const LhsEval& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const LhsEval& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); LhsEval diffCont; if (phaseIdx==gasPhaseIdx) { @@ -328,9 +328,9 @@ public: const LhsEval& diffWC = Opm::BinaryCoeff::H2O_Mesitylene::gasDiffCoeff(T, p); const LhsEval& diffAW = Opm::BinaryCoeff::H2O_Air::gasDiffCoeff(T, p); - const LhsEval& xga = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, airIdx)); - const LhsEval& xgw = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, H2OIdx)); - const LhsEval& xgc = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, NAPLIdx)); + const LhsEval& xga = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, airIdx)); + const LhsEval& xgw = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, H2OIdx)); + const LhsEval& xgc = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, NAPLIdx)); if (compIdx==NAPLIdx) return (1 - xgw)/(xga/diffAW + xgc/diffWC); else if (compIdx==H2OIdx) return (1 - xgc)/(xgw/diffWC + xga/diffAC); @@ -343,9 +343,9 @@ public: const LhsEval& diffWCl = 1.e-9; // BinaryCoeff::H2O_Mesitylene::liquidDiffCoeff(temperature, pressure); const LhsEval& diffAWl = 1.e-9; // BinaryCoeff::H2O_Air::liquidDiffCoeff(temperature, pressure); - const LhsEval& xwa = FsToolbox::template toLhs(fluidState.moleFraction(waterPhaseIdx, airIdx)); - const LhsEval& xww = FsToolbox::template toLhs(fluidState.moleFraction(waterPhaseIdx, H2OIdx)); - const LhsEval& xwc = FsToolbox::template toLhs(fluidState.moleFraction(waterPhaseIdx, NAPLIdx)); + const LhsEval& xwa = FsToolbox::template decay(fluidState.moleFraction(waterPhaseIdx, airIdx)); + const LhsEval& xww = FsToolbox::template decay(fluidState.moleFraction(waterPhaseIdx, H2OIdx)); + const LhsEval& xwc = FsToolbox::template decay(fluidState.moleFraction(waterPhaseIdx, NAPLIdx)); switch (compIdx) { case NAPLIdx: @@ -381,8 +381,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); assert(0 <= compIdx && compIdx < numComponents); - const LhsEval& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const LhsEval& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const LhsEval& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const LhsEval& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); Valgrind::CheckDefined(T); Valgrind::CheckDefined(p); @@ -426,8 +426,8 @@ public: { typedef Opm::MathToolbox FsToolbox; - const LhsEval& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const LhsEval& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const LhsEval& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const LhsEval& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == waterPhaseIdx) { return H2O::liquidEnthalpy(T, p); @@ -438,9 +438,9 @@ public: else if (phaseIdx == gasPhaseIdx) { // gas phase enthalpy depends strongly on composition LhsEval result = 0; - result += H2O::gasEnthalpy(T, p) * FsToolbox::template toLhs(fluidState.massFraction(gasPhaseIdx, H2OIdx)); - result += NAPL::gasEnthalpy(T, p) * FsToolbox::template toLhs(fluidState.massFraction(gasPhaseIdx, airIdx)); - result += Air::gasEnthalpy(T, p) * FsToolbox::template toLhs(fluidState.massFraction(gasPhaseIdx, NAPLIdx)); + result += H2O::gasEnthalpy(T, p) * FsToolbox::template decay(fluidState.massFraction(gasPhaseIdx, H2OIdx)); + result += NAPL::gasEnthalpy(T, p) * FsToolbox::template decay(fluidState.massFraction(gasPhaseIdx, airIdx)); + result += Air::gasEnthalpy(T, p) * FsToolbox::template decay(fluidState.massFraction(gasPhaseIdx, NAPLIdx)); return result; } @@ -458,14 +458,14 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); if (phaseIdx == waterPhaseIdx){ // water phase - const LhsEval& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const LhsEval& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const LhsEval& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const LhsEval& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); return H2O::liquidThermalConductivity(T, p); } else if (phaseIdx == gasPhaseIdx) { // gas phase - const LhsEval& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const LhsEval& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const LhsEval& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const LhsEval& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); return Air::gasThermalConductivity(T, p); } diff --git a/opm/material/fluidsystems/H2OAirXyleneFluidSystem.hpp b/opm/material/fluidsystems/H2OAirXyleneFluidSystem.hpp index 4ca841427..47d44be89 100644 --- a/opm/material/fluidsystems/H2OAirXyleneFluidSystem.hpp +++ b/opm/material/fluidsystems/H2OAirXyleneFluidSystem.hpp @@ -173,34 +173,34 @@ public: typedef Opm::MathToolbox FsToolbox; if (phaseIdx == waterPhaseIdx) { - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); // See: Ochs 2008 // \todo: proper citation const LhsEval& rholH2O = H2O::liquidDensity(T, p); const LhsEval& clH2O = rholH2O/H2O::molarMass(); - const auto& xwH2O = FsToolbox::template toLhs(fluidState.moleFraction(waterPhaseIdx, H2OIdx)); - const auto& xwAir = FsToolbox::template toLhs(fluidState.moleFraction(waterPhaseIdx, airIdx)); - const auto& xwNapl = FsToolbox::template toLhs(fluidState.moleFraction(waterPhaseIdx, NAPLIdx)); + const auto& xwH2O = FsToolbox::template decay(fluidState.moleFraction(waterPhaseIdx, H2OIdx)); + const auto& xwAir = FsToolbox::template decay(fluidState.moleFraction(waterPhaseIdx, airIdx)); + const auto& xwNapl = FsToolbox::template decay(fluidState.moleFraction(waterPhaseIdx, NAPLIdx)); // this assumes each dissolved molecule displaces exactly one // water molecule in the liquid return clH2O*(H2O::molarMass()*xwH2O + Air::molarMass()*xwAir + NAPL::molarMass()*xwNapl); } else if (phaseIdx == naplPhaseIdx) { // assume pure NAPL for the NAPL phase - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); return NAPL::liquidDensity(T, LhsEval(1e100)); } assert (phaseIdx == gasPhaseIdx); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); - const LhsEval& pH2O = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, H2OIdx))*p; - const LhsEval& pAir = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, airIdx))*p; - const LhsEval& pNAPL = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, NAPLIdx))*p; + const LhsEval& pH2O = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, H2OIdx))*p; + const LhsEval& pAir = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, airIdx))*p; + const LhsEval& pNAPL = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, NAPLIdx))*p; return H2O::gasDensity(T, pH2O) + Air::gasDensity(T, pAir) + @@ -215,8 +215,8 @@ public: { typedef Opm::MathToolbox FsToolbox; - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == waterPhaseIdx) { // assume pure water viscosity @@ -252,9 +252,9 @@ public: NAPL::molarMass() }; - const auto& xgAir = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, airIdx)); - const auto& xgH2O = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, H2OIdx)); - const auto& xgNapl = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, NAPLIdx)); + const auto& xgAir = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, airIdx)); + const auto& xgH2O = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, H2OIdx)); + const auto& xgNapl = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, NAPLIdx)); const LhsEval& xgAW = xgAir + xgH2O; const LhsEval& muAW = (mu[airIdx]*xgAir + mu[H2OIdx]*xgH2O)/ xgAW; @@ -281,16 +281,16 @@ public: typedef Opm::MathToolbox FsToolbox; if (phaseIdx==gasPhaseIdx) { - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); const LhsEval& diffAC = Opm::BinaryCoeff::Air_Xylene::gasDiffCoeff(T, p); const LhsEval& diffWC = Opm::BinaryCoeff::H2O_Xylene::gasDiffCoeff(T, p); const LhsEval& diffAW = Opm::BinaryCoeff::H2O_Air::gasDiffCoeff(T, p); - const LhsEval& xga = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, airIdx)); - const LhsEval& xgw = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, H2OIdx)); - const LhsEval& xgc = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, NAPLIdx)); + const LhsEval& xga = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, airIdx)); + const LhsEval& xgw = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, H2OIdx)); + const LhsEval& xgc = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, NAPLIdx)); if (compIdx==NAPLIdx) return (1.- xgw)/(xga/diffAW + xgc/diffWC); else if (compIdx==H2OIdx) return (1.- xgc)/(xgw/diffWC + xga/diffAC); @@ -302,9 +302,9 @@ public: Scalar diffWCl = 1.e-9; // BinaryCoeff::H2O_Xylene::liquidDiffCoeff(temperature, pressure); Scalar diffAWl = 1.e-9; // BinaryCoeff::H2O_Air::liquidDiffCoeff(temperature, pressure); - const LhsEval& xwa = FsToolbox::template toLhs(fluidState.moleFraction(waterPhaseIdx, airIdx)); - const LhsEval& xww = FsToolbox::template toLhs(fluidState.moleFraction(waterPhaseIdx, H2OIdx)); - const LhsEval& xwc = FsToolbox::template toLhs(fluidState.moleFraction(waterPhaseIdx, NAPLIdx)); + const LhsEval& xwa = FsToolbox::template decay(fluidState.moleFraction(waterPhaseIdx, airIdx)); + const LhsEval& xww = FsToolbox::template decay(fluidState.moleFraction(waterPhaseIdx, H2OIdx)); + const LhsEval& xwc = FsToolbox::template decay(fluidState.moleFraction(waterPhaseIdx, NAPLIdx)); switch (compIdx) { case NAPLIdx: @@ -337,8 +337,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); assert(0 <= compIdx && compIdx < numComponents); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == waterPhaseIdx) { if (compIdx == H2OIdx) @@ -378,8 +378,8 @@ public: { typedef Opm::MathToolbox FsToolbox; - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == waterPhaseIdx) { return H2O::liquidEnthalpy(T, p); @@ -393,9 +393,9 @@ public: const LhsEval& hga = Air::gasEnthalpy(T, p); LhsEval result = 0; - result += hgw * FsToolbox::template toLhs(fluidState.massFraction(gasPhaseIdx, H2OIdx)); - result += hga * FsToolbox::template toLhs(fluidState.massFraction(gasPhaseIdx, airIdx)); - result += hgc * FsToolbox::template toLhs(fluidState.massFraction(gasPhaseIdx, NAPLIdx)); + result += hgw * FsToolbox::template decay(fluidState.massFraction(gasPhaseIdx, H2OIdx)); + result += hga * FsToolbox::template decay(fluidState.massFraction(gasPhaseIdx, airIdx)); + result += hgc * FsToolbox::template decay(fluidState.massFraction(gasPhaseIdx, NAPLIdx)); return result; } diff --git a/opm/material/fluidsystems/H2ON2FluidSystem.hpp b/opm/material/fluidsystems/H2ON2FluidSystem.hpp index 4c1383d9c..e17feaf7e 100644 --- a/opm/material/fluidsystems/H2ON2FluidSystem.hpp +++ b/opm/material/fluidsystems/H2ON2FluidSystem.hpp @@ -275,12 +275,12 @@ public: typedef Opm::MathToolbox LhsToolbox; typedef Opm::MathToolbox FsToolbox; - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); LhsEval sumMoleFrac = 0; for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) - sumMoleFrac += FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, compIdx)); + sumMoleFrac += FsToolbox::template decay(fluidState.moleFraction(phaseIdx, compIdx)); // liquid phase if (phaseIdx == liquidPhaseIdx) { @@ -293,8 +293,8 @@ public: const auto& rholH2O = H2O::liquidDensity(T, p); const auto& clH2O = rholH2O/H2O::molarMass(); - const auto& xlH2O = FsToolbox::template toLhs(fluidState.moleFraction(liquidPhaseIdx, H2OIdx)); - const auto& xlN2 = FsToolbox::template toLhs(fluidState.moleFraction(liquidPhaseIdx, N2Idx)); + const auto& xlH2O = FsToolbox::template decay(fluidState.moleFraction(liquidPhaseIdx, H2OIdx)); + const auto& xlN2 = FsToolbox::template decay(fluidState.moleFraction(liquidPhaseIdx, N2Idx)); // this assumes each nitrogen molecule displaces exactly one // water molecule in the liquid @@ -309,13 +309,13 @@ public: // for the gas phase assume an ideal gas return IdealGas::molarDensity(T, p) - * FsToolbox::template toLhs(fluidState.averageMolarMass(gasPhaseIdx)) + * FsToolbox::template decay(fluidState.averageMolarMass(gasPhaseIdx)) / LhsToolbox::max(1e-5, sumMoleFrac); // assume ideal mixture: steam and nitrogen don't "see" each // other - const auto& xgH2O = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, H2OIdx)); - const auto& xgN2 = FsToolbox::template toLhs(fluidState.moleFraction(gasPhaseIdx, N2Idx)); + const auto& xgH2O = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, H2OIdx)); + const auto& xgN2 = FsToolbox::template decay(fluidState.moleFraction(gasPhaseIdx, N2Idx)); const auto& rho_gH2O = H2O::gasDensity(T, p*xgH2O); const auto& rho_gN2 = N2::gasDensity(T, p*xgN2); return (rho_gH2O + rho_gN2)/LhsToolbox::max(1e-5, sumMoleFrac); @@ -332,8 +332,8 @@ public: typedef Opm::MathToolbox LhsToolbox; typedef Opm::MathToolbox FsToolbox; - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); // liquid phase if (phaseIdx == liquidPhaseIdx) @@ -361,7 +361,7 @@ public: LhsEval sumx = 0.0; for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) - sumx += FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, compIdx)); + sumx += FsToolbox::template decay(fluidState.moleFraction(phaseIdx, compIdx)); sumx = LhsToolbox::max(1e-10, sumx); for (unsigned i = 0; i < numComponents; ++i) { @@ -371,11 +371,11 @@ public: phiIJ *= phiIJ; phiIJ /= std::sqrt(8*(1 + molarMass(i)/molarMass(j))); divisor += - FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, j)) + FsToolbox::template decay(fluidState.moleFraction(phaseIdx, j)) /sumx*phiIJ; } muResult += - FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, i)) + FsToolbox::template decay(fluidState.moleFraction(phaseIdx, i)) /sumx*mu[i]/divisor; } return muResult; @@ -394,8 +394,8 @@ public: typedef Opm::MathToolbox FsToolbox; - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); // liquid phase if (phaseIdx == liquidPhaseIdx) { @@ -421,8 +421,8 @@ public: { typedef Opm::MathToolbox FsToolbox; - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); // liquid phase if (phaseIdx == liquidPhaseIdx) @@ -441,8 +441,8 @@ public: { typedef Opm::MathToolbox FsToolbox; - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); Valgrind::CheckDefined(T); Valgrind::CheckDefined(p); @@ -459,8 +459,8 @@ public: // "see" the molecules of the other component, which means // that the total specific enthalpy is the sum of the // "partial specific enthalpies" of the components. - const auto& XgH2O = FsToolbox::template toLhs(fluidState.massFraction(gasPhaseIdx, H2OIdx)); - const auto& XgN2 = FsToolbox::template toLhs(fluidState.massFraction(gasPhaseIdx, N2Idx)); + const auto& XgH2O = FsToolbox::template decay(fluidState.massFraction(gasPhaseIdx, H2OIdx)); + const auto& XgN2 = FsToolbox::template decay(fluidState.massFraction(gasPhaseIdx, N2Idx)); LhsEval hH2O = XgH2O*H2O::gasEnthalpy(T, p); LhsEval hN2 = XgN2*N2::gasEnthalpy(T, p); @@ -477,8 +477,8 @@ public: typedef Opm::MathToolbox FsToolbox; - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == liquidPhaseIdx) // liquid phase return H2O::liquidThermalConductivity(T, p); @@ -487,8 +487,8 @@ public: if (useComplexRelations){ // return the sum of the partial conductivity of Nitrogen and Steam - const auto& xH2O = FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, H2OIdx)); - const auto& xN2 = FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, N2Idx)); + const auto& xH2O = FsToolbox::template decay(fluidState.moleFraction(phaseIdx, H2OIdx)); + const auto& xN2 = FsToolbox::template decay(fluidState.moleFraction(phaseIdx, N2Idx)); // Assuming Raoult's, Daltons law and ideal gas in order to obtain the // partial pressures in the gas phase @@ -510,12 +510,12 @@ public: { typedef Opm::MathToolbox FsToolbox; - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); - const auto& xAlphaH2O = FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, H2OIdx)); - const auto& xAlphaN2 = FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, N2Idx)); - const auto& XAlphaH2O = FsToolbox::template toLhs(fluidState.massFraction(phaseIdx, H2OIdx)); - const auto& XAlphaN2 = FsToolbox::template toLhs(fluidState.massFraction(phaseIdx, N2Idx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); + const auto& xAlphaH2O = FsToolbox::template decay(fluidState.moleFraction(phaseIdx, H2OIdx)); + const auto& xAlphaN2 = FsToolbox::template decay(fluidState.moleFraction(phaseIdx, N2Idx)); + const auto& XAlphaH2O = FsToolbox::template decay(fluidState.massFraction(phaseIdx, H2OIdx)); + const auto& XAlphaN2 = FsToolbox::template decay(fluidState.massFraction(phaseIdx, N2Idx)); if (phaseIdx == liquidPhaseIdx) return H2O::liquidHeatCapacity(T, p); diff --git a/opm/material/fluidsystems/H2ON2LiquidPhaseFluidSystem.hpp b/opm/material/fluidsystems/H2ON2LiquidPhaseFluidSystem.hpp index d14a6957a..56bb523e8 100644 --- a/opm/material/fluidsystems/H2ON2LiquidPhaseFluidSystem.hpp +++ b/opm/material/fluidsystems/H2ON2LiquidPhaseFluidSystem.hpp @@ -259,12 +259,12 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); LhsEval sumMoleFrac = 0; for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) - sumMoleFrac += FsToolbox::template toLhs(fluidState.moleFraction(phaseIdx, compIdx)); + sumMoleFrac += FsToolbox::template decay(fluidState.moleFraction(phaseIdx, compIdx)); assert(phaseIdx == liquidPhaseIdx); @@ -277,8 +277,8 @@ public: const LhsEval& rholH2O = H2O::liquidDensity(T, p); const LhsEval& clH2O = rholH2O/H2O::molarMass(); - const auto& xlH2O = FsToolbox::template toLhs(fluidState.moleFraction(liquidPhaseIdx, H2OIdx)); - const auto& xlN2 = FsToolbox::template toLhs(fluidState.moleFraction(liquidPhaseIdx, N2Idx)); + const auto& xlH2O = FsToolbox::template decay(fluidState.moleFraction(liquidPhaseIdx, H2OIdx)); + const auto& xlN2 = FsToolbox::template decay(fluidState.moleFraction(liquidPhaseIdx, N2Idx)); // this assumes each nitrogen molecule displaces exactly one // water molecule in the liquid @@ -296,8 +296,8 @@ public: assert(phaseIdx == liquidPhaseIdx); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); // assume pure water for the liquid phase return H2O::liquidViscosity(T, p); @@ -315,8 +315,8 @@ public: assert(phaseIdx == liquidPhaseIdx); assert(0 <= compIdx && compIdx < numComponents); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (compIdx == H2OIdx) return H2O::vaporPressure(T)/p; @@ -335,8 +335,8 @@ public: assert(phaseIdx == liquidPhaseIdx); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); return BinaryCoeff::H2O_N2::liquidDiffCoeff(T, p); } @@ -351,8 +351,8 @@ public: assert (phaseIdx == liquidPhaseIdx); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); Valgrind::CheckDefined(T); Valgrind::CheckDefined(p); @@ -371,8 +371,8 @@ public: assert(phaseIdx == liquidPhaseIdx); if(useComplexRelations){ - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); return H2O::liquidThermalConductivity(T, p); } else @@ -389,8 +389,8 @@ public: assert (phaseIdx == liquidPhaseIdx); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); return H2O::liquidHeatCapacity(T, p); } diff --git a/opm/material/fluidsystems/SinglePhaseFluidSystem.hpp b/opm/material/fluidsystems/SinglePhaseFluidSystem.hpp index f403aa200..9ea33b5e1 100644 --- a/opm/material/fluidsystems/SinglePhaseFluidSystem.hpp +++ b/opm/material/fluidsystems/SinglePhaseFluidSystem.hpp @@ -194,8 +194,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); return Fluid::density(T, p); } @@ -209,8 +209,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); return Fluid::viscosity(T, p); } @@ -243,8 +243,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); return Fluid::enthalpy(T, p); } @@ -258,8 +258,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); return Fluid::thermalConductivity(T, p); } @@ -273,8 +273,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& T = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& p = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& T = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& p = FsToolbox::template decay(fluidState.pressure(phaseIdx)); return Fluid::heatCapacity(T, p); } }; diff --git a/opm/material/fluidsystems/TwoPhaseImmiscibleFluidSystem.hpp b/opm/material/fluidsystems/TwoPhaseImmiscibleFluidSystem.hpp index 4ed84b7d9..4d8f687dd 100644 --- a/opm/material/fluidsystems/TwoPhaseImmiscibleFluidSystem.hpp +++ b/opm/material/fluidsystems/TwoPhaseImmiscibleFluidSystem.hpp @@ -230,8 +230,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& temperature = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& pressure = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& temperature = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& pressure = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == wettingPhaseIdx) return WettingPhase::density(temperature, pressure); return NonwettingPhase::density(temperature, pressure); @@ -247,8 +247,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& temperature = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& pressure = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& temperature = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& pressure = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == wettingPhaseIdx) return WettingPhase::viscosity(temperature, pressure); return NonwettingPhase::viscosity(temperature, pressure); @@ -285,8 +285,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& temperature = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& pressure = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& temperature = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& pressure = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == wettingPhaseIdx) return WettingPhase::enthalpy(temperature, pressure); return NonwettingPhase::enthalpy(temperature, pressure); @@ -302,8 +302,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& temperature = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& pressure = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& temperature = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& pressure = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == wettingPhaseIdx) return WettingPhase::thermalConductivity(temperature, pressure); return NonwettingPhase::thermalConductivity(temperature, pressure); @@ -319,8 +319,8 @@ public: assert(0 <= phaseIdx && phaseIdx < numPhases); - const auto& temperature = FsToolbox::template toLhs(fluidState.temperature(phaseIdx)); - const auto& pressure = FsToolbox::template toLhs(fluidState.pressure(phaseIdx)); + const auto& temperature = FsToolbox::template decay(fluidState.temperature(phaseIdx)); + const auto& pressure = FsToolbox::template decay(fluidState.pressure(phaseIdx)); if (phaseIdx == wettingPhaseIdx) return WettingPhase::heatCapacity(temperature, pressure); return NonwettingPhase::heatCapacity(temperature, pressure); diff --git a/opm/material/heatconduction/Somerton.hpp b/opm/material/heatconduction/Somerton.hpp index 1312b499a..4288ec45b 100644 --- a/opm/material/heatconduction/Somerton.hpp +++ b/opm/material/heatconduction/Somerton.hpp @@ -99,7 +99,7 @@ public: Valgrind::CheckDefined(params.fullySaturatedLambda(phaseIdx)); if (FluidSystem::isLiquid(phaseIdx)) { - const auto& sat = Toolbox::template toLhs(fluidState.saturation(phaseIdx)); + const auto& sat = Toolbox::template decay(fluidState.saturation(phaseIdx)); lambda += regularizedSqrt_(Toolbox::max(0.0, Toolbox::min(1.0, sat))) * (params.fullySaturatedLambda(phaseIdx) - params.vacuumLambda());