Component.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 This file is part of the Open Porous Media project (OPM).
5
6 OPM 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 2 of the License, or
9 (at your option) any later version.
10
11 OPM 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 OPM. If not, see <http://www.gnu.org/licenses/>.
18
19 Consult the COPYING file in the top-level source directory of this
20 module for the precise wording of the license and the list of
21 copyright holders.
22*/
27#ifndef OPM_COMPONENT_HPP
28#define OPM_COMPONENT_HPP
29
30#include <stdexcept>
31namespace Opm {
32
40template <class ScalarT, class Implementation>
42{
43public:
44 typedef ScalarT Scalar;
45
46 static const bool isTabulated = false;
47
60 static void init(Scalar /* tempMin */, Scalar /* tempMax */, unsigned /* nTemp */,
61 Scalar /* pressMin */, Scalar /* pressMax */, unsigned /* nPress */)
62 { }
63
67 static bool gasIsCompressible()
68 { throw std::runtime_error("Not implemented: Component::gasIsCompressible()"); }
69
73 static bool gasIsIdeal()
74 { throw std::runtime_error("Not implemented: Component::gasIsIdeal()"); }
75
80 { throw std::runtime_error("Not implemented: Component::liquidIsCompressible()"); }
81
85 static const char* name()
86 { throw std::runtime_error("Not implemented: Component::name()"); }
87
92 { throw std::runtime_error("Not implemented: Component::molarMass()"); }
93
98 { throw std::runtime_error("Not implemented: Component::criticalTemperature()"); }
99
104 { throw std::runtime_error("Not implemented: Component::criticalPressure()"); }
105
106
111 { throw std::runtime_error("Not implemented: acentricFactor of the component"); }
112
117 { throw std::runtime_error("Not implemented: criticalVolume of the compoenent"); }
118
123 { throw std::runtime_error("Not implemented: Component::tripleTemperature()"); }
124
129 { throw std::runtime_error("Not implemented: Component::triplePressure()"); }
130
137 template <class Evaluation>
138 static Evaluation vaporPressure(const Evaluation& /* temperature */)
139 { throw std::runtime_error("Not implemented: Component::vaporPressure()"); }
140
147 template <class Evaluation>
148 static Evaluation gasDensity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
149 { throw std::runtime_error("Not implemented: Component::gasDensity()"); }
150
157 template <class Evaluation>
158 static Evaluation liquidDensity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
159 { throw std::runtime_error("Not implemented: Component::liquidDensity()"); }
160
167 template <class Evaluation>
168 static Evaluation gasEnthalpy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
169 { throw std::runtime_error("Not implemented: Component::gasEnthalpy()"); }
170
177 template <class Evaluation>
178 static Evaluation liquidEnthalpy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
179 { throw std::runtime_error("Not implemented: Component::liquidEnthalpy()"); }
180
187 template <class Evaluation>
188 static Evaluation gasInternalEnergy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
189 { throw std::runtime_error("Not implemented: Component::gasInternalEnergy()"); }
190
197 template <class Evaluation>
198 static Evaluation liquidInternalEnergy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
199 { throw std::runtime_error("Not implemented: Component::liquidInternalEnergy()"); }
200
208 template <class Evaluation>
209 static Evaluation gasViscosity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
210 { throw std::runtime_error("Not implemented: Component::gasViscosity()"); }
211
218 template <class Evaluation>
219 static Evaluation liquidViscosity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
220 { throw std::runtime_error("Not implemented: Component::liquidViscosity()"); }
221
225 template <class Evaluation>
226 static Evaluation gasThermalConductivity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
227 { throw std::runtime_error("Not implemented: Component::gasThermalConductivity()"); }
228
232 template <class Evaluation>
233 static Evaluation liquidThermalConductivity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
234 { throw std::runtime_error("Not implemented: Component::liquidThermalConductivity()"); }
235
239 template <class Evaluation>
240 static Evaluation gasHeatCapacity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
241 { throw std::runtime_error("Not implemented: Component::gasHeatCapacity()"); }
242
246 template <class Evaluation>
247 static Evaluation liquidHeatCapacity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
248 { throw std::runtime_error("Not implemented: Component::liquidHeatCapacity()"); }
249};
250
251} // namespace Opm
252
253#endif
Abstract base class of a pure chemical species.
Definition: Component.hpp:42
static Scalar tripleTemperature()
Returns the temperature in at the component's triple point.
Definition: Component.hpp:122
static bool gasIsCompressible()
Returns true iff the gas phase is assumed to be compressible.
Definition: Component.hpp:67
static const bool isTabulated
Definition: Component.hpp:46
static Evaluation gasThermalConductivity(const Evaluation &, const Evaluation &)
Thermal conductivity of the component [W/(m^2 K/m)] as a gas.
Definition: Component.hpp:226
static Scalar molarMass()
The molar mass in of the component.
Definition: Component.hpp:91
static Scalar acentricFactor()
Returns the acentric factor of the component.
Definition: Component.hpp:110
static Scalar criticalPressure()
Returns the critical pressure in of the component.
Definition: Component.hpp:103
static Evaluation liquidHeatCapacity(const Evaluation &, const Evaluation &)
Specific isobaric heat capacity of the component [J/kg] as a liquid.
Definition: Component.hpp:247
static Evaluation liquidThermalConductivity(const Evaluation &, const Evaluation &)
Thermal conductivity of the component [W/(m^2 K/m)] as a liquid.
Definition: Component.hpp:233
static Scalar criticalTemperature()
Returns the critical temperature in of the component.
Definition: Component.hpp:97
static Evaluation gasHeatCapacity(const Evaluation &, const Evaluation &)
Specific isobaric heat capacity of the component [J/kg] as a gas.
Definition: Component.hpp:240
static Evaluation gasInternalEnergy(const Evaluation &, const Evaluation &)
Specific internal energy of the pure component in gas.
Definition: Component.hpp:188
static Evaluation liquidViscosity(const Evaluation &, const Evaluation &)
The dynamic liquid viscosity of the pure component.
Definition: Component.hpp:219
static Evaluation gasEnthalpy(const Evaluation &, const Evaluation &)
Specific enthalpy of the pure component in gas.
Definition: Component.hpp:168
static Evaluation vaporPressure(const Evaluation &)
The vapor pressure in of the component at a given temperature in .
Definition: Component.hpp:138
static bool liquidIsCompressible()
Returns true iff the liquid phase is assumed to be compressible.
Definition: Component.hpp:79
static Evaluation liquidDensity(const Evaluation &, const Evaluation &)
The density of the liquid component at a given pressure in and temperature in .
Definition: Component.hpp:158
static Scalar triplePressure()
Returns the pressure in at the component's triple point.
Definition: Component.hpp:128
static const char * name()
A human readable name for the component.
Definition: Component.hpp:85
static Evaluation liquidEnthalpy(const Evaluation &, const Evaluation &)
Specific enthalpy of the pure component in liquid.
Definition: Component.hpp:178
static Scalar criticalVolume()
Returns the critical volume in of the component.
Definition: Component.hpp:116
ScalarT Scalar
Definition: Component.hpp:44
static void init(Scalar, Scalar, unsigned, Scalar, Scalar, unsigned)
A default routine for initialization, not needed for components and must not be called.
Definition: Component.hpp:60
static bool gasIsIdeal()
Returns true iff the gas phase is assumed to be ideal.
Definition: Component.hpp:73
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:209
static Evaluation gasDensity(const Evaluation &, const Evaluation &)
The density in of the component at a given pressure in and temperature in .
Definition: Component.hpp:148
static Evaluation liquidInternalEnergy(const Evaluation &, const Evaluation &)
Specific internal energy of pure the pure component in liquid.
Definition: Component.hpp:198
Definition: Air_Mesitylene.hpp:34