3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
thermalconductivityjohansen.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_JOHANSEN_HH
25#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_JOHANSEN_HH
26
27#include <cmath>
28#include <algorithm>
29
30namespace Dumux {
31
33{
34 static const int wPhaseIdx = 0;
35 static const int nPhaseIdx = 1;
36};
37
64template<class Scalar, class Indices = JohansenIndices>
66{
67public:
71 template<class VolumeVariables, class SpatialParams, class Element, class FVGeometry>
72 [[deprecated("Signature deprecated. Use signature with volume variables only!")]]
73 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars,
74 const SpatialParams& spatialParams,
75 const Element& element,
76 const FVGeometry& fvGeometry,
77 const typename FVGeometry::SubControlVolume& scv)
78 {
79 return effectiveThermalConductivity(volVars);
80 }
81
97 template<class VolumeVariables>
98 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
99 {
100 using FluidSystem = typename VolumeVariables::FluidSystem;
101 static_assert(FluidSystem::numPhases == 2, "ThermalConductivitySomerton only works for two-phase fluid systems!");
102 // TODO: there should be an assertion that the indices are correct and 0 is actually the wetting phase!
103
104 const Scalar sw = volVars.saturation(Indices::wPhaseIdx);
105 const Scalar lambdaW = volVars.fluidThermalConductivity(Indices::wPhaseIdx);
106 const Scalar lambdaN = volVars.fluidThermalConductivity(Indices::nPhaseIdx);
107 const Scalar lambdaSolid = volVars.solidThermalConductivity();
108 const Scalar porosity = volVars.porosity();
109 const Scalar rhoSolid = volVars.solidDensity();
110
111 return effectiveThermalConductivity(sw, lambdaW, lambdaN, lambdaSolid, porosity, rhoSolid);
112 }
113
126 static Scalar effectiveThermalConductivity(const Scalar Sw,
127 const Scalar lambdaW,
128 const Scalar lambdaN,
129 const Scalar lambdaSolid,
130 const Scalar porosity,
131 const Scalar rhoSolid)
132 {
133 using std::max;
134 const Scalar satW = max<Scalar>(0.0, Sw);
135
136 const Scalar kappa = 15.6; // fitted to medium quartz sand
137 const Scalar rhoBulk = rhoSolid*porosity;
138 // lambdaSolid^(1-porosity) * lambdaW^porosity =
139
140 using std::pow;
141 const Scalar lSat = lambdaSolid * pow(lambdaW / lambdaSolid, porosity);
142 const Scalar lDry = (0.135*rhoBulk + 64.7)/(rhoSolid - 0.947*rhoBulk);
143 const Scalar Ke = (kappa*satW)/(1+(kappa-1)*satW);// Kersten number, equation 13
144
145 return lDry + Ke * (lSat - lDry); // equation 14
146 }
147};
148} // end namespace Dumux
149#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
Definition: thermalconductivityjohansen.hh:33
static const int wPhaseIdx
Definition: thermalconductivityjohansen.hh:34
static const int nPhaseIdx
Definition: thermalconductivityjohansen.hh:35
Relation for the saturation-dependent effective thermal conductivity.
Definition: thermalconductivityjohansen.hh:66
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars)
Returns the effective thermal conductivity after Johansen (1975) .
Definition: thermalconductivityjohansen.hh:98
static Scalar effectiveThermalConductivity(const Scalar Sw, const Scalar lambdaW, const Scalar lambdaN, const Scalar lambdaSolid, const Scalar porosity, const Scalar rhoSolid)
Returns the effective thermal conductivity after Johansen (1975) .
Definition: thermalconductivityjohansen.hh:126
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars, const SpatialParams &spatialParams, const Element &element, const FVGeometry &fvGeometry, const typename FVGeometry::SubControlVolume &scv)
effective thermal conductivity after Johansen (1975)
Definition: thermalconductivityjohansen.hh:73