3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
thermalconductivitysimplefluidlumping.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_SIMPLE_FLUID_LUMPING_HH
25#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_SIMPLE_FLUID_LUMPING_HH
26
27#include <assert.h>
28#include <algorithm>
29
30namespace Dumux {
31
37template<class Scalar, int numEnergyEquationsFluid>
39{
40
41public:
45 template<class VolumeVariables, class SpatialParams, class Element, class FVGeometry>
46 [[deprecated("Signature deprecated. Use signature with volume variables only!")]]
47 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars,
48 const SpatialParams& spatialParams,
49 const Element& element,
50 const FVGeometry& fvGeometry,
51 const typename FVGeometry::SubControlVolume& scv)
52 {
53 return effectiveThermalConductivity(volVars);
54 }
55
63 template<class VolumeVariables>
64 static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
65 {
66 using FluidSystem = typename VolumeVariables::FluidSystem;
67 const Scalar sw = volVars.saturation(FluidSystem::phase0Idx);
68 const Scalar lambdaW = volVars.fluidThermalConductivity(FluidSystem::phase0Idx);
69 const Scalar lambdaN = volVars.fluidThermalConductivity(FluidSystem::phase1Idx);
70 const Scalar lambdaSolid = volVars.solidThermalConductivity();
71 const Scalar porosity = volVars.porosity();
72
73 return effectiveThermalConductivity(sw, lambdaW, lambdaN, lambdaSolid, porosity);
74 }
75
88 static Scalar effectiveThermalConductivity(const Scalar sw,
89 const Scalar lambdaW,
90 const Scalar lambdaN,
91 const Scalar lambdaSolid,
92 const Scalar porosity,
93 const Scalar rhoSolid = 0.0 /*unused*/)
94 {
95 assert(numEnergyEquationsFluid != 2) ;
96
97 // Franz Lindner / Shi & Wang 2011
98 using std::max;
99 const Scalar satW = max<Scalar>(0.0, sw);
100
101 const Scalar kfeff = porosity *((1.-satW)*lambdaN + satW*lambdaW) ; // arithmetic
102
103 Scalar keff ;
104
105 if (numEnergyEquationsFluid == 1){ // solid dealed with individually (extra balance equation)
106 keff = kfeff ;
107 }
108 else {
109 const Scalar kseff = (1.0-porosity) * lambdaSolid ;
110 keff = kfeff + kseff;
111 }
112
113 return keff ;
114 }
115};
116} // end namespace Dumux
117#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 the saturation-dependent effective thermal conductivity.
Definition: thermalconductivitysimplefluidlumping.hh:39
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars, const SpatialParams &spatialParams, const Element &element, const FVGeometry &fvGeometry, const typename FVGeometry::SubControlVolume &scv)
effective thermal conductivity
Definition: thermalconductivitysimplefluidlumping.hh:47
static Scalar effectiveThermalConductivity(const Scalar sw, const Scalar lambdaW, const Scalar lambdaN, const Scalar lambdaSolid, const Scalar porosity, const Scalar rhoSolid=0.0)
Returns the effective thermal conductivity .
Definition: thermalconductivitysimplefluidlumping.hh:88
static Scalar effectiveThermalConductivity(const VolumeVariables &volVars)
Effective thermal conductivity .
Definition: thermalconductivitysimplefluidlumping.hh:64