18#include <dune/common/stdstreams.hh> 
   19#include <dune/common/math.hh> 
   41template <
class Scalar, 
class CO2Tables>
 
   49    static bool warningThrown;
 
   68    { 
return 273.15 + 30.95;  }
 
 
   80    { 
return 273.15 - 56.35;  }
 
 
   92    { 
return CO2Tables::tabulatedEnthalpy.minPress();  }
 
 
   98    { 
return CO2Tables::tabulatedEnthalpy.maxPress();  }
 
 
  104    { 
return CO2Tables::tabulatedEnthalpy.minTemp();  }
 
 
  110    { 
return CO2Tables::tabulatedEnthalpy.maxTemp();  }
 
 
  128        static const Scalar a[4] =
 
  129            { -7.0602087, 1.9391218, -1.6463597, -3.2995634 };
 
  130        static const Scalar t[4] =
 
  131            { 1.0, 1.5, 2.0, 4.0 };
 
  138        for (
int i = 0; i < 4; ++i)
 
  139            exponent += a[i]*pow(1 - Tred, t[i]);
 
  140        exponent *= 1.0/Tred;
 
 
  156            Dune::dwarn << 
"Subcritical values: Be aware to use " 
  157                        <<
"Tables with sufficient resolution!"<< std::endl;
 
  161            CO2Tables::tabulatedEnthalpy.at(temperature, pressure);
 
 
  174            Dune::dwarn << 
"Subcritical values: Be aware to use " 
  175                        <<
"Tables with sufficient resolution!"<< std::endl;
 
 
  193        return h - (pressure / rho);
 
 
  207        return h - (pressure / rho);
 
 
  219            Dune::dwarn << 
"Subcritical values: Be aware to use " 
  220                        <<
"Tables with sufficient resolution!"<< std::endl;
 
  223        return CO2Tables::tabulatedDensity.at(temperature, pressure);
 
 
  245            Dune::dwarn << 
"Subcritical values: Be aware to use " 
  246                        <<
"Tables with sufficient resolution!"<< std::endl;
 
  249        return CO2Tables::tabulatedDensity.at(temperature, pressure);
 
 
  297        Scalar temperature2 = temperature+dT;
 
 
  318        static const double a0 = 0.235156;
 
  319        static const double a1 = -0.491266;
 
  320        static const double a2 = 5.211155E-2;
 
  321        static const double a3 = 5.347906E-2;
 
  322        static const double a4 = -1.537102E-2;
 
  324        static const double d11 = 0.4071119E-2;
 
  325        static const double d21 = 0.7198037E-4;
 
  326        static const double d64 = 0.2411697E-16;
 
  327        static const double d81 = 0.2971072E-22;
 
  328        static const double d82 = -0.1627888E-22;
 
  330        static const double ESP = 251.196;
 
  332        double mu0, SigmaStar, TStar;
 
  336        if(temperature < 275.) 
 
  339            Dune::dgrave << 
"Temperature below 275K in viscosity function:" 
  340                    << 
"Regularizing temperature to 275K. " << std::endl;
 
  344        TStar = temperature/ESP;
 
  350        SigmaStar = exp(a0 + a1*log(TStar)
 
  351                        + a2*log(TStar)*log(TStar)
 
  352                        + a3*log(TStar)*log(TStar)*log(TStar)
 
  353                        + a4*log(TStar)*log(TStar)*log(TStar)*log(TStar) );
 
  354        mu0 = 1.00697*sqrt(temperature) / SigmaStar;
 
  360        dmu = d11*rho + d21*rho*rho + d64*power(rho,6)/(TStar*TStar*TStar)
 
  361            + d81*power(rho,8) + d82*power(rho,8)/TStar;
 
  363        visco_CO2 = (mu0 + dmu)/1.0E6;   
 
 
 
  394template <
class Scalar, 
class CO2Tables>
 
  397template <
class Scalar, 
class CO2Tables>
 
  398bool CO2<Scalar, CO2Tables>::warningThrown = 
false;
 
Base class for all components Components provide the thermodynamic relations for the liquid,...
Definition components/base.hh:46
Scalar Scalar
Definition components/base.hh:50
A class for the CO2 fluid properties.
Definition co2.hh:46
static Scalar maxTabulatedTemperature()
Returns the maximal tabulated temperature  of the used table.
Definition co2.hh:109
static Scalar minTabulatedPressure()
Returns the minimal tabulated pressure  of the used table.
Definition co2.hh:91
static Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of CO2 .
Definition co2.hh:187
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity  of CO2.
Definition co2.hh:388
static Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of liquid CO2 .
Definition co2.hh:169
static Scalar vaporPressure(Scalar T)
The vapor pressure in  of pure CO2 at a given temperature.
Definition co2.hh:126
static Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of liquid CO2 .
Definition co2.hh:201
static constexpr Scalar molarMass()
The mass in  of one mole of CO2.
Definition co2.hh:61
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of steam in  at a given density and temperature.
Definition co2.hh:268
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of CO2 gas in  at a given pressure and temperature.
Definition co2.hh:233
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of CO2 at a given pressure and temperature .
Definition co2.hh:215
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition co2.hh:115
static Scalar minTabulatedTemperature()
Returns the minimal tabulated temperature  of the used table.
Definition co2.hh:103
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
The density of pure CO2 at a given pressure and temperature .
Definition co2.hh:241
static Scalar criticalTemperature()
Returns the critical temperature  of CO2.
Definition co2.hh:67
static Scalar liquidPressure(Scalar temperature, Scalar density)
The pressure of liquid water in  at a given density and temperature.
Definition co2.hh:280
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity  of pure CO2.
Definition co2.hh:373
static std::string name()
A human readable name for the CO2.
Definition co2.hh:55
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity  of CO2. Equations given in: - Vesovic et al., 1990.
Definition co2.hh:316
static Scalar criticalPressure()
Returns the critical pressure  of CO2.
Definition co2.hh:73
static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
The molar density of CO2 in  at a given pressure and temperature.
Definition co2.hh:259
static Scalar tripleTemperature()
Returns the temperature  at CO2's triple point.
Definition co2.hh:79
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:293
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of gaseous CO2 .
Definition co2.hh:151
static Scalar maxTabulatedPressure()
Returns the maximal tabulated pressure  of the used table.
Definition co2.hh:97
static Scalar triplePressure()
Returns the pressure  at CO2's triple point.
Definition co2.hh:85
Interface for components that have a gas state.
Definition gas.hh:28
Interface for components that have a liquid state.
Definition liquid.hh:28
static constexpr Scalar R
The ideal gas constant .
Definition constants.hh:32
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.