version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
13#ifndef DUMUX_MATERIAL_THERMALCONDUCTIVITY_AVERAGED_HH
14#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_AVERAGED_HH
15
16#include <algorithm>
17
18namespace Dumux {
19
47template<class Scalar>
49{
50public:
56 template<class VolumeVariables>
57 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
58 {
59 constexpr int numFluidPhases = VolumeVariables::numFluidPhases();
60
61 // Get the thermal conductivities and the porosity from the volume variables
62 Scalar lambdaFluid = 0.0;
63 for (int phaseIdx = 0; phaseIdx < numFluidPhases; ++phaseIdx)
64 lambdaFluid += volVars.fluidThermalConductivity(phaseIdx)*volVars.saturation(phaseIdx);
65
66 const Scalar lambdaSolid = volVars.solidThermalConductivity();
67 const Scalar porosity = volVars.porosity();
68
69 return lambdaSolid*(1-porosity) + lambdaFluid*porosity;
70 }
71};
72
73} // end namespace Dumux
74
75#endif
Effective thermal conductivity based on weighted arithmetic average.
Definition: thermalconductivityaverage.hh:49
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars)
Effective thermal conductivity in .
Definition: thermalconductivityaverage.hh:57
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:127
Definition: adapt.hh:17