diff --git a/dumux/material/components/air.hh b/dumux/material/components/air.hh index 945b997bfc10d7796a4a8b82e1b91b58f1715190..2952bc33deb32a225b08c6f5fe577293c4a58e89 100644 --- a/dumux/material/components/air.hh +++ b/dumux/material/components/air.hh @@ -143,7 +143,8 @@ public: 1.16145*std::pow(Tstar, -0.14874) + 0.52487*std::exp(- 0.77320*Tstar) + 2.16178*std::exp(- 2.43787*Tstar); - Scalar mu = 40.785*Fc*std::sqrt(M*temperature)/(std::pow(Vc, 2./3)*Omega_v); + Scalar mu = 40.785 * Fc * std::sqrt(M * temperature) + / (std::cbrt(Vc * Vc) * Omega_v); // convertion from micro poise to Pa s return mu/1e6 / 10; @@ -152,14 +153,12 @@ public: // simpler method, from old constrelAir.hh static Scalar simpleGasViscosity(Scalar temperature, Scalar pressure) { - Scalar r; if(temperature < 273.15 || temperature > 660.) { DUNE_THROW(NumericalProblem, "simpleGasViscosity: Temperature out of range! (T = " << temperature << " K)"); } - r = 1.496*1.E-6*std::pow(temperature,1.5)/(temperature+120.); - return (r); + return 1.496e-6 * std::cbrt(temperature * temperature) / (temperature + 120.); } diff --git a/dumux/material/components/h2o.hh b/dumux/material/components/h2o.hh index d80bfc6cd990118c98b3c4795010bec6992920b8..636f6939bda91f54c235f241c506e76167999c14 100644 --- a/dumux/material/components/h2o.hh +++ b/dumux/material/components/h2o.hh @@ -867,7 +867,7 @@ private: static constexpr Scalar heatCap_p_Region1_(Scalar temperature, Scalar pressure) { return - - pow(Region1::tau(temperature), 2 ) * + -1 * Region1::tau(temperature) * Region1::tau(temperature) * Region1::ddGamma_ddTau(temperature, pressure) * Rs; } @@ -877,10 +877,10 @@ private: { Scalar tau = Region1::tau(temperature); Scalar num = Region1::dGamma_dPi(temperature, pressure) - tau * Region1::ddGamma_dTaudPi(temperature, pressure); - Scalar diff = pow(num, 2) / Region1::ddGamma_ddPi(temperature, pressure); + Scalar diff = num * num / Region1::ddGamma_ddPi(temperature, pressure); return - - pow(tau, 2 ) * + -1 * tau * tau * Region1::ddGamma_ddTau(temperature, pressure) * Rs + diff; } @@ -925,7 +925,7 @@ private: static constexpr Scalar heatCap_p_Region2_(Scalar temperature, Scalar pressure) { return - - pow(Region2::tau(temperature), 2 ) * + -1 * Region2::tau(temperature) * Region2::tau(temperature) * Region2::ddGamma_ddTau(temperature, pressure) * Rs; } @@ -938,7 +938,7 @@ private: Scalar num = 1 + pi * Region2::dGamma_dPi(temperature, pressure) + tau * pi * Region2::ddGamma_dTaudPi(temperature, pressure); Scalar diff = num * num / (1 - pi * pi * Region2::ddGamma_ddPi(temperature, pressure)); return - - pow(tau, 2 ) * + -1 * tau * tau * Region2::ddGamma_ddTau(temperature, pressure) * Rs - diff; }