3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_MATERIAL_THERMALCONDUCTIVITY_AVERAGE_HH
25#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_AVERAGE_HH
26
27#include <algorithm>
28
29namespace Dumux {
30
35template<class Scalar>
37{
38public:
42 template<class VolumeVariables, class SpatialParams, class Element, class FVGeometry>
43 [[deprecated("Signature deprecated. Use signature with volume variables only!")]]
44 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars,
45 const SpatialParams& spatialParams,
46 const Element& element,
47 const FVGeometry& fvGeometry,
48 const typename FVGeometry::SubControlVolume& scv)
49 {
50 return effectiveThermalConductivity(volVars);
51 }
52
59 template<class VolumeVariables>
60 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
61 {
62 constexpr int numFluidPhases = VolumeVariables::numFluidPhases();
63
64 // Get the thermal conductivities and the porosity from the volume variables
65 Scalar lambdaFluid = 0.0;
66 for (int phaseIdx = 0; phaseIdx < numFluidPhases; ++phaseIdx)
67 lambdaFluid += volVars.fluidThermalConductivity(phaseIdx)*volVars.saturation(phaseIdx);
68
69 const Scalar lambdaSolid = volVars.solidThermalConductivity();
70 const Scalar porosity = volVars.porosity();
71
72 return lambdaSolid*(1-porosity) + lambdaFluid*porosity;
73 }
74};
75
76} // end namespace Dumux
77
78#endif
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:139
Relation for a simple effective thermal conductivity.
Definition: thermalconductivityaverage.hh:37
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars, const SpatialParams &spatialParams, const Element &element, const FVGeometry &fvGeometry, const typename FVGeometry::SubControlVolume &scv)
effective thermal conductivity
Definition: thermalconductivityaverage.hh:44
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars)
Relation for a simple effective thermal conductivity .
Definition: thermalconductivityaverage.hh:60