version 3.8
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
7
13#ifndef DUMUX_COMPONENT_GAS_HH
14#define DUMUX_COMPONENT_GAS_HH
15
16#include <dune/common/exceptions.hh>
17
19
20namespace Dumux {
21namespace Components {
22
27template<class Scalar, class Component>
28class Gas
29{
30public:
34 template<class C = Component>
35 static constexpr bool gasIsCompressible()
36 {
37 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasIsCompressible()");
38 return 0; // iso c++ requires a return statement for constexpr functions
39 }
40
44 template<class C = Component>
45 static constexpr bool gasViscosityIsConstant()
46 {
47 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasViscosityIsConstant()");
48 return 0; // iso c++ requires a return statement for constexpr functions
49 }
50
54 template<class C = Component>
55 static constexpr bool gasIsIdeal()
56 {
57 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasIsIdeal()");
58 return 0; // iso c++ requires a return statement for constexpr functions
59 }
60
68 template<class C = Component>
69 static Scalar gasDensity(Scalar temperature, Scalar pressure)
70 {
71 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasDensity(t,p)");
72 DUNE_THROW(Dune::NotImplemented, "gasDensity(t,p)");
73 }
74
82 template<class C = Component>
83 static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
84 {
85 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasMolarDensity(t,p)");
86 DUNE_THROW(Dune::NotImplemented, "gasMolarDensity(t,p)");
87 }
88
95 template<class C = Component>
96 static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
97 {
98 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasEnthalpy(t,p)");
99 DUNE_THROW(Dune::NotImplemented, "gasEnthalpy(t,p)");
100 }
101
108 template<class C = Component>
109 static const Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
110 {
111 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasInternalEnergy(t,p)");
112 DUNE_THROW(Dune::NotImplemented, "gasInternalEnergy(t,p)");
113 }
114
122 template<class C = Component>
123 static Scalar gasViscosity(Scalar temperature, Scalar pressure)
124 {
125 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasViscosity(t,p)");
126 DUNE_THROW(Dune::NotImplemented, "gasViscosity(t,p)");
127 }
128
134 template<class C = Component>
135 static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
136 {
137 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasThermalConductivity(t,p)");
138 DUNE_THROW(Dune::NotImplemented, "gasThermalConductivity(t,p)");
139 }
140
146 template<class C = Component>
147 static Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
148 {
149 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasHeatCapacity(t,p)");
150 DUNE_THROW(Dune::NotImplemented, "gasHeatCapacity(t,p)");
151 }
152
153};
154
155} // end namespace Components
156} // end namespace Dumux
157
158#endif
Interface for components that have a gas state.
Definition: gas.hh:29
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density in of the component at a given pressure in and temperature in .
Definition: gas.hh:69
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:123
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:83
static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of the pure component in gas.
Definition: gas.hh:96
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: gas.hh:35
static const Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of the pure component in gas.
Definition: gas.hh:109
static constexpr bool gasViscosityIsConstant()
Returns true if the gas phase viscostiy is constant.
Definition: gas.hh:45
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of the component as a gas.
Definition: gas.hh:135
static Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of the component as a gas.
Definition: gas.hh:147
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: gas.hh:55
Type traits.
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:22
Definition: adapt.hh:17
Template which always yields a false value.
Definition: common/typetraits/typetraits.hh:24