3.1-git
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:
70 template<class VolumeVariables, class SpatialParams, class Element, class FVGeometry>
71 [[deprecated("Signature deprecated. Use signature with volume variables only!")]]
72 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars,
73 const SpatialParams& spatialParams,
74 const Element& element,
75 const FVGeometry& fvGeometry,
76 const typename FVGeometry::SubControlVolume& scv)
77 {
78 return effectiveThermalConductivity(volVars);
79 }
80
93 template<class VolumeVariables>
94 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
95 {
96 using FluidSystem = typename VolumeVariables::FluidSystem;
97
98 const Scalar sw = volVars.saturation(FluidSystem::wPhaseIdx);
99 const Scalar sn = volVars.saturation(FluidSystem::nPhaseIdx);
100 const Scalar lambdaW = volVars.fluidThermalConductivity(FluidSystem::wPhaseIdx);
101 const Scalar lambdaN = volVars.fluidThermalConductivity(FluidSystem::nPhaseIdx);
102 const Scalar lambdaG = volVars.fluidThermalConductivity(FluidSystem::gPhaseIdx);
103 const Scalar lambdaSolid = volVars.solidThermalConductivity();
104 const Scalar porosity = volVars.porosity();
105
106 return effectiveThermalConductivity(sw, sn, lambdaW, lambdaN, lambdaG, lambdaSolid, porosity);
107 }
108
122 static Scalar effectiveThermalConductivity(const Scalar sw,
123 const Scalar sn,
124 const Scalar lambdaW,
125 const Scalar lambdaN,
126 const Scalar lambdaG,
127 const Scalar lambdaSolid,
128 const Scalar porosity)
129 {
130 using std::max;
131 using std::pow;
132 using std::sqrt;
133 const Scalar satW = max<Scalar>(0.0, sw);
134 const Scalar satN = max<Scalar>(0.0, sn);
135
136// const Scalar lSw = 1.8; //pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaW, porosity);
137// const Scalar lSn = 0.65; //pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaN, porosity);
138// const Scalar lSg = 0.35; //pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaG, porosity);
139 // porosity weighted geometric mean
140 const Scalar lSw = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaW, porosity);
141 const Scalar lSn = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaN, porosity);
142 const Scalar lSg = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaG, porosity);
143 const Scalar lambdaEff = lSg + sqrt(satW) * (lSw - lSg) + sqrt(satN) * (lSn -lSg);
144
145 return lambdaEff;
146
147 }
148};
149} // end namespace Dumux
150#endif
make the local view function available whenever we use the grid geometry
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:94
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:122
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars, const SpatialParams &spatialParams, const Element &element, const FVGeometry &fvGeometry, const typename FVGeometry::SubControlVolume &scv)
effective thermal conductivity after Somerton (1974) extended for a three phase system
Definition: thermalconductivitysomerton3p.hh:72