version 3.8
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//
12#ifndef DUMUX_MATERIAL_THERMALCONDUCTIVITY_SOMERTON_3P_HH
13#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_SOMERTON_3P_HH
14
15#include <algorithm>
16#include <cmath>
17
18namespace Dumux {
19
51template<class Scalar>
52class ThermalConductivitySomerton
53{
54public:
67 template<class VolumeVariables>
68 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
69 {
70 using FluidSystem = typename VolumeVariables::FluidSystem;
71
72 const Scalar sw = volVars.saturation(FluidSystem::wPhaseIdx);
73 const Scalar sn = volVars.saturation(FluidSystem::nPhaseIdx);
74 const Scalar lambdaW = volVars.fluidThermalConductivity(FluidSystem::wPhaseIdx);
75 const Scalar lambdaN = volVars.fluidThermalConductivity(FluidSystem::nPhaseIdx);
76 const Scalar lambdaG = volVars.fluidThermalConductivity(FluidSystem::gPhaseIdx);
77 const Scalar lambdaSolid = volVars.solidThermalConductivity();
78 const Scalar porosity = volVars.porosity();
79
80 return effectiveThermalConductivity(sw, sn, lambdaW, lambdaN, lambdaG, lambdaSolid, porosity);
81 }
82
96 static Scalar effectiveThermalConductivity(const Scalar sw,
97 const Scalar sn,
98 const Scalar lambdaW,
99 const Scalar lambdaN,
100 const Scalar lambdaG,
101 const Scalar lambdaSolid,
102 const Scalar porosity)
103 {
104 using std::max;
105 using std::pow;
106 using std::sqrt;
107 const Scalar satW = max<Scalar>(0.0, sw);
108 const Scalar satN = max<Scalar>(0.0, sn);
109
110 // porosity weighted geometric mean
111 const Scalar lSw = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaW, porosity);
112 const Scalar lSn = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaN, porosity);
113 const Scalar lSg = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaG, porosity);
114 const Scalar lambdaEff = lSg + sqrt(satW) * (lSw - lSg) + sqrt(satN) * (lSn -lSg);
115
116 return lambdaEff;
117
118 }
119};
120} // end namespace Dumux
121#endif
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars)
effective thermal conductivity after Somerton (1974) extended for a three phase system
Definition: thermalconductivitysomerton3p.hh:68
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:96
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:127
Definition: adapt.hh:17