version 3.9
thermalconductivityaverage.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_THERMALCONDUCTIVITY_AVERAGED_HH
8#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_AVERAGED_HH
9
10#include <algorithm>
11
12namespace Dumux {
13
41template<class Scalar>
43{
44public:
50 template<class VolumeVariables>
51 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
52 {
53 constexpr int numFluidPhases = VolumeVariables::numFluidPhases();
54
55 // Get the thermal conductivities and the porosity from the volume variables
56 Scalar lambdaFluid = 0.0;
57 for (int phaseIdx = 0; phaseIdx < numFluidPhases; ++phaseIdx)
58 lambdaFluid += volVars.fluidThermalConductivity(phaseIdx)*volVars.saturation(phaseIdx);
59
60 const Scalar lambdaSolid = volVars.solidThermalConductivity();
61 const Scalar porosity = volVars.porosity();
62
63 return lambdaSolid*(1-porosity) + lambdaFluid*porosity;
64 }
65};
66
67} // end namespace Dumux
68
69#endif
Effective thermal conductivity based on weighted arithmetic average.
Definition: thermalconductivityaverage.hh:43
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars)
Effective thermal conductivity in .
Definition: thermalconductivityaverage.hh:51
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:127
Definition: adapt.hh:17