51 template <
class Scalar,
class CO2Tables>
73 {
return 273.15 + 30.95; }
85 {
return 273.15 - 56.35; }
97 {
return CO2Tables::tabulatedEnthalpy.minPress(); }
103 {
return CO2Tables::tabulatedEnthalpy.maxPress(); }
109 {
return CO2Tables::tabulatedEnthalpy.minTemp(); }
115 {
return CO2Tables::tabulatedEnthalpy.maxTemp(); }
129 template <
class Evaluation>
132 static constexpr Scalar a[4] =
133 { -7.0602087, 1.9391218, -1.6463597, -3.2995634 };
134 static constexpr Scalar t[4] =
135 { 1.0, 1.5, 2.0, 4.0 };
138 Evaluation exponent = 0;
140 for (
int i = 0; i < 4; ++i)
141 exponent += a[i]*pow(1 - Tred, t[i]);
142 exponent *= 1.0/Tred;
163 template <
class Evaluation>
165 const Evaluation& pressure,
166 bool extrapolate =
false)
168 return CO2Tables::tabulatedEnthalpy.eval(temperature, pressure, extrapolate);
174 template <
class Evaluation>
176 const Evaluation& pressure,
177 bool extrapolate =
false)
179 const Evaluation h =
gasEnthalpy(temperature, pressure, extrapolate);
180 const Evaluation rho =
gasDensity(temperature, pressure, extrapolate);
182 return h - (pressure / rho);
188 template <
class Evaluation>
190 const Evaluation& pressure,
191 bool extrapolate =
false)
193 return CO2Tables::tabulatedDensity.eval(temperature, pressure, extrapolate);
202 template <
class Evaluation>
204 const Evaluation& pressure,
205 bool extrapolate =
false)
207 constexpr Scalar a0 = 0.235156;
208 constexpr Scalar a1 = -0.491266;
209 constexpr Scalar a2 = 5.211155e-2;
210 constexpr Scalar a3 = 5.347906e-2;
211 constexpr Scalar a4 = -1.537102e-2;
213 constexpr Scalar d11 = 0.4071119e-2;
214 constexpr Scalar d21 = 0.7198037e-4;
215 constexpr Scalar d64 = 0.2411697e-16;
216 constexpr Scalar d81 = 0.2971072e-22;
217 constexpr Scalar d82 = -0.1627888e-22;
219 constexpr Scalar ESP = 251.196;
221 if(temperature < 275.)
223 Evaluation TStar = temperature/ESP;
226 const Evaluation logTStar = log(TStar);
227 Evaluation SigmaStar = exp(a0 + logTStar*(a1 + logTStar*(a2 + logTStar*(a3 + logTStar*a4))));
229 Evaluation mu0 = 1.00697*sqrt(temperature) / SigmaStar;
231 const Evaluation rho =
gasDensity(temperature, pressure, extrapolate);
237 + d64*pow(rho, 6.0)/(TStar*TStar*TStar)
239 + d82*pow(rho, 8.0)/TStar;
241 return (mu0 + dmu)/1.0e6;
254 template <
class Evaluation>
255 static Evaluation
gasHeatCapacity(
const Evaluation& temperature,
const Evaluation& pressure)
257 constexpr Scalar eps = 1e-6;
262 const Evaluation h1 =
gasEnthalpy(temperature - eps, pressure);
263 const Evaluation h2 =
gasEnthalpy(temperature + eps, pressure);
265 return (h2 - h1) / (2*eps) ;
Abstract base class of a pure chemical species.
A central place for various physical constants occuring in some equations.
Relations valid for an ideal gas.
A class for the CO2 fluid properties.
Definition: CO2.hpp:53
static Evaluation gasHeatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of the component [J/kg] as a liquid.
Definition: CO2.hpp:255
static Scalar minTabulatedPressure()
Returns the pressure [Pa] at CO2's triple point.
Definition: CO2.hpp:96
static Scalar maxTabulatedTemperature()
Returns the pressure [Pa] at CO2's triple point.
Definition: CO2.hpp:114
static Scalar minTabulatedTemperature()
Returns the pressure [Pa] at CO2's triple point.
Definition: CO2.hpp:108
static Scalar criticalTemperature()
Returns the critical temperature [K] of CO2.
Definition: CO2.hpp:72
static const char * name()
A human readable name for the CO2.
Definition: CO2.hpp:60
static Scalar triplePressure()
Returns the pressure [Pa] at CO2's triple point.
Definition: CO2.hpp:90
static Scalar molarMass()
The mass in [kg] of one mole of CO2.
Definition: CO2.hpp:66
static Evaluation vaporPressure(const Evaluation &T)
The vapor pressure in [N/m^2] of pure CO2 at a given temperature.
Definition: CO2.hpp:130
static Scalar maxTabulatedPressure()
Returns the pressure [Pa] at CO2's triple point.
Definition: CO2.hpp:102
static Evaluation gasEnthalpy(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate=false)
Specific enthalpy of gaseous CO2 [J/kg].
Definition: CO2.hpp:164
static Evaluation gasViscosity(Evaluation temperature, const Evaluation &pressure, bool extrapolate=false)
The dynamic viscosity [Pa s] of CO2.
Definition: CO2.hpp:203
static Scalar criticalPressure()
Returns the critical pressure [Pa] of CO2.
Definition: CO2.hpp:78
static bool gasIsIdeal()
Returns true iff the gas phase is assumed to be ideal.
Definition: CO2.hpp:157
static Scalar tripleTemperature()
Returns the temperature [K]at CO2's triple point.
Definition: CO2.hpp:84
static Evaluation gasInternalEnergy(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate=false)
Specific internal energy of CO2 [J/kg].
Definition: CO2.hpp:175
static bool gasIsCompressible()
Returns true iff the gas phase is assumed to be compressible.
Definition: CO2.hpp:151
static Evaluation gasDensity(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate=false)
The density of CO2 at a given pressure and temperature [kg/m^3].
Definition: CO2.hpp:189
Abstract base class of a pure chemical species.
Definition: Component.hpp:42
A central place for various physical constants occuring in some equations.
Definition: Constants.hpp:41