LiquidPhase.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) 2010-2013 by Andreas Lauser
5  Copyright (C) 2010 by Markus Wolff
6 
7  This file is part of the Open Porous Media project (OPM).
8 
9  OPM is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 2 of the License, or
12  (at your option) any later version.
13 
14  OPM is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with OPM. If not, see <http://www.gnu.org/licenses/>.
21 */
26 #ifndef OPM_LIQUID_PHASE_HPP
27 #define OPM_LIQUID_PHASE_HPP
28 
29 namespace Opm {
30 
35 template <class Scalar, class ComponentT>
37 {
38 public:
40  typedef ComponentT Component;
41 
43  static const char *name()
44  { return Component::name(); }
45 
47  static bool isLiquid()
48  { return true; }
49 
51  static bool isCompressible()
53 
55  static bool isIdealGas()
56  { return false; /* we're a liquid! */ }
57 
59  static Scalar molarMass()
60  { return Component::molarMass(); }
61 
63  static Scalar criticalTemperature()
64  { return Component::criticalTemperature(); }
65 
67  static Scalar criticalPressure()
68  { return Component::criticalPressure(); }
69 
71  static Scalar tripleTemperature()
72  { return Component::tripleTemperature(); }
73 
75  static Scalar triplePressure()
76  { return Component::triplePressure(); }
77 
79  template <class Evaluation>
80  static Evaluation vaporPressure(const Evaluation& temperature)
81  { return Component::vaporPressure(temperature); }
82 
84  template <class Evaluation>
85  static Evaluation density(const Evaluation& temperature, const Evaluation& pressure)
86  { return Component::liquidDensity(temperature, pressure); }
87 
89  template <class Evaluation>
90  static Evaluation pressure(const Evaluation& temperature, const Evaluation& density)
91  { return Component::liquidPressure(temperature, density); }
92 
94  template <class Evaluation>
95  static const Evaluation enthalpy(const Evaluation& temperature, const Evaluation& pressure)
96  { return Component::liquidEnthalpy(temperature, pressure); }
97 
99  template <class Evaluation>
100  static const Evaluation internalEnergy(const Evaluation& temperature, const Evaluation& pressure)
101  { return Component::liquidInternalEnergy(temperature, pressure); }
102 
104  template <class Evaluation>
105  static Evaluation viscosity(const Evaluation& temperature, const Evaluation& pressure)
106  { return Component::liquidViscosity(temperature, pressure); }
107 
109  template <class Evaluation>
110  static Evaluation thermalConductivity(const Evaluation& temperature, const Evaluation& pressure)
111  { return Component::liquidThermalConductivity(temperature, pressure); }
112 
114  template <class Evaluation>
115  static Evaluation heatCapacity(const Evaluation& temperature, const Evaluation& pressure)
116  { return Component::liquidHeatCapacity(temperature, pressure); }
117 };
118 } // namespace Opm
119 
120 #endif
static Evaluation liquidInternalEnergy(const Evaluation &, const Evaluation &)
Specific internal energy of pure the pure component in liquid.
Definition: Component.hpp:186
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: LiquidPhase.hpp:105
static Scalar tripleTemperature()
Returns the temperature in at the component's triple point.
Definition: Component.hpp:110
static Evaluation liquidViscosity(const Evaluation &, const Evaluation &)
The dynamic liquid viscosity of the pure component.
Definition: Component.hpp:207
Definition: Air_Mesitylene.hpp:31
static Evaluation liquidDensity(const Evaluation &, const Evaluation &)
The density of the liquid component at a given pressure in and temperature in . ...
Definition: Component.hpp:146
static bool isIdealGas()
Returns true iff the fluid is assumed to be an ideal gas.
Definition: LiquidPhase.hpp:55
static Scalar triplePressure()
Returns the pressure in at the component's triple point.
Definition: Component.hpp:116
static Scalar tripleTemperature()
Returns the temperature at the component's triple point.
Definition: LiquidPhase.hpp:71
ComponentT Component
The type of the phase's underlying (pseudo-) component.
Definition: LiquidPhase.hpp:40
static Evaluation liquidHeatCapacity(const Evaluation &, const Evaluation &)
Specific isobaric heat capacity of the component [J/kg] as a liquid.
Definition: Component.hpp:235
static bool isLiquid()
Returs whether the fluid is a liquid.
Definition: LiquidPhase.hpp:47
static bool isCompressible()
Returns true iff the fluid is assumed to be compressible.
Definition: LiquidPhase.hpp:51
static const char * name()
A human readable name for the component.
Definition: LiquidPhase.hpp:43
Represents the liquid phase of a single (pseudo-) component.
Definition: LiquidPhase.hpp:36
static Scalar triplePressure()
Returns the pressure at the component's triple point.
Definition: LiquidPhase.hpp:75
static Evaluation heatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of the fluid [J/kg].
Definition: LiquidPhase.hpp:115
static Evaluation density(const Evaluation &temperature, const Evaluation &pressure)
The density [kg/m^3] of the component at a given pressure and temperature.
Definition: LiquidPhase.hpp:85
static Evaluation vaporPressure(const Evaluation &temperature)
The vapor pressure in [N/m^2] of the component at a given temperature.
Definition: LiquidPhase.hpp:80
static bool liquidIsCompressible()
Returns true iff the liquid phase is assumed to be compressible.
Definition: Component.hpp:80
static Scalar criticalTemperature()
Returns the critical temperature of the component.
Definition: LiquidPhase.hpp:63
static Scalar criticalTemperature()
Returns the critical temperature in of the component.
Definition: Component.hpp:98
static Evaluation liquidEnthalpy(const Evaluation &, const Evaluation &)
Specific enthalpy of the pure component in liquid.
Definition: Component.hpp:166
static Scalar molarMass()
The mass in [kg] of one mole of the component.
Definition: LiquidPhase.hpp:59
static const char * name()
A human readable name for the component.
Definition: Component.hpp:86
static Evaluation liquidThermalConductivity(const Evaluation &, const Evaluation &)
Thermal conductivity of the component [W/(m^2 K/m)] as a liquid.
Definition: Component.hpp:221
static const Evaluation internalEnergy(const Evaluation &temperature, const Evaluation &pressure)
Specific internal energy [J/kg] the pure component as a gas.
Definition: LiquidPhase.hpp:100
static Evaluation pressure(const Evaluation &temperature, const Evaluation &density)
The pressure [Pa] of the component at a given density and temperature.
Definition: LiquidPhase.hpp:90
static const Evaluation enthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy [J/kg] the pure component as a gas.
Definition: LiquidPhase.hpp:95
static Evaluation thermalConductivity(const Evaluation &temperature, const Evaluation &pressure)
Thermal conductivity of the fluid [W/(m^2 K/m)].
Definition: LiquidPhase.hpp:110
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 criticalPressure()
Returns the critical pressure of the component.
Definition: LiquidPhase.hpp:67
static Scalar molarMass()
The molar mass in of the component.
Definition: Component.hpp:92