version 3.8
somerton.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_FLUIDMATRIX_THERMALCONDUCTIVITY_SOMERTON_HH
13#define DUMUX_MATERIAL_FLUIDMATRIX_THERMALCONDUCTIVITY_SOMERTON_HH
14
15#include <algorithm>
16#include <cmath>
17
18namespace Dumux {
19
46template<class Scalar>
48{
49public:
62 template<class VolumeVariables>
63 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
64 {
65 using FluidSystem = typename VolumeVariables::FluidSystem;
66 static_assert(FluidSystem::numPhases == 2, "ThermalConductivitySomerton only works for two-phase fluid systems!");
67 static_assert((FluidSystem::isGas(0) && !FluidSystem::isGas(1)) || (!FluidSystem::isGas(0) && FluidSystem::isGas(1)),
68 "ThermalConductivitySomerton only works if one phase is gaseous and one is liquid!");
69
70 constexpr int liquidPhaseIdx = FluidSystem::isGas(0) ? 1 : 0;
71 constexpr int gasPhaseIdx = FluidSystem::isGas(0) ? 0 : 1;
72
73 const Scalar satLiquid = volVars.saturation(liquidPhaseIdx);
74 const Scalar lambdaLiquid = volVars.fluidThermalConductivity(liquidPhaseIdx);
75 const Scalar lambdaGas = volVars.fluidThermalConductivity(gasPhaseIdx);
76 const Scalar lambdaSolid = volVars.solidThermalConductivity();
77 const Scalar porosity = volVars.porosity();
78
79 return effectiveThermalConductivity_(satLiquid, lambdaLiquid, lambdaGas, lambdaSolid, porosity);
80 }
81
82private:
95 static Scalar effectiveThermalConductivity_(const Scalar satLiquid,
96 const Scalar lambdaLiquid,
97 const Scalar lambdaGas,
98 const Scalar lambdaSolid,
99 const Scalar porosity,
100 const Scalar rhoSolid = 0.0 /*unused*/)
101 {
102 using std::max;
103 using std::pow;
104 using std::sqrt;
105 const Scalar satLiquidPhysical = max<Scalar>(0.0, satLiquid);
106 // geometric mean, using ls^(1-p)*l^p = ls*(l/ls)^p
107 const Scalar lambdaSaturated = lambdaSolid * pow(lambdaLiquid / lambdaSolid, porosity);
108 const Scalar lambdaDry = lambdaSolid * pow(lambdaGas / lambdaSolid, porosity);
109
110 return lambdaDry + sqrt(satLiquidPhysical) * (lambdaSaturated - lambdaDry);
111 }
112};
113
114} // end namespace Dumux
115
116#endif
Relation for the saturation-dependent effective thermal conductivity.
Definition: somerton.hh:48
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars)
effective thermal conductivity after Somerton (1974)
Definition: somerton.hh:63
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:127
Definition: adapt.hh:17