18#include <dune/common/stdstreams.hh>
19#include <dune/common/math.hh>
42template <
class Scalar,
class CO2Tables>
50 static bool warningThrown;
69 {
return 273.15 + 30.95; }
81 {
return 273.15 - 56.35; }
93 {
return CO2Tables::tabulatedEnthalpy.minPress(); }
99 {
return CO2Tables::tabulatedEnthalpy.maxPress(); }
105 {
return CO2Tables::tabulatedEnthalpy.minTemp(); }
111 {
return CO2Tables::tabulatedEnthalpy.maxTemp(); }
129 static const Scalar a[4] =
130 { -7.0602087, 1.9391218, -1.6463597, -3.2995634 };
131 static const Scalar t[4] =
132 { 1.0, 1.5, 2.0, 4.0 };
139 for (
int i = 0; i < 4; ++i)
140 exponent += a[i]*pow(1 - Tred, t[i]);
141 exponent *= 1.0/Tred;
157 Dune::dwarn <<
"Subcritical values: Be aware to use "
158 <<
"Tables with sufficient resolution!"<< std::endl;
175 Dune::dwarn <<
"Subcritical values: Be aware to use "
176 <<
"Tables with sufficient resolution!"<< std::endl;
220 Dune::dwarn <<
"Subcritical values: Be aware to use "
221 <<
"Tables with sufficient resolution!"<< std::endl;
246 Dune::dwarn <<
"Subcritical values: Be aware to use "
247 <<
"Tables with sufficient resolution!"<< std::endl;
319 static const double a0 = 0.235156;
320 static const double a1 = -0.491266;
321 static const double a2 = 5.211155E-2;
322 static const double a3 = 5.347906E-2;
323 static const double a4 = -1.537102E-2;
325 static const double d11 = 0.4071119E-2;
326 static const double d21 = 0.7198037E-4;
327 static const double d64 = 0.2411697E-16;
328 static const double d81 = 0.2971072E-22;
329 static const double d82 = -0.1627888E-22;
331 static const double ESP = 251.196;
333 double mu0, SigmaStar, TStar;
340 Dune::dgrave <<
"Temperature below 275K in viscosity function:"
341 <<
"Regularizing temperature to 275K. " << std::endl;
351 SigmaStar = exp(a0 + a1*log(TStar)
352 + a2*log(TStar)*log(TStar)
353 + a3*log(TStar)*log(TStar)*log(TStar)
354 + a4*log(TStar)*log(TStar)*log(TStar)*log(TStar) );
361 dmu = d11*rho + d21*rho*rho + d64*power(rho,6)/(TStar*TStar*TStar)
362 + d81*power(rho,8) + d82*power(rho,8)/TStar;
364 visco_CO2 = (mu0 + dmu)/1.0E6;
395template <
class Scalar,
class CO2Tables>
398template <
class Scalar,
class CO2Tables>
399bool CO2<Scalar, CO2Tables>::warningThrown =
false;
Base class for all components Components provide the thermodynamic relations for the liquid,...
Definition: components/base.hh:47
Scalar Scalar
export the scalar type used by the component
Definition: components/base.hh:51
A class for the CO2 fluid properties.
Definition: co2.hh:47
static Scalar maxTabulatedTemperature()
Returns the maximal tabulated temperature of the used table.
Definition: co2.hh:110
static Scalar minTabulatedPressure()
Returns the minimal tabulated pressure of the used table.
Definition: co2.hh:92
static Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of CO2 .
Definition: co2.hh:188
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of CO2.
Definition: co2.hh:389
static Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of liquid CO2 .
Definition: co2.hh:170
static Scalar vaporPressure(Scalar T)
The vapor pressure in of pure CO2 at a given temperature.
Definition: co2.hh:127
static Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of liquid CO2 .
Definition: co2.hh:202
static constexpr Scalar molarMass()
The mass in of one mole of CO2.
Definition: co2.hh:62
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of steam in at a given density and temperature.
Definition: co2.hh:269
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of CO2 gas in at a given pressure and temperature.
Definition: co2.hh:234
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of CO2 at a given pressure and temperature .
Definition: co2.hh:216
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: co2.hh:116
static Scalar minTabulatedTemperature()
Returns the minimal tabulated temperature of the used table.
Definition: co2.hh:104
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
The density of pure CO2 at a given pressure and temperature .
Definition: co2.hh:242
static Scalar criticalTemperature()
Returns the critical temperature of CO2.
Definition: co2.hh:68
static Scalar liquidPressure(Scalar temperature, Scalar density)
The pressure of liquid water in at a given density and temperature.
Definition: co2.hh:281
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of pure CO2.
Definition: co2.hh:374
static std::string name()
A human readable name for the CO2.
Definition: co2.hh:56
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of CO2. Equations given in: - Vesovic et al., 1990.
Definition: co2.hh:317
static Scalar criticalPressure()
Returns the critical pressure of CO2.
Definition: co2.hh:74
static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
The molar density of CO2 in at a given pressure and temperature.
Definition: co2.hh:260
static Scalar tripleTemperature()
Returns the temperature at CO2's triple point.
Definition: co2.hh:80
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:294
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of gaseous CO2 .
Definition: co2.hh:152
static Scalar maxTabulatedPressure()
Returns the maximal tabulated pressure of the used table.
Definition: co2.hh:98
static Scalar triplePressure()
Returns the pressure at CO2's triple point.
Definition: co2.hh:86
Interface for components that have a gas state.
Definition: gas.hh:29
Interface for components that have a liquid state.
Definition: liquid.hh:29
A central place for various physical constants occurring in some equations.
Definition: constants.hh:27
Exception thrown if a fixable numerical problem occurs.
Definition: exceptions.hh:27
Base class for all components Components provide the thermodynamic relations for the liquid,...
A central place for various physical constants occurring in some equations.
Some exceptions thrown in DuMux
Interface for components that have a gas state.
Interface for components that have a liquid state.
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:22
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:53