Line | Branch | Exec | Source |
---|---|---|---|
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-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder | ||
5 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
6 | // | ||
7 | /*! | ||
8 | * \file | ||
9 | * \ingroup EffectiveHeatConductivity | ||
10 | * \brief Effective thermal conductivity after Somerton | ||
11 | */ | ||
12 | |||
13 | #ifndef DUMUX_MATERIAL_FLUIDMATRIX_THERMALCONDUCTIVITY_SOMERTON_THREE_P_HH | ||
14 | #define DUMUX_MATERIAL_FLUIDMATRIX_THERMALCONDUCTIVITY_SOMERTON_THREE_P_HH | ||
15 | |||
16 | #include <algorithm> | ||
17 | #include <cmath> | ||
18 | |||
19 | namespace Dumux { | ||
20 | |||
21 | /*! | ||
22 | * \addtogroup EffectiveHeatConductivity | ||
23 | * \copydetails Dumux::ThermalConductivitySomertonThreeP | ||
24 | */ | ||
25 | |||
26 | /*! | ||
27 | * \ingroup EffectiveHeatConductivity | ||
28 | * \brief Effective thermal conductivity after Somerton | ||
29 | * | ||
30 | * ### Somerton (three fluid phases) | ||
31 | * | ||
32 | * The Somerton method \cite somerton1974 computes the thermal conductivity of dry and the wet soil material. | ||
33 | * It is extended here to a three phase system of water (w), NAPL (n) and gas (g). | ||
34 | * It uses a root function of the water and NAPL saturation to compute the | ||
35 | * effective thermal conductivity for a three-phase fluidsystem. The individual thermal | ||
36 | * conductivities are calculated as geometric mean of the thermal conductivity of the porous | ||
37 | * material and of the respective fluid phase. | ||
38 | * | ||
39 | * The effective thermal conductivity of `ThermalConductivitySomertonThreeP` is given by | ||
40 | * \f[ | ||
41 | * \lambda_\text{eff} = \lambda_\text{g,eff} + \sqrt{S_\text{w}} \left(\lambda_\text{w,eff} - \lambda_\text{g,eff}\right) + | ||
42 | * \sqrt{S_\text{n}} \left(\lambda_\text{n,eff} - \lambda_\text{g,eff}\right) | ||
43 | * \f] | ||
44 | * | ||
45 | * with \f$ S_\text{w} \f$ the water saturation, | ||
46 | * \f$ S_\text{n} \f$ the NAPL saturation, the effective phase saturations given by | ||
47 | * \f$ \lambda_{\alpha,\text{eff}} = (\lambda_\text{s})^{\left(1-\phi\right)} (\lambda_\alpha)^\phi, \alpha \in \{\text{w,n,g}\}\f$ | ||
48 | * (geometric mean) and \f$ \lambda_\text{s} \f$ is the thermal conductivity of the solid phase. | ||
49 | */ | ||
50 | template<class Scalar> | ||
51 | class ThermalConductivitySomertonThreeP | ||
52 | { | ||
53 | public: | ||
54 | /*! | ||
55 | * \brief Effective thermal conductivity in \f$\mathrm{W/(m K)}\f$ for three phases | ||
56 | * \param volVars volume variables | ||
57 | * \return Effective thermal conductivity in \f$\mathrm{W/(m K)}\f$ for three phases | ||
58 | */ | ||
59 | template<class VolumeVariables> | ||
60 | 9041184 | static Scalar effectiveThermalConductivity(const VolumeVariables& volVars) | |
61 | { | ||
62 | using FluidSystem = typename VolumeVariables::FluidSystem; | ||
63 | |||
64 | 9041184 | const Scalar sw = volVars.saturation(FluidSystem::wPhaseIdx); | |
65 | 9041184 | const Scalar sn = volVars.saturation(FluidSystem::nPhaseIdx); | |
66 | 9041184 | const Scalar lambdaW = volVars.fluidThermalConductivity(FluidSystem::wPhaseIdx); | |
67 | 9041184 | const Scalar lambdaN = volVars.fluidThermalConductivity(FluidSystem::nPhaseIdx); | |
68 | 9041184 | const Scalar lambdaG = volVars.fluidThermalConductivity(FluidSystem::gPhaseIdx); | |
69 | 9041184 | const Scalar lambdaSolid = volVars.solidThermalConductivity(); | |
70 | 9041184 | const Scalar porosity = volVars.porosity(); | |
71 | |||
72 | 9041184 | return effectiveThermalConductivity(sw, sn, lambdaW, lambdaN, lambdaG, lambdaSolid, porosity); | |
73 | } | ||
74 | |||
75 | /*! | ||
76 | * \brief Effective thermal conductivity in \f$\mathrm{W/(m K)}\f$ for three phases | ||
77 | * | ||
78 | * \param sw The saturation of the wetting phase | ||
79 | * \param sn The saturation of the nonwetting phase | ||
80 | * \param lambdaW The thermal conductivity of the water phase in \f$\mathrm{W/(m K)}\f$ | ||
81 | * \param lambdaN The thermal conductivity of the NAPL phase in \f$\mathrm{W/(m K)}\f$ | ||
82 | * \param lambdaG The thermal conductivity of the gas phase in \f$\mathrm{W/(m K)}\f$ | ||
83 | * \param lambdaSolid The thermal conductivity of the solid phase in \f$\mathrm{W/(m K)}\f$ | ||
84 | * \param porosity The porosity | ||
85 | * | ||
86 | * \return Effective thermal conductivity in \f$\mathrm{W/(m K)}\f$ for three phases | ||
87 | */ | ||
88 | 9041184 | static Scalar effectiveThermalConductivity(const Scalar sw, | |
89 | const Scalar sn, | ||
90 | const Scalar lambdaW, | ||
91 | const Scalar lambdaN, | ||
92 | const Scalar lambdaG, | ||
93 | const Scalar lambdaSolid, | ||
94 | const Scalar porosity) | ||
95 | { | ||
96 | using std::max; | ||
97 | using std::pow; | ||
98 | using std::sqrt; | ||
99 |
1/2✓ Branch 0 taken 9041184 times.
✗ Branch 1 not taken.
|
9041184 | const Scalar satW = max<Scalar>(0.0, sw); |
100 |
2/2✓ Branch 0 taken 8055382 times.
✓ Branch 1 taken 985802 times.
|
9041184 | const Scalar satN = max<Scalar>(0.0, sn); |
101 | |||
102 | // porosity weighted geometric mean | ||
103 | 9041184 | const Scalar lSw = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaW, porosity); | |
104 | 9041184 | const Scalar lSn = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaN, porosity); | |
105 | 9041184 | const Scalar lSg = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaG, porosity); | |
106 | 9041184 | const Scalar lambdaEff = lSg + sqrt(satW) * (lSw - lSg) + sqrt(satN) * (lSn -lSg); | |
107 | |||
108 | 9041184 | return lambdaEff; | |
109 | |||
110 | } | ||
111 | }; | ||
112 | |||
113 | |||
114 | } // end namespace Dumux | ||
115 | |||
116 | #endif | ||
117 |