31 #include <opm/common/Exceptions.hpp>
32 #include <opm/common/ErrorMacros.hpp>
53 template <
class Scalar,
class CO2Tables>
56 static const Scalar R;
57 static bool warningPrinted;
76 {
return 273.15 + 30.95; }
88 {
return 273.15 - 56.35; }
100 {
return CO2Tables::tabulatedEnthalpy.minPress(); }
106 {
return CO2Tables::tabulatedEnthalpy.maxPress(); }
112 {
return CO2Tables::tabulatedEnthalpy.minTemp(); }
118 {
return CO2Tables::tabulatedEnthalpy.maxTemp(); }
132 template <
class Evaluation>
135 static const Scalar a[4] =
136 { -7.0602087, 1.9391218, -1.6463597, -3.2995634 };
137 static const Scalar t[4] =
138 { 1.0, 1.5, 2.0, 4.0 };
141 Evaluation exponent = 0;
143 for (
int i = 0; i < 5; ++i)
144 exponent += a[i]*Opm::pow(1 - Tred, t[i]);
145 exponent *= 1.0/Tred;
166 template <
class Evaluation>
168 const Evaluation& pressure)
170 return CO2Tables::tabulatedEnthalpy.eval(temperature, pressure);
176 template <
class Evaluation>
178 const Evaluation& pressure)
180 const Evaluation& h =
gasEnthalpy(temperature, pressure);
181 const Evaluation& rho =
gasDensity(temperature, pressure);
183 return h - (pressure / rho);
189 template <
class Evaluation>
190 static Evaluation
gasDensity(
const Evaluation& temperature,
const Evaluation& pressure)
192 return CO2Tables::tabulatedDensity.eval(temperature, pressure);
201 template <
class Evaluation>
202 static Evaluation
gasViscosity(Evaluation temperature,
const Evaluation& pressure)
204 const Scalar a0 = 0.235156;
205 const Scalar a1 = -0.491266;
206 const Scalar a2 = 5.211155e-2;
207 const Scalar a3 = 5.347906e-2;
208 const Scalar a4 = -1.537102e-2;
210 const Scalar d11 = 0.4071119e-2;
211 const Scalar d21 = 0.7198037e-4;
212 const Scalar d64 = 0.2411697e-16;
213 const Scalar d81 = 0.2971072e-22;
214 const Scalar d82 = -0.1627888e-22;
216 const Scalar ESP = 251.196;
218 if(temperature < 275.)
220 Evaluation TStar = temperature/ESP;
223 const Evaluation& logTStar = Opm::log(TStar);
224 Evaluation SigmaStar = Opm::exp(a0 + logTStar*(a1 + logTStar*(a2 + logTStar*(a3 + logTStar*a4))));
226 Evaluation mu0 = 1.00697*Opm::sqrt(temperature) / SigmaStar;
228 const Evaluation& rho =
gasDensity(temperature, pressure);
234 + d64*Opm::pow(rho, 6.0)/(TStar*TStar*TStar)
235 + d81*Opm::pow(rho, 8.0)
236 + d82*Opm::pow(rho, 8.0)/TStar;
238 return (mu0 + dmu)/1.0e6;
251 template <
class Evaluation>
252 static Evaluation
gasHeatCapacity(
const Evaluation& temperature,
const Evaluation& pressure)
259 const Evaluation& h1 =
gasEnthalpy(temperature - eps, pressure);
260 const Evaluation& h2 =
gasEnthalpy(temperature + eps, pressure);
262 return (h2 - h1) / (2*eps) ;
266 template <
class Scalar,
class CO2Tables>
267 bool CO2<Scalar, CO2Tables>::warningPrinted =
false;
269 template <
class Scalar,
class CO2Tables>
270 const Scalar CO2<Scalar, CO2Tables>::R = Constants<Scalar>::R;
static Scalar triplePressure()
Returns the pressure [Pa] at CO2's triple point.
Definition: CO2.hpp:93
static Scalar minTabulatedTemperature()
Returns the pressure [Pa] at CO2's triple point.
Definition: CO2.hpp:111
Relations valid for an ideal gas.
static Scalar criticalTemperature()
Returns the critical temperature [K] of CO2.
Definition: CO2.hpp:75
Abstract base class of a pure chemical species.
Definition: Component.hpp:43
static Evaluation gasEnthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy of gaseous CO2 [J/kg].
Definition: CO2.hpp:167
static Evaluation gasInternalEnergy(const Evaluation &temperature, const Evaluation &pressure)
Specific internal energy of CO2 [J/kg].
Definition: CO2.hpp:177
Abstract base class of a pure chemical species.
A class for the CO2 fluid properties.
Definition: CO2.hpp:54
static Scalar maxTabulatedTemperature()
Returns the pressure [Pa] at CO2's triple point.
Definition: CO2.hpp:117
static Evaluation gasHeatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of the component [J/kg] as a liquid.
Definition: CO2.hpp:252
static Scalar criticalPressure()
Returns the critical pressure [Pa] of CO2.
Definition: CO2.hpp:81
static const char * name()
A human readable name for the CO2.
Definition: CO2.hpp:63
static Evaluation gasViscosity(Evaluation temperature, const Evaluation &pressure)
The dynamic viscosity [Pa s] of CO2.
Definition: CO2.hpp:202
static Evaluation vaporPressure(const Evaluation &T)
The vapor pressure in [N/m^2] of pure CO2 at a given temperature.
Definition: CO2.hpp:133
static Scalar minTabulatedPressure()
Returns the pressure [Pa] at CO2's triple point.
Definition: CO2.hpp:99
static Scalar molarMass()
The mass in [kg] of one mole of CO2.
Definition: CO2.hpp:69
static Evaluation gasDensity(const Evaluation &temperature, const Evaluation &pressure)
The density of CO2 at a given pressure and temperature [kg/m^3].
Definition: CO2.hpp:190
A central place for various physical constants occuring in some equations.
static bool gasIsIdeal()
Returns true iff the gas phase is assumed to be ideal.
Definition: CO2.hpp:160
static Scalar tripleTemperature()
Returns the temperature [K]at CO2's triple point.
Definition: CO2.hpp:87
static Scalar maxTabulatedPressure()
Returns the pressure [Pa] at CO2's triple point.
Definition: CO2.hpp:105
static bool gasIsCompressible()
Returns true iff the gas phase is assumed to be compressible.
Definition: CO2.hpp:154