www.mooseframework.org
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Water97FluidProperties Class Reference

Water (H2O) fluid properties as a function of pressure (Pa) and temperature (K) from IAPWS-IF97: Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. More...

#include <Water97FluidProperties.h>

Inheritance diagram for Water97FluidProperties:
[legend]

Public Member Functions

 Water97FluidProperties (const InputParameters &parameters)
 
virtual ~Water97FluidProperties ()
 
virtual std::string fluidName () const override
 Fluid name. More...
 
virtual Real molarMass () const override
 Water molar mass. More...
 
virtual Real criticalPressure () const
 Water critical pressure. More...
 
virtual Real criticalTemperature () const
 Water critical temperature. More...
 
virtual Real criticalDensity () const
 Water critical density. More...
 
virtual Real triplePointPressure () const
 Water triple point pressure. More...
 
virtual Real triplePointTemperature () const
 Water triple point temperature. More...
 
virtual Real rho (Real pressure, Real temperature) const override
 Density. More...
 
virtual void rho_dpT (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const override
 Density and its derivatives wrt pressure and temperature. More...
 
virtual Real e (Real pressure, Real temperature) const override
 Internal energy. More...
 
virtual void e_dpT (Real pressure, Real temperature, Real &e, Real &de_dp, Real &de_dT) const override
 Internal energy and its derivatives wrt pressure and temperature. More...
 
virtual void rho_e_dpT (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &e, Real &de_dp, Real &de_dT) const override
 Density and internal energy and their derivatives wrt pressure and temperature. More...
 
virtual Real c (Real pressure, Real temperature) const override
 Speed of sound. More...
 
virtual Real cp (Real pressure, Real temperature) const override
 Isobaric specific heat capacity. More...
 
virtual Real cv (Real pressure, Real temperature) const override
 Isochoric specific heat. More...
 
virtual Real mu (Real pressure, Real temperature) const override
 
virtual void mu_dpT (Real pressure, Real temperature, Real &mu, Real &dmu_dp, Real &dmu_dT) const override
 
virtual Real mu_from_rho_T (Real density, Real temperature) const override
 
virtual void mu_drhoT_from_rho_T (Real density, Real temperature, Real ddensity_dT, Real &mu, Real &dmu_drho, Real &dmu_dT) const override
 Dynamic viscosity and its derivatives wrt density and temperature. More...
 
virtual Real k (Real pressure, Real temperature) const override
 Thermal conductivity. More...
 
virtual void k_dpT (Real pressure, Real temperature, Real &k, Real &dk_dp, Real &dk_dT) const override
 Thermal conductivity and its derivatives wrt pressure and temperature. More...
 
virtual Real k_from_rho_T (Real density, Real temperature) const override
 Thermal conductivity as a function of density and temperature. More...
 
virtual Real s (Real pressure, Real temperature) const override
 Specific entropy. More...
 
virtual Real h (Real pressure, Real temperature) const override
 Specific enthalpy. More...
 
virtual void h_dpT (Real pressure, Real temperature, Real &h, Real &dh_dp, Real &dh_dT) const override
 Enthalpy and its derivatives wrt pressure and temperature. More...
 
virtual Real beta (Real pressure, Real temperature) const override
 Thermal expansion coefficient. More...
 
Real vaporPressure (Real temperature) const
 Saturation pressure as a function of temperature. More...
 
void vaporPressure_dT (Real temperature, Real &psat, Real &dpsat_dT) const
 Saturation pressure as a function of temperature and derivative wrt temperature. More...
 
Real vaporTemperature (Real pressure) const
 Saturation temperature as a function of pressure. More...
 
Real b23p (Real temperature) const
 Auxillary equation for the boundary between regions 2 and 3. More...
 
Real b23T (Real pressure) const
 Auxillary equation for the boundary between regions 2 and 3. More...
 
unsigned int inRegion (Real pressure, Real temperature) const
 Determines the phase region that the given pressure and temperature values lie in. More...
 
unsigned int subregion3 (Real pressure, Real temperature) const
 Provides the correct subregion index for a (P,T) point in region 3. More...
 
Real subregionVolume (Real pi, Real theta, Real a, Real b, Real c, Real d, Real e, unsigned int sid) const
 Specific volume in all subregions of region 3 EXCEPT subregion n (13). More...
 
Real densityRegion3 (Real pressure, Real temperature) const
 Density function for Region 3 - supercritical water and steam. More...
 
virtual Real henryConstant (Real temperature) const override
 Henry's law constant for dissolution in water. More...
 
virtual void henryConstant_dT (Real temperature, Real &Kh, Real &dKh_dT) const override
 Henry's law constant for dissolution in water and derivative wrt temperature. More...
 
virtual Real temperature_from_ph (Real pressure, Real enthalpy) const
 Backwards equation T(p, h) From Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. More...
 
Real b2bc (Real pressure) const
 Boundary between subregions b and c in region 2. More...
 
Real b3ab (Real pressure) const
 Boundary between subregions a and b in region 3. More...
 
virtual Real gamma (Real pressure, Real temperature) const
 Adiabatic index - ratio of specific heats. More...
 
virtual void execute () final
 
virtual void initialize () final
 
virtual void finalize () final
 

Protected Types

enum  subregionEnum {
  AB, CD, GH, IJ,
  JK, MN, OP, QU,
  RX, UV, WX, EF
}
 Enum of subregion ids for region 3. More...
 

Protected Member Functions

Real gamma1 (Real pi, Real tau) const
 Gibbs free energy in Region 1 - single phase liquid region. More...
 
Real dgamma1_dpi (Real pi, Real tau) const
 Derivative of Gibbs free energy in Region 1 wrt pi. More...
 
Real d2gamma1_dpi2 (Real pi, Real tau) const
 Second derivative of Gibbs free energy in Region 1 wrt pi. More...
 
Real dgamma1_dtau (Real pi, Real tau) const
 Derivative of Gibbs free energy in Region 1 wrt tau. More...
 
Real d2gamma1_dtau2 (Real pi, Real tau) const
 Second derivative of Gibbs free energy in Region 1 wrt tau. More...
 
Real d2gamma1_dpitau (Real pi, Real tau) const
 Second derivative of Gibbs free energy in Region 1 wrt pi and tau. More...
 
Real gamma2 (Real pi, Real tau) const
 Gibbs free energy in Region 2 - superheated steam. More...
 
Real dgamma2_dpi (Real pi, Real tau) const
 Derivative of Gibbs free energy in Region 2 wrt pi. More...
 
Real d2gamma2_dpi2 (Real pi, Real tau) const
 Second derivative of Gibbs free energy in Region 2 wrt pi. More...
 
Real dgamma2_dtau (Real pi, Real tau) const
 Derivative of Gibbs free energy in Region 2 wrt tau. More...
 
Real d2gamma2_dtau2 (Real pi, Real tau) const
 Second derivative of Gibbs free energy in Region 2 wrt tau. More...
 
Real d2gamma2_dpitau (Real pi, Real tau) const
 Second derivative of Gibbs free energy in Region 2 wrt pi and tau. More...
 
Real phi3 (Real delta, Real tau) const
 Helmholtz free energy in Region 3. More...
 
Real dphi3_ddelta (Real delta, Real tau) const
 Derivative of Helmholtz free energy in Region 3 wrt delta. More...
 
Real d2phi3_ddelta2 (Real delta, Real tau) const
 Second derivative of Helmholtz free energy in Region 3 wrt delta. More...
 
Real dphi3_dtau (Real delta, Real tau) const
 Derivative of Helmholtz free energy in Region 3 wrt tau. More...
 
Real d2phi3_dtau2 (Real delta, Real tau) const
 Second derivative of Helmholtz free energy in Region 3 wrt tau. More...
 
Real d2phi3_ddeltatau (Real delta, Real tau) const
 Second derivative of Helmholtz free energy in Region 3 wrt delta and tau. More...
 
Real gamma5 (Real pi, Real tau) const
 Gibbs free energy in Region 5. More...
 
Real dgamma5_dpi (Real pi, Real tau) const
 Derivative of Gibbs free energy in Region 5 wrt pi. More...
 
Real d2gamma5_dpi2 (Real pi, Real tau) const
 Second derivative of Gibbs free energy in Region 5 wrt pi. More...
 
Real dgamma5_dtau (Real pi, Real tau) const
 Derivative of Gibbs free energy in Region 5 wrt tau. More...
 
Real d2gamma5_dtau2 (Real pi, Real tau) const
 Second derivative of Gibbs free energy in Region 5 wrt tau. More...
 
Real d2gamma5_dpitau (Real pi, Real tau) const
 Second derivative of Gibbs free energy in Region 5 wrt pi and tau. More...
 
Real tempXY (Real pressure, subregionEnum xy) const
 Boundaries between subregions in region 3. More...
 
unsigned int inRegionPH (Real pressure, Real enthalpy) const
 Determines the phase region that the given pressure and enthaply values lie in. More...
 
unsigned int subregion2ph (Real pressure, Real enthalpy) const
 Provides the correct subregion index for a (P,h) point in region 2. More...
 
unsigned int subregion3ph (Real pressure, Real enthalpy) const
 Provides the correct subregion index for a (P,h) point in region 3. More...
 
Real temperature_from_ph1 (Real pressure, Real enthalpy) const
 Backwards equation T(p, h) in Region 1 Eq. More...
 
Real temperature_from_ph2a (Real pressure, Real enthalpy) const
 Backwards equation T(p, h) in Region 2a Eq. More...
 
Real temperature_from_ph2b (Real pressure, Real enthalpy) const
 Backwards equation T(p, h) in Region 2b Eq. More...
 
Real temperature_from_ph2c (Real pressure, Real enthalpy) const
 Backwards equation T(p, h) in Region 2c Eq. More...
 
Real temperature_from_ph3a (Real pressure, Real enthalpy) const
 Backwards equation T(p, h) in Region 3a Eq. More...
 
Real temperature_from_ph3b (Real pressure, Real enthalpy) const
 Backwards equation T(p, h) in Region 3b Eq. More...
 
virtual Real henryConstantIAPWS (Real temperature, Real A, Real B, Real C) const
 IAPWS formulation of Henry's law constant for dissolution in water From Guidelines on the Henry's constant and vapour liquid distribution constant for gases in H20 and D20 at high temperatures, IAPWS (2004) More...
 
virtual void henryConstantIAPWS_dT (Real temperature, Real &Kh, Real &dKh_dT, Real A, Real B, Real C) const
 IAPWS formulation of Henry's law constant for dissolution in water and derivative wrt temperature. More...
 

Protected Attributes

const Real _Mh2o
 Water molar mass (kg/mol) More...
 
const Real _Rw
 Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) More...
 
const Real _p_critical
 Critical pressure (Pa) More...
 
const Real _T_critical
 Critical temperature (K) More...
 
const Real _rho_critical
 Critical density (kg/m^3) More...
 
const Real _p_triple
 Triple point pressure (Pa) More...
 
const Real _T_triple
 Triple point temperature (K) More...
 
const std::vector< Real > _n1
 Reference constants used in to calculate thermophysical properties of water. More...
 
const std::vector< int > _I1
 
const std::vector< int > _J1
 
const std::vector< Real > _nph1
 
const std::vector< int > _Iph1 {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6}
 
const std::vector< int > _Jph1
 
const std::vector< Real > _n02
 Constants for region 2. More...
 
const std::vector< Real > _n2
 
const std::vector< int > _J02 {0, 1, -5, -4, -3, -2, -1, 2, 3}
 
const std::vector< int > _I2
 
const std::vector< int > _J2
 
const std::vector< Real > _nph2a
 
const std::vector< int > _Iph2a
 
const std::vector< int > _Jph2a
 
const std::vector< Real > _nph2b
 
const std::vector< int > _Iph2b
 
const std::vector< int > _Jph2b
 
const std::vector< Real > _nph2c
 
const std::vector< int > _Iph2c
 
const std::vector< int > _Jph2c
 
const std::vector< Real > _n3
 Constants for region 3. More...
 
const std::vector< int > _I3
 
const std::vector< int > _J3
 
const std::vector< std::vector< Real > > _par3
 
const std::vector< unsigned int > _par3N
 
const std::vector< std::vector< Real > > _n3s
 Constants for all 26 subregions in region 3. More...
 
const std::vector< std::vector< int > > _I3s
 
const std::vector< std::vector< int > > _J3s
 
const std::vector< Real > _nph3a
 
const std::vector< int > _Iph3a
 
const std::vector< int > _Jph3a
 
const std::vector< Real > _nph3b
 
const std::vector< int > _Iph3b
 
const std::vector< int > _Jph3b
 
const std::vector< int > _J05 {0, 1, -3, -2, -1, 2}
 Constants for region 5. More...
 
const std::vector< Real > _n05
 
const std::vector< int > _I5 {1, 1, 1, 2, 2, 3}
 
const std::vector< int > _J5 {1, 2, 3, 3, 9, 7}
 
const std::vector< Real > _n5
 
const std::vector< Real > _T_star {1386.0, 540.0, _T_critical, 1.0, 1000.0}
 Temperature scale for each region. More...
 
const std::vector< Real > _p_star {16.53e6, 1.0e6, 1.0e6, 1.0e6, 1.0e6}
 Pressure scale for each region. More...
 
const Real _R
 Universal gas constant (J/mol/K) More...
 
const Real _T_c2k
 Conversion of temperature from Celcius to Kelvin. More...
 

Detailed Description

Water (H2O) fluid properties as a function of pressure (Pa) and temperature (K) from IAPWS-IF97: Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam.

To avoid iteration in Region 3, the backwards equations from: Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam are implemented.

Water viscosity as a function of density (kg/m^3) and temperature (K) from: Release on the IAPWS Formulation 2008 for the Viscosity of Ordinary Water Substance.

Thermal conductivity as a function of density (kg/m^3) and temperature (K) from: Revised Release on the IAPS Formulation 1985 for the Thermal Conductivity of Ordinary Water Substance

Definition at line 37 of file Water97FluidProperties.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

Water97FluidProperties::Water97FluidProperties ( const InputParameters &  parameters)

Definition at line 19 of file Water97FluidProperties.C.

20  : SinglePhaseFluidPropertiesPT(parameters),
21  _Mh2o(18.015e-3),
22  _Rw(461.526),
23  _p_critical(22.064e6),
24  _T_critical(647.096),
25  _rho_critical(322.0),
26  _p_triple(611.657),
27  _T_triple(273.16)
28 {
29 }
const Real _T_critical
Critical temperature (K)
const Real _p_critical
Critical pressure (Pa)
const Real _T_triple
Triple point temperature (K)
const Real _rho_critical
Critical density (kg/m^3)
SinglePhaseFluidPropertiesPT(const InputParameters &parameters)
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...
const Real _p_triple
Triple point pressure (Pa)
const Real _Mh2o
Water molar mass (kg/mol)
virtual Real e(Real pressure, Real temperature) const override
Internal energy.
Water97FluidProperties::~Water97FluidProperties ( )
virtual

Definition at line 31 of file Water97FluidProperties.C.

31 {}

Member Function Documentation

Real Water97FluidProperties::b23p ( Real  temperature) const

Auxillary equation for the boundary between regions 2 and 3.

Eq. (5) from Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
temperaturewater temperature (K)
Returns
pressure (Pa) on the boundary between region 2 and 3

Definition at line 898 of file Water97FluidProperties.C.

Referenced by b3ab(), and inRegion().

899 {
900  // Check whether the input temperature is within the region of validity of this equation.
901  // Valid for 623.15 K <= t <= 863.15 K
902  if (temperature < 623.15 || temperature > 863.15)
903  mooseError(name(), ": b23p(): Temperature is outside range of 623.15 K <= T <= 863.15 K");
904 
905  // Constants for the boundary between regions 2 and 3
906  const std::vector<Real> n23{0.34805185628969e3,
907  -0.11671859879975e1,
908  0.10192970039326e-2,
909  0.57254459862746e3,
910  0.13918839778870e2};
911 
912  return (n23[0] + n23[1] * temperature + n23[2] * temperature * temperature) * 1.e6;
913 }
const std::string temperature
Definition: NS.h:25
Real Water97FluidProperties::b23T ( Real  pressure) const

Auxillary equation for the boundary between regions 2 and 3.

Eq. (6) from Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
pressurewater pressure (Pa)
Returns
temperature (K) on the boundary between regions 2 and 3

Definition at line 916 of file Water97FluidProperties.C.

Referenced by inRegionPH().

917 {
918  // Check whether the input pressure is within the region of validity of this equation.
919  // Valid for 16.529 MPa <= p <= 100 MPa
920  if (pressure < 16.529e6 || pressure > 100.0e6)
921  mooseError(name(), ": b23T(): Pressure is outside range 16.529 MPa <= p <= 100 MPa");
922 
923  // Constants for the boundary between regions 2 and 3
924  const std::vector<Real> n23{0.34805185628969e3,
925  -0.11671859879975e1,
926  0.10192970039326e-2,
927  0.57254459862746e3,
928  0.13918839778870e2};
929 
930  return n23[3] + std::sqrt((pressure / 1.e6 - n23[4]) / n23[2]);
931 }
const std::string pressure
Definition: NS.h:24
Real Water97FluidProperties::b2bc ( Real  pressure) const

Boundary between subregions b and c in region 2.

Equation 21 from Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam.

Parameters
pressurewater pressure (Pa)
Returns
enthalpy at boundary (J/kg)

Definition at line 1731 of file Water97FluidProperties.C.

Referenced by subregion2ph().

1732 {
1733  // Check whether the input pressure is within the region of validity of this equation.
1734  if (pressure < 6.5467e6 || pressure > 100.0e6)
1735  mooseError(name(), ": b2bc(): Pressure is outside range of 6.5467 MPa <= p <= 100 MPa");
1736 
1737  Real pi = pressure / 1.0e6;
1738 
1739  return (0.26526571908428e4 + std::sqrt((pi - 0.45257578905948e1) / 0.12809002730136e-3)) * 1.0e3;
1740 }
const std::string pressure
Definition: NS.h:24
virtual Real e(Real pressure, Real temperature) const override
Internal energy.
Real Water97FluidProperties::b3ab ( Real  pressure) const

Boundary between subregions a and b in region 3.

Equation 1 from Revised Supplementary Release on Backward Equations for the Functions T(p,h), v(p,h) and T(p,s), v(p,s) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
pressurewater pressure (Pa)
Returns
enthalpy at boundary (J/kg)

Definition at line 1846 of file Water97FluidProperties.C.

Referenced by subregion3ph().

1847 {
1848  // Check whether the input pressure is within the region of validity of this equation.
1849  if (pressure < b23p(623.15) || pressure > 100.0e6)
1850  mooseError(name(), ": b3ab(): Pressure is outside range of 16.529 MPa <= p <= 100 MPa");
1851 
1852  Real pi = pressure / 1.0e6;
1853  Real eta = 0.201464004206875e4 + 0.374696550136983e1 * pi - 0.219921901054187e-1 * pi * pi +
1854  0.87513168600995e-4 * pi * pi * pi;
1855 
1856  return eta * 1.0e3;
1857 }
Real b23p(Real temperature) const
Auxillary equation for the boundary between regions 2 and 3.
const std::string pressure
Definition: NS.h:24
Real Water97FluidProperties::beta ( Real  pressure,
Real  temperature 
) const
overridevirtual

Thermal expansion coefficient.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
beta (1/K)

Implements SinglePhaseFluidPropertiesPT.

Definition at line 777 of file Water97FluidProperties.C.

Referenced by vaporTemperature().

778 {
779  mooseError(name(), ": beta() not implemented yet");
780 }
Real Water97FluidProperties::c ( Real  pressure,
Real  temperature 
) const
overridevirtual

Speed of sound.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
speed of sound (m/s)

Implements SinglePhaseFluidPropertiesPT.

Definition at line 318 of file Water97FluidProperties.C.

Referenced by densityRegion3(), vaporPressure(), and vaporPressure_dT().

