version 3.8.0
Loading...
Searching...
No Matches
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//
12#ifndef DUMUX_MATERIAL_THERMALCONDUCTIVITY_AVERAGE_HH
13#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_AVERAGE_HH
14
15#include <algorithm>
16
17namespace Dumux {
18
23template<class Scalar>
25{
26public:
33 template<class VolumeVariables>
34 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
35 {
36 constexpr int numFluidPhases = VolumeVariables::numFluidPhases();
37
38 // Get the thermal conductivities and the porosity from the volume variables
39 Scalar lambdaFluid = 0.0;
40 for (int phaseIdx = 0; phaseIdx < numFluidPhases; ++phaseIdx)
41 lambdaFluid += volVars.fluidThermalConductivity(phaseIdx)*volVars.saturation(phaseIdx);
42
43 const Scalar lambdaSolid = volVars.solidThermalConductivity();
44 const Scalar porosity = volVars.porosity();
45
46 return lambdaSolid*(1-porosity) + lambdaFluid*porosity;
47 }
48};
49
50} // end namespace Dumux
51
52#endif
Relation for a simple effective thermal conductivity.
Definition thermalconductivityaverage.hh:25
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars)
Relation for a simple effective thermal conductivity .
Definition thermalconductivityaverage.hh:34
Definition adapt.hh:17