3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
thermalconductivitysomerton3p.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_3P_HH
25#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_SOMERTON_3P_HH
26
27#include <algorithm>
28#include <cmath>
29
30namespace Dumux {
31
63template<class Scalar>
64class ThermalConductivitySomerton
65{
66public:
79 template<class VolumeVariables>
80 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
81 {
82 using FluidSystem = typename VolumeVariables::FluidSystem;
83
84 const Scalar sw = volVars.saturation(FluidSystem::wPhaseIdx);
85 const Scalar sn = volVars.saturation(FluidSystem::nPhaseIdx);
86 const Scalar lambdaW = volVars.fluidThermalConductivity(FluidSystem::wPhaseIdx);
87 const Scalar lambdaN = volVars.fluidThermalConductivity(FluidSystem::nPhaseIdx);
88 const Scalar lambdaG = volVars.fluidThermalConductivity(FluidSystem::gPhaseIdx);
89 const Scalar lambdaSolid = volVars.solidThermalConductivity();
90 const Scalar porosity = volVars.porosity();
91
92 return effectiveThermalConductivity(sw, sn, lambdaW, lambdaN, lambdaG, lambdaSolid, porosity);
93 }
94
108 static Scalar effectiveThermalConductivity(const Scalar sw,
109 const Scalar sn,
110 const Scalar lambdaW,
111 const Scalar lambdaN,
112 const Scalar lambdaG,
113 const Scalar lambdaSolid,
114 const Scalar porosity)
115 {
116 using std::max;
117 using std::pow;
118 using std::sqrt;
119 const Scalar satW = max<Scalar>(0.0, sw);
120 const Scalar satN = max<Scalar>(0.0, sn);
121
122 // porosity weighted geometric mean
123 const Scalar lSw = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaW, porosity);
124 const Scalar lSn = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaN, porosity);
125 const Scalar lSg = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaG, porosity);
126 const Scalar lambdaEff = lSg + sqrt(satW) * (lSw - lSg) + sqrt(satN) * (lSn -lSg);
127
128 return lambdaEff;
129
130 }
131};
132} // end namespace Dumux
133#endif
Definition: adapt.hh:29
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:139
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars)
effective thermal conductivity after Somerton (1974) extended for a three phase system
Definition: thermalconductivitysomerton3p.hh:80
static Scalar effectiveThermalConductivity(const Scalar sw, const Scalar sn, const Scalar lambdaW, const Scalar lambdaN, const Scalar lambdaG, const Scalar lambdaSolid, const Scalar porosity)
effective thermal conductivity after Somerton (1974)
Definition: thermalconductivitysomerton3p.hh:108