56template <
class Scalar>
336 static const Scalar eps = 1e-7;
339 Scalar du_dp = (uvPEps - uv)/eps;
403 static const Scalar eps = 1e-7;
406 Scalar du_dp = (uv - uvMEps)/eps;
520 const Scalar eps = pv*1e-8;
523 Scalar dv_dp = (v1 - v0)/eps;
539 Scalar drho_dp = - 1/(v0*v0)*dv_dp;
542 return 1.0/v0 + (
pressure - pv)*drho_dp;
591 for (
int i = 0; i < 5 && abs(
pressure*1e-9) < abs(deltaP); ++i) {
633 const Scalar eps = pv*1e-8;
636 Scalar dv_dp = (v1 - v0)/eps;
654 Scalar drho_dp = - 1/(v0*v0)*dv_dp;
657 return 1.0/v0 + (
pressure - pv)*drho_dp;
697 for (
int i = 0; i < 5 && abs(
pressure*1e-9) < abs(deltaP); ++i) {
777 "Evaluating the IAPWS fit function for thermal conductivity outside range of applicability."
810 "Evaluating the IAPWS fit function for thermal conductivity outside range of applicability."
918template <
class Scalar>
Some exceptions thrown in DuMux
Some templates to wrap the valgrind macros.
Implements relations common for all regions of the IAPWS '97 formulation. See:
Implements the equations for region 1 of the IAPWS '97 formulation. See:
Implements the equations for region 2 of the IAPWS '97 formulation. See:
Implements the equations for region 4 of the IAPWS '97 formulation.
Interface for components that have a gas state.
Interface for components that have a liquid state.
Relations valid for an ideal gas.
bool CheckDefined(const T &value)
Make valgrind complain if the object occupied by an object is undefined.
Definition: valgrind.hh:72
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
IsAqueous struct.
Definition: components/base.hh:47
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
Interface for components that have a gas state.
Definition: gas.hh:41
Material properties of pure water .
Definition: h2o.hh:61
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of pure water.
Definition: h2o.hh:744
static Scalar vaporTemperature(Scalar pressure)
The vapor temperature in of pure water at a given pressure.
Definition: h2o.hh:152
static Scalar liquidPressure(Scalar temperature, Scalar density)
The pressure of liquid water in at a given density and temperature.
Definition: h2o.hh:686
static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of water (IAPWS) .
Definition: h2o.hh:767
static const Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of liquid water .
Definition: h2o.hh:307
static Scalar gasHeatCapacityConstVolume(Scalar temperature, Scalar pressure)
Specific isochoric heat capacity of steam and water vapor .
Definition: h2o.hh:452
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: h2o.hh:561
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of steam.
Definition: h2o.hh:726
static const Scalar liquidHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of liquid water .
Definition: h2o.hh:281
static const Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of liquid water .
Definition: h2o.hh:217
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
The density of pure water in at a given pressure and temperature.
Definition: h2o.hh:621
static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of water steam .
Definition: h2o.hh:173
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of steam in at a given pressure and temperature.
Definition: h2o.hh:493
static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
The molar density of water in at a given pressure and temperature.
Definition: h2o.hh:670
static constexpr Scalar acentricFactor()
The acentric factor of water.
Definition: h2o.hh:87
static Scalar vaporPressure(Scalar T)
The vapor pressure in of pure water at a given temperature.
Definition: h2o.hh:131
static constexpr Scalar criticalTemperature()
Returns the critical temperature of water.
Definition: h2o.hh:93
static Scalar gasThermalConductivity(const Scalar temperature, const Scalar pressure)
Thermal conductivity of steam (IAPWS) .
Definition: h2o.hh:800
static constexpr Scalar triplePressure()
Returns the pressure at water's triple point.
Definition: h2o.hh:117
static Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of steam and water vapor .
Definition: h2o.hh:357
static const Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of water steam .
Definition: h2o.hh:252
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: h2o.hh:472
static const Scalar liquidHeatCapacityConstVolume(Scalar temperature, Scalar pressure)
Specific isochoric heat capacity of liquid water .
Definition: h2o.hh:424
static std::string name()
A human readable name for the water.
Definition: h2o.hh:75
static constexpr Scalar molarMass()
The molar mass in of water.
Definition: h2o.hh:81
static constexpr Scalar criticalPressure()
Returns the critical pressure of water.
Definition: h2o.hh:99
static constexpr Scalar criticalMolarVolume()
Returns the molar volume of water at the critical point.
Definition: h2o.hh:105
static constexpr bool liquidIsCompressible()
Returns true if the liquid phase is assumed to be compressible.
Definition: h2o.hh:478
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of steam in at a given density and temperature.
Definition: h2o.hh:576
static constexpr Scalar tripleTemperature()
Returns the temperature at water's triple point.
Definition: h2o.hh:111
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of steam in at a given pressure and temperature.
Definition: h2o.hh:555
Implements relations which are common for all regions of the IAPWS '97 formulation.
Definition: common.hh:56
static constexpr Scalar criticalMolarVolume
Critical molar volume of water .
Definition: common.hh:71
static constexpr Scalar Rs
Specific gas constant of water .
Definition: common.hh:62
static constexpr Scalar triplePressure
Triple pressure of water .
Definition: common.hh:83
static constexpr Scalar molarMass
The molar mass of water .
Definition: common.hh:59
static Scalar viscosity(Scalar temperature, Scalar rho)
The dynamic viscosity of pure water.
Definition: common.hh:99
static constexpr Scalar acentricFactor
The acentric factor of water .
Definition: common.hh:74
static constexpr Scalar criticalTemperature
Critical temperature of water .
Definition: common.hh:65
static constexpr Scalar tripleTemperature
Triple temperature of water .
Definition: common.hh:80
static constexpr Scalar criticalPressure
Critical pressure of water .
Definition: common.hh:68
static Scalar thermalConductivityIAPWS(const Scalar T, const Scalar rho)
Thermal conductivity water (IAPWS) .
Definition: common.hh:160
Implements the equations for region 1 of the IAPWS '97 formulation.
Definition: region1.hh:50
static Scalar dGamma_dPi(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized pressure for IAPWS region 1 (i....
Definition: region1.hh:182
static Scalar ddGamma_ddPi(Scalar temperature, Scalar pressure)
The second partial derivative of the Gibbs free energy to the normalized pressure for IAPWS region 1 ...
Definition: region1.hh:241
static constexpr Scalar dPi_dp(Scalar pressure)
Returns the derivative of the reduced pressure to the pressure for IAPWS region 1 in .
Definition: region1.hh:107
static constexpr Scalar tau(Scalar temperature)
Returns the reduced temperature for IAPWS region 1.
Definition: region1.hh:81
static void checkValidityRange(Scalar temperature, Scalar pressure, const std::string &propertyName="This property")
Returns true if IAPWS region 1 applies for a (temperature in , pressure in ) pair.
Definition: region1.hh:60
static Scalar dGamma_dTau(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized temperature for IAPWS region 1 (i....
Definition: region1.hh:154
static constexpr Scalar pi(Scalar pressure)
Returns the reduced pressure for IAPWS region 1.
Definition: region1.hh:98
static Scalar ddGamma_ddTau(Scalar temperature, Scalar pressure)
The second partial derivative of the Gibbs free energy to the normalized temperature for IAPWS region...
Definition: region1.hh:270
static Scalar ddGamma_dTaudPi(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized pressure and to the normalized temp...
Definition: region1.hh:211
Implements the equations for region 2 of the IAPWS '97 formulation.
Definition: region2.hh:52
static Scalar ddGamma_ddTau(Scalar temperature, Scalar pressure)
The second partial derivative of the Gibbs free energy to the normalized temperature for IAPWS region...
Definition: region2.hh:300
static Scalar dGamma_dTau(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized temperature for IAPWS region 2 (i....
Definition: region2.hh:165
static Scalar ddGamma_dTaudPi(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized pressure and to the normalized temp...
Definition: region2.hh:234
static Scalar ddGamma_ddPi(Scalar temperature, Scalar pressure)
The second partial derivative of the Gibbs free energy to the normalized pressure for IAPWS region 2 ...
Definition: region2.hh:267
static void checkValidityRange(Scalar temperature, Scalar pressure, const std::string &propertyName="This property")
Returns true if IAPWS region 2 applies for a (temperature, pressure) pair.
Definition: region2.hh:62
static constexpr Scalar pi(Scalar pressure)
Returns the reduced pressure (dimensionless) for IAPWS region 2.
Definition: region2.hh:100
static constexpr Scalar dPi_dp(Scalar pressure)
Returns the derivative of the reduced pressure to the pressure for IAPWS region 2 in .
Definition: region2.hh:109
static constexpr Scalar tau(Scalar temperature)
Returns the reduced temperature (dimensionless) for IAPWS region 2.
Definition: region2.hh:83
static Scalar dGamma_dPi(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized pressure for IAPWS region 2 (i....
Definition: region2.hh:202
Implements the equations for region 4 of the IAPWS '97 formulation.
Definition: region4.hh:52
static Scalar saturationPressure(Scalar temperature)
Returns the saturation pressure in of pure water at a given temperature.
Definition: region4.hh:63
static Scalar vaporTemperature(Scalar pressure)
Returns the saturation temperature in of pure water at a given pressure.
Definition: region4.hh:94
Interface for components that have a liquid state.
Definition: liquid.hh:41
static constexpr Scalar pressure(Scalar temperature, Scalar rhoMolar)
The pressure of the gas in , depending on the molar density and temperature.
Definition: idealgas.hh:60
static constexpr Scalar density(Scalar avgMolarMass, Scalar temperature, Scalar pressure)
The density of the gas in , depending on pressure, temperature and average molar mass of the gas.
Definition: idealgas.hh:49
Base class for all components Components provide the thermodynamic relations for the liquid,...