GasPhase.hpp
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  Copyright (C) 2009-2013 by Andreas Lauser
5 
6  This file is part of the Open Porous Media project (OPM).
7 
8  OPM is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 2 of the License, or
11  (at your option) any later version.
12 
13  OPM is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with OPM. If not, see <http://www.gnu.org/licenses/>.
20 */
25 #ifndef OPM_GAS_PHASE_HPP
26 #define OPM_GAS_PHASE_HPP
27 
28 namespace Opm {
29 
34 template <class Scalar, class ComponentT>
35 class GasPhase
36 {
37 public:
41  typedef ComponentT Component;
42 
46  static const char *name()
47  { return Component::name(); }
48 
52  static bool isLiquid()
53  { return false; }
54 
58  static bool isCompressible()
59  { return Component::gasIsCompressible(); }
60 
64  static bool isIdealGas()
65  { return Component::gasIsIdeal(); }
66 
70  static Scalar molarMass()
71  { return Component::molarMass(); }
72 
76  static Scalar criticalTemperature()
77  { return Component::criticalTemperature(); }
78 
82  static Scalar criticalPressure()
83  { return Component::criticalPressure(); }
84 
88  static Scalar tripleTemperature()
89  { return Component::tripleTemperature(); }
90 
94  static Scalar triplePressure()
95  { return Component::triplePressure(); }
96 
103  template <class Evaluation>
104  static Evaluation vaporPressure(const Evaluation& temperature)
105  { return Component::vaporPressure(temperature); }
106 
112  template <class Evaluation>
113  static Evaluation density(const Evaluation& temperature, const Evaluation& pressure)
114  { return Component::gasDensity(temperature, pressure); }
115 
122  template <class Evaluation>
123  static Evaluation pressure(const Evaluation& temperature, const Evaluation& density)
124  { return Component::gasPressure(temperature, density); }
125 
131  template <class Evaluation>
132  static Evaluation enthalpy(const Evaluation& temperature, const Evaluation& pressure)
133  { return Component::gasEnthalpy(temperature, pressure); }
134 
140  template <class Evaluation>
141  static Evaluation internalEnergy(const Evaluation& temperature, const Evaluation& pressure)
142  { return Component::gasInternalEnergy(temperature, pressure); }
143 
149  template <class Evaluation>
150  static Evaluation viscosity(const Evaluation& temperature, const Evaluation& pressure)
151  { return Component::gasViscosity(temperature, pressure); }
152 
158  template <class Evaluation>
159  static Evaluation thermalConductivity(const Evaluation& temperature, const Evaluation& pressure)
160  { return Component::gasThermalConductivity(temperature, pressure); }
161 
167  template <class Evaluation>
168  static Evaluation heatCapacity(const Evaluation& temperature, const Evaluation& pressure)
169  { return Component::gasHeatCapacity(temperature, pressure); }
170 };
171 } // namespace Opm
172 
173 #endif
static bool isLiquid()
Returs whether the fluid is a liquid.
Definition: GasPhase.hpp:52
static Scalar tripleTemperature()
Returns the temperature in at the component's triple point.
Definition: Component.hpp:110
static Evaluation gasInternalEnergy(const Evaluation &, const Evaluation &)
Specific internal energy of the pure component in gas.
Definition: Component.hpp:176
static Evaluation gasViscosity(const Evaluation &, const Evaluation &)
The dynamic viscosity of the pure component at a given pressure in and temperature in ...
Definition: Component.hpp:197
Definition: Air_Mesitylene.hpp:31
static Scalar triplePressure()
Returns the pressure at the component's triple point.
Definition: GasPhase.hpp:94
static Scalar tripleTemperature()
Returns the temperature at the component's triple point.
Definition: GasPhase.hpp:88
static Evaluation enthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy [J/kg] the pure component as a gas.
Definition: GasPhase.hpp:132
static Evaluation density(const Evaluation &temperature, const Evaluation &pressure)
The density [kg/m^3] of the component at a given pressure and temperature.
Definition: GasPhase.hpp:113
static Scalar molarMass()
The mass in [kg] of one mole of the component.
Definition: GasPhase.hpp:70
static Evaluation thermalConductivity(const Evaluation &temperature, const Evaluation &pressure)
Thermal conductivity of the fluid [W/(m^2 K/m)].
Definition: GasPhase.hpp:159
static bool gasIsCompressible()
Returns true iff the gas phase is assumed to be compressible.
Definition: Component.hpp:68
static Scalar triplePressure()
Returns the pressure in at the component's triple point.
Definition: Component.hpp:116
static Evaluation vaporPressure(const Evaluation &temperature)
The vapor pressure in [N/m^2] of the component at a given temperature.
Definition: GasPhase.hpp:104
static Evaluation viscosity(const Evaluation &temperature, const Evaluation &pressure)
The dynamic viscosity [Pa s] of the pure component at a given pressure and temperature.
Definition: GasPhase.hpp:150
static bool gasIsIdeal()
Returns true iff the gas phase is assumed to be ideal.
Definition: Component.hpp:74
static Evaluation pressure(const Evaluation &temperature, const Evaluation &density)
The pressure [Pa] of the component at a given density and temperature.
Definition: GasPhase.hpp:123
static Evaluation gasEnthalpy(const Evaluation &, const Evaluation &)
Specific enthalpy of the pure component in gas.
Definition: Component.hpp:156
ComponentT Component
The type of the phase's underlying (pseudo-) component.
Definition: GasPhase.hpp:41
static bool isCompressible()
Returns true iff the fluid is assumed to be compressible.
Definition: GasPhase.hpp:58
static Scalar criticalPressure()
Returns the critical pressure of the component.
Definition: GasPhase.hpp:82
static Evaluation internalEnergy(const Evaluation &temperature, const Evaluation &pressure)
Specific internal energy [J/kg] the pure component as a gas.
Definition: GasPhase.hpp:141
static Evaluation gasDensity(const Evaluation &, const Evaluation &)
The density in of the component at a given pressure in and temperature in .
Definition: Component.hpp:136
static Scalar criticalTemperature()
Returns the critical temperature in of the component.
Definition: Component.hpp:98
static Evaluation gasThermalConductivity(const Evaluation &, const Evaluation &)
Thermal conductivity of the component [W/(m^2 K/m)] as a gas.
Definition: Component.hpp:214
static Evaluation gasHeatCapacity(const Evaluation &, const Evaluation &)
Specific isobaric heat capacity of the component [J/kg] as a gas.
Definition: Component.hpp:228
static bool isIdealGas()
Returns true iff the fluid is assumed to be an ideal gas.
Definition: GasPhase.hpp:64
static const char * name()
A human readable name for the component.
Definition: Component.hpp:86
static Evaluation heatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of the fluid [J/kg].
Definition: GasPhase.hpp:168
Represents the gas phase of a single (pseudo-) component.
Definition: GasPhase.hpp:35
static const char * name()
A human readable name for the component.
Definition: GasPhase.hpp:46
static Scalar criticalTemperature()
Returns the critical temperature of the component.
Definition: GasPhase.hpp:76
static Scalar criticalPressure()
Returns the critical pressure in of the component.
Definition: Component.hpp:104
static Evaluation vaporPressure(const Evaluation &)
The vapor pressure in of the component at a given temperature in .
Definition: Component.hpp:126
static Scalar molarMass()
The molar mass in of the component.
Definition: Component.hpp:92