version 3.10-dev
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
7#ifndef DUMUX_MATERIAL_FLUIDMATRIX_THERMALCONDUCTIVITY_SOMERTON_THREE_P_HH
8#define DUMUX_MATERIAL_FLUIDMATRIX_THERMALCONDUCTIVITY_SOMERTON_THREE_P_HH
9
10#include <algorithm>
11#include <cmath>
12
13namespace Dumux {
14
44template<class Scalar>
46{
47public:
53 template<class VolumeVariables>
54 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
55 {
56 using FluidSystem = typename VolumeVariables::FluidSystem;
57
58 const Scalar sw = volVars.saturation(FluidSystem::wPhaseIdx);
59 const Scalar sn = volVars.saturation(FluidSystem::nPhaseIdx);
60 const Scalar lambdaW = volVars.fluidThermalConductivity(FluidSystem::wPhaseIdx);
61 const Scalar lambdaN = volVars.fluidThermalConductivity(FluidSystem::nPhaseIdx);
62 const Scalar lambdaG = volVars.fluidThermalConductivity(FluidSystem::gPhaseIdx);
63 const Scalar lambdaSolid = volVars.solidThermalConductivity();
64 const Scalar porosity = volVars.porosity();
65
66 return effectiveThermalConductivity(sw, sn, lambdaW, lambdaN, lambdaG, lambdaSolid, porosity);
67 }
68
82 static Scalar effectiveThermalConductivity(const Scalar sw,
83 const Scalar sn,
84 const Scalar lambdaW,
85 const Scalar lambdaN,
86 const Scalar lambdaG,
87 const Scalar lambdaSolid,
88 const Scalar porosity)
89 {
90 using std::max;
91 using std::pow;
92 using std::sqrt;
93 const Scalar satW = max<Scalar>(0.0, sw);
94 const Scalar satN = max<Scalar>(0.0, sn);
95
96 // porosity weighted geometric mean
97 const Scalar lSw = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaW, porosity);
98 const Scalar lSn = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaN, porosity);
99 const Scalar lSg = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaG, porosity);
100 const Scalar lambdaEff = lSg + sqrt(satW) * (lSw - lSg) + sqrt(satN) * (lSn -lSg);
101
102 return lambdaEff;
103
104 }
105};
106
107#ifndef DOXYGEN
108#ifndef DUMUX_MATERIAL_FLUIDMATRIX_THERMALCONDUCTIVITY_SOMERTON_TWO_P_HH
109template<class Scalar>
110using ThermalConductivitySomerton [[deprecated("Use ThermalConductivitySomertonThreeP. Will be removed after 3.9.")]] = ThermalConductivitySomertonThreeP<Scalar>;
111#endif
112#endif
113
114} // end namespace Dumux
115
116#endif
Effective thermal conductivity after Somerton.
Definition: thermalconductivitysomerton3p.hh:46
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars)
Effective thermal conductivity in for three phases.
Definition: thermalconductivitysomerton3p.hh:54
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 in for three phases.
Definition: thermalconductivitysomerton3p.hh:82
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:127
Definition: adapt.hh:17