3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
1csolid.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_SOLIDSYSTEMS_SOLID_PHASE_HH
25#define DUMUX_SOLIDSYSTEMS_SOLID_PHASE_HH
26
27#include <string>
28#include <dune/common/exceptions.hh>
29
30namespace Dumux {
31namespace SolidSystems {
32
39template <class Scalar, class ComponentT, bool isInertComp = true>
41{
42public:
43 using Component = ComponentT;
44
45 /****************************************
46 * Solid phase related static parameters
47 ****************************************/
48 static constexpr int numComponents = 1;
49 static constexpr int numInertComponents = isInertComp ? 1 : 0;
50
56 static std::string componentName(int compIdx = 0)
57 { return Component::name(); }
58
62 static std::string name()
63 { return "s"; }
64
68 static constexpr bool isCompressible(int compIdx = 0)
69 { return false; }
70
74 static constexpr bool isInert()
75 { return isInertComp; }
76
80 static Scalar molarMass(int compIdx = 0)
81 { return Component::molarMass(); }
82
86 static Scalar density(Scalar temperature, int compIdx = 0)
87 { return Component::solidDensity(temperature); }
88
92 template <class SolidState>
93 static Scalar density(const SolidState& solidState, int compIdx = 0)
94 { return density(solidState.temperature(), compIdx); }
95
99 template <class SolidState>
100 static Scalar molarDensity(const SolidState& solidState, int compIdx = 0)
101 { return density(solidState.temperature(), compIdx)/molarMass(compIdx); }
102
106 static Scalar thermalConductivity(Scalar temperature, int compIdx = 0)
107 { return Component::solidThermalConductivity(temperature); }
108
112 template <class SolidState>
113 static Scalar thermalConductivity(const SolidState &solidState, int compIdx = 0)
114 { return thermalConductivity(solidState.temperature(), compIdx); }
115
119 static Scalar heatCapacity(Scalar temperature, int compIdx = 0)
120 { return Component::solidHeatCapacity(temperature); }
121
125 template <class SolidState>
126 static Scalar heatCapacity(const SolidState &solidState, int compIdx = 0)
127 { return heatCapacity(solidState.temperature(), compIdx); }
128};
129
136template <class Scalar, class ComponentT>
137using InertSolidPhase = OneCSolid<Scalar, ComponentT, /*isInert=*/true>;
138
139} // end namespace SolidSystems
140} // end namespace Dumux
141
142#endif
Definition: adapt.hh:29
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
The simplest solid phase consisting of a single solid component.
Definition: 1csolid.hh:41
static Scalar heatCapacity(const SolidState &solidState, int compIdx=0)
Specific isobaric heat capacity of the solid .
Definition: 1csolid.hh:126
static constexpr bool isInert()
Returns whether the component is inert (doesn't react)
Definition: 1csolid.hh:74
static Scalar heatCapacity(Scalar temperature, int compIdx=0)
Specific isobaric heat capacity of the solid .
Definition: 1csolid.hh:119
static Scalar molarDensity(const SolidState &solidState, int compIdx=0)
The molar density of the solid phase at a given pressure and temperature.
Definition: 1csolid.hh:100
ComponentT Component
Definition: 1csolid.hh:43
static Scalar thermalConductivity(const SolidState &solidState, int compIdx=0)
Thermal conductivity of the solid .
Definition: 1csolid.hh:113
static std::string name()
A human readable name for the solid system.
Definition: 1csolid.hh:62
static Scalar density(const SolidState &solidState, int compIdx=0)
The density of the solid phase at a given pressure and temperature.
Definition: 1csolid.hh:93
static Scalar molarMass(int compIdx=0)
The molar mass in of the component.
Definition: 1csolid.hh:80
static Scalar thermalConductivity(Scalar temperature, int compIdx=0)
Thermal conductivity of the solid .
Definition: 1csolid.hh:106
static constexpr int numInertComponents
Definition: 1csolid.hh:49
static constexpr bool isCompressible(int compIdx=0)
Returns whether the phase is incompressible.
Definition: 1csolid.hh:68
static constexpr int numComponents
Definition: 1csolid.hh:48
static Scalar density(Scalar temperature, int compIdx=0)
The density of the solid phase at a given pressure and temperature.
Definition: 1csolid.hh:86
static std::string componentName(int compIdx=0)
A human readable name for the component.
Definition: 1csolid.hh:56