Skip to content
Snippets Groups Projects
Commit ca11ba4d authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

Merge branch 'feature/less-pow-in-thermal-conductivity-laws' into 'master'

Half number of std::pow calls in thermal conductivity laws

I'd like to back-port this to 2.10 if it proofs itself.

See merge request !226
parents dfe5e869 ff709945
No related branches found
No related tags found
1 merge request!226Half number of std::pow calls in thermal conductivity laws
...@@ -128,7 +128,8 @@ public: ...@@ -128,7 +128,8 @@ public:
const Scalar kappa = 15.6; // fitted to medium quartz sand const Scalar kappa = 15.6; // fitted to medium quartz sand
const Scalar rhoBulk = rhoSolid*porosity; const Scalar rhoBulk = rhoSolid*porosity;
const Scalar lSat = std::pow(lambdaSolid, (1.0 - porosity)) * std::pow(lambdaW, porosity); // lambdaSolid^(1-porosity) * lambdaW^porosity =
const Scalar lSat = lambdaSolid * std::pow(lambdaW / lambdaSolid, porosity);
const Scalar lDry = (0.135*rhoBulk + 64.7)/(rhoSolid - 0.947*rhoBulk); const Scalar lDry = (0.135*rhoBulk + 64.7)/(rhoSolid - 0.947*rhoBulk);
const Scalar Ke = (kappa*satW)/(1+(kappa-1)*satW);// Kersten number, equation 13 const Scalar Ke = (kappa*satW)/(1+(kappa-1)*satW);// Kersten number, equation 13
......
...@@ -119,9 +119,9 @@ public: ...@@ -119,9 +119,9 @@ public:
const Scalar rhoSolid = 0.0 /*unused*/) const Scalar rhoSolid = 0.0 /*unused*/)
{ {
const Scalar satW = std::max<Scalar>(0.0, sw); const Scalar satW = std::max<Scalar>(0.0, sw);
// geometric mean // geometric mean, using ls^(1-p)*l^p = ls*(l/ls)^p
const Scalar lSat = std::pow(lambdaSolid, (1.0 - porosity)) * std::pow(lambdaW, porosity); const Scalar lSat = lambdaSolid * std::pow(lambdaW / lambdaSolid, porosity);
const Scalar lDry = std::pow(lambdaSolid, (1.0 - porosity)) * std::pow(lambdaN, porosity); const Scalar lDry = lambdaSolid * std::pow(lambdaN / lambdaSolid, porosity);
return lDry + std::sqrt(satW) * (lSat - lDry); return lDry + std::sqrt(satW) * (lSat - lDry);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment