3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
gas.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 *****************************************************************************/
19
25#ifndef DUMUX_COMPONENT_GAS_HH
26#define DUMUX_COMPONENT_GAS_HH
27
28#include <dune/common/exceptions.hh>
29
31
32namespace Dumux {
33namespace Components {
34
39template<class Scalar, class Component>
40class Gas
41{
42public:
46 template<class C = Component>
47 static constexpr bool gasIsCompressible()
48 {
49 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasIsCompressible()");
50 return 0; // iso c++ requires a return statement for constexpr functions
51 }
52
56 template<class C = Component>
57 static constexpr bool gasViscosityIsConstant()
58 {
59 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasViscosityIsConstant()");
60 return 0; // iso c++ requires a return statement for constexpr functions
61 }
62
66 template<class C = Component>
67 static constexpr bool gasIsIdeal()
68 {
69 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasIsIdeal()");
70 return 0; // iso c++ requires a return statement for constexpr functions
71 }
72
80 template<class C = Component>
81 static Scalar gasDensity(Scalar temperature, Scalar pressure)
82 {
83 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasDensity(t,p)");
84 DUNE_THROW(Dune::NotImplemented, "gasDensity(t,p)");
85 }
86
94 template<class C = Component>
95 static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
96 {
97 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasMolarDensity(t,p)");
98 DUNE_THROW(Dune::NotImplemented, "gasMolarDensity(t,p)");
99 }
100
107 template<class C = Component>
108 static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
109 {
110 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasEnthalpy(t,p)");
111 DUNE_THROW(Dune::NotImplemented, "gasEnthalpy(t,p)");
112 }
113
120 template<class C = Component>
121 static const Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
122 {
123 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasInternalEnergy(t,p)");
124 DUNE_THROW(Dune::NotImplemented, "gasInternalEnergy(t,p)");
125 }
126
134 template<class C = Component>
135 static Scalar gasViscosity(Scalar temperature, Scalar pressure)
136 {
137 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasViscosity(t,p)");
138 DUNE_THROW(Dune::NotImplemented, "gasViscosity(t,p)");
139 }
140
146 template<class C = Component>
147 static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
148 {
149 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasThermalConductivity(t,p)");
150 DUNE_THROW(Dune::NotImplemented, "gasThermalConductivity(t,p)");
151 }
152
158 template<class C = Component>
159 static Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
160 {
161 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasHeatCapacity(t,p)");
162 DUNE_THROW(Dune::NotImplemented, "gasHeatCapacity(t,p)");
163 }
164
165};
166
167} // end namespace Components
168} // end namespace Dumux
169
170#endif
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:34
Template which always yields a false value.
Definition: typetraits.hh:37
Interface for components that have a gas state.
Definition: gas.hh:41
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density in of the component at a given pressure in and temperature in .
Definition: gas.hh:81
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of the pure component at a given pressure in and temperature in .
Definition: gas.hh:135
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density in of the component at a given pressure in and temperature in .
Definition: gas.hh:95
static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of the pure component in gas.
Definition: gas.hh:108
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: gas.hh:47
static const Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of the pure component in gas.
Definition: gas.hh:121
static constexpr bool gasViscosityIsConstant()
Returns true if the gas phase viscostiy is constant.
Definition: gas.hh:57
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of the component as a gas.
Definition: gas.hh:147
static Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of the component as a gas.
Definition: gas.hh:159
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: gas.hh:67