version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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-FileCopyrightText: 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::Components {
21
26template<class Scalar, class Component>
27class Gas
28{
29public:
33 template<class C = Component>
34 static constexpr bool gasIsCompressible()
35 {
36 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasIsCompressible()");
37 return 0; // iso c++ requires a return statement for constexpr functions
38 }
39
43 template<class C = Component>
44 static constexpr bool gasViscosityIsConstant()
45 {
46 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasViscosityIsConstant()");
47 return 0; // iso c++ requires a return statement for constexpr functions
48 }
49
53 template<class C = Component>
54 static constexpr bool gasIsIdeal()
55 {
56 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasIsIdeal()");
57 return 0; // iso c++ requires a return statement for constexpr functions
58 }
59
67 template<class C = Component>
68 static Scalar gasDensity(Scalar temperature, Scalar pressure)
69 {
70 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasDensity(t,p)");
71 DUNE_THROW(Dune::NotImplemented, "gasDensity(t,p)");
72 }
73
81 template<class C = Component>
82 static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
83 {
84 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasMolarDensity(t,p)");
85 DUNE_THROW(Dune::NotImplemented, "gasMolarDensity(t,p)");
86 }
87
94 template<class C = Component>
95 static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
96 {
97 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasEnthalpy(t,p)");
98 DUNE_THROW(Dune::NotImplemented, "gasEnthalpy(t,p)");
99 }
100
107 template<class C = Component>
108 static const Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
109 {
110 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasInternalEnergy(t,p)");
111 DUNE_THROW(Dune::NotImplemented, "gasInternalEnergy(t,p)");
112 }
113
121 template<class C = Component>
122 static Scalar gasViscosity(Scalar temperature, Scalar pressure)
123 {
124 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasViscosity(t,p)");
125 DUNE_THROW(Dune::NotImplemented, "gasViscosity(t,p)");
126 }
127
133 template<class C = Component>
134 static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
135 {
136 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasThermalConductivity(t,p)");
137 DUNE_THROW(Dune::NotImplemented, "gasThermalConductivity(t,p)");
138 }
139
145 template<class C = Component>
146 static Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
147 {
148 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: gasHeatCapacity(t,p)");
149 DUNE_THROW(Dune::NotImplemented, "gasHeatCapacity(t,p)");
150 }
151
152};
153
154} // end namespace Dumux::Components
155
156#endif
Interface for components that have a gas state.
Definition: gas.hh:28
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density in of the component at a given pressure in and temperature in .
Definition: gas.hh:68
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:122
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:82
static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of the pure component in gas.
Definition: gas.hh:95
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: gas.hh:34
static const Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of the pure component in gas.
Definition: gas.hh:108
static constexpr bool gasViscosityIsConstant()
Returns true if the gas phase viscostiy is constant.
Definition: gas.hh:44
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of the component as a gas.
Definition: gas.hh:134
static Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of the component as a gas.
Definition: gas.hh:146
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: gas.hh:54
Type traits.
Definition: air.hh:22
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
Template which always yields a false value.
Definition: common/typetraits/typetraits.hh:24