3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
thermalconductivitysomerton.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*****************************************************************************
4 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_MATERIAL_THERMALCONDUCTIVITY_SOMERTON_HH
25#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_SOMERTON_HH
26
27#include <algorithm>
28#include <cmath>
29
30namespace Dumux {
31
58template<class Scalar>
60{
61public:
74 template<class VolumeVariables>
75 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
76 {
77 using FluidSystem = typename VolumeVariables::FluidSystem;
78 static_assert(FluidSystem::numPhases == 2, "ThermalConductivitySomerton only works for two-phase fluid systems!");
79 static_assert((FluidSystem::isGas(0) && !FluidSystem::isGas(1)) || (!FluidSystem::isGas(0) && FluidSystem::isGas(1)),
80 "ThermalConductivitySomerton only works if one phase is gaseous and one is liquid!");
81
82 constexpr int liquidPhaseIdx = FluidSystem::isGas(0) ? 1 : 0;
83 constexpr int gasPhaseIdx = FluidSystem::isGas(0) ? 0 : 1;
84
85 const Scalar satLiquid = volVars.saturation(liquidPhaseIdx);
86 const Scalar lambdaLiquid = volVars.fluidThermalConductivity(liquidPhaseIdx);
87 const Scalar lambdaGas = volVars.fluidThermalConductivity(gasPhaseIdx);
88 const Scalar lambdaSolid = volVars.solidThermalConductivity();
89 const Scalar porosity = volVars.porosity();
90
91 return effectiveThermalConductivity_(satLiquid, lambdaLiquid, lambdaGas, lambdaSolid, porosity);
92 }
93
94private:
107 static Scalar effectiveThermalConductivity_(const Scalar satLiquid,
108 const Scalar lambdaLiquid,
109 const Scalar lambdaGas,
110 const Scalar lambdaSolid,
111 const Scalar porosity,
112 const Scalar rhoSolid = 0.0 /*unused*/)
113 {
114 using std::max;
115 using std::pow;
116 using std::sqrt;
117 const Scalar satLiquidPhysical = max<Scalar>(0.0, satLiquid);
118 // geometric mean, using ls^(1-p)*l^p = ls*(l/ls)^p
119 const Scalar lSat = lambdaSolid * pow(lambdaLiquid / lambdaSolid, porosity);
120 const Scalar lDry = lambdaSolid * pow(lambdaGas / lambdaSolid, porosity);
121
122 return lDry + sqrt(satLiquidPhysical) * (lSat - lDry);
123 }
124};
125
126} // end namespace Dumux
127
128#endif
Definition: adapt.hh:29
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:139
Relation for the saturation-dependent effective thermal conductivity.
Definition: thermalconductivitysomerton.hh:60
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars)
effective thermal conductivity after Somerton (1974)
Definition: thermalconductivitysomerton.hh:75