30#include <dune/common/math.hh>
52template <
class Scalar,
class CO2Tables>
60 static bool warningThrown;
79 {
return 273.15 + 30.95; }
91 {
return 273.15 - 56.35; }
103 {
return CO2Tables::tabulatedEnthalpy.minPress(); }
109 {
return CO2Tables::tabulatedEnthalpy.maxPress(); }
115 {
return CO2Tables::tabulatedEnthalpy.minTemp(); }
121 {
return CO2Tables::tabulatedEnthalpy.maxTemp(); }
139 static const Scalar a[4] =
140 { -7.0602087, 1.9391218, -1.6463597, -3.2995634 };
141 static const Scalar t[4] =
142 { 1.0, 1.5, 2.0, 4.0 };
149 for (
int i = 0; i < 4; ++i)
150 exponent += a[i]*pow(1 - Tred, t[i]);
151 exponent *= 1.0/Tred;
167 Dune::dwarn <<
"Subcritical values: Be aware to use "
168 <<
"Tables with sufficient resolution!"<< std::endl;
185 Dune::dwarn <<
"Subcritical values: Be aware to use "
186 <<
"Tables with sufficient resolution!"<< std::endl;
230 Dune::dwarn <<
"Subcritical values: Be aware to use "
231 <<
"Tables with sufficient resolution!"<< std::endl;
256 Dune::dwarn <<
"Subcritical values: Be aware to use "
257 <<
"Tables with sufficient resolution!"<< std::endl;
329 static const double a0 = 0.235156;
330 static const double a1 = -0.491266;
331 static const double a2 = 5.211155E-2;
332 static const double a3 = 5.347906E-2;
333 static const double a4 = -1.537102E-2;
335 static const double d11 = 0.4071119E-2;
336 static const double d21 = 0.7198037E-4;
337 static const double d64 = 0.2411697E-16;
338 static const double d81 = 0.2971072E-22;
339 static const double d82 = -0.1627888E-22;
341 static const double ESP = 251.196;
343 double mu0, SigmaStar, TStar;
350 Dune::dgrave <<
"Temperature below 275K in viscosity function:"
351 <<
"Regularizing temperature to 275K. " << std::endl;
361 SigmaStar = exp(a0 + a1*log(TStar)
362 + a2*log(TStar)*log(TStar)
363 + a3*log(TStar)*log(TStar)*log(TStar)
364 + a4*log(TStar)*log(TStar)*log(TStar)*log(TStar) );
371 dmu = d11*rho + d21*rho*rho + d64*power(rho,6)/(TStar*TStar*TStar)
372 + d81*power(rho,8) + d82*power(rho,8)/TStar;
374 visco_CO2 = (mu0 + dmu)/1.0E6;
405template <
class Scalar,
class CO2Tables>
408template <
class Scalar,
class CO2Tables>
409bool CO2<Scalar, CO2Tables>::warningThrown =
false;
Some exceptions thrown in DuMux
Interface for components that have a gas state.
Interface for components that have a liquid state.
A central place for various physical constants occurring in some equations.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:34
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:65
Exception thrown if a fixable numerical problem occurs.
Definition: exceptions.hh:39
Base class for all components Components provide the thermodynamic relations for the liquid,...
Definition: components/base.hh:59
Scalar Scalar
export the scalar type used by the component
Definition: components/base.hh:63
A class for the CO2 fluid properties.
Definition: co2.hh:57
static Scalar maxTabulatedTemperature()
Returns the maximal tabulated temperature of the used table.
Definition: co2.hh:120
static Scalar minTabulatedPressure()
Returns the minimal tabulated pressure of the used table.
Definition: co2.hh:102
static Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of CO2 .
Definition: co2.hh:198
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of CO2.
Definition: co2.hh:399
static Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of liquid CO2 .
Definition: co2.hh:180
static Scalar vaporPressure(Scalar T)
The vapor pressure in of pure CO2 at a given temperature.
Definition: co2.hh:137
static Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of liquid CO2 .
Definition: co2.hh:212
static constexpr Scalar molarMass()
The mass in of one mole of CO2.
Definition: co2.hh:72
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of steam in at a given density and temperature.
Definition: co2.hh:279
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of CO2 gas in at a given pressure and temperature.
Definition: co2.hh:244
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of CO2 at a given pressure and temperature .
Definition: co2.hh:226
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: co2.hh:126
static Scalar minTabulatedTemperature()
Returns the minimal tabulated temperature of the used table.
Definition: co2.hh:114
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
The density of pure CO2 at a given pressure and temperature .
Definition: co2.hh:252
static Scalar criticalTemperature()
Returns the critical temperature of CO2.
Definition: co2.hh:78
static Scalar liquidPressure(Scalar temperature, Scalar density)
The pressure of liquid water in at a given density and temperature.
Definition: co2.hh:291
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of pure CO2.
Definition: co2.hh:384
static std::string name()
A human readable name for the CO2.
Definition: co2.hh:66
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of CO2. Equations given in: - Vesovic et al., 1990.
Definition: co2.hh:327
static Scalar criticalPressure()
Returns the critical pressure of CO2.
Definition: co2.hh:84
static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
The molar density of CO2 in at a given pressure and temperature.
Definition: co2.hh:270
static Scalar tripleTemperature()
Returns the temperature at CO2's triple point.
Definition: co2.hh:90
static Scalar liquidHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of the component as a liquid. USE WITH CAUTION! Exploits enthalpy fu...
Definition: co2.hh:304
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of gaseous CO2 .
Definition: co2.hh:162
static Scalar maxTabulatedPressure()
Returns the maximal tabulated pressure of the used table.
Definition: co2.hh:108
static Scalar triplePressure()
Returns the pressure at CO2's triple point.
Definition: co2.hh:96
Interface for components that have a gas state.
Definition: gas.hh:41
Interface for components that have a liquid state.
Definition: liquid.hh:41
A central place for various physical constants occurring in some equations.
Definition: constants.hh:39
Base class for all components Components provide the thermodynamic relations for the liquid,...