319 {
320  Real speed2, pi, tau, delta;
321 
322  // Determine which region the point is in
323  unsigned int region = inRegion(pressure, temperature);
324  switch (region)
325  {
326  case 1:
327  pi = pressure / _p_star[0];
328  tau = _T_star[0] / temperature;
329  speed2 = _Rw * temperature * std::pow(dgamma1_dpi(pi, tau), 2.0) /
330  (std::pow(dgamma1_dpi(pi, tau) - tau * d2gamma1_dpitau(pi, tau), 2.0) /
331  (tau * tau * d2gamma1_dtau2(pi, tau)) -
332  d2gamma1_dpi2(pi, tau));
333  break;
334 
335  case 2:
336  pi = pressure / _p_star[1];
337  tau = _T_star[1] / temperature;
338  speed2 = _Rw * temperature * std::pow(pi * dgamma2_dpi(pi, tau), 2.0) /
339  ((-pi * pi * d2gamma2_dpi2(pi, tau)) +
340  std::pow(pi * dgamma2_dpi(pi, tau) - tau * pi * d2gamma2_dpitau(pi, tau), 2.0) /
341  (tau * tau * d2gamma2_dtau2(pi, tau)));
342  break;
343 
344  case 3:
345  {
346  // Calculate density first, then use that in Helmholtz free energy
347  Real density3 = densityRegion3(pressure, temperature);
348  delta = density3 / _rho_critical;
349  tau = _T_star[2] / temperature;
350  speed2 =
351  _Rw * temperature *
352  (2.0 * delta * dphi3_ddelta(delta, tau) + delta * delta * d2phi3_ddelta2(delta, tau) -
353  std::pow(delta * dphi3_ddelta(delta, tau) - delta * tau * d2phi3_ddeltatau(delta, tau),
354  2.0) /
355  (tau * tau * d2phi3_dtau2(delta, tau)));
356  break;
357  }
358 
359  case 5:
360  pi = pressure / _p_star[4];
361  tau = _T_star[4] / temperature;
362  speed2 = _Rw * temperature * std::pow(pi * dgamma5_dpi(pi, tau), 2.0) /
363  ((-pi * pi * d2gamma5_dpi2(pi, tau)) +
364  std::pow(pi * dgamma5_dpi(pi, tau) - tau * pi * d2gamma5_dpitau(pi, tau), 2.0) /
365  (tau * tau * d2gamma5_dtau2(pi, tau)));
366  break;
367 
368  default:
369  mooseError(name(), ": inRegion() has given an incorrect region");
370  }
371 
372  return std::sqrt(speed2);
373 }
Real dphi3_ddelta(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt delta.
Real d2gamma5_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt tau.
const std::vector< Real > _T_star
Temperature scale for each region.
const std::vector< Real > _p_star
Pressure scale for each region.
const std::string temperature
Definition: NS.h:25
Real dgamma2_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt pi.
Real d2phi3_ddelta2(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt delta.
Real d2phi3_dtau2(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt tau.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
Real d2gamma2_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt pi and tau.
Real dgamma1_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt pi.
unsigned int inRegion(Real pressure, Real temperature) const
Determines the phase region that the given pressure and temperature values lie in.
Real d2gamma5_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt pi.
Real d2phi3_ddeltatau(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt delta and tau.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real d2gamma5_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt pi and tau.
const Real _rho_critical
Critical density (kg/m^3)
Real d2gamma1_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt pi.
Real d2gamma2_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt pi.
const std::string pressure
Definition: NS.h:24
Real d2gamma2_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt tau.
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...
Real d2gamma1_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt pi and tau.
Real d2gamma1_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt tau.
Real dgamma5_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt pi.
Real Water97FluidProperties::cp ( Real  pressure,
Real  temperature 
) const
overridevirtual

Isobaric specific heat capacity.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
cp (J/kg/K)

Implements SinglePhaseFluidPropertiesPT.

Definition at line 376 of file Water97FluidProperties.C.

377 {
378  Real specific_heat, pi, tau, delta;
379 
380  // Determine which region the point is in
381  unsigned int region = inRegion(pressure, temperature);
382  switch (region)
383  {
384  case 1:
385  pi = pressure / _p_star[0];
386  tau = _T_star[0] / temperature;
387  specific_heat = -_Rw * tau * tau * d2gamma1_dtau2(pi, tau);
388  break;
389 
390  case 2:
391  pi = pressure / _p_star[1];
392  tau = _T_star[1] / temperature;
393  specific_heat = -_Rw * tau * tau * d2gamma2_dtau2(pi, tau);
394  break;
395 
396  case 3:
397  {
398  // Calculate density first, then use that in Helmholtz free energy
399  Real density3 = densityRegion3(pressure, temperature);
400  delta = density3 / _rho_critical;
401  tau = _T_star[2] / temperature;
402  specific_heat =
403  _Rw *
404  (-tau * tau * d2phi3_dtau2(delta, tau) +
405  (delta * dphi3_ddelta(delta, tau) - delta * tau * d2phi3_ddeltatau(delta, tau)) *
406  (delta * dphi3_ddelta(delta, tau) - delta * tau * d2phi3_ddeltatau(delta, tau)) /
407  (2.0 * delta * dphi3_ddelta(delta, tau) +
408  delta * delta * d2phi3_ddelta2(delta, tau)));
409  break;
410  }
411 
412  case 5:
413  pi = pressure / _p_star[4];
414  tau = _T_star[4] / temperature;
415  specific_heat = -_Rw * tau * tau * d2gamma5_dtau2(pi, tau);
416  break;
417 
418  default:
419  mooseError(name(), ": inRegion() has given an incorrect region");
420  }
421  return specific_heat;
422 }
Real dphi3_ddelta(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt delta.
Real d2gamma5_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt tau.
const std::vector< Real > _T_star
Temperature scale for each region.
const std::vector< Real > _p_star
Pressure scale for each region.
const std::string temperature
Definition: NS.h:25
Real d2phi3_ddelta2(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt delta.
Real d2phi3_dtau2(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt tau.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
unsigned int inRegion(Real pressure, Real temperature) const
Determines the phase region that the given pressure and temperature values lie in.
Real d2phi3_ddeltatau(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt delta and tau.
const Real _rho_critical
Critical density (kg/m^3)
const std::string pressure
Definition: NS.h:24
Real d2gamma2_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt tau.
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...
Real d2gamma1_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt tau.
Real Water97FluidProperties::criticalDensity ( ) const
virtual

Water critical density.

Returns
critical density (kg/m^3)

Definition at line 58 of file Water97FluidProperties.C.

59 {
60  return _rho_critical;
61 }
const Real _rho_critical
Critical density (kg/m^3)
Real Water97FluidProperties::criticalPressure ( ) const
virtual

Water critical pressure.

Returns
critical pressure (Pa)

Definition at line 46 of file Water97FluidProperties.C.

47 {
48  return _p_critical;
49 }
const Real _p_critical
Critical pressure (Pa)
Real Water97FluidProperties::criticalTemperature ( ) const
virtual

Water critical temperature.

Returns
critical temperature (K)

Definition at line 52 of file Water97FluidProperties.C.

53 {
54  return _T_critical;
55 }
const Real _T_critical
Critical temperature (K)
Real Water97FluidProperties::cv ( Real  pressure,
Real  temperature 
) const
overridevirtual

Isochoric specific heat.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
cv (J/kg/K)

Implements SinglePhaseFluidPropertiesPT.

Definition at line 425 of file Water97FluidProperties.C.

426 {
427  Real specific_heat, pi, tau, delta;
428 
429  // Determine which region the point is in
430  unsigned int region = inRegion(pressure, temperature);
431  switch (region)
432  {
433  case 1:
434  pi = pressure / _p_star[0];
435  tau = _T_star[0] / temperature;
436  specific_heat = _Rw * (-tau * tau * d2gamma1_dtau2(pi, tau) +
437  std::pow(dgamma1_dpi(pi, tau) - tau * d2gamma1_dpitau(pi, tau), 2) /
438  d2gamma1_dpi2(pi, tau));
439  break;
440 
441  case 2:
442  pi = pressure / _p_star[1];
443  tau = _T_star[1] / temperature;
444  specific_heat = _Rw * (-tau * tau * d2gamma2_dtau2(pi, tau) +
445  std::pow(dgamma2_dpi(pi, tau) - tau * d2gamma2_dpitau(pi, tau), 2) /
446  d2gamma2_dpi2(pi, tau));
447  break;
448 
449  case 3:
450  {
451  // Calculate density first, then use that in Helmholtz free energy
452  Real density3 = densityRegion3(pressure, temperature);
453  delta = density3 / _rho_critical;
454  tau = _T_star[2] / temperature;
455  specific_heat = _Rw * (-tau * tau * d2phi3_dtau2(delta, tau));
456  break;
457  }
458 
459  case 5:
460  pi = pressure / _p_star[4];
461  tau = _T_star[4] / temperature;
462  specific_heat = _Rw * (-tau * tau * d2gamma5_dtau2(pi, tau) +
463  std::pow(dgamma5_dpi(pi, tau) - tau * d2gamma5_dpitau(pi, tau), 2) /
464  d2gamma5_dpi2(pi, tau));
465  break;
466 
467  default:
468  mooseError(name(), ": inRegion() has given an incorrect region");
469  }
470  return specific_heat;
471 }
Real d2gamma5_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt tau.
const std::vector< Real > _T_star
Temperature scale for each region.
const std::vector< Real > _p_star
Pressure scale for each region.
const std::string temperature
Definition: NS.h:25
Real dgamma2_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt pi.
Real d2phi3_dtau2(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt tau.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
Real d2gamma2_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt pi and tau.
Real dgamma1_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt pi.
unsigned int inRegion(Real pressure, Real temperature) const
Determines the phase region that the given pressure and temperature values lie in.
Real d2gamma5_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt pi.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real d2gamma5_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt pi and tau.
const Real _rho_critical
Critical density (kg/m^3)
Real d2gamma1_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt pi.
Real d2gamma2_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt pi.
const std::string pressure
Definition: NS.h:24
Real d2gamma2_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt tau.
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...
Real d2gamma1_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt pi and tau.
Real d2gamma1_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt tau.
Real dgamma5_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt pi.
Real Water97FluidProperties::d2gamma1_dpi2 ( Real  pi,
Real  tau 
) const
protected

Second derivative of Gibbs free energy in Region 1 wrt pi.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
second derivative of Gibbs free energy wrt pi (-)

Definition at line 997 of file Water97FluidProperties.C.

Referenced by c(), cv(), e_dpT(), and rho_dpT().

998 {
999  Real sum = 0.0;
1000  for (std::size_t i = 0; i < _n1.size(); ++i)
1001  sum += _n1[i] * _I1[i] * (_I1[i] - 1) * std::pow(7.1 - pi, _I1[i] - 2) *
1002  std::pow(tau - 1.222, _J1[i]);
1003 
1004  return sum;
1005 }
const std::vector< int > _I1
const std::vector< int > _J1
const std::vector< Real > _n1
Reference constants used in to calculate thermophysical properties of water.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real Water97FluidProperties::d2gamma1_dpitau ( Real  pi,
Real  tau 
) const
protected

Second derivative of Gibbs free energy in Region 1 wrt pi and tau.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
second derivative of Gibbs free energy wrt pi and tau (-)

Definition at line 1029 of file Water97FluidProperties.C.

Referenced by c(), cv(), e_dpT(), h_dpT(), and rho_dpT().

1030 {
1031  Real dg = 0.0;
1032  for (std::size_t i = 0; i < _n1.size(); ++i)
1033  dg += -_n1[i] * _I1[i] * _J1[i] * std::pow(7.1 - pi, _I1[i] - 1) *
1034  std::pow(tau - 1.222, _J1[i] - 1);
1035 
1036  return dg;
1037 }
const std::vector< int > _I1
const std::vector< int > _J1
const std::vector< Real > _n1
Reference constants used in to calculate thermophysical properties of water.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real Water97FluidProperties::d2gamma1_dtau2 ( Real  pi,
Real  tau 
) const
protected

Second derivative of Gibbs free energy in Region 1 wrt tau.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
second derivative of Gibbs free energy wrt tau (-)

Definition at line 1018 of file Water97FluidProperties.C.

Referenced by c(), cp(), cv(), e_dpT(), and h_dpT().

1019 {
1020  Real dg = 0.0;
1021  for (std::size_t i = 0; i < _n1.size(); ++i)
1022  dg += _n1[i] * _J1[i] * (_J1[i] - 1) * std::pow(7.1 - pi, _I1[i]) *
1023  std::pow(tau - 1.222, _J1[i] - 2);
1024 
1025  return dg;
1026 }
const std::vector< int > _I1
const std::vector< int > _J1
const std::vector< Real > _n1
Reference constants used in to calculate thermophysical properties of water.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real Water97FluidProperties::d2gamma2_dpi2 ( Real  pi,
Real  tau 
) const
protected

Second derivative of Gibbs free energy in Region 2 wrt pi.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
second derivative of Gibbs free energy wrt pi (-)

Definition at line 1072 of file Water97FluidProperties.C.

Referenced by c(), cv(), e_dpT(), and rho_dpT().

1073 {
1074  // Ideal gas part of the Gibbs free energy
1075  Real dg0 = -1.0 / pi / pi;
1076 
1077  // Residual part of the Gibbs free energy
1078  Real dgr = 0.0;
1079  for (std::size_t i = 0; i < _n2.size(); ++i)
1080  dgr += _n2[i] * _I2[i] * (_I2[i] - 1) * std::pow(pi, _I2[i] - 2) * std::pow(tau - 0.5, _J2[i]);
1081 
1082  return dg0 + dgr;
1083 }
const std::vector< int > _I2
const std::vector< int > _J2
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< Real > _n2
Real Water97FluidProperties::d2gamma2_dpitau ( Real  pi,
Real  tau 
) const
protected

Second derivative of Gibbs free energy in Region 2 wrt pi and tau.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
second derivative of Gibbs free energy wrt pi and tau (-)

Definition at line 1118 of file Water97FluidProperties.C.

Referenced by c(), cv(), e_dpT(), h_dpT(), and rho_dpT().

1119 {
1120  // Ideal gas part of the Gibbs free energy
1121  Real dg0 = 0.0;
1122 
1123  // Residual part of the Gibbs free energy
1124  Real dgr = 0.0;
1125  for (std::size_t i = 0; i < _n2.size(); ++i)
1126  dgr += _n2[i] * _I2[i] * _J2[i] * std::pow(pi, _I2[i] - 1) * std::pow(tau - 0.5, _J2[i] - 1);
1127 
1128  return dg0 + dgr;
1129 }
const std::vector< int > _I2
const std::vector< int > _J2
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< Real > _n2
Real Water97FluidProperties::d2gamma2_dtau2 ( Real  pi,
Real  tau 
) const
protected

Second derivative of Gibbs free energy in Region 2 wrt tau.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
second derivative of Gibbs free energy wrt tau (-)

Definition at line 1102 of file Water97FluidProperties.C.

Referenced by c(), cp(), cv(), e_dpT(), and h_dpT().

1103 {
1104  // Ideal gas part of the Gibbs free energy
1105  Real dg0 = 0.0;
1106  for (std::size_t i = 0; i < _n02.size(); ++i)
1107  dg0 += _n02[i] * _J02[i] * (_J02[i] - 1) * std::pow(tau, _J02[i] - 2);
1108 
1109  // Residual part of the Gibbs free energy
1110  Real dgr = 0.0;
1111  for (std::size_t i = 0; i < _n2.size(); ++i)
1112  dgr += _n2[i] * _J2[i] * (_J2[i] - 1) * std::pow(pi, _I2[i]) * std::pow(tau - 0.5, _J2[i] - 2);
1113 
1114  return dg0 + dgr;
1115 }
const std::vector< int > _I2
const std::vector< int > _J2
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< int > _J02
const std::vector< Real > _n02
Constants for region 2.
const std::vector< Real > _n2
Real Water97FluidProperties::d2gamma5_dpi2 ( Real  pi,
Real  tau 
) const
protected

Second derivative of Gibbs free energy in Region 5 wrt pi.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
second derivative of Gibbs free energy wrt pi (-)

Definition at line 1224 of file Water97FluidProperties.C.

Referenced by c(), cv(), e_dpT(), and rho_dpT().

1225 {
1226  // Ideal gas part of the Gibbs free energy
1227  Real dg0 = -1.0 / pi / pi;
1228 
1229  // Residual part of the Gibbs free energy
1230  Real dgr = 0.0;
1231  for (std::size_t i = 0; i < _n5.size(); ++i)
1232  dgr += _n5[i] * _I5[i] * (_I5[i] - 1) * std::pow(pi, _I5[i] - 2) * std::pow(tau, _J5[i]);
1233 
1234  return dg0 + dgr;
1235 }
const std::vector< int > _I5
const std::vector< int > _J5
const std::vector< Real > _n5
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real Water97FluidProperties::d2gamma5_dpitau ( Real  pi,
Real  tau 
) const
protected

Second derivative of Gibbs free energy in Region 5 wrt pi and tau.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
second derivative of Gibbs free energy wrt pi and tau (-)

Definition at line 1270 of file Water97FluidProperties.C.

Referenced by c(), cv(), e_dpT(), h_dpT(), and rho_dpT().

1271 {
1272  // Ideal gas part of the Gibbs free energy
1273  Real dg0 = 0.0;
1274 
1275  // Residual part of the Gibbs free energy
1276  Real dgr = 0.0;
1277  for (std::size_t i = 0; i < _n5.size(); ++i)
1278  dgr += _n5[i] * _I5[i] * _J5[i] * std::pow(pi, _I5[i] - 1) * std::pow(tau, _J5[i] - 1);
1279 
1280  return dg0 + dgr;
1281 }
const std::vector< int > _I5
const std::vector< int > _J5
const std::vector< Real > _n5
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real Water97FluidProperties::d2gamma5_dtau2 ( Real  pi,
Real  tau 
) const
protected

Second derivative of Gibbs free energy in Region 5 wrt tau.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
second derivative of Gibbs free energy wrt tau (-)

Definition at line 1254 of file Water97FluidProperties.C.

Referenced by c(), cp(), cv(), e_dpT(), and h_dpT().

1255 {
1256  // Ideal gas part of the Gibbs free energy
1257  Real dg0 = 0.0;
1258  for (std::size_t i = 0; i < _n05.size(); ++i)
1259  dg0 += _n05[i] * _J05[i] * (_J05[i] - 1) * std::pow(tau, _J05[i] - 2);
1260 
1261  // Residual part of the Gibbs free energy
1262  Real dgr = 0.0;
1263  for (std::size_t i = 0; i < _n5.size(); ++i)
1264  dgr += _n5[i] * _J5[i] * (_J5[i] - 1) * std::pow(pi, _I5[i]) * std::pow(tau, _J5[i] - 2);
1265 
1266  return dg0 + dgr;
1267 }
const std::vector< int > _I5
const std::vector< Real > _n05
const std::vector< int > _J5
const std::vector< Real > _n5
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< int > _J05
Constants for region 5.
Real Water97FluidProperties::d2phi3_ddelta2 ( Real  delta,
Real  tau 
) const
protected

Second derivative of Helmholtz free energy in Region 3 wrt delta.

Parameters
deltareduced density (-)
taureduced temperature (-)
Returns
second derivative of Helmholtz free energy wrt delta (-)

Definition at line 1152 of file Water97FluidProperties.C.

Referenced by c(), cp(), e_dpT(), h_dpT(), and rho_dpT().

1153 {
1154  Real sum = 0.0;
1155  for (std::size_t i = 1; i < _n3.size(); ++i)
1156  sum += _n3[i] * _I3[i] * (_I3[i] - 1) * std::pow(delta, _I3[i] - 2) * std::pow(tau, _J3[i]);
1157 
1158  return -_n3[0] / delta / delta + sum;
1159 }
const std::vector< Real > _n3
Constants for region 3.
const std::vector< int > _J3
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< int > _I3
Real Water97FluidProperties::d2phi3_ddeltatau ( Real  delta,
Real  tau 
) const
protected

Second derivative of Helmholtz free energy in Region 3 wrt delta and tau.

Parameters
deltareduced density (-)
taureduced temperature (-)
Returns
second derivative of Helmholtz free energy wrt delta and tau (-)

Definition at line 1182 of file Water97FluidProperties.C.

Referenced by c(), cp(), e_dpT(), h_dpT(), and rho_dpT().

1183 {
1184  Real sum = 0.0;
1185  for (std::size_t i = 1; i < _n3.size(); ++i)
1186  sum += _n3[i] * _I3[i] * _J3[i] * std::pow(delta, _I3[i] - 1) * std::pow(tau, _J3[i] - 1);
1187 
1188  return sum;
1189 }
const std::vector< Real > _n3
Constants for region 3.
const std::vector< int > _J3
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< int > _I3
Real Water97FluidProperties::d2phi3_dtau2 ( Real  delta,
Real  tau 
) const
protected

Second derivative of Helmholtz free energy in Region 3 wrt tau.

Parameters
deltareduced density (-)
taureduced temperature (-)
Returns
second derivative of Helmholtz free energy wrt tau (-)

Definition at line 1172 of file Water97FluidProperties.C.

Referenced by c(), cp(), cv(), e_dpT(), and h_dpT().

1173 {
1174  Real sum = 0.0;
1175  for (std::size_t i = 1; i < _n3.size(); ++i)
1176  sum += _n3[i] * _J3[i] * (_J3[i] - 1) * std::pow(delta, _I3[i]) * std::pow(tau, _J3[i] - 2);
1177 
1178  return sum;
1179 }
const std::vector< Real > _n3
Constants for region 3.
const std::vector< int > _J3
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< int > _I3
Real Water97FluidProperties::densityRegion3 ( Real  pressure,
Real  temperature 
) const

Density function for Region 3 - supercritical water and steam.

To avoid iteration, use the backwards equations for region 3 from Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam.

Parameters
pressurewater pressure (Pa)
temperaturewater temperature (K)
Returns
density (kg/m^3) in region 3

Definition at line 1596 of file Water97FluidProperties.C.

Referenced by c(), cp(), cv(), e(), e_dpT(), h(), h_dpT(), rho(), rho_dpT(), and s().

1597 {
1598  // Region 3 is subdivided into 26 subregions, each with a given backwards equation
1599  // to directly calculate density from pressure and temperature without the need for
1600  // expensive iterations. Find the subregion id that the point is in:
1601  unsigned int sid = subregion3(pressure, temperature);
1602 
1603  Real vstar, pi, theta, a, b, c, d, e;
1604  unsigned int N;
1605 
1606  vstar = _par3[sid][0];
1607  pi = pressure / _par3[sid][1] / 1.0e6;
1608  theta = temperature / _par3[sid][2];
1609  a = _par3[sid][3];
1610  b = _par3[sid][4];
1611  c = _par3[sid][5];
1612  d = _par3[sid][6];
1613  e = _par3[sid][7];
1614  N = _par3N[sid];
1615 
1616  Real sum = 0.0;
1617  Real volume = 0.0;
1618 
1619  // Note that subregion 13 is the only different formulation
1620  if (sid == 13)
1621  {
1622  for (std::size_t i = 0; i < N; ++i)
1623  sum += _n3s[sid][i] * std::pow(pi - a, _I3s[sid][i]) * std::pow(theta - b, _J3s[sid][i]);
1624 
1625  volume = vstar * std::exp(sum);
1626  }
1627  else
1628  volume = vstar * subregionVolume(pi, theta, a, b, c, d, e, sid);
1629 
1630  // Density is the inverse of volume
1631  return 1.0 / volume;
1632 }
const std::vector< std::vector< Real > > _par3
virtual Real c(Real pressure, Real temperature) const override
Speed of sound.
unsigned int subregion3(Real pressure, Real temperature) const
Provides the correct subregion index for a (P,T) point in region 3.
const std::vector< std::vector< Real > > _n3s
Constants for all 26 subregions in region 3.
const std::string temperature
Definition: NS.h:25
const std::vector< std::vector< int > > _I3s
Real subregionVolume(Real pi, Real theta, Real a, Real b, Real c, Real d, Real e, unsigned int sid) const
Specific volume in all subregions of region 3 EXCEPT subregion n (13).
const std::vector< unsigned int > _par3N
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:24
const std::vector< std::vector< int > > _J3s
virtual Real e(Real pressure, Real temperature) const override
Internal energy.
Real Water97FluidProperties::dgamma1_dpi ( Real  pi,
Real  tau 
) const
protected

Derivative of Gibbs free energy in Region 1 wrt pi.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
derivative of Gibbs free energy wrt pi (-)

Definition at line 987 of file Water97FluidProperties.C.

Referenced by c(), cv(), e(), e_dpT(), rho(), and rho_dpT().

988 {
989  Real sum = 0.0;
990  for (std::size_t i = 0; i < _n1.size(); ++i)
991  sum += -_n1[i] * _I1[i] * std::pow(7.1 - pi, _I1[i] - 1) * std::pow(tau - 1.222, _J1[i]);
992 
993  return sum;
994 }
const std::vector< int > _I1
const std::vector< int > _J1
const std::vector< Real > _n1
Reference constants used in to calculate thermophysical properties of water.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real Water97FluidProperties::dgamma1_dtau ( Real  pi,
Real  tau 
) const
protected

Derivative of Gibbs free energy in Region 1 wrt tau.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
derivative of Gibbs free energy wrt tau (-)

Definition at line 1008 of file Water97FluidProperties.C.

Referenced by e(), h(), h_dpT(), and s().

1009 {
1010  Real g = 0.0;
1011  for (std::size_t i = 0; i < _n1.size(); ++i)
1012  g += _n1[i] * _J1[i] * std::pow(7.1 - pi, _I1[i]) * std::pow(tau - 1.222, _J1[i] - 1);
1013 
1014  return g;
1015 }
const std::vector< int > _I1
const std::vector< int > _J1
const std::vector< Real > _n1
Reference constants used in to calculate thermophysical properties of water.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real Water97FluidProperties::dgamma2_dpi ( Real  pi,
Real  tau 
) const
protected

Derivative of Gibbs free energy in Region 2 wrt pi.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
derivative of Gibbs free energy wrt pi (-)

Definition at line 1058 of file Water97FluidProperties.C.

Referenced by c(), cv(), e(), e_dpT(), rho(), and rho_dpT().

1059 {
1060  // Ideal gas part of the Gibbs free energy
1061  Real dg0 = 1.0 / pi;
1062 
1063  // Residual part of the Gibbs free energy
1064  Real dgr = 0.0;
1065  for (std::size_t i = 0; i < _n2.size(); ++i)
1066  dgr += _n2[i] * _I2[i] * std::pow(pi, _I2[i] - 1) * std::pow(tau - 0.5, _J2[i]);
1067 
1068  return dg0 + dgr;
1069 }
const std::vector< int > _I2
const std::vector< int > _J2
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< Real > _n2
Real Water97FluidProperties::dgamma2_dtau ( Real  pi,
Real  tau 
) const
protected

Derivative of Gibbs free energy in Region 2 wrt tau.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
derivative of Gibbs free energy wrt tau (-)

Definition at line 1086 of file Water97FluidProperties.C.

Referenced by e(), h(), h_dpT(), and s().

1087 {
1088  // Ideal gas part of the Gibbs free energy
1089  Real dg0 = 0.0;
1090  for (std::size_t i = 0; i < _n02.size(); ++i)
1091  dg0 += _n02[i] * _J02[i] * std::pow(tau, _J02[i] - 1);
1092 
1093  // Residual part of the Gibbs free energy
1094  Real dgr = 0.0;
1095  for (std::size_t i = 0; i < _n2.size(); ++i)
1096  dgr += _n2[i] * _J2[i] * std::pow(pi, _I2[i]) * std::pow(tau - 0.5, _J2[i] - 1);
1097 
1098  return dg0 + dgr;
1099 }
const std::vector< int > _I2
const std::vector< int > _J2
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< int > _J02
const std::vector< Real > _n02
Constants for region 2.
const std::vector< Real > _n2
Real Water97FluidProperties::dgamma5_dpi ( Real  pi,
Real  tau 
) const
protected

Derivative of Gibbs free energy in Region 5 wrt pi.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
derivative of Gibbs free energy wrt pi (-)

Definition at line 1210 of file Water97FluidProperties.C.

Referenced by c(), cv(), e(), e_dpT(), rho(), and rho_dpT().

1211 {
1212  // Ideal gas part of the Gibbs free energy
1213  Real dg0 = 1.0 / pi;
1214 
1215  // Residual part of the Gibbs free energy
1216  Real dgr = 0.0;
1217  for (std::size_t i = 0; i < _n5.size(); ++i)
1218  dgr += _n5[i] * _I5[i] * std::pow(pi, _I5[i] - 1) * std::pow(tau, _J5[i]);
1219 
1220  return dg0 + dgr;
1221 }
const std::vector< int > _I5
const std::vector< int > _J5
const std::vector< Real > _n5
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real Water97FluidProperties::dgamma5_dtau ( Real  pi,
Real  tau 
) const
protected

Derivative of Gibbs free energy in Region 5 wrt tau.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
derivative of Gibbs free energy wrt tau (-)

Definition at line 1238 of file Water97FluidProperties.C.

Referenced by e(), h(), h_dpT(), and s().

1239 {
1240  // Ideal gas part of the Gibbs free energy
1241  Real dg0 = 0.0;
1242  for (std::size_t i = 0; i < _n05.size(); ++i)
1243  dg0 += _n05[i] * _J05[i] * std::pow(tau, _J05[i] - 1);
1244 
1245  // Residual part of the Gibbs free energy
1246  Real dgr = 0.0;
1247  for (std::size_t i = 0; i < _n5.size(); ++i)
1248  dgr += _n5[i] * _J5[i] * std::pow(pi, _I5[i]) * std::pow(tau, _J5[i] - 1);
1249 
1250  return dg0 + dgr;
1251 }
const std::vector< int > _I5
const std::vector< Real > _n05
const std::vector< int > _J5
const std::vector< Real > _n5
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< int > _J05
Constants for region 5.
Real Water97FluidProperties::dphi3_ddelta ( Real  delta,
Real  tau 
) const
protected

Derivative of Helmholtz free energy in Region 3 wrt delta.

Parameters
deltareduced density (-)
taureduced temperature (-)
Returns
derivative of Helmholtz free energy wrt delta (-)

Definition at line 1142 of file Water97FluidProperties.C.

Referenced by c(), cp(), e_dpT(), h(), h_dpT(), and rho_dpT().

1143 {
1144  Real sum = 0.0;
1145  for (std::size_t i = 1; i < _n3.size(); ++i)
1146  sum += _n3[i] * _I3[i] * std::pow(delta, _I3[i] - 1) * std::pow(tau, _J3[i]);
1147 
1148  return _n3[0] / delta + sum;
1149 }
const std::vector< Real > _n3
Constants for region 3.
const std::vector< int > _J3
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< int > _I3
Real Water97FluidProperties::dphi3_dtau ( Real  delta,
Real  tau 
) const
protected

Derivative of Helmholtz free energy in Region 3 wrt tau.

Parameters
deltareduced density (-)
taureduced temperature (-)
Returns
derivative of Helmholtz free energy wrt tau (-)

Definition at line 1162 of file Water97FluidProperties.C.

Referenced by e(), h(), h_dpT(), and s().

1163 {
1164  Real sum = 0.0;
1165  for (std::size_t i = 1; i < _n3.size(); ++i)
1166  sum += _n3[i] * _J3[i] * std::pow(delta, _I3[i]) * std::pow(tau, _J3[i] - 1);
1167 
1168  return sum;
1169 }
const std::vector< Real > _n3
Constants for region 3.
const std::vector< int > _J3
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< int > _I3
Real Water97FluidProperties::e ( Real  pressure,
Real  temperature 
) const
overridevirtual

Internal energy.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
internal energy (J/kg)

Implements SinglePhaseFluidPropertiesPT.

Definition at line 181 of file Water97FluidProperties.C.

Referenced by b2bc(), densityRegion3(), e_dpT(), subregion3(), and vaporTemperature().

182 {
183  Real internal_energy, pi, tau;
184 
185  // Determine which region the point is in
186  unsigned int region = inRegion(pressure, temperature);
187  switch (region)
188  {
189  case 1:
190  pi = pressure / _p_star[0];
191  tau = _T_star[0] / temperature;
192  internal_energy =
193  _Rw * temperature * (tau * dgamma1_dtau(pi, tau) - pi * dgamma1_dpi(pi, tau));
194  break;
195 
196  case 2:
197  pi = pressure / _p_star[1];
198  tau = _T_star[1] / temperature;
199  internal_energy =
200  _Rw * temperature * (tau * dgamma2_dtau(pi, tau) - pi * dgamma2_dpi(pi, tau));
201  break;
202 
203  case 3:
204  {
205  // Calculate density first, then use that in Helmholtz free energy
206  Real density3 = densityRegion3(pressure, temperature);
207  Real delta = density3 / _rho_critical;
208  tau = _T_star[2] / temperature;
209  internal_energy = _Rw * temperature * tau * dphi3_dtau(delta, tau);
210  break;
211  }
212 
213  case 5:
214  pi = pressure / _p_star[4];
215  tau = _T_star[4] / temperature;
216  internal_energy =
217  _Rw * temperature * (tau * dgamma5_dtau(pi, tau) - pi * dgamma5_dpi(pi, tau));
218  break;
219 
220  default:
221  mooseError(name(), ": inRegion() has given an incorrect region");
222  }
223  // Output in J/kg
224  return internal_energy;
225 }
const std::vector< Real > _T_star
Temperature scale for each region.
Real dgamma5_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt tau.
const std::vector< Real > _p_star
Pressure scale for each region.
const std::string temperature
Definition: NS.h:25
Real dgamma2_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt pi.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
Real dphi3_dtau(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt tau.
Real dgamma1_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt pi.
unsigned int inRegion(Real pressure, Real temperature) const
Determines the phase region that the given pressure and temperature values lie in.
Real dgamma2_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt tau.
const Real _rho_critical
Critical density (kg/m^3)
const std::string pressure
Definition: NS.h:24
Real dgamma1_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt tau.
const std::string internal_energy
Definition: NS.h:28
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...
Real dgamma5_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt pi.
void Water97FluidProperties::e_dpT ( Real  pressure,
Real  temperature,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
overridevirtual

Internal energy and its derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]einternal energy (J/kg)
[out]de_dpderivative of internal energy wrt pressure
[out]de_dTderivative of internal energy wrt temperature

Implements SinglePhaseFluidPropertiesPT.

Definition at line 228 of file Water97FluidProperties.C.

Referenced by rho_e_dpT().

230 {
231  Real pi, tau, dinternal_energy_dp, dinternal_energy_dT;
232 
233  // Determine which region the point is in
234  unsigned int region = inRegion(pressure, temperature);
235  switch (region)
236  {
237  case 1:
238  {
239  pi = pressure / _p_star[0];
240  tau = _T_star[0] / temperature;
241  Real dgdp = dgamma1_dpi(pi, tau);
242  Real d2gdpt = d2gamma1_dpitau(pi, tau);
243  dinternal_energy_dp =
244  _Rw * temperature * (tau * d2gdpt - dgdp - pi * d2gamma1_dpi2(pi, tau)) / _p_star[0];
245  dinternal_energy_dT =
246  _Rw * (pi * tau * d2gdpt - tau * tau * d2gamma1_dtau2(pi, tau) - pi * dgdp);
247  break;
248  }
249 
250  case 2:
251  {
252  pi = pressure / _p_star[1];
253  tau = _T_star[1] / temperature;
254  Real dgdp = dgamma2_dpi(pi, tau);
255  Real d2gdpt = d2gamma2_dpitau(pi, tau);
256  dinternal_energy_dp =
257  _Rw * temperature * (tau * d2gdpt - dgdp - pi * d2gamma2_dpi2(pi, tau)) / _p_star[1];
258  dinternal_energy_dT =
259  _Rw * (pi * tau * d2gdpt - tau * tau * d2gamma2_dtau2(pi, tau) - pi * dgdp);
260  break;
261  }
262 
263  case 3:
264  {
265  // Calculate density first, then use that in Helmholtz free energy
266  Real density3 = densityRegion3(pressure, temperature);
267  Real delta = density3 / _rho_critical;
268  tau = _T_star[2] / temperature;
269  Real dpdd = dphi3_ddelta(delta, tau);
270  Real d2pddt = d2phi3_ddeltatau(delta, tau);
271  Real d2pdd2 = d2phi3_ddelta2(delta, tau);
272  dinternal_energy_dp =
273  _T_star[2] * d2pddt / _rho_critical /
274  (2.0 * temperature * delta * dpdd + temperature * delta * delta * d2pdd2);
275  dinternal_energy_dT =
276  -_Rw * (delta * tau * d2pddt * (dpdd - tau * d2pddt) / (2.0 * dpdd + delta * d2pdd2) +
277  tau * tau * d2phi3_dtau2(delta, tau));
278  break;
279  }
280 
281  case 5:
282  {
283  pi = pressure / _p_star[4];
284  tau = _T_star[4] / temperature;
285  Real dgdp = dgamma5_dpi(pi, tau);
286  Real d2gdpt = d2gamma5_dpitau(pi, tau);
287  dinternal_energy_dp =
288  _Rw * temperature * (tau * d2gdpt - dgdp - pi * d2gamma5_dpi2(pi, tau)) / _p_star[4];
289  dinternal_energy_dT =
290  _Rw * (pi * tau * d2gdpt - tau * tau * d2gamma5_dtau2(pi, tau) - pi * dgdp);
291  break;
292  }
293 
294  default:
295  mooseError(name(), ": inRegion has given an incorrect region");
296  }
297 
298  e = this->e(pressure, temperature);
299  de_dp = dinternal_energy_dp;
300  de_dT = dinternal_energy_dT;
301 }
Real dphi3_ddelta(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt delta.
Real d2gamma5_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt tau.
const std::vector< Real > _T_star
Temperature scale for each region.
const std::vector< Real > _p_star
Pressure scale for each region.
const std::string temperature
Definition: NS.h:25
Real dgamma2_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt pi.
Real d2phi3_ddelta2(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt delta.
Real d2phi3_dtau2(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt tau.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
Real d2gamma2_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt pi and tau.
Real dgamma1_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt pi.
unsigned int inRegion(Real pressure, Real temperature) const
Determines the phase region that the given pressure and temperature values lie in.
Real d2gamma5_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt pi.
Real d2phi3_ddeltatau(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt delta and tau.
Real d2gamma5_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt pi and tau.
const Real _rho_critical
Critical density (kg/m^3)
Real d2gamma1_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt pi.
Real d2gamma2_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt pi.
const std::string pressure
Definition: NS.h:24
Real d2gamma2_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt tau.
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...
Real d2gamma1_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt pi and tau.
Real d2gamma1_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt tau.
virtual Real e(Real pressure, Real temperature) const override
Internal energy.
Real dgamma5_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt pi.
virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Definition at line 25 of file FluidProperties.h.

25 {}
virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Definition at line 27 of file FluidProperties.h.

27 {}
std::string Water97FluidProperties::fluidName ( ) const
overridevirtual

Fluid name.

Returns
"water"

Implements SinglePhaseFluidPropertiesPT.

Definition at line 34 of file Water97FluidProperties.C.

Referenced by PorousFlowFluidStateWaterNCG::PorousFlowFluidStateWaterNCG().

35 {
36  return "water";
37 }
Real SinglePhaseFluidPropertiesPT::gamma ( Real  pressure,
Real  temperature 
) const
virtualinherited

Adiabatic index - ratio of specific heats.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
gamma (-)

Definition at line 27 of file SinglePhaseFluidPropertiesPT.C.

Referenced by MethaneFluidProperties::c().

28 {
30 }
virtual Real cp(Real pressure, Real temperature) const =0
Isobaric specific heat capacity.
const std::string temperature
Definition: NS.h:25
virtual Real cv(Real pressure, Real temperature) const =0
Isochoric specific heat.
const std::string pressure
Definition: NS.h:24
Real Water97FluidProperties::gamma1 ( Real  pi,
Real  tau 
) const
protected

Gibbs free energy in Region 1 - single phase liquid region.

From Eq. (7) From Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, IAPWS 2007.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
Gibbs free energy (-)

Definition at line 977 of file Water97FluidProperties.C.

Referenced by s().

978 {
979  Real sum = 0.0;
980  for (std::size_t i = 0; i < _n1.size(); ++i)
981  sum += _n1[i] * std::pow(7.1 - pi, _I1[i]) * std::pow(tau - 1.222, _J1[i]);
982 
983  return sum;
984 }
const std::vector< int > _I1
const std::vector< int > _J1
const std::vector< Real > _n1
Reference constants used in to calculate thermophysical properties of water.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real Water97FluidProperties::gamma2 ( Real  pi,
Real  tau 
) const
protected

Gibbs free energy in Region 2 - superheated steam.

From Eq. (15) From Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, IAPWS 2007.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
Gibbs free energy (-)

Definition at line 1040 of file Water97FluidProperties.C.

Referenced by s().

1041 {
1042  // Ideal gas part of the Gibbs free energy
1043  Real sum0 = 0.0;
1044  for (std::size_t i = 0; i < _n02.size(); ++i)
1045  sum0 += _n02[i] * std::pow(tau, _J02[i]);
1046 
1047  Real g0 = std::log(pi) + sum0;
1048 
1049  // Residual part of the Gibbs free energy
1050  Real gr = 0.0;
1051  for (std::size_t i = 0; i < _n2.size(); ++i)
1052  gr += _n2[i] * std::pow(pi, _I2[i]) * std::pow(tau - 0.5, _J2[i]);
1053 
1054  return g0 + gr;
1055 }
const std::vector< int > _I2
const std::vector< int > _J2
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< int > _J02
const std::vector< Real > _n02
Constants for region 2.
const std::vector< Real > _n2
Real Water97FluidProperties::gamma5 ( Real  pi,
Real  tau 
) const
protected

Gibbs free energy in Region 5.

From Eq. (32) From Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, IAPWS 2007.

Parameters
pireduced pressure (-)
taureduced temperature (-)
Returns
Gibbs free energy (-)

Definition at line 1192 of file Water97FluidProperties.C.

Referenced by s().

1193 {
1194  // Ideal gas part of the Gibbs free energy
1195  Real sum0 = 0.0;
1196  for (std::size_t i = 0; i < _n05.size(); ++i)
1197  sum0 += _n05[i] * std::pow(tau, _J05[i]);
1198 
1199  Real g0 = std::log(pi) + sum0;
1200 
1201  // Residual part of the Gibbs free energy
1202  Real gr = 0.0;
1203  for (std::size_t i = 0; i < _n5.size(); ++i)
1204  gr += _n5[i] * std::pow(pi, _I5[i]) * std::pow(tau, _J5[i]);
1205 
1206  return g0 + gr;
1207 }
const std::vector< int > _I5
const std::vector< Real > _n05
const std::vector< int > _J5
const std::vector< Real > _n5
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< int > _J05
Constants for region 5.
Real Water97FluidProperties::h ( Real  p,
Real  T 
) const
overridevirtual

Specific enthalpy.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
h (J/kg)

Implements SinglePhaseFluidPropertiesPT.

Definition at line 674 of file Water97FluidProperties.C.

Referenced by inRegionPH().

675 {
676  Real enthalpy, pi, tau, delta;
677 
678  // Determine which region the point is in
679  unsigned int region = inRegion(pressure, temperature);
680  switch (region)
681  {
682  case 1:
683  pi = pressure / _p_star[0];
684  tau = _T_star[0] / temperature;
685  enthalpy = _Rw * _T_star[0] * dgamma1_dtau(pi, tau);
686  break;
687 
688  case 2:
689  pi = pressure / _p_star[1];
690  tau = _T_star[1] / temperature;
691  enthalpy = _Rw * _T_star[1] * dgamma2_dtau(pi, tau);
692  break;
693 
694  case 3:
695  {
696  // Calculate density first, then use that in Helmholtz free energy
697  Real density3 = densityRegion3(pressure, temperature);
698  delta = density3 / _rho_critical;
699  tau = _T_star[2] / temperature;
700  enthalpy =
701  _Rw * temperature * (tau * dphi3_dtau(delta, tau) + delta * dphi3_ddelta(delta, tau));
702  break;
703  }
704 
705  case 5:
706  pi = pressure / _p_star[4];
707  tau = _T_star[4] / temperature;
708  enthalpy = _Rw * _T_star[4] * dgamma5_dtau(pi, tau);
709  break;
710 
711  default:
712  mooseError("Water97FluidProperties::inRegion has given an incorrect region");
713  }
714  return enthalpy;
715 }
Real dphi3_ddelta(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt delta.
const std::vector< Real > _T_star
Temperature scale for each region.
Real dgamma5_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt tau.
const std::vector< Real > _p_star
Pressure scale for each region.
const std::string temperature
Definition: NS.h:25
const std::string enthalpy
Definition: NS.h:26
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
Real dphi3_dtau(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt tau.
unsigned int inRegion(Real pressure, Real temperature) const
Determines the phase region that the given pressure and temperature values lie in.
Real dgamma2_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt tau.
const Real _rho_critical
Critical density (kg/m^3)
const std::string pressure
Definition: NS.h:24
Real dgamma1_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt tau.
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...
void Water97FluidProperties::h_dpT ( Real  pressure,
Real  temperature,
Real &  h,
Real &  dh_dp,
Real &  dh_dT 
) const
overridevirtual

Enthalpy and its derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]h(J/kg)
[out]dh_dpderivative of enthalpy wrt pressure
[out]dh_dTderivative of enthalpy wrt temperature

Implements SinglePhaseFluidPropertiesPT.

Definition at line 718 of file Water97FluidProperties.C.

720 {
721  Real enthalpy, pi, tau, delta, denthalpy_dp, denthalpy_dT;
722 
723  // Determine which region the point is in
724  unsigned int region = inRegion(pressure, temperature);
725  switch (region)
726  {
727  case 1:
728  pi = pressure / _p_star[0];
729  tau = _T_star[0] / temperature;
730  enthalpy = _Rw * _T_star[0] * dgamma1_dtau(pi, tau);
731  denthalpy_dp = _Rw * _T_star[0] * d2gamma1_dpitau(pi, tau) / _p_star[0];
732  denthalpy_dT = -_Rw * tau * tau * d2gamma1_dtau2(pi, tau);
733  break;
734 
735  case 2:
736  pi = pressure / _p_star[1];
737  tau = _T_star[1] / temperature;
738  enthalpy = _Rw * _T_star[1] * dgamma2_dtau(pi, tau);
739  denthalpy_dp = _Rw * _T_star[1] * d2gamma2_dpitau(pi, tau) / _p_star[1];
740  denthalpy_dT = -_Rw * tau * tau * d2gamma2_dtau2(pi, tau);
741  break;
742 
743  case 3:
744  {
745  // Calculate density first, then use that in Helmholtz free energy
746  Real density3 = densityRegion3(pressure, temperature);
747  delta = density3 / _rho_critical;
748  tau = _T_star[2] / temperature;
749  Real dpdd = dphi3_ddelta(delta, tau);
750  Real d2pddt = d2phi3_ddeltatau(delta, tau);
751  Real d2pdd2 = d2phi3_ddelta2(delta, tau);
752  enthalpy = _Rw * temperature * (tau * dphi3_dtau(delta, tau) + delta * dpdd);
753  denthalpy_dp = (d2pddt + dpdd + delta * d2pdd2) / _rho_critical /
754  (2.0 * delta * dpdd + delta * delta * d2pdd2);
755  denthalpy_dT = _Rw * delta * dpdd * (1.0 - tau * d2pddt / dpdd) *
756  (1.0 - tau * d2pddt / dpdd) / (2.0 + delta * d2pdd2 / dpdd) -
757  _Rw * tau * tau * d2phi3_dtau2(delta, tau);
758  break;
759  }
760 
761  case 5:
762  pi = pressure / _p_star[4];
763  tau = _T_star[4] / temperature;
764  enthalpy = _Rw * _T_star[4] * dgamma5_dtau(pi, tau);
765  denthalpy_dp = _Rw * _T_star[4] * d2gamma5_dpitau(pi, tau) / _p_star[4];
766  denthalpy_dT = -_Rw * tau * tau * d2gamma5_dtau2(pi, tau);
767  break;
768 
769  default:
770  mooseError("Water97FluidProperties::inRegion has given an incorrect region");
771  }
772  h = enthalpy;
773  dh_dp = denthalpy_dp;
774  dh_dT = denthalpy_dT;
775 }
Real dphi3_ddelta(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt delta.
Real d2gamma5_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt tau.
const std::vector< Real > _T_star
Temperature scale for each region.
Real dgamma5_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt tau.
const std::vector< Real > _p_star
Pressure scale for each region.
const std::string temperature
Definition: NS.h:25
const std::string enthalpy
Definition: NS.h:26
Real d2phi3_ddelta2(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt delta.
Real d2phi3_dtau2(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt tau.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
Real dphi3_dtau(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt tau.
Real d2gamma2_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt pi and tau.
unsigned int inRegion(Real pressure, Real temperature) const
Determines the phase region that the given pressure and temperature values lie in.
virtual Real h(Real pressure, Real temperature) const override
Specific enthalpy.
Real dgamma2_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt tau.
Real d2phi3_ddeltatau(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt delta and tau.
Real d2gamma5_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt pi and tau.
const Real _rho_critical
Critical density (kg/m^3)
const std::string pressure
Definition: NS.h:24
Real dgamma1_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt tau.
Real d2gamma2_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt tau.
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...
Real d2gamma1_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt pi and tau.
Real d2gamma1_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt tau.
Real Water97FluidProperties::henryConstant ( Real  temperature) const
overridevirtual

Henry's law constant for dissolution in water.

Parameters
temperaturefluid temperature (K)
Returns
Henry's constant

Implements SinglePhaseFluidPropertiesPT.

Definition at line 1634 of file Water97FluidProperties.C.

1635 {
1636  mooseError(name(), ": henryConstant() not defined");
1637 }
void Water97FluidProperties::henryConstant_dT ( Real  temperature,
Real &  Kh,
Real &  dKh_dT 
) const
overridevirtual

Henry's law constant for dissolution in water and derivative wrt temperature.

Parameters
temperaturefluid temperature (K)
[out]KhHenry's constant
[out]dKh_dTderivative of Kh wrt temperature

Implements SinglePhaseFluidPropertiesPT.

Definition at line 1640 of file Water97FluidProperties.C.

1643 {
1644  mooseError(name(), ": henryConstant_dT() not defined");
1645 }
Real SinglePhaseFluidPropertiesPT::henryConstantIAPWS ( Real  temperature,
Real  A,
Real  B,
Real  C 
) const
protectedvirtualinherited

IAPWS formulation of Henry's law constant for dissolution in water From Guidelines on the Henry's constant and vapour liquid distribution constant for gases in H20 and D20 at high temperatures, IAPWS (2004)

Definition at line 33 of file SinglePhaseFluidPropertiesPT.C.

Referenced by MethaneFluidProperties::henryConstant(), and CO2FluidProperties::henryConstant().

34 {
35  Real Tr = temperature / 647.096;
36  Real tau = 1.0 - Tr;
37 
38  Real lnkh = A / Tr + B * std::pow(tau, 0.355) / Tr + C * std::pow(Tr, -0.41) * std::exp(tau);
39 
40  // The vapor pressure used in this formulation
41  std::vector<Real> a{-7.85951783, 1.84408259, -11.7866497, 22.6807411, -15.9618719, 1.80122502};
42  std::vector<Real> b{1.0, 1.5, 3.0, 3.5, 4.0, 7.5};
43  Real sum = 0.0;
44 
45  for (std::size_t i = 0; i < a.size(); ++i)
46  sum += a[i] * std::pow(tau, b[i]);
47 
48  return 22.064e6 * std::exp(sum / Tr) * std::exp(lnkh);
49 }
const std::string temperature
Definition: NS.h:25
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
void SinglePhaseFluidPropertiesPT::henryConstantIAPWS_dT ( Real  temperature,
Real &  Kh,
Real &  dKh_dT,
Real  A,
Real  B,
Real  C 
) const
protectedvirtualinherited

IAPWS formulation of Henry's law constant for dissolution in water and derivative wrt temperature.

Definition at line 52 of file SinglePhaseFluidPropertiesPT.C.

Referenced by MethaneFluidProperties::henryConstant_dT(), and CO2FluidProperties::henryConstant_dT().

54 {
55  Real pc = 22.064e6;
56  Real Tc = 647.096;
57 
58  Real Tr = temperature / Tc;
59  Real tau = 1.0 - Tr;
60 
61  Real lnkh = A / Tr + B * std::pow(tau, 0.355) / Tr + C * std::pow(Tr, -0.41) * std::exp(tau);
62  Real dlnkh_dT =
63  (-A / Tr / Tr - B * std::pow(tau, 0.355) / Tr / Tr - 0.355 * B * std::pow(tau, -0.645) / Tr -
64  0.41 * C * std::pow(Tr, -1.41) * std::exp(tau) - C * std::pow(Tr, -0.41) * std::exp(tau)) /
65  Tc;
66 
67  // The vapor pressure used in this formulation
68  std::vector<Real> a{-7.85951783, 1.84408259, -11.7866497, 22.6807411, -15.9618719, 1.80122502};
69  std::vector<Real> b{1.0, 1.5, 3.0, 3.5, 4.0, 7.5};
70  Real sum = 0.0;
71  Real dsum = 0.0;
72 
73  for (std::size_t i = 0; i < a.size(); ++i)
74  {
75  sum += a[i] * std::pow(tau, b[i]);
76  dsum += a[i] * b[i] * std::pow(tau, b[i] - 1.0);
77  }
78 
79  Real p = pc * std::exp(sum / Tr);
80  Real dp_dT = -p / Tc / Tr * (sum / Tr + dsum);
81 
82  // Henry's constant and its derivative wrt temperature
83  Kh = p * std::exp(lnkh);
84  dKh_dT = (p * dlnkh_dT + dp_dT) * std::exp(lnkh);
85 }
const std::string temperature
Definition: NS.h:25
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 26 of file FluidProperties.h.

26 {}
unsigned int Water97FluidProperties::inRegion ( Real  pressure,
Real  temperature 
) const

Determines the phase region that the given pressure and temperature values lie in.

Parameters
pressurewater pressure (Pa)
temperaturewater temperature (K)
Returns
region phase region index

Definition at line 934 of file Water97FluidProperties.C.

Referenced by c(), cp(), cv(), e(), e_dpT(), h(), h_dpT(), rho(), rho_dpT(), and s().

935 {
936  // Valid for 273.15 K <= T <= 1073.15 K, p <= 100 MPa
937  // 1073.15 K <= T <= 2273.15 K, p <= 50 Mpa
938  if (temperature >= 273.15 && temperature <= 1073.15)
939  {
940  if (pressure < vaporPressure(273.15) || pressure > 100.0e6)
941  mooseError("Pressure ", pressure, " is out of range in ", name(), ": inRegion()");
942  }
943  else if (temperature > 1073.15 && temperature <= 2273.15)
944  {
945  if (pressure < 0.0 || pressure > 50.0e6)
946  mooseError("Pressure ", pressure, " is out of range in ", name(), ": inRegion()");
947  }
948  else
949  mooseError("Temperature ", temperature, " is out of range in ", name(), ": inRegion()");
950 
951  // Determine the phase region that the (P, T) point lies in
952  unsigned int region;
953 
954  if (temperature >= 273.15 && temperature <= 623.15)
955  {
956  if (pressure > vaporPressure(temperature) && pressure <= 100.0e6)
957  region = 1;
958  else
959  region = 2;
960  }
961  else if (temperature > 623.15 && temperature <= 863.15)
962  {
963  if (pressure <= b23p(temperature))
964  region = 2;
965  else
966  region = 3;
967  }
968  else if (temperature > 863.15 && temperature <= 1073.15)
969  region = 2;
970  else
971  region = 5;
972 
973  return region;
974 }
const std::string temperature
Definition: NS.h:25
Real b23p(Real temperature) const
Auxillary equation for the boundary between regions 2 and 3.
Real vaporPressure(Real temperature) const
Saturation pressure as a function of temperature.
const std::string pressure
Definition: NS.h:24
unsigned int Water97FluidProperties::inRegionPH ( Real  pressure,
Real  enthalpy 
) const
protected

Determines the phase region that the given pressure and enthaply values lie in.

Parameters
pressurewater pressure (Pa)
enthalpywater enthalpy (J/kg)
Returns
region phase region index

Definition at line 1648 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1649 {
1650  unsigned int region;
1651 
1652  // Need to calculate enthalpies at the boundaries to delineate regions
1653  Real p273 = vaporPressure(273.15);
1654  Real p623 = vaporPressure(623.15);
1655 
1656  if (pressure >= p273 && pressure <= p623)
1657  {
1658  if (enthalpy >= h(pressure, 273.15) && enthalpy <= h(pressure, vaporTemperature(pressure)))
1659  region = 1;
1660  else if (enthalpy > h(pressure, vaporTemperature(pressure)) && enthalpy <= h(pressure, 1073.15))
1661  region = 2;
1662  else if (enthalpy > h(pressure, 1073.15) && enthalpy <= h(pressure, 2273.15))
1663  region = 5;
1664  else
1665  mooseError("Enthalpy ", enthalpy, " is out of range in ", name(), ": inRegionPH()");
1666  }
1667  else if (pressure > p623 && pressure <= 50.0e6)
1668  {
1669  if (enthalpy >= h(pressure, 273.15) && enthalpy <= h(pressure, 623.15))
1670  region = 1;
1671  else if (enthalpy > h(pressure, 623.15) && enthalpy <= h(pressure, b23T(pressure)))
1672  region = 3;
1673  else if (enthalpy > h(pressure, b23T(pressure)) && enthalpy <= h(pressure, 1073.15))
1674  region = 2;
1675  else if (enthalpy > h(pressure, 1073.15) && enthalpy <= h(pressure, 2273.15))
1676  region = 5;
1677  else
1678  mooseError("Enthalpy ", enthalpy, " is out of range in ", name(), ": inRegionPH()");
1679  }
1680  else if (pressure > 50.0e6 && pressure <= 100.0e6)
1681  {
1682  if (enthalpy >= h(pressure, 273.15) && enthalpy <= h(pressure, 623.15))
1683  region = 1;
1684  else if (enthalpy > h(pressure, 623.15) && enthalpy <= h(pressure, b23T(pressure)))
1685  region = 3;
1686  else if (enthalpy > h(pressure, b23T(pressure)) && enthalpy <= h(pressure, 1073.15))
1687  region = 2;
1688  else
1689  mooseError("Enthalpy ", enthalpy, " is out of range in ", name(), ": inRegionPH()");
1690  }
1691  else
1692  mooseError("Pressure ", pressure, " is out of range in ", name(), ": inRegionPH()");
1693 
1694  return region;
1695 }
const std::string enthalpy
Definition: NS.h:26
Real b23T(Real pressure) const
Auxillary equation for the boundary between regions 2 and 3.
Real vaporPressure(Real temperature) const
Saturation pressure as a function of temperature.
virtual Real h(Real pressure, Real temperature) const override
Specific enthalpy.
Real vaporTemperature(Real pressure) const
Saturation temperature as a function of pressure.
const std::string pressure
Definition: NS.h:24
Real Water97FluidProperties::k ( Real  pressure,
Real  temperature 
) const
overridevirtual

Thermal conductivity.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
thermal conductivity (W/m/K)

Implements SinglePhaseFluidPropertiesPT.

Definition at line 584 of file Water97FluidProperties.C.

585 {
586  Real rho = this->rho(pressure, temperature);
587  return this->k_from_rho_T(rho, temperature);
588 }
const std::string temperature
Definition: NS.h:25
virtual Real rho(Real pressure, Real temperature) const override
Density.
const std::string pressure
Definition: NS.h:24
virtual Real k_from_rho_T(Real density, Real temperature) const override
Thermal conductivity as a function of density and temperature.
void Water97FluidProperties::k_dpT ( Real  pressure,
Real  temperature,
Real &  k,
Real &  dk_dp,
Real &  dk_dT 
) const
overridevirtual

Thermal conductivity and its derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]thermalconductivity (W/m/K)
[out]derivativeof thermal conductivity wrt pressure
[out]derivativeof thermal conductivity wrt temperature

Implements SinglePhaseFluidPropertiesPT.

Definition at line 591 of file Water97FluidProperties.C.

593 {
594  mooseError(name(), "k_dpT() is not implemented");
595 }
Real Water97FluidProperties::k_from_rho_T ( Real  density,
Real  temperature 
) const
overridevirtual

Thermal conductivity as a function of density and temperature.

Parameters
densityfluid density (kg/m^3)
temperaturefluid temperature (K)
Returns
thermal conductivity (W/m/K)

Implements SinglePhaseFluidPropertiesPT.

Definition at line 598 of file Water97FluidProperties.C.

Referenced by k().

599 {
600  // Scale the density and temperature. Note that the scales are slightly
601  // different to the critical values used in IAPWS-IF97
602  Real Tbar = temperature / 647.26;
603  Real rhobar = density / 317.7;
604  std::vector<Real> a{0.0102811, 0.0299621, 0.0156146, -0.00422464};
605 
606  // Ideal gas component
607  Real sum0 = 0.0;
608 
609  for (std::size_t i = 0; i < a.size(); ++i)
610  sum0 += a[i] * std::pow(Tbar, i);
611 
612  Real lambda0 = std::sqrt(Tbar) * sum0;
613 
614  // The contribution due to finite density
615  Real lambda1 =
616  -0.39707 + 0.400302 * rhobar + 1.06 * std::exp(-0.171587 * std::pow(rhobar + 2.392190, 2.0));
617 
618  // Critical enhancement
619  Real DeltaT = std::abs(Tbar - 1.0) + 0.00308976;
620  Real Q = 2.0 + 0.0822994 / std::pow(DeltaT, 0.6);
621  Real S = (Tbar >= 1.0 ? 1.0 / DeltaT : 10.0932 / std::pow(DeltaT, 0.6));
622 
623  Real lambda2 = (0.0701309 / std::pow(Tbar, 10.0) + 0.011852) * std::pow(rhobar, 1.8) *
624  std::exp(0.642857 * (1.0 - std::pow(rhobar, 2.8))) +
625  0.00169937 * S * std::pow(rhobar, Q) *
626  std::exp((Q / (1.0 + Q)) * (1.0 - std::pow(rhobar, 1.0 + Q))) -
627  1.02 * std::exp(-4.11717 * std::pow(Tbar, 1.5) - 6.17937 / std::pow(rhobar, 5.0));
628 
629  return lambda0 + lambda1 + lambda2;
630 }
const std::string density
Definition: NS.h:15
const std::string temperature
Definition: NS.h:25
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real Water97FluidProperties::molarMass ( ) const
overridevirtual

Water molar mass.

Returns
molar mass (kg/mol)

Implements SinglePhaseFluidPropertiesPT.

Definition at line 40 of file Water97FluidProperties.C.

41 {
42  return _Mh2o;
43 }
const Real _Mh2o
Water molar mass (kg/mol)
Real Water97FluidProperties::mu ( Real  pressure,
Real  temperature 
) const
overridevirtual

Implements SinglePhaseFluidPropertiesPT.

Definition at line 474 of file Water97FluidProperties.C.

475 {
476  Real rho = this->rho(pressure, temperature);
477  return this->mu_from_rho_T(rho, temperature);
478 }
const std::string temperature
Definition: NS.h:25
virtual Real rho(Real pressure, Real temperature) const override
Density.
virtual Real mu_from_rho_T(Real density, Real temperature) const override
const std::string pressure
Definition: NS.h:24
void Water97FluidProperties::mu_dpT ( Real  pressure,
Real  temperature,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT 
) const
overridevirtual

Implements SinglePhaseFluidPropertiesPT.

Definition at line 481 of file Water97FluidProperties.C.

483 {
484  Real rho, drho_dp, drho_dT;
485  this->rho_dpT(pressure, temperature, rho, drho_dp, drho_dT);
486  Real dmu_drho;
487  this->mu_drhoT_from_rho_T(rho, temperature, drho_dT, mu, dmu_drho, dmu_dT);
488  dmu_dp = dmu_drho * drho_dp;
489 }
const std::string temperature
Definition: NS.h:25
virtual Real rho(Real pressure, Real temperature) const override
Density.
virtual void mu_drhoT_from_rho_T(Real density, Real temperature, Real ddensity_dT, Real &mu, Real &dmu_drho, Real &dmu_dT) const override
Dynamic viscosity and its derivatives wrt density and temperature.
virtual Real mu(Real pressure, Real temperature) const override
virtual void rho_dpT(Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const override
Density and its derivatives wrt pressure and temperature.
const std::string pressure
Definition: NS.h:24
void Water97FluidProperties::mu_drhoT_from_rho_T ( Real  density,
Real  temperature,
Real  ddensity_dT,
Real &  mu,
Real &  dmu_drho,
Real &  dmu_dT 
) const
overridevirtual

Dynamic viscosity and its derivatives wrt density and temperature.

Parameters
densityfluid density (kg/m^3)
temperaturefluid temperature (K)
ddensity_dTderivative of density wrt temperature
[out]muviscosity (Pa.s)
[out]dmu_drhoderivative of viscosity wrt density
[out]dmu_dTderivative of viscosity wrt temperature

Implements SinglePhaseFluidPropertiesPT.

Definition at line 527 of file Water97FluidProperties.C.

Referenced by mu_dpT(), and PorousFlowFluidStateWaterNCG::thermophysicalProperties().

533 {
534  // Constants from Release on the IAPWS Formulation 2008 for the Viscosity of
535  // Ordinary Water Substance
536  const std::vector<int> I{0, 1, 2, 3, 0, 1, 2, 3, 5, 0, 1, 2, 3, 4, 0, 1, 0, 3, 4, 3, 5};
537  const std::vector<int> J{0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6};
538  const std::vector<Real> H0{1.67752, 2.20462, 0.6366564, -0.241605};
539  const std::vector<Real> H1{
540  5.20094e-1, 8.50895e-2, -1.08374, -2.89555e-1, 2.22531e-1, 9.99115e-1, 1.88797,
541  1.26613, 1.20573e-1, -2.81378e-1, -9.06851e-1, -7.72479e-1, -4.89837e-1, -2.57040e-1,
542  1.61913e-1, 2.57399e-1, -3.25372e-2, 6.98452e-2, 8.72102e-3, -4.35673e-3, -5.93264e-4};
543 
544  Real mu_star = 1.0e-6;
545  Real rhobar = density / _rho_critical;
546  Real Tbar = temperature / _T_critical;
547  Real drhobar_drho = 1.0 / _rho_critical;
548  Real dTbar_dT = 1.0 / _T_critical;
549 
550  // Limit of zero density. Derivative wrt rho is 0
551  Real sum0 = 0.0, dsum0_dTbar = 0.0;
552  for (std::size_t i = 0; i < H0.size(); ++i)
553  {
554  sum0 += H0[i] / std::pow(Tbar, i);
555  dsum0_dTbar -= i * H0[i] / std::pow(Tbar, i + 1);
556  }
557 
558  Real mu0 = 100.0 * std::sqrt(Tbar) / sum0;
559  Real dmu0_dTbar =
560  50.0 / std::sqrt(Tbar) / sum0 - 100.0 * std::sqrt(Tbar) * dsum0_dTbar / sum0 / sum0;
561 
562  // Residual component due to finite density
563  Real sum1 = 0.0, dsum1_drho = 0.0, dsum1_dTbar = 0.0;
564  for (std::size_t i = 0; i < H1.size(); ++i)
565  {
566  sum1 += std::pow(1.0 / Tbar - 1.0, I[i]) * H1[i] * std::pow(rhobar - 1.0, J[i]);
567  dsum1_drho +=
568  std::pow(1.0 / Tbar - 1.0, I[i]) * H1[i] * J[i] * std::pow(rhobar - 1.0, J[i] - 1);
569  dsum1_dTbar -= I[i] * std::pow(1.0 / Tbar - 1.0, I[i] - 1) * H1[i] *
570  std::pow(rhobar - 1.0, J[i]) / Tbar / Tbar;
571  }
572 
573  Real mu1 = std::exp(rhobar * sum1);
574  Real dmu1_drho = (sum1 + rhobar * dsum1_drho) * mu1;
575  Real dmu1_dTbar = (rhobar * dsum1_dTbar) * mu1;
576 
577  // Viscosity and its derivatives are then
578  mu = mu_star * mu0 * mu1;
579  dmu_drho = mu_star * mu0 * dmu1_drho * drhobar_drho;
580  dmu_dT = mu_star * (dmu0_dTbar * mu1 + mu0 * dmu1_dTbar) * dTbar_dT + dmu_drho * ddensity_dT;
581 }
const Real _T_critical
Critical temperature (K)
const std::string density
Definition: NS.h:15
const std::string temperature
Definition: NS.h:25
virtual Real mu(Real pressure, Real temperature) const override
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const Real _rho_critical
Critical density (kg/m^3)
Real Water97FluidProperties::mu_from_rho_T ( Real  density,
Real  temperature 
) const
overridevirtual

Implements SinglePhaseFluidPropertiesPT.

Definition at line 492 of file Water97FluidProperties.C.

Referenced by mu().

493 {
494  // Constants from Release on the IAPWS Formulation 2008 for the Viscosity of
495  // Ordinary Water Substance
496  const std::vector<int> I{0, 1, 2, 3, 0, 1, 2, 3, 5, 0, 1, 2, 3, 4, 0, 1, 0, 3, 4, 3, 5};
497  const std::vector<int> J{0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6};
498  const std::vector<Real> H0{1.67752, 2.20462, 0.6366564, -0.241605};
499  const std::vector<Real> H1{
500  5.20094e-1, 8.50895e-2, -1.08374, -2.89555e-1, 2.22531e-1, 9.99115e-1, 1.88797,
501  1.26613, 1.20573e-1, -2.81378e-1, -9.06851e-1, -7.72479e-1, -4.89837e-1, -2.57040e-1,
502  1.61913e-1, 2.57399e-1, -3.25372e-2, 6.98452e-2, 8.72102e-3, -4.35673e-3, -5.93264e-4};
503 
504  Real mu_star = 1.e-6;
505  Real rhobar = density / _rho_critical;
506  Real Tbar = temperature / _T_critical;
507 
508  // Viscosity in limit of zero density
509  Real sum0 = 0.0;
510  for (std::size_t i = 0; i < H0.size(); ++i)
511  sum0 += H0[i] / std::pow(Tbar, i);
512 
513  Real mu0 = 100.0 * std::sqrt(Tbar) / sum0;
514 
515  // Residual component due to finite density
516  Real sum1 = 0.0;
517  for (std::size_t i = 0; i < H1.size(); ++i)
518  sum1 += std::pow(1.0 / Tbar - 1.0, I[i]) * H1[i] * std::pow(rhobar - 1.0, J[i]);
519 
520  Real mu1 = std::exp(rhobar * sum1);
521 
522  // The water viscosity (in Pa.s) is then given by
523  return mu_star * mu0 * mu1;
524 }
const Real _T_critical
Critical temperature (K)
const std::string density
Definition: NS.h:15
const std::string temperature
Definition: NS.h:25
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const Real _rho_critical
Critical density (kg/m^3)
Real Water97FluidProperties::phi3 ( Real  delta,
Real  tau 
) const
protected

Helmholtz free energy in Region 3.

From Eq. (28) From Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, IAPWS 2007.

Parameters
deltareduced density (-)
taureduced temperature (-)
Returns
Helmholtz free energy (-)

Definition at line 1132 of file Water97FluidProperties.C.

Referenced by s().

1133 {
1134  Real sum = 0.0;
1135  for (std::size_t i = 1; i < _n3.size(); ++i)
1136  sum += _n3[i] * std::pow(delta, _I3[i]) * std::pow(tau, _J3[i]);
1137 
1138  return _n3[0] * std::log(delta) + sum;
1139 }
const std::vector< Real > _n3
Constants for region 3.
const std::vector< int > _J3
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< int > _I3
Real Water97FluidProperties::rho ( Real  pressure,
Real  temperature 
) const
overridevirtual

Density.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
density (kg/m^3)

Implements SinglePhaseFluidPropertiesPT.

Definition at line 76 of file Water97FluidProperties.C.

Referenced by k(), mu(), mu_dpT(), rho_dpT(), and PorousFlowFluidStateWaterNCG::thermophysicalProperties().

77 {
78  Real density, pi, tau;
79 
80  // Determine which region the point is in
81  unsigned int region = inRegion(pressure, temperature);
82 
83  switch (region)
84  {
85  case 1:
86  pi = pressure / _p_star[0];
87  tau = _T_star[0] / temperature;
88  density = pressure / (pi * _Rw * temperature * dgamma1_dpi(pi, tau));
89  break;
90 
91  case 2:
92  pi = pressure / _p_star[1];
93  tau = _T_star[1] / temperature;
94  density = pressure / (pi * _Rw * temperature * dgamma2_dpi(pi, tau));
95  break;
96 
97  case 3:
99  break;
100 
101  case 5:
102  pi = pressure / _p_star[4];
103  tau = _T_star[4] / temperature;
104  density = pressure / (pi * _Rw * temperature * dgamma5_dpi(pi, tau));
105  break;
106 
107  default:
108  mooseError(name(), ": inRegion() has given an incorrect region");
109  }
110  return density;
111 }
const std::vector< Real > _T_star
Temperature scale for each region.
const std::string density
Definition: NS.h:15
const std::vector< Real > _p_star
Pressure scale for each region.
const std::string temperature
Definition: NS.h:25
Real dgamma2_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt pi.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
Real dgamma1_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt pi.
unsigned int inRegion(Real pressure, Real temperature) const
Determines the phase region that the given pressure and temperature values lie in.
const std::string pressure
Definition: NS.h:24
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...
Real dgamma5_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt pi.
void Water97FluidProperties::rho_dpT ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT 
) const
overridevirtual

Density and its derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]rhodensity (kg/m^3)
[out]drho_dpderivative of density wrt pressure
[out]drho_dTderivative of density wrt temperature

Implements SinglePhaseFluidPropertiesPT.

Definition at line 114 of file Water97FluidProperties.C.

Referenced by mu_dpT(), rho_e_dpT(), and PorousFlowFluidStateWaterNCG::thermophysicalProperties().

116 {
117  Real pi, tau, ddensity_dp, ddensity_dT;
118 
119  // Determine which region the point is in
120  unsigned int region = inRegion(pressure, temperature);
121 
122  switch (region)
123  {
124  case 1:
125  {
126  pi = pressure / _p_star[0];
127  tau = _T_star[0] / temperature;
128  Real dgdp = dgamma1_dpi(pi, tau);
129  ddensity_dp = -d2gamma1_dpi2(pi, tau) / (_Rw * temperature * dgdp * dgdp);
130  ddensity_dT = -pressure * (dgdp - tau * d2gamma1_dpitau(pi, tau)) /
131  (_Rw * pi * temperature * temperature * dgdp * dgdp);
132  break;
133  }
134 
135  case 2:
136  {
137  pi = pressure / _p_star[1];
138  tau = _T_star[1] / temperature;
139  Real dgdp = dgamma2_dpi(pi, tau);
140  ddensity_dp = -d2gamma2_dpi2(pi, tau) / (_Rw * temperature * dgdp * dgdp);
141  ddensity_dT = -pressure * (dgdp - tau * d2gamma2_dpitau(pi, tau)) /
142  (_Rw * pi * temperature * temperature * dgdp * dgdp);
143  break;
144  }
145 
146  case 3:
147  {
148  // Calculate density first, then use that in Helmholtz free energy
150  Real delta = density / _rho_critical;
151  tau = _T_star[2] / temperature;
152  Real dpdd = dphi3_ddelta(delta, tau);
153  Real d2pdd2 = d2phi3_ddelta2(delta, tau);
154  ddensity_dp = 1.0 / (_Rw * temperature * delta * (2.0 * dpdd + delta * d2pdd2));
155  ddensity_dT = density * (tau * d2phi3_ddeltatau(delta, tau) - dpdd) / temperature /
156  (2.0 * dpdd + delta * d2pdd2);
157  break;
158  }
159 
160  case 5:
161  {
162  pi = pressure / _p_star[4];
163  tau = _T_star[4] / temperature;
164  Real dgdp = dgamma5_dpi(pi, tau);
165  ddensity_dp = -d2gamma5_dpi2(pi, tau) / (_Rw * temperature * dgdp * dgdp);
166  ddensity_dT = -pressure * (dgdp - tau * d2gamma5_dpitau(pi, tau)) /
167  (_Rw * pi * temperature * temperature * dgdp * dgdp);
168  break;
169  }
170 
171  default:
172  mooseError(name(), ": inRegion() has given an incorrect region");
173  }
174 
175  rho = this->rho(pressure, temperature);
176  drho_dp = ddensity_dp;
177  drho_dT = ddensity_dT;
178 }
Real dphi3_ddelta(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt delta.
const std::vector< Real > _T_star
Temperature scale for each region.
const std::string density
Definition: NS.h:15
const std::vector< Real > _p_star
Pressure scale for each region.
const std::string temperature
Definition: NS.h:25
Real dgamma2_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt pi.
virtual Real rho(Real pressure, Real temperature) const override
Density.
Real d2phi3_ddelta2(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt delta.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
Real d2gamma2_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt pi and tau.
Real dgamma1_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt pi.
unsigned int inRegion(Real pressure, Real temperature) const
Determines the phase region that the given pressure and temperature values lie in.
Real d2gamma5_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt pi.
Real d2phi3_ddeltatau(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt delta and tau.
Real d2gamma5_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt pi and tau.
const Real _rho_critical
Critical density (kg/m^3)
Real d2gamma1_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt pi.
Real d2gamma2_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt pi.
const std::string pressure
Definition: NS.h:24
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...
Real d2gamma1_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt pi and tau.
Real dgamma5_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt pi.
void Water97FluidProperties::rho_e_dpT ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
overridevirtual

Density and internal energy and their derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]rhodensity (kg/m^3)
[out]drho_dpderivative of density wrt pressure
[out]drho_dTderivative of density wrt temperature
[out]einternal energy (J/kg)
[out]de_dpderivative of internal energy wrt pressure
[out]de_dTderivative of internal energy wrt temperature

Implements SinglePhaseFluidPropertiesPT.

Definition at line 304 of file Water97FluidProperties.C.

312 {
313  rho_dpT(pressure, temperature, rho, drho_dp, drho_dT);
314  e_dpT(pressure, temperature, e, de_dp, de_dT);
315 }
const std::string temperature
Definition: NS.h:25
virtual Real rho(Real pressure, Real temperature) const override
Density.
virtual void rho_dpT(Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const override
Density and its derivatives wrt pressure and temperature.
const std::string pressure
Definition: NS.h:24
virtual void e_dpT(Real pressure, Real temperature, Real &e, Real &de_dp, Real &de_dT) const override
Internal energy and its derivatives wrt pressure and temperature.
virtual Real e(Real pressure, Real temperature) const override
Internal energy.
Real Water97FluidProperties::s ( Real  pressure,
Real  temperature 
) const
overridevirtual

Specific entropy.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
s (J/kg/K)

Implements SinglePhaseFluidPropertiesPT.

Definition at line 633 of file Water97FluidProperties.C.

634 {
635  Real entropy, pi, tau, density3, delta;
636 
637  // Determine which region the point is in
638  unsigned int region = inRegion(pressure, temperature);
639  switch (region)
640  {
641  case 1:
642  pi = pressure / _p_star[0];
643  tau = _T_star[0] / temperature;
644  entropy = _Rw * (tau * dgamma1_dtau(pi, tau) - gamma1(pi, tau));
645  break;
646 
647  case 2:
648  pi = pressure / _p_star[1];
649  tau = _T_star[1] / temperature;
650  entropy = _Rw * (tau * dgamma2_dtau(pi, tau) - gamma2(pi, tau));
651  break;
652 
653  case 3:
654  // Calculate density first, then use that in Helmholtz free energy
655  density3 = densityRegion3(pressure, temperature);
656  delta = density3 / _rho_critical;
657  tau = _T_star[2] / temperature;
658  entropy = _Rw * (tau * dphi3_dtau(delta, tau) - phi3(delta, tau));
659  break;
660 
661  case 5:
662  pi = pressure / _p_star[4];
663  tau = _T_star[4] / temperature;
664  entropy = _Rw * (tau * dgamma5_dtau(pi, tau) - gamma5(pi, tau));
665  break;
666 
667  default:
668  mooseError(name(), ": inRegion() has given an incorrect region");
669  }
670  return entropy;
671 }
const std::vector< Real > _T_star
Temperature scale for each region.
Real dgamma5_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt tau.
Real gamma5(Real pi, Real tau) const
Gibbs free energy in Region 5.
const std::vector< Real > _p_star
Pressure scale for each region.
const std::string temperature
Definition: NS.h:25
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
Real dphi3_dtau(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt tau.
unsigned int inRegion(Real pressure, Real temperature) const
Determines the phase region that the given pressure and temperature values lie in.
Real gamma2(Real pi, Real tau) const
Gibbs free energy in Region 2 - superheated steam.
Real dgamma2_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt tau.
Real gamma1(Real pi, Real tau) const
Gibbs free energy in Region 1 - single phase liquid region.
const Real _rho_critical
Critical density (kg/m^3)
Real phi3(Real delta, Real tau) const
Helmholtz free energy in Region 3.
const std::string pressure
Definition: NS.h:24
Real dgamma1_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt tau.
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...
unsigned int Water97FluidProperties::subregion2ph ( Real  pressure,
Real  enthalpy 
) const
protected

Provides the correct subregion index for a (P,h) point in region 2.

From Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
pressurewater pressure (Pa)
enthalpywater enthalpy (J/kg)
Returns
subregion index

Definition at line 1698 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1699 {
1700  unsigned int subregion;
1701 
1702  if (pressure <= 4.0e6)
1703  subregion = 1;
1704  else if (pressure > 4.0e6 && pressure < 6.5467e6)
1705  subregion = 2;
1706  else
1707  {
1708  if (enthalpy >= b2bc(pressure))
1709  subregion = 2;
1710  else
1711  subregion = 3;
1712  }
1713 
1714  return subregion;
1715 }
const std::string enthalpy
Definition: NS.h:26
const std::string pressure
Definition: NS.h:24
Real b2bc(Real pressure) const
Boundary between subregions b and c in region 2.
unsigned int Water97FluidProperties::subregion3 ( Real  pressure,
Real  temperature 
) const

Provides the correct subregion index for a (P,T) point in region 3.

From Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
pressurewater pressure (Pa)
temperaturewater temperature (K)
Returns
subregion index

Definition at line 1284 of file Water97FluidProperties.C.

Referenced by densityRegion3().

1285 {
1286  Real pMPa = pressure / 1.0e6;
1287  const Real P3cd = 19.00881189173929;
1288  unsigned int subregion = 0;
1289 
1290  if (pMPa > 40.0 && pMPa <= 100.0)
1291  {
1292  if (temperature <= tempXY(pressure, AB))
1293  subregion = 0;
1294  else // (temperature > tempXY(pressure, AB))
1295  subregion = 1;
1296  }
1297  else if (pMPa > 25.0 && pMPa <= 40.0)
1298  {
1299  if (temperature <= tempXY(pressure, CD))
1300  subregion = 2;
1301  else if (temperature > tempXY(pressure, CD) && temperature <= tempXY(pressure, AB))
1302  subregion = 3;
1303  else if (temperature > tempXY(pressure, AB) && temperature <= tempXY(pressure, EF))
1304  subregion = 4;
1305  else // (temperature > tempXY(pressure, EF))
1306  subregion = 5;
1307  }
1308  else if (pMPa > 23.5 && pMPa <= 25.0)
1309  {
1310  if (temperature <= tempXY(pressure, CD))
1311  subregion = 2;
1312  else if (temperature > tempXY(pressure, CD) && temperature <= tempXY(pressure, GH))
1313  subregion = 6;
1314  else if (temperature > tempXY(pressure, GH) && temperature <= tempXY(pressure, EF))
1315  subregion = 7;
1316  else if (temperature > tempXY(pressure, EF) && temperature <= tempXY(pressure, IJ))
1317  subregion = 8;
1318  else if (temperature > tempXY(pressure, IJ) && temperature <= tempXY(pressure, JK))
1319  subregion = 9;
1320  else // (temperature > tempXY(pressure, JK))
1321  subregion = 10;
1322  }
1323  else if (pMPa > 23.0 && pMPa <= 23.5)
1324  {
1325  if (temperature <= tempXY(pressure, CD))
1326  subregion = 2;
1327  else if (temperature > tempXY(pressure, CD) && temperature <= tempXY(pressure, GH))
1328  subregion = 11;
1329  else if (temperature > tempXY(pressure, GH) && temperature <= tempXY(pressure, EF))
1330  subregion = 7;
1331  else if (temperature > tempXY(pressure, EF) && temperature <= tempXY(pressure, IJ))
1332  subregion = 8;
1333  else if (temperature > tempXY(pressure, IJ) && temperature <= tempXY(pressure, JK))
1334  subregion = 9;
1335  else // (temperature > tempXY(pressure, JK))
1336  subregion = 10;
1337  }
1338  else if (pMPa > 22.5 && pMPa <= 23.0)
1339  {
1340  if (temperature <= tempXY(pressure, CD))
1341  subregion = 2;
1342  else if (temperature > tempXY(pressure, CD) && temperature <= tempXY(pressure, GH))
1343  subregion = 11;
1344  else if (temperature > tempXY(pressure, GH) && temperature <= tempXY(pressure, MN))
1345  subregion = 12;
1346  else if (temperature > tempXY(pressure, MN) && temperature <= tempXY(pressure, EF))
1347  subregion = 13;
1348  else if (temperature > tempXY(pressure, EF) && temperature <= tempXY(pressure, OP))
1349  subregion = 14;
1350  else if (temperature > tempXY(pressure, OP) && temperature <= tempXY(pressure, IJ))
1351  subregion = 15;
1352  else if (temperature > tempXY(pressure, IJ) && temperature <= tempXY(pressure, JK))
1353  subregion = 9;
1354  else // (temperature > tempXY(pressure, JK))
1355  subregion = 10;
1356  }
1357  else if (pMPa > vaporPressure(643.15) * 1.0e-6 &&
1358  pMPa <= 22.5) // vaporPressure(643.15) = 21.04 MPa
1359  {
1360  if (temperature <= tempXY(pressure, CD))
1361  subregion = 2;
1362  else if (temperature > tempXY(pressure, CD) && temperature <= tempXY(pressure, QU))
1363  subregion = 16;
1364  else if (temperature > tempXY(pressure, QU) && temperature <= tempXY(pressure, RX))
1365  {
1366  if (pMPa > 22.11 && pMPa <= 22.5)
1367  {
1368  if (temperature <= tempXY(pressure, UV))
1369  subregion = 20;
1370  else if (temperature > tempXY(pressure, UV) && temperature <= tempXY(pressure, EF))
1371  subregion = 21;
1372  else if (temperature > tempXY(pressure, EF) && temperature <= tempXY(pressure, WX))
1373  subregion = 22;
1374  else // (temperature > tempXY(pressure, WX) && temperature <= tempXY(pressure, RX))
1375  subregion = 23;
1376  }
1377  else if (pMPa > 22.064 && pMPa <= 22.11)
1378  {
1379  if (temperature <= tempXY(pressure, UV))
1380  subregion = 20;
1381  else if (temperature > tempXY(pressure, UV) && temperature <= tempXY(pressure, EF))
1382  subregion = 24;
1383  else if (temperature > tempXY(pressure, EF) && temperature <= tempXY(pressure, WX))
1384  subregion = 25;
1385  else // (temperature > tempXY(pressure, WX) && temperature <= tempXY(pressure, RX))
1386  subregion = 23;
1387  }
1388  else if (temperature <= vaporTemperature(pressure))
1389  {
1390  if (pMPa > 21.93161551 && pMPa <= 22.064)
1392  subregion = 20;
1393  else
1394  subregion = 24;
1395  else // (pMPa > vaporPressure(643.15) * 1.0e-6 && pMPa <= 21.93161551)
1396  subregion = 20;
1397  }
1399  {
1400  if (pMPa > 21.90096265 && pMPa <= 22.064)
1401  {
1402  if (temperature <= tempXY(pressure, WX))
1403  subregion = 25;
1404  else
1405  subregion = 23;
1406  }
1407  else
1408  subregion = 23;
1409  }
1410  }
1411  else if (temperature > tempXY(pressure, RX) && temperature <= tempXY(pressure, JK))
1412  subregion = 17;
1413  else
1414  subregion = 10;
1415  }
1416  else if (pMPa > 20.5 &&
1417  pMPa <= vaporPressure(643.15) * 1.0e-6) // vaporPressure(643.15) = 21.04 MPa
1418  {
1419  if (temperature <= tempXY(pressure, CD))
1420  subregion = 2;
1422  subregion = 16;
1424  subregion = 17;
1425  else // (temperature > tempXY(pressure, JK))
1426  subregion = 10;
1427  }
1428  else if (pMPa > P3cd && pMPa <= 20.5) // P3cd = 19.00881189173929
1429  {
1430  if (temperature <= tempXY(pressure, CD))
1431  subregion = 2;
1433  subregion = 18;
1434  else
1435  subregion = 19;
1436  }
1437  else if (pMPa > vaporPressure(623.15) * 1.0e-6 && pMPa <= P3cd)
1438  {
1440  subregion = 2;
1441  else
1442  subregion = 19;
1443  }
1444  else if (pMPa > 22.11 && pMPa <= 22.5)
1445  {
1447  subregion = 20;
1448  else if (temperature > tempXY(pressure, UV) && temperature <= tempXY(pressure, EF))
1449  subregion = 21;
1450  else if (temperature > tempXY(pressure, EF) && temperature <= tempXY(pressure, WX))
1451  subregion = 22;
1452  else // (temperature > tempXY(pressure, WX) && temperature <= tempXY(pressure, RX))
1453  subregion = 23;
1454  }
1455  else if (pMPa > 22.064 && pMPa <= 22.11)
1456  {
1458  subregion = 20;
1459  else if (temperature > tempXY(pressure, UV) && temperature <= tempXY(pressure, EF))
1460  subregion = 24;
1461  else if (temperature > tempXY(pressure, EF) && temperature <= tempXY(pressure, WX))
1462  subregion = 25;
1463  else // (temperature > tempXY(pressure, WX) && temperature <= tempXY(pressure, RX))
1464  subregion = 23;
1465  }
1466  else
1467  mooseError(name(), ": subregion3(): Shouldn't have got here!");
1468 
1469  return subregion;
1470 }
Real tempXY(Real pressure, subregionEnum xy) const
Boundaries between subregions in region 3.
const std::string temperature
Definition: NS.h:25
Real vaporPressure(Real temperature) const
Saturation pressure as a function of temperature.
Real vaporTemperature(Real pressure) const
Saturation temperature as a function of pressure.
const std::string pressure
Definition: NS.h:24
virtual Real e(Real pressure, Real temperature) const override
Internal energy.
unsigned int Water97FluidProperties::subregion3ph ( Real  pressure,
Real  enthalpy 
) const
protected

Provides the correct subregion index for a (P,h) point in region 3.

From Revised Supplementary Release on Backward Equations for the Functions T(p,h), v(p,h) and T(p,s), v(p,s) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
pressurewater pressure (Pa)
enthalpywater enthalpy (J/kg)
Returns
subregion index

Definition at line 1718 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1719 {
1720  unsigned int subregion;
1721 
1722  if (enthalpy <= b3ab(pressure))
1723  subregion = 1;
1724  else
1725  subregion = 2;
1726 
1727  return subregion;
1728 }
Real b3ab(Real pressure) const
Boundary between subregions a and b in region 3.
const std::string enthalpy
Definition: NS.h:26
const std::string pressure
Definition: NS.h:24
Real Water97FluidProperties::subregionVolume ( Real  pi,
Real  theta,
Real  a,
Real  b,
Real  c,
Real  d,
Real  e,
unsigned int  sid 
) const

Specific volume in all subregions of region 3 EXCEPT subregion n (13).

Parameters
piscaled water pressure
thetascaled water temperature
ato e constants
sidsubregion ID of the subregion
Returns
volume water specific volume (m^3/kg)

Definition at line 1583 of file Water97FluidProperties.C.

Referenced by densityRegion3().

1585 {
1586  Real sum = 0.0;
1587 
1588  for (std::size_t i = 0; i < _n3s[sid].size(); ++i)
1589  sum += _n3s[sid][i] * std::pow(std::pow(pi - a, c), _I3s[sid][i]) *
1590  std::pow(std::pow(theta - b, d), _J3s[sid][i]);
1591 
1592  return std::pow(sum, e);
1593 }
virtual Real c(Real pressure, Real temperature) const override
Speed of sound.
const std::vector< std::vector< Real > > _n3s
Constants for all 26 subregions in region 3.
const std::vector< std::vector< int > > _I3s
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< std::vector< int > > _J3s
virtual Real e(Real pressure, Real temperature) const override
Internal energy.
Real Water97FluidProperties::temperature_from_ph ( Real  pressure,
Real  enthalpy 
) const
virtual

Backwards equation T(p, h) From Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam.

Parameters
pressurewater pressure (Pa)
enthalpywater enthalpy (J/kg)
Returns
temperature water temperature (K)

Definition at line 1743 of file Water97FluidProperties.C.

1744 {
1745  Real temperature = 0.0;
1746 
1747  // Determine which region the point is in
1748  unsigned int region = inRegionPH(pressure, enthalpy);
1749 
1750  switch (region)
1751  {
1752  case 1:
1753  temperature = temperature_from_ph1(pressure, enthalpy);
1754  break;
1755 
1756  case 2:
1757  {
1758  // First, determine which subregion the point is in:
1759  unsigned int subregion = subregion2ph(pressure, enthalpy);
1760 
1761  if (subregion == 1)
1762  temperature = temperature_from_ph2a(pressure, enthalpy);
1763  else if (subregion == 2)
1764  temperature = temperature_from_ph2b(pressure, enthalpy);
1765  else
1766  temperature = temperature_from_ph2c(pressure, enthalpy);
1767  break;
1768  }
1769 
1770  case 3:
1771  {
1772  // First, determine which subregion the point is in:
1773  unsigned int subregion = subregion3ph(pressure, enthalpy);
1774 
1775  if (subregion == 1)
1776  temperature = temperature_from_ph3a(pressure, enthalpy);
1777  else
1778  temperature = temperature_from_ph3b(pressure, enthalpy);
1779  break;
1780  }
1781 
1782  case 5:
1783  mooseError(name(), ": temperature_from_ph() not implemented for region 5");
1784  break;
1785 
1786  default:
1787  mooseError(name(), ": inRegionPH() has given an incorrect region");
1788  }
1789 
1790  return temperature;
1791 }
unsigned int inRegionPH(Real pressure, Real enthalpy) const
Determines the phase region that the given pressure and enthaply values lie in.
Real temperature_from_ph1(Real pressure, Real enthalpy) const
Backwards equation T(p, h) in Region 1 Eq.
Real temperature_from_ph2a(Real pressure, Real enthalpy) const
Backwards equation T(p, h) in Region 2a Eq.
unsigned int subregion2ph(Real pressure, Real enthalpy) const
Provides the correct subregion index for a (P,h) point in region 2.
Real temperature_from_ph2b(Real pressure, Real enthalpy) const
Backwards equation T(p, h) in Region 2b Eq.
unsigned int subregion3ph(Real pressure, Real enthalpy) const
Provides the correct subregion index for a (P,h) point in region 3.
const std::string temperature
Definition: NS.h:25
const std::string enthalpy
Definition: NS.h:26
Real temperature_from_ph3b(Real pressure, Real enthalpy) const
Backwards equation T(p, h) in Region 3b Eq.
Real temperature_from_ph2c(Real pressure, Real enthalpy) const
Backwards equation T(p, h) in Region 2c Eq.
Real temperature_from_ph3a(Real pressure, Real enthalpy) const
Backwards equation T(p, h) in Region 3a Eq.
const std::string pressure
Definition: NS.h:24
Real Water97FluidProperties::temperature_from_ph1 ( Real  pressure,
Real  enthalpy 
) const
protected

Backwards equation T(p, h) in Region 1 Eq.

(11) from Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
pressurewater pressure (Pa)
enthalpywater enthalpy (J/kg)
Returns
temperature water temperature (K)

Definition at line 1794 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1795 {
1796  Real pi = pressure / 1.0e6;
1797  Real eta = enthalpy / 2500.0e3;
1798  Real sum = 0.0;
1799 
1800  for (std::size_t i = 0; i < _nph1.size(); ++i)
1801  sum += _nph1[i] * std::pow(pi, _Iph1[i]) * std::pow(eta + 1.0, _Jph1[i]);
1802 
1803  return sum;
1804 }
const std::string enthalpy
Definition: NS.h:26
const std::vector< int > _Iph1
const std::vector< Real > _nph1
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:24
const std::vector< int > _Jph1
Real Water97FluidProperties::temperature_from_ph2a ( Real  pressure,
Real  enthalpy 
) const
protected

Backwards equation T(p, h) in Region 2a Eq.

(22) from Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
pressurewater pressure (Pa)
enthalpywater enthalpy (J/kg)
Returns
temperature water temperature (K)

Definition at line 1807 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1808 {
1809  Real pi = pressure / 1.0e6;
1810  Real eta = enthalpy / 2000.0e3;
1811  Real sum = 0.0;
1812 
1813  for (std::size_t i = 0; i < _nph2a.size(); ++i)
1814  sum += _nph2a[i] * std::pow(pi, _Iph2a[i]) * std::pow(eta - 2.1, _Jph2a[i]);
1815 
1816  return sum;
1817 }
const std::string enthalpy
Definition: NS.h:26
const std::vector< int > _Jph2a
const std::vector< Real > _nph2a
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:24
const std::vector< int > _Iph2a
Real Water97FluidProperties::temperature_from_ph2b ( Real  pressure,
Real  enthalpy 
) const
protected

Backwards equation T(p, h) in Region 2b Eq.

(23) from Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
pressurewater pressure (Pa)
enthalpywater enthalpy (J/kg)
Returns
temperature water temperature (K)

Definition at line 1820 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1821 {
1822  Real pi = pressure / 1.0e6;
1823  Real eta = enthalpy / 2000.0e3;
1824  Real sum = 0.0;
1825 
1826  for (std::size_t i = 0; i < _nph2b.size(); ++i)
1827  sum += _nph2b[i] * std::pow(pi - 2.0, _Iph2b[i]) * std::pow(eta - 2.6, _Jph2b[i]);
1828 
1829  return sum;
1830 }
const std::vector< int > _Jph2b
const std::vector< int > _Iph2b
const std::string enthalpy
Definition: NS.h:26
const std::vector< Real > _nph2b
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:24
Real Water97FluidProperties::temperature_from_ph2c ( Real  pressure,
Real  enthalpy 
) const
protected

Backwards equation T(p, h) in Region 2c Eq.

(24) from Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
pressurewater pressure (Pa)
enthalpywater enthalpy (J/kg)
Returns
temperature water temperature (K)

Definition at line 1833 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1834 {
1835  Real pi = pressure / 1.0e6;
1836  Real eta = enthalpy / 2000.0e3;
1837  Real sum = 0.0;
1838 
1839  for (std::size_t i = 0; i < _nph2c.size(); ++i)
1840  sum += _nph2c[i] * std::pow(pi + 25.0, _Iph2c[i]) * std::pow(eta - 1.8, _Jph2c[i]);
1841 
1842  return sum;
1843 }
const std::vector< int > _Jph2c
const std::string enthalpy
Definition: NS.h:26
const std::vector< int > _Iph2c
const std::vector< Real > _nph2c
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:24
Real Water97FluidProperties::temperature_from_ph3a ( Real  pressure,
Real  enthalpy 
) const
protected

Backwards equation T(p, h) in Region 3a Eq.

(2) from Revised Supplementary Release on Backward Equations for the Functions T(p,h), v(p,h) and T(p,s), v(p,s) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
pressurewater pressure (Pa)
enthalpywater enthalpy (J/kg)
Returns
temperature water temperature (K)

Definition at line 1860 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1861 {
1862  Real pi = pressure / 100.0e6;
1863  Real eta = enthalpy / 2300.0e3;
1864  Real sum = 0.0;
1865 
1866  for (std::size_t i = 0; i < _nph3a.size(); ++i)
1867  sum += _nph3a[i] * std::pow(pi + 0.24, _Iph3a[i]) * std::pow(eta - 0.615, _Jph3a[i]);
1868 
1869  return sum * 760.0;
1870 }
const std::vector< int > _Iph3a
const std::string enthalpy
Definition: NS.h:26
const std::vector< int > _Jph3a
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:24
const std::vector< Real > _nph3a
Real Water97FluidProperties::temperature_from_ph3b ( Real  pressure,
Real  enthalpy 
) const
protected

Backwards equation T(p, h) in Region 3b Eq.

(3) from Revised Supplementary Release on Backward Equations for the Functions T(p,h), v(p,h) and T(p,s), v(p,s) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
pressurewater pressure (Pa)
enthalpywater enthalpy (J/kg)
Returns
temperature water temperature (K)

Definition at line 1873 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1874 {
1875  Real pi = pressure / 100.0e6;
1876  Real eta = enthalpy / 2800.0e3;
1877  Real sum = 0.0;
1878 
1879  for (std::size_t i = 0; i < _nph3b.size(); ++i)
1880  sum += _nph3b[i] * std::pow(pi + 0.298, _Iph3b[i]) * std::pow(eta - 0.72, _Jph3b[i]);
1881 
1882  return sum * 860.0;
1883 }
const std::vector< int > _Jph3b
const std::string enthalpy
Definition: NS.h:26
const std::vector< int > _Iph3b
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< Real > _nph3b
const std::string pressure
Definition: NS.h:24
Real Water97FluidProperties::tempXY ( Real  pressure,
subregionEnum  xy 
) const
protected

Boundaries between subregions in region 3.

From Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Parameters
pressurewater pressure (Pa)
xystring to select the boundary between two subregions
Returns
temperature (K) along the boundary

Definition at line 1473 of file Water97FluidProperties.C.

Referenced by subregion3().

1474 {
1475  Real pi = pressure / 1.0e6;
1476 
1477  const std::vector<std::vector<int>> I{{0, 1, 2, -1, -2},
1478  {0, 1, 2, 3},
1479  {0, 1, 2, 3, 4},
1480  {0, 1, 2, 3, 4},
1481  {0, 1, 2, 3, 4},
1482  {0, 1, 2, 3},
1483  {0, 1, 2, -1, -2},
1484  {0, 1, 2, 3},
1485  {0, 1, 2, 3},
1486  {0, 1, 2, 3, 4},
1487  {0, 1, 2, -1, -2}};
1488 
1489  const std::vector<std::vector<Real>> n{
1490  {0.154793642129415e4,
1491  -0.187661219490113e3,
1492  0.213144632222113e2,
1493  -0.191887498864292e4,
1494  0.918419702359447e3},
1495  {0.585276966696349e3, 0.278233532206915e1, -0.127283549295878e-1, 0.159090746562729e-3},
1496  {-0.249284240900418e5,
1497  0.428143584791546e4,
1498  -0.269029173140130e3,
1499  0.751608051114157e1,
1500  -0.787105249910383e-1},
1501  {0.584814781649163e3,
1502  -0.616179320924617,
1503  0.260763050899562,
1504  -0.587071076864459e-2,
1505  0.515308185433082e-4},
1506  {0.617229772068439e3,
1507  -0.770600270141675e1,
1508  0.697072596851896,
1509  -0.157391839848015e-1,
1510  0.137897492684194e-3},
1511  {0.535339483742384e3, 0.761978122720128e1, -0.158365725441648, 0.192871054508108e-2},
1512  {0.969461372400213e3,
1513  -0.332500170441278e3,
1514  0.642859598466067e2,
1515  0.773845935768222e3,
1516  -0.152313732937084e4},
1517  {0.565603648239126e3, 0.529062258221222e1, -0.102020639611016, 0.122240301070145e-2},
1518  {0.584561202520006e3, -0.102961025163669e1, 0.243293362700452, -0.294905044740799e-2},
1519  {0.528199646263062e3, 0.890579602135307e1, -0.222814134903755, 0.286791682263697e-2},
1520  {0.728052609145380e1,
1521  0.973505869861952e2,
1522  0.147370491183191e2,
1523  0.329196213998375e3,
1524  0.873371668682417e3}};
1525 
1526  // Choose the constants based on the string xy
1527  unsigned int row;
1528 
1529  switch (xy)
1530  {
1531  case AB:
1532  row = 0;
1533  break;
1534  case CD:
1535  row = 1;
1536  break;
1537  case GH:
1538  row = 2;
1539  break;
1540  case IJ:
1541  row = 3;
1542  break;
1543  case JK:
1544  row = 4;
1545  break;
1546  case MN:
1547  row = 5;
1548  break;
1549  case OP:
1550  row = 6;
1551  break;
1552  case QU:
1553  row = 7;
1554  break;
1555  case RX:
1556  row = 8;
1557  break;
1558  case UV:
1559  row = 9;
1560  break;
1561  case WX:
1562  row = 10;
1563  break;
1564  default:
1565  row = 0;
1566  }
1567 
1568  Real sum = 0.0;
1569 
1570  if (xy == AB || xy == OP || xy == WX)
1571  for (std::size_t i = 0; i < n[row].size(); ++i)
1572  sum += n[row][i] * std::pow(std::log(pi), I[row][i]);
1573  else if (xy == EF)
1574  sum += 3.727888004 * (pi - _p_critical / 1.0e6) + _T_critical;
1575  else
1576  for (std::size_t i = 0; i < n[row].size(); ++i)
1577  sum += n[row][i] * std::pow(pi, I[row][i]);
1578 
1579  return sum;
1580 }
const Real _T_critical
Critical temperature (K)
const Real _p_critical
Critical pressure (Pa)
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:24
Real Water97FluidProperties::triplePointPressure ( ) const
virtual

Water triple point pressure.

Returns
triple point pressure (Pa)

Definition at line 64 of file Water97FluidProperties.C.

65 {
66  return _p_triple;
67 }
const Real _p_triple
Triple point pressure (Pa)
Real Water97FluidProperties::triplePointTemperature ( ) const
virtual

Water triple point temperature.

Returns
triple point temperature (K)

Definition at line 70 of file Water97FluidProperties.C.

71 {
72  return _T_triple;
73 }
const Real _T_triple
Triple point temperature (K)
Real Water97FluidProperties::vaporPressure ( Real  temperature) const

Saturation pressure as a function of temperature.

Eq. (30) from Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Valid for 273.15 K <= t <= 647.096 K

Parameters
temperaturewater temperature (K)
Returns
saturation pressure (Pa)

Definition at line 783 of file Water97FluidProperties.C.

Referenced by inRegion(), inRegionPH(), subregion3(), and BrineFluidProperties::vaporPressure().

784 {
785  // Check whether the input temperature is within the region of validity of this equation.
786  // Valid for 273.15 K <= t <= 647.096 K
787  if (temperature < 273.15 || temperature > _T_critical)
788  mooseError(name(),
789  ": vaporPressure(): Temperature is outside range 273.15 K <= T "
790  "<= 647.096 K");
791 
792  // Constants for region 4 (the saturation curve up to the critical point)
793  const std::vector<Real> n4{0.11670521452767e4,
794  -0.72421316703206e6,
795  -0.17073846940092e2,
796  0.12020824702470e5,
797  -0.32325550322333e7,
798  0.14915108613530e2,
799  -0.48232657361591e4,
800  0.40511340542057e6,
801  -0.238555575678490,
802  0.65017534844798e3};
803 
804  Real theta, theta2, a, b, c, p;
805  theta = temperature + n4[8] / (temperature - n4[9]);
806  theta2 = theta * theta;
807  a = theta2 + n4[0] * theta + n4[1];
808  b = n4[2] * theta2 + n4[3] * theta + n4[4];
809  c = n4[5] * theta2 + n4[6] * theta + n4[7];
810  p = std::pow(2.0 * c / (-b + std::sqrt(b * b - 4.0 * a * c)), 4.0);
811 
812  return p * 1.e6;
813 }
const Real _T_critical
Critical temperature (K)
virtual Real c(Real pressure, Real temperature) const override
Speed of sound.
const std::string temperature
Definition: NS.h:25
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
void Water97FluidProperties::vaporPressure_dT ( Real  temperature,
Real &  psat,
Real &  dpsat_dT 
) const

Saturation pressure as a function of temperature and derivative wrt temperature.

Eq. (30) from Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Valid for 273.15 K <= t <= 647.096 K

Parameters
temperaturewater temperature (K)
[out]saturationpressure (Pa)
[out]derivativeof saturation pressure wrt temperature (Pa/K)

Definition at line 816 of file Water97FluidProperties.C.

Referenced by PorousFlowFluidStateWaterNCG::thermophysicalProperties().

817 {
818  // Check whether the input temperature is within the region of validity of this equation.
819  // Valid for 273.15 K <= t <= 647.096 K
820  if (temperature < 273.15 || temperature > _T_critical)
821  mooseError(name(),
822  ": vaporPressure_dT(): Temperature is outside range 273.15 K <= "
823  "T <= 647.096 K");
824 
825  // Constants for region 4 (the saturation curve up to the critical point)
826  const std::vector<Real> n4{0.11670521452767e4,
827  -0.72421316703206e6,
828  -0.17073846940092e2,
829  0.12020824702470e5,
830  -0.32325550322333e7,
831  0.14915108613530e2,
832  -0.48232657361591e4,
833  0.40511340542057e6,
834  -0.238555575678490,
835  0.65017534844798e3};
836 
837  Real theta, dtheta_dT, theta2, a, b, c, da_dtheta, db_dtheta, dc_dtheta;
838  theta = temperature + n4[8] / (temperature - n4[9]);
839  dtheta_dT = 1.0 - n4[8] / (temperature - n4[9]) / (temperature - n4[9]);
840  theta2 = theta * theta;
841 
842  a = theta2 + n4[0] * theta + n4[1];
843  b = n4[2] * theta2 + n4[3] * theta + n4[4];
844  c = n4[5] * theta2 + n4[6] * theta + n4[7];
845 
846  da_dtheta = 2.0 * theta + n4[0];
847  db_dtheta = 2.0 * n4[2] * theta + n4[3];
848  dc_dtheta = 2.0 * n4[5] * theta + n4[6];
849 
850  Real denominator = -b + std::sqrt(b * b - 4.0 * a * c);
851 
852  psat = std::pow(2.0 * c / denominator, 4.0) * 1.0e6;
853 
854  // The derivative wrt temperature is given by the chain rule
855  Real dpsat = 4.0 * std::pow(2.0 * c / denominator, 3.0);
856  dpsat *= (2.0 * dc_dtheta / denominator -
857  2.0 * c / denominator / denominator *
858  (-db_dtheta +
859  std::pow(b * b - 4.0 * a * c, -0.5) *
860  (b * db_dtheta - 2.0 * da_dtheta * c - 2.0 * a * dc_dtheta)));
861  dpsat_dT = dpsat * dtheta_dT * 1.0e6;
862 }
const Real _T_critical
Critical temperature (K)
virtual Real c(Real pressure, Real temperature) const override
Speed of sound.
const std::string temperature
Definition: NS.h:25
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real Water97FluidProperties::vaporTemperature ( Real  pressure) const

Saturation temperature as a function of pressure.

Eq. (31) from Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Valid for 611.213 Pa <= p <= 22.064 MPa

Parameters
pressurewater pressure (Pa)
Returns
saturation temperature (K)

Definition at line 865 of file Water97FluidProperties.C.

Referenced by inRegionPH(), and subregion3().

866 {
867  // Check whether the input pressure is within the region of validity of this equation.
868  // Valid for 611.213 Pa <= p <= 22.064 MPa
869  if (pressure < 611.23 || pressure > _p_critical)
870  mooseError(name(),
871  ": vaporTemperature(): Pressure is outside range 611.213 Pa <= "
872  "p <= 22.064 MPa");
873 
874  // Constants for region 4 (the saturation curve up to the critical point)
875  const std::vector<Real> n4{0.11670521452767e4,
876  -0.72421316703206e6,
877  -0.17073846940092e2,
878  0.12020824702470e5,
879  -0.32325550322333e7,
880  0.14915108613530e2,
881  -0.48232657361591e4,
882  0.40511340542057e6,
883  -0.238555575678490,
884  0.65017534844798e3};
885 
886  Real beta, beta2, e, f, g, d;
887  beta = std::pow(pressure / 1.e6, 0.25);
888  beta2 = beta * beta;
889  e = beta2 + n4[2] * beta + n4[5];
890  f = n4[0] * beta2 + n4[3] * beta + n4[6];
891  g = n4[1] * beta2 + n4[4] * beta + n4[7];
892  d = 2.0 * g / (-f - std::sqrt(f * f - 4.0 * e * g));
893 
894  return (n4[9] + d - std::sqrt((n4[9] + d) * (n4[9] + d) - 4.0 * (n4[8] + n4[9] * d))) / 2.0;
895 }
virtual Real beta(Real pressure, Real temperature) const override
Thermal expansion coefficient.
const Real _p_critical
Critical pressure (Pa)
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:24
virtual Real e(Real pressure, Real temperature) const override
Internal energy.

Member Data Documentation

const std::vector<int> Water97FluidProperties::_I1
protected
Initial value:
{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2,
2, 2, 3, 3, 3, 4, 4, 4, 5, 8, 8, 21, 23, 29, 30, 31, 32}

Definition at line 703 of file Water97FluidProperties.h.

Referenced by d2gamma1_dpi2(), d2gamma1_dpitau(), d2gamma1_dtau2(), dgamma1_dpi(), dgamma1_dtau(), and gamma1().

const std::vector<int> Water97FluidProperties::_I2
protected
Initial value:
{1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
4, 4, 4, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 10, 10,
10, 16, 16, 18, 20, 20, 20, 21, 22, 23, 24, 24, 24}

Definition at line 748 of file Water97FluidProperties.h.

Referenced by d2gamma2_dpi2(), d2gamma2_dpitau(), d2gamma2_dtau2(), dgamma2_dpi(), dgamma2_dtau(), and gamma2().

const std::vector<int> Water97FluidProperties::_I3
protected
Initial value:
{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3,
3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 8, 9, 9, 10, 10, 11}

Definition at line 819 of file Water97FluidProperties.h.

Referenced by d2phi3_ddelta2(), d2phi3_ddeltatau(), d2phi3_dtau2(), dphi3_ddelta(), dphi3_dtau(), and phi3().

const std::vector<std::vector<int> > Water97FluidProperties::_I3s
protected

Definition at line 1104 of file Water97FluidProperties.h.

Referenced by densityRegion3(), and subregionVolume().

const std::vector<int> Water97FluidProperties::_I5 {1, 1, 1, 2, 2, 3}
protected
const std::vector<int> Water97FluidProperties::_Iph1 {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6}
protected

Definition at line 717 of file Water97FluidProperties.h.

Referenced by temperature_from_ph1().

const std::vector<int> Water97FluidProperties::_Iph2a
protected
Initial value:
{0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7}

Definition at line 767 of file Water97FluidProperties.h.

Referenced by temperature_from_ph2a().

const std::vector<int> Water97FluidProperties::_Iph2b
protected
Initial value:
{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 7, 7, 9, 9}

Definition at line 785 of file Water97FluidProperties.h.

Referenced by temperature_from_ph2b().

const std::vector<int> Water97FluidProperties::_Iph2c
protected
Initial value:
{-7, -7, -6, -6, -5, -5, -2, -2, -1, -1, 0, 0,
1, 1, 2, 6, 6, 6, 6, 6, 6, 6, 6}

Definition at line 800 of file Water97FluidProperties.h.

Referenced by temperature_from_ph2c().

const std::vector<int> Water97FluidProperties::_Iph3a
protected
Initial value:
{-12, -12, -12, -12, -12, -12, -12, -12, -10, -10, -10,
-8, -8, -8, -8, -5, -3, -2, -2, -2, -1, -1,
0, 0, 1, 3, 3, 4, 4, 10, 12}

Definition at line 1217 of file Water97FluidProperties.h.

Referenced by temperature_from_ph3a().

const std::vector<int> Water97FluidProperties::_Iph3b
protected
Initial value:
{-12, -12, -10, -10, -10, -10, -10, -8, -8, -8, -8,
-8, -6, -6, -6, -4, -4, -3, -2, -2, -1, -1,
-1, -1, -1, -1, 0, 0, 1, 3, 5, 6, 8}

Definition at line 1235 of file Water97FluidProperties.h.

Referenced by temperature_from_ph3b().

const std::vector<int> Water97FluidProperties::_J02 {0, 1, -5, -4, -3, -2, -1, 2, 3}
protected

Definition at line 746 of file Water97FluidProperties.h.

Referenced by d2gamma2_dtau2(), dgamma2_dtau(), and gamma2().

const std::vector<int> Water97FluidProperties::_J05 {0, 1, -3, -2, -1, 2}
protected

Constants for region 5.

Definition at line 1243 of file Water97FluidProperties.h.

Referenced by d2gamma5_dtau2(), dgamma5_dtau(), and gamma5().

const std::vector<int> Water97FluidProperties::_J1
protected
Initial value:
{-2, -1, 0, 1, 2, 3, 4, 5, -9, -7, -1, 0,
1, 3, -3, 0, 1, 3, 17, -4, 0, 6, -5, -2,
10, -8, -11, -6, -29, -31, -38, -39, -40, -41}

Definition at line 706 of file Water97FluidProperties.h.

Referenced by d2gamma1_dpi2(), d2gamma1_dpitau(), d2gamma1_dtau2(), dgamma1_dpi(), dgamma1_dtau(), and gamma1().

const std::vector<int> Water97FluidProperties::_J2
protected
Initial value:
{0, 1, 2, 3, 6, 1, 2, 4, 7, 36, 0, 1, 3, 6, 35,
1, 2, 3, 7, 3, 16, 35, 0, 11, 25, 8, 36, 13, 4, 10,
14, 29, 50, 57, 20, 35, 48, 21, 53, 39, 26, 40, 58}

Definition at line 752 of file Water97FluidProperties.h.

Referenced by d2gamma2_dpi2(), d2gamma2_dpitau(), d2gamma2_dtau2(), dgamma2_dpi(), dgamma2_dtau(), and gamma2().

const std::vector<int> Water97FluidProperties::_J3
protected
Initial value:
{0, 0, 1, 2, 7, 10, 12, 23, 2, 6, 15, 17, 0, 2,
6, 7, 22, 26, 0, 2, 4, 16, 26, 0, 2, 4, 26, 1,
3, 26, 0, 2, 26, 2, 26, 2, 26, 0, 1, 26}

Definition at line 822 of file Water97FluidProperties.h.

Referenced by d2phi3_ddelta2(), d2phi3_ddeltatau(), d2phi3_dtau2(), dphi3_ddelta(), dphi3_dtau(), and phi3().

const std::vector<std::vector<int> > Water97FluidProperties::_J3s
protected

Definition at line 1156 of file Water97FluidProperties.h.

Referenced by densityRegion3(), and subregionVolume().

const std::vector<int> Water97FluidProperties::_J5 {1, 2, 3, 3, 9, 7}
protected
const std::vector<int> Water97FluidProperties::_Jph1
protected
Initial value:
{0, 1, 2, 6, 22, 32, 0, 1, 2, 3,
4, 10, 32, 10, 32, 10, 32, 32, 32, 32}

Definition at line 719 of file Water97FluidProperties.h.

Referenced by temperature_from_ph1().

const std::vector<int> Water97FluidProperties::_Jph2a
protected
Initial value:
{0, 1, 2, 3, 7, 20, 0, 1, 2, 3, 7, 9, 11, 18, 44, 0, 2,
7, 36, 38, 40, 42, 44, 24, 44, 12, 32, 44, 32, 36, 42, 34, 44, 28}

Definition at line 770 of file Water97FluidProperties.h.

Referenced by temperature_from_ph2a().

const std::vector<int> Water97FluidProperties::_Jph2b
protected
Initial value:
{0, 1, 2, 12, 18, 24, 28, 40, 0, 2, 6, 12, 18,
24, 28, 40, 2, 8, 18, 40, 1, 2, 12, 24, 2, 12,
18, 24, 28, 40, 18, 24, 40, 28, 2, 28, 1, 40}

Definition at line 788 of file Water97FluidProperties.h.

Referenced by temperature_from_ph2b().

const std::vector<int> Water97FluidProperties::_Jph2c
protected
Initial value:
{0, 4, 0, 2, 0, 2, 0, 1, 0, 2, 0, 1,
4, 8, 4, 0, 1, 4, 10, 12, 16, 20, 22}

Definition at line 803 of file Water97FluidProperties.h.

Referenced by temperature_from_ph2c().

const std::vector<int> Water97FluidProperties::_Jph3a
protected
Initial value:
{0, 1, 2, 6, 14, 16, 20, 22, 1, 5, 12, 0, 2, 4, 10, 2,
0, 1, 3, 4, 0, 2, 0, 1, 1, 0, 1, 0, 3, 4, 5}

Definition at line 1221 of file Water97FluidProperties.h.

Referenced by temperature_from_ph3a().

const std::vector<int> Water97FluidProperties::_Jph3b
protected
Initial value:
{0, 1, 0, 1, 5, 10, 12, 0, 1, 2, 4, 10, 0, 1, 2, 0, 1,
5, 0, 4, 2, 4, 6, 10, 14, 16, 0, 2, 1, 1, 1, 1, 1}

Definition at line 1239 of file Water97FluidProperties.h.

Referenced by temperature_from_ph3b().

const Real Water97FluidProperties::_Mh2o
protected

Water molar mass (kg/mol)

Definition at line 669 of file Water97FluidProperties.h.

Referenced by molarMass().

const std::vector<Real> Water97FluidProperties::_n02
protected
Initial value:
{-0.96927686500217e1,
0.10086655968018e2,
-0.56087911283020e-2,
0.71452738081455e-1,
-0.40710498223928e0,
0.14240819171444e1,
-0.43839511319450e1,
-0.28408632460772e0,
0.21268463753307e-1}

Constants for region 2.

Definition at line 723 of file Water97FluidProperties.h.

Referenced by d2gamma2_dtau2(), dgamma2_dtau(), and gamma2().

const std::vector<Real> Water97FluidProperties::_n05
protected
Initial value:
{-0.13179983674201e2,
0.68540841634434e1,
-0.24805148933466e-1,
0.36901534980333,
-0.31161318213925e1,
-0.32961626538917}

Definition at line 1244 of file Water97FluidProperties.h.

Referenced by d2gamma5_dtau2(), dgamma5_dtau(), and gamma5().

const std::vector<Real> Water97FluidProperties::_n1
protected
Initial value:
{
0.14632971213167e0, -0.84548187169114e0, -0.37563603672040e1, 0.33855169168385e1,
-0.95791963387872e0, 0.15772038513228e0, -0.16616417199501e-1, 0.81214629983568e-3,
0.28319080123804e-3, -0.60706301565874e-3, -0.18990068218419e-1, -0.32529748770505e-1,
-0.21841717175414e-1, -0.52838357969930e-4, -0.47184321073267e-3, -0.30001780793026e-3,
0.47661393906987e-4, -0.44141845330846e-5, -0.72694996297594e-15, -0.31679644845054e-4,
-0.28270797985312e-5, -0.85205128120103e-9, -0.22425281908000e-5, -0.65171222895601e-6,
-0.14341729937924e-12, -0.40516996860117e-6, -0.12734301741641e-8, -0.17424871230634e-9,
-0.68762131295531e-18, 0.14478307828521e-19, 0.26335781662795e-22, -0.11947622640071e-22,
0.18228094581404e-23, -0.93537087292458e-25}

Reference constants used in to calculate thermophysical properties of water.

Taken from Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam and from Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and SteamConstants for region 1

Definition at line 692 of file Water97FluidProperties.h.

Referenced by d2gamma1_dpi2(), d2gamma1_dpitau(), d2gamma1_dtau2(), dgamma1_dpi(), dgamma1_dtau(), and gamma1().

const std::vector<Real> Water97FluidProperties::_n2
protected
Initial value:
{
-0.17731742473213e-2, -0.17834862292358e-1, -0.45996013696365e-1, -0.57581259083432e-1,
-0.50325278727930e-1, -0.33032641670203e-4, -0.18948987516315e-3, -0.39392777243355e-2,
-0.43797295650573e-1, -0.26674547914087e-4, 0.20481737692309e-7, 0.43870667284435e-6,
-0.32277677238570e-4, -0.15033924542148e-2, -0.40668253562649e-1, -0.78847309559367e-9,
0.12790717852285e-7, 0.48225372718507e-6, 0.22922076337661e-5, -0.16714766451061e-10,
-0.21171472321355e-2, -0.23895741934104e2, -0.59059564324270e-17, -0.12621808899101e-5,
-0.38946842435739e-1, 0.11256211360459e-10, -0.82311340897998e1, 0.19809712802088e-7,
0.10406965210174e-18, -0.10234747095929e-12, -0.10018179379511e-8, -0.80882908646985e-10,
0.10693031879409e0, -0.33662250574171e0, 0.89185845355421e-24, 0.30629316876232e-12,
-0.42002467698208e-5, -0.59056029685639e-25, 0.37826947613457e-5, -0.12768608934681e-14,
0.73087610595061e-28, 0.55414715350778e-16, -0.94369707241210e-6}

Definition at line 733 of file Water97FluidProperties.h.

Referenced by d2gamma2_dpi2(), d2gamma2_dpitau(), d2gamma2_dtau2(), dgamma2_dpi(), dgamma2_dtau(), and gamma2().

const std::vector<Real> Water97FluidProperties::_n3
protected
Initial value:
{
0.10658070028513e1, -0.15732845290239e2, 0.20944396974307e2, -0.76867707878716e1,
0.26185947787954e1, -0.28080781148620e1, 0.12053369696517e1, -0.84566812812502e-2,
-0.12654315477714e1, -0.11524407806681e1, 0.88521043984318e0, -0.64207765181607e0,
0.38493460186671e0, -0.85214708824206e0, 0.48972281541877e1, -0.30502617256965e1,
0.39420536879154e-1, 0.12558408424308e0, -0.27999329698710e0, 0.13899799569460e1,
-0.20189915023570e1, -0.82147637173963e-2, -0.47596035734923e0, 0.43984074473500e-1,
-0.44476435428739e0, 0.90572070719733e0, 0.70522450087967e0, 0.10770512626332e0,
-0.32913623258954e0, -0.50871062041158e0, -0.22175400873096e-1, 0.94260751665092e-1,
0.16436278447961e0, -0.13503372241348e-1, -0.14834345352472e-1, 0.57922953628084e-3,
0.32308904703711e-2, 0.80964802996215e-4, -0.16557679795037e-3, -0.44923899061815e-4}

Constants for region 3.

Definition at line 807 of file Water97FluidProperties.h.

Referenced by d2phi3_ddelta2(), d2phi3_ddeltatau(), d2phi3_dtau2(), dphi3_ddelta(), dphi3_dtau(), and phi3().

const std::vector<std::vector<Real> > Water97FluidProperties::_n3s
protected

Constants for all 26 subregions in region 3.

Definition at line 857 of file Water97FluidProperties.h.

Referenced by densityRegion3(), and subregionVolume().

const std::vector<Real> Water97FluidProperties::_n5
protected
Initial value:
{0.15736404855259e-2,
0.90153761673944e-3,
-0.50270077677648e-2,
0.22440037409485e-5,
-0.41163275453471e-5,
0.37919454822955e-7}

Definition at line 1253 of file Water97FluidProperties.h.

Referenced by d2gamma5_dpi2(), d2gamma5_dpitau(), d2gamma5_dtau2(), dgamma5_dpi(), dgamma5_dtau(), and gamma5().

const std::vector<Real> Water97FluidProperties::_nph1
protected
Initial value:
{
-0.23872489924521e3, 0.40421188637945e3, 0.11349746881718e3, -0.58457616048039e1,
-0.15285482413140e-3, -0.10866707695377e-5, -0.13391744872602e2, 0.43211039183559e2,
-0.54010067170506e2, 0.30535892203916e2, -0.65964749423638e1, 0.93965400878363e-2,
0.11573647505340e-6, -0.25858641282073e-4, -0.40644363084799e-8, 0.66456186191635e-7,
0.80670734103027e-10, -0.93477771213947e-12, 0.58265442020601e-14, -0.15020185953503e-16}

Definition at line 710 of file Water97FluidProperties.h.

Referenced by temperature_from_ph1().

const std::vector<Real> Water97FluidProperties::_nph2a
protected
Initial value:
{
0.10898952318288e4, 0.84951654495535e3, -0.10781748091826e3, 0.33153654801263e2,
-0.74232016790248e1, 0.11765048724356e2, 0.18445749355790e1, -0.41792700549624e1,
0.62478196935812e1, -0.17344563108114e2, -0.20058176862096e3, 0.27196065473796e3,
-0.45511318285818e3, 0.30919688604755e4, 0.25226640357872e6, -0.61707422868339e-2,
-0.31078046629583, 0.11670873077107e2, 0.12812798404046e9, -0.98554909623276e9,
0.28224546973002e10, -0.35948971410703e10, 0.17227349913197e10, -0.13551334240775e5,
0.12848734664650e8, 0.13865724283226e1, 0.23598832556514e6, -0.13105236545054e8,
0.73999835474766e4, -0.55196697030060e6, 0.37154085996233e7, 0.19127729239660e5,
-0.41535164835634e6, -0.62459855192507e2}

Definition at line 756 of file Water97FluidProperties.h.

Referenced by temperature_from_ph2a().

const std::vector<Real> Water97FluidProperties::_nph2b
protected
Initial value:
{
0.14895041079516e4, 0.74307798314034e3, -0.97708318797837e2, 0.24742464705674e1,
-0.63281320016026, 0.11385952129658e1, -0.47811863648625, 0.85208123431544e-2,
0.93747147377932, 0.33593118604916e1, 0.33809355601454e1, 0.16844539671904,
0.73875745236695, -0.47128737436186, 0.15020273139707, -0.21764114219750e-2,
-0.21810755324761e-1, -0.10829784403677, -0.46333324635812e-1, 0.71280351959551e-4,
0.11032831789999e-3, 0.18955248387902e-3, 0.30891541160537e-2, 0.13555504554949e-2,
0.28640237477456e-6, -0.10779857357512e-4, -0.76462712454814e-4, 0.14052392818316e-4,
-0.31083814331434e-4, -0.10302738212103e-5, 0.28217281635040e-6, 0.12704902271945e-5,
0.73803353468292e-7, -0.11030139238909e-7, -0.81456365207833e-13, -0.25180545682962e-10,
-0.17565233969407e-17, 0.86934156344163e-14}

Definition at line 773 of file Water97FluidProperties.h.

Referenced by temperature_from_ph2b().

const std::vector<Real> Water97FluidProperties::_nph2c
protected
Initial value:
{
-0.32368398555242e13, 0.73263350902181e13, 0.35825089945447e12, -0.58340131851590e12,
-0.10783068217470e11, 0.20825544563171e11, 0.61074783564516e6, 0.85977722535580e6,
-0.25745723604170e5, 0.31081088422714e5, 0.12082315865936e4, 0.48219755109255e3,
0.37966001272486e1, -0.10842984880077e2, -0.45364172676660e-1, 0.14559115658698e-12,
0.11261597407230e-11, -0.17804982240686e-10, 0.12324579690832e-6, -0.11606921130984e-5,
0.27846367088554e-4, -0.59270038474176e-3, 0.12918582991878e-2}

Definition at line 792 of file Water97FluidProperties.h.

Referenced by temperature_from_ph2c().

const std::vector<Real> Water97FluidProperties::_nph3a
protected
Initial value:
{
-0.133645667811215e-6, 0.455912656802978e-5, -0.146294640700979e-4, 0.639341312970080e-2,
0.372783927268847e3, -0.718654377460447e4, 0.573494752103400e6, -0.267569329111439e7,
-0.334066283302614e-4, -0.245479214069597e-1, 0.478087847764996e2, 0.764664131818904e-5,
0.128350627676972e-2, 0.171219081377331e-1, -0.851007304583213e1, -0.136513461629781e-1,
-0.384460997596657e-5, 0.337423807911655e-2, -0.551624873066791, 0.729202277107470,
-0.992522757376041e-2, -.119308831407288, .793929190615421, .454270731799386,
.20999859125991, -0.642109823904738e-2, -0.235155868604540e-1, 0.252233108341612e-2,
-0.764885133368119e-2, 0.136176427574291e-1, -0.133027883575669e-1}

Definition at line 1207 of file Water97FluidProperties.h.

Referenced by temperature_from_ph3a().

const std::vector<Real> Water97FluidProperties::_nph3b
protected
Initial value:
{
0.323254573644920e-4, -0.127575556587181e-3, -0.475851877356068e-3, 0.156183014181602e-2,
0.105724860113781, -0.858514221132534e2, 0.724140095480911e3, 0.296475810273257e-2,
-0.592721983365988e-2, -0.126305422818666e-1, -0.115716196364853, 0.849000969739595e2,
-0.108602260086615e-1, 0.154304475328851e-1, 0.750455441524466e-1, 0.252520973612982e-1,
-0.602507901232996e-1, -0.307622221350501e1, -0.574011959864879e-1, 0.503471360939849e1,
-0.925081888584834, 0.391733882917546e1, -0.773146007130190e2, 0.949308762098587e4,
-0.141043719679409e7, 0.849166230819026e7, 0.861095729446704, 0.323346442811720,
0.873281936020439, -0.436653048526683, 0.286596714529479, -0.131778331276228,
0.676682064330275e-2}

Definition at line 1224 of file Water97FluidProperties.h.

Referenced by temperature_from_ph3b().

const Real Water97FluidProperties::_p_critical
protected

Critical pressure (Pa)

Definition at line 673 of file Water97FluidProperties.h.

Referenced by criticalPressure(), tempXY(), and vaporTemperature().

const std::vector<Real> Water97FluidProperties::_p_star {16.53e6, 1.0e6, 1.0e6, 1.0e6, 1.0e6}
protected

Pressure scale for each region.

Definition at line 1263 of file Water97FluidProperties.h.

Referenced by c(), cp(), cv(), e(), e_dpT(), h(), h_dpT(), rho(), rho_dpT(), and s().

const Real Water97FluidProperties::_p_triple
protected

Triple point pressure (Pa)

Definition at line 679 of file Water97FluidProperties.h.

Referenced by triplePointPressure().

const std::vector<std::vector<Real> > Water97FluidProperties::_par3
protected
Initial value:
{{0.0024, 100.0, 760.0, 0.085, 0.817, 1.0, 1.0, 1.0},
{0.0041, 100.0, 860.0, 0.280, 0.779, 1.0, 1.0, 1.0},
{0.0022, 40.0, 690.0, 0.259, 0.903, 1.0, 1.0, 1.0},
{0.0029, 40.0, 690.0, 0.559, 0.939, 1.0, 1.0, 4.0},
{0.0032, 40.0, 710.0, 0.587, 0.918, 1.0, 1.0, 1.0},
{0.0064, 40.0, 730.0, 0.587, 0.891, 0.5, 1.0, 4.0},
{0.0027, 25.0, 660.0, 0.872, 0.971, 1.0, 1.0, 4.0},
{0.0032, 25.0, 660.0, 0.898, 0.983, 1.0, 1.0, 4.0},
{0.0041, 25.0, 660.0, 0.910, 0.984, 0.5, 1.0, 4.0},
{0.0054, 25.0, 670.0, 0.875, 0.964, 0.5, 1.0, 4.0},
{0.0077, 25.0, 680.0, 0.802, 0.935, 1.0, 1.0, 1.0},
{0.0026, 24.0, 650.0, 0.908, 0.989, 1.0, 1.0, 4.0},
{0.0028, 23.0, 650.0, 1.000, 0.997, 1.0, 0.25, 1.0},
{0.0031, 23.0, 650.0, 0.976, 0.997, 0.0, 0.0, 0.0},
{0.0034, 23.0, 650.0, 0.974, 0.996, 0.5, 1.0, 1.0},
{0.0041, 23.0, 650.0, 0.972, 0.997, 0.5, 1.0, 1.0},
{0.0022, 23.0, 650.0, 0.848, 0.983, 1.0, 1.0, 4.0},
{0.0054, 23.0, 650.0, 0.874, 0.982, 1.0, 1.0, 1.0},
{0.0022, 21.0, 640.0, 0.886, 0.990, 1.0, 1.0, 4.0},
{0.0088, 20.0, 650.0, 0.803, 1.020, 1.0, 1.0, 1.0},
{0.0026, 23.0, 650.0, 0.902, 0.988, 1.0, 1.0, 1.0},
{0.0031, 23.0, 650.0, 0.960, 0.995, 1.0, 1.0, 1.0},
{0.0039, 23.0, 650.0, 0.959, 0.995, 1.0, 1.0, 4.0},
{0.0049, 23.0, 650.0, 0.910, 0.988, 1.0, 1.0, 1.0},
{0.0031, 22.0, 650.0, 0.996, 0.994, 1.0, 1.0, 4.0},
{0.0038, 22.0, 650.0, 0.993, 0.994, 1.0, 1.0, 4.0}}

Definition at line 826 of file Water97FluidProperties.h.

Referenced by densityRegion3().

const std::vector<unsigned int> Water97FluidProperties::_par3N
protected
Initial value:
{30, 32, 35, 38, 29, 42, 38, 29, 42, 29, 34, 43, 40,
39, 24, 27, 24, 27, 29, 33, 38, 39, 35, 36, 20, 23}

Definition at line 853 of file Water97FluidProperties.h.

Referenced by densityRegion3().

const Real SinglePhaseFluidPropertiesPT::_R
protectedinherited
const Real Water97FluidProperties::_rho_critical
protected

Critical density (kg/m^3)

Definition at line 677 of file Water97FluidProperties.h.

Referenced by c(), cp(), criticalDensity(), cv(), e(), e_dpT(), h(), h_dpT(), mu_drhoT_from_rho_T(), mu_from_rho_T(), rho_dpT(), and s().

const Real Water97FluidProperties::_Rw
protected

Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K)

Definition at line 671 of file Water97FluidProperties.h.

Referenced by c(), cp(), cv(), e(), e_dpT(), h(), h_dpT(), rho(), rho_dpT(), and s().

const Real SinglePhaseFluidPropertiesPT::_T_c2k
protectedinherited
const Real Water97FluidProperties::_T_critical
protected

Critical temperature (K)

Definition at line 675 of file Water97FluidProperties.h.

Referenced by criticalTemperature(), mu_drhoT_from_rho_T(), mu_from_rho_T(), tempXY(), vaporPressure(), and vaporPressure_dT().

const std::vector<Real> Water97FluidProperties::_T_star {1386.0, 540.0, _T_critical, 1.0, 1000.0}
protected

Temperature scale for each region.

Definition at line 1261 of file Water97FluidProperties.h.

Referenced by c(), cp(), cv(), e(), e_dpT(), h(), h_dpT(), rho(), rho_dpT(), and s().

const Real Water97FluidProperties::_T_triple
protected

Triple point temperature (K)

Definition at line 681 of file Water97FluidProperties.h.

Referenced by triplePointTemperature().


The documentation for this class was generated from the following files: