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
 Molar mass [kg/mol]. More...
 
virtual Real criticalPressure () const override
 Critical pressure. More...
 
virtual Real criticalTemperature () const override
 Critical temperature. More...
 
virtual Real criticalDensity () const override
 Critical density. More...
 
virtual Real triplePointPressure () const override
 Triple point pressure. More...
 
virtual Real triplePointTemperature () const override
 Triple point temperature. More...
 
virtual Real rho_from_p_T (Real pressure, Real temperature) const override
 Density from pressure and temperature. More...
 
virtual void rho_from_p_T (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const override
 Density and its derivatives from pressure and temperature. More...
 
virtual Real e_from_p_T (Real pressure, Real temperature) const override
 Internal energy from pressure and temperature. More...
 
virtual void e_from_p_T (Real pressure, Real temperature, Real &e, Real &de_dp, Real &de_dT) const override
 Internal energy and its derivatives from 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_from_p_T (Real pressure, Real temperature) const override
 Speed of sound. More...
 
virtual Real cp_from_p_T (Real pressure, Real temperature) const override
 Isobaric specific heat capacity. More...
 
virtual Real cv_from_p_T (Real pressure, Real temperature) const override
 Isochoric specific heat. More...
 
virtual Real mu_from_p_T (Real pressure, Real temperature) const override
 
virtual void mu_from_p_T (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
 Dynamic viscosity as a function of density and temperature. More...
 
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 void rho_mu (Real pressure, Real temperature, Real &rho, Real &mu) const override
 Density and viscosity. More...
 
virtual void rho_mu_dpT (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &mu, Real &dmu_dp, Real &dmu_dT) const override
 Density and viscosity and their derivatives wrt pressure and temperature. More...
 
virtual Real k_from_p_T (Real pressure, Real temperature) const override
 Thermal conductivity. More...
 
virtual void k_from_p_T (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_from_p_T (Real pressure, Real temperature) const override
 Specific entropy from pressure and temperature. More...
 
virtual void s_from_p_T (Real p, Real T, Real &s, Real &ds_dp, Real &ds_dT) const override
 Specific entropy and its derivatives from pressure and temperature. More...
 
virtual Real h_from_p_T (Real pressure, Real temperature) const override
 Specific enthalpy from pressure and temperature. More...
 
virtual void h_from_p_T (Real pressure, Real temperature, Real &h, Real &dh_dp, Real &dh_dT) const override
 Specific enthalpy and its derivatives from pressure and temperature. More...
 
virtual Real vaporPressure (Real temperature) const override
 Vapor pressure. More...
 
virtual void vaporPressure_dT (Real temperature, Real &psat, Real &dpsat_dT) const override
 Vapor pressure. 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 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 p_from_v_e (Real v, Real e) const
 Pressure from specific volume and specific internal energy. More...
 
virtual void p_from_v_e (Real v, Real e, Real &p, Real &dp_dv, Real &dp_de) const
 Pressure and its derivatives from specific volume and specific internal energy. More...
 
virtual Real T_from_v_e (Real v, Real e) const
 Temperature from specific volume and specific internal energy. More...
 
virtual void T_from_v_e (Real v, Real e, Real &T, Real &dT_dv, Real &dT_de) const
 Temperature and its derivatives from specific volume and specific internal energy. More...
 
virtual Real c_from_v_e (Real v, Real e) const
 Sound speed from specific volume and specific internal energy. More...
 
virtual void c_from_v_e (Real v, Real e, Real &c, Real &dc_dv, Real &dc_de) const
 Sound speed and its derivatives from specific volume and specific internal energy. More...
 
virtual Real cp_from_v_e (Real v, Real e) const
 Isobaric (constant-pressure) specific heat from specific volume and specific internal energy. More...
 
virtual Real cv_from_v_e (Real v, Real e) const
 Isochoric (constant-volume) specific heat from specific volume and specific internal energy. More...
 
virtual Real mu_from_v_e (Real v, Real e) const
 Dynamic viscosity from specific volume and specific internal energy. More...
 
virtual Real k_from_v_e (Real v, Real e) const
 Thermal conductivity from specific volume and specific internal energy. More...
 
virtual Real s_from_v_e (Real v, Real e) const
 Specific entropy from specific volume and specific internal energy. More...
 
virtual void s_from_v_e (Real v, Real e, Real &s, Real &ds_dv, Real &ds_de) const
 Specific entropy and its derivatives from specific volume and specific internal energy. More...
 
virtual Real s (Real pressure, Real temperature) const
 
virtual Real s_from_h_p (Real h, Real p) const
 Specific entropy from specific enthalpy and pressure. More...
 
virtual void s_from_h_p (Real h, Real p, Real &s, Real &ds_dh, Real &ds_dp) const
 Specific entropy and its derivatives from specific enthalpy and pressure. More...
 
virtual Real rho_from_p_s (Real p, Real s) const
 Density from pressure and specific entropy. More...
 
virtual void rho_from_p_s (Real p, Real s, Real &rho, Real &drho_dp, Real &drho_ds) const
 Density and its derivatives from pressure and specific entropy. More...
 
virtual Real e_from_v_h (Real v, Real h) const
 Specific internal energy as a function of specific volume and specific enthalpy. More...
 
virtual void e_from_v_h (Real v, Real h, Real &e, Real &de_dv, Real &de_dh) const
 Specific internal energy and derivatives as a function of specific volume and specific enthalpy. More...
 
virtual Real rho (Real p, Real T) const
 
virtual void rho_dpT (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const
 
virtual Real v_from_p_T (Real p, Real T) const
 Specific volume from pressure and temperature. More...
 
virtual void v_from_p_T (Real p, Real T, Real &v, Real &dv_dp, Real &dv_dT) const
 Specific volume and its derivatives from pressure and temperature. More...
 
virtual Real e_from_p_rho (Real p, Real rho) const
 Specific internal energy from pressure and density. More...
 
virtual void e_from_p_rho (Real p, Real rho, Real &e, Real &de_dp, Real &de_drho) const
 Specific internal energy and its derivatives from pressure and density. More...
 
virtual Real e_spndl_from_v (Real v) const
 Specific internal energy from temperature and specific volume. More...
 
virtual void v_e_spndl_from_T (Real T, Real &v, Real &e) const
 Specific internal energy from temperature and specific volume. More...
 
virtual Real e_from_T_v (Real T, Real v) const
 Specific volume and specific internal energy from temerature at the vapor spinodal. More...
 
virtual void e_from_T_v (Real T, Real v, Real &e, Real &de_dT, Real &de_dv) const
 Specific internal energy and its derivatives from temperature and specific volume. More...
 
virtual Real p_from_T_v (Real T, Real v) const
 Pressure from temperature and specific volume. More...
 
virtual void p_from_T_v (Real T, Real v, Real &p, Real &dp_dT, Real &dp_dv) const
 Pressure and its derivatives from temperature and specific volume. More...
 
virtual Real h_from_T_v (Real T, Real v) const
 Specific enthalpy from temperature and specific volume. More...
 
virtual void h_from_T_v (Real T, Real v, Real &h, Real &dh_dT, Real &dh_dv) const
 Specific enthalpy and its derivatives from temperature and specific volume. More...
 
virtual Real s_from_T_v (Real T, Real v) const
 Specific entropy from temperature and specific volume. More...
 
virtual void s_from_T_v (Real T, Real v, Real &s, Real &ds_dT, Real &ds_dv) const
 Specific entropy and its derivatives from temperature and specific volume. More...
 
virtual Real cv_from_T_v (Real T, Real v) const
 Specific isochoric heat capacity from temperature and specific volume. More...
 
virtual Real h (Real p, Real T) const
 
virtual void h_dpT (Real pressure, Real temperature, Real &h, Real &dh_dp, Real &dh_dT) const
 
virtual Real e (Real pressure, Real temperature) const
 
virtual void e_dpT (Real pressure, Real temperature, Real &e, Real &de_dp, Real &de_dT) const
 
virtual Real p_from_h_s (Real h, Real s) const
 Pressure from specific enthalpy and specific entropy. More...
 
virtual void p_from_h_s (Real h, Real s, Real &p, Real &dp_dh, Real &dp_ds) const
 Pressure and its derivatives from specific enthalpy and specific entropy. More...
 
virtual Real g_from_v_e (Real v, Real e) const
 Gibbs free energy from specific volume and specific internal energy. More...
 
virtual Real beta_from_p_T (Real p, Real T) const
 Thermal expansion coefficient from pressure and temperature. More...
 
virtual Real beta (Real pressure, Real temperature) const
 
virtual Real pp_sat_from_p_T (Real p, Real T) const
 Partial pressure at saturation in a gas mixture. More...
 
virtual Real T_from_p_h (Real pressure, Real enthalpy) const
 Temperature from pressure and specific enthalpy. More...
 
virtual Real criticalInternalEnergy () const
 Critical specific internal energy. More...
 
virtual Real c (Real pressure, Real temperature) const
 
virtual Real gamma_from_p_T (Real pressure, Real temperature) const
 Adiabatic index - ratio of specific heats. More...
 
virtual Real mu (Real pressure, Real temperature) const
 Dynamic viscosity. More...
 
virtual void mu_dpT (Real pressure, Real temperature, Real &mu, Real &dmu_dp, Real &dmu_dT) const
 Dynamic viscosity and its derivatives wrt pressure and temperature. More...
 
virtual Real k (Real pressure, Real temperature) const
 
virtual void k_dpT (Real pressure, Real temperature, Real &k, Real &dk_dp, Real &dk_dT) const
 
virtual Real henryConstant (Real temperature) const
 Henry's law constant for dissolution in water. More...
 
virtual void henryConstant_dT (Real temperature, Real &Kh, Real &dKh_dT) const
 Henry's law constant for dissolution in water and derivative wrt temperature. More...
 
virtual void execute () final
 
virtual void initialize () final
 
virtual void finalize () final
 
virtual void threadJoin (const UserObject &) final
 
virtual void subdomainSetup () 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::array< Real, 34 > _n1
 Reference constants used in to calculate thermophysical properties of water. More...
 
const std::array< int, 34 > _I1
 
const std::array< int, 34 > _J1
 
const std::array< Real, 20 > _nph1
 
const std::array< int, 20 > _Iph1 {{0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6}}
 
const std::array< int, 20 > _Jph1
 
const std::array< Real, 9 > _n02
 Constants for region 2. More...
 
const std::array< Real, 43 > _n2
 
const std::array< int, 9 > _J02 {{0, 1, -5, -4, -3, -2, -1, 2, 3}}
 
const std::array< int, 43 > _I2
 
const std::array< int, 43 > _J2
 
const std::array< Real, 36 > _nph2a
 
const std::array< int, 36 > _Iph2a
 
const std::array< int, 36 > _Jph2a
 
const std::array< Real, 38 > _nph2b
 
const std::array< int, 38 > _Iph2b
 
const std::array< int, 38 > _Jph2b
 
const std::array< Real, 23 > _nph2c
 
const std::array< int, 23 > _Iph2c
 
const std::array< int, 23 > _Jph2c
 
const std::array< Real, 5 > _n23
 Constants for the boundary between regions 2 and 3. More...
 
const std::array< Real, 40 > _n3
 Constants for region 3. More...
 
const std::array< int, 40 > _I3
 
const std::array< int, 40 > _J3
 
const std::array< std::array< Real, 8 >, 26 > _par3
 
const std::array< unsigned int, 26 > _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::array< Real, 31 > _nph3a
 
const std::array< int, 31 > _Iph3a
 
const std::array< int, 31 > _Jph3a
 
const std::array< Real, 33 > _nph3b
 
const std::array< int, 33 > _Iph3b
 
const std::array< int, 33 > _Jph3b
 
const std::array< Real, 10 > _n4
 Constants for region 4 (the saturation curve up to the critical point) More...
 
const std::array< int, 6 > _J05 {{0, 1, -3, -2, -1, 2}}
 Constants for region 5. More...
 
const std::array< Real, 6 > _n05
 
const std::array< int, 6 > _I5 {{1, 1, 1, 2, 2, 3}}
 
const std::array< int, 6 > _J5 {{1, 2, 3, 3, 9, 7}}
 
const std::array< Real, 6 > _n5
 
const std::vector< std::vector< int > > _tempXY_I
 Constnats for the tempXY() method. More...
 
const std::vector< std::vector< Real > > _tempXY_n
 
const std::array< int, 21 > _mu_I {{0, 1, 2, 3, 0, 1, 2, 3, 5, 0, 1, 2, 3, 4, 0, 1, 0, 3, 4, 3, 5}}
 Constants from Release on the IAPWS Formulation 2008 for the Viscosity of Ordinary Water Substance. More...
 
const std::array< int, 21 > _mu_J {{0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6}}
 
const std::array< Real, 4 > _mu_H0 {{1.67752, 2.20462, 0.6366564, -0.241605}}
 
const std::array< Real, 21 > _mu_H1
 
std::array< Real, 4 > _k_a {{0.0102811, 0.0299621, 0.0156146, -0.00422464}}
 Constants for thermal conductivity. More...
 
const std::array< Real, 5 > _T_star {{1386.0, 540.0, _T_critical, 1.0, 1000.0}}
 Temperature scale for each region. More...
 
const std::array< Real, 5 > _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 Celsius 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 40 of file Water97FluidProperties.h.

Member Enumeration Documentation

◆ subregionEnum

Constructor & Destructor Documentation

◆ Water97FluidProperties()

Water97FluidProperties::Water97FluidProperties ( const InputParameters &  parameters)

Definition at line 26 of file Water97FluidProperties.C.

27  : SinglePhaseFluidProperties(parameters),
28  _Mh2o(18.015e-3),
29  _Rw(461.526),
30  _p_critical(22.064e6),
31  _T_critical(647.096),
32  _rho_critical(322.0),
33  _p_triple(611.657),
34  _T_triple(273.16)
35 {
36 }
const Real _T_critical
Critical temperature (K)
const Real _p_critical
Critical pressure (Pa)
SinglePhaseFluidProperties(const InputParameters &parameters)
const Real _T_triple
Triple point temperature (K)
const Real _rho_critical
Critical density (kg/m^3)
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

◆ ~Water97FluidProperties()

Water97FluidProperties::~Water97FluidProperties ( )
virtual

Definition at line 38 of file Water97FluidProperties.C.

38 {}

Member Function Documentation

◆ b23p()

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 874 of file Water97FluidProperties.C.

Referenced by b3ab(), and inRegion().

875 {
876  // Check whether the input temperature is within the region of validity of this equation.
877  // Valid for 623.15 K <= t <= 863.15 K
878  if (temperature < 623.15 || temperature > 863.15)
879  throw MooseException(name() +
880  ": b23p(): Temperature is outside range of 623.15 K <= T <= 863.15 K");
881 
882  return (_n23[0] + _n23[1] * temperature + _n23[2] * temperature * temperature) * 1.e6;
883 }
const std::array< Real, 5 > _n23
Constants for the boundary between regions 2 and 3.
const std::string temperature
Definition: NS.h:27
const std::string name
Definition: Setup.h:22

◆ b23T()

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 886 of file Water97FluidProperties.C.

Referenced by inRegionPH().

887 {
888  // Check whether the input pressure is within the region of validity of this equation.
889  // Valid for 16.529 MPa <= p <= 100 MPa
890  if (pressure < 16.529e6 || pressure > 100.0e6)
891  throw MooseException(name() + ": b23T(): Pressure is outside range 16.529 MPa <= p <= 100 MPa");
892 
893  return _n23[3] + std::sqrt((pressure / 1.e6 - _n23[4]) / _n23[2]);
894 }
const std::array< Real, 5 > _n23
Constants for the boundary between regions 2 and 3.
const std::string name
Definition: Setup.h:22
const std::string pressure
Definition: NS.h:26

◆ b2bc()

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 1657 of file Water97FluidProperties.C.

Referenced by subregion2ph().

1658 {
1659  // Check whether the input pressure is within the region of validity of this equation.
1660  if (pressure < 6.5467e6 || pressure > 100.0e6)
1661  throw MooseException(name() +
1662  ": b2bc(): Pressure is outside range of 6.5467 MPa <= p <= 100 MPa");
1663 
1664  Real pi = pressure / 1.0e6;
1665 
1666  return (0.26526571908428e4 + std::sqrt((pi - 0.45257578905948e1) / 0.12809002730136e-3)) * 1.0e3;
1667 }
const std::string name
Definition: Setup.h:22
const std::string pressure
Definition: NS.h:26
virtual Real e(Real pressure, Real temperature) const

◆ b3ab()

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 1773 of file Water97FluidProperties.C.

Referenced by subregion3ph().

1774 {
1775  // Check whether the input pressure is within the region of validity of this equation.
1776  if (pressure < b23p(623.15) || pressure > 100.0e6)
1777  throw MooseException(name() +
1778  ": b3ab(): Pressure is outside range of 16.529 MPa <= p <= 100 MPa");
1779 
1780  Real pi = pressure / 1.0e6;
1781  Real eta = 0.201464004206875e4 + 0.374696550136983e1 * pi - 0.219921901054187e-1 * pi * pi +
1782  0.87513168600995e-4 * pi * pi * pi;
1783 
1784  return eta * 1.0e3;
1785 }
const std::string name
Definition: Setup.h:22
Real b23p(Real temperature) const
Auxillary equation for the boundary between regions 2 and 3.
const std::string pressure
Definition: NS.h:26

◆ beta()

Real SinglePhaseFluidProperties::beta ( Real  pressure,
Real  temperature 
) const
virtualinherited

Definition at line 256 of file SinglePhaseFluidProperties.C.

Referenced by vaporTemperature().

257 {
259 }
virtual Real beta_from_p_T(Real p, Real T) const
Thermal expansion coefficient from pressure and temperature.
const std::string temperature
Definition: NS.h:27
const std::string pressure
Definition: NS.h:26

◆ beta_from_p_T()

Real SinglePhaseFluidProperties::beta_from_p_T ( Real  p,
Real  T 
) const
virtualinherited

Thermal expansion coefficient from pressure and temperature.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
Returns
beta (1/K)

Reimplemented in SimpleFluidProperties.

Definition at line 171 of file SinglePhaseFluidProperties.C.

Referenced by SinglePhaseFluidProperties::beta().

172 {
173  // The volumetric thermal expansion coefficient is defined as
174  // 1/v dv/dT)_p
175  // It is the fractional change rate of volume with respect to temperature change
176  // at constant pressure. Here it is coded as
177  // - 1/rho drho/dT)_p
178  // using chain rule with v = v(rho)
179 
180  Real rho, drho_dp, drho_dT;
181  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
182  return -drho_dT / rho;
183 }
virtual Real rho(Real p, Real T) const
virtual Real rho_from_p_T(Real p, Real T) const
Density from pressure and temperature.

◆ c()

Real SinglePhaseFluidProperties::c ( Real  pressure,
Real  temperature 
) const
virtualinherited

Definition at line 391 of file SinglePhaseFluidProperties.C.

Referenced by IdealGasFluidProperties::c_from_v_e(), StiffenedGasFluidProperties::c_from_v_e(), densityRegion3(), subregionVolume(), vaporPressure(), and vaporPressure_dT().

392 {
394 }
virtual Real c_from_p_T(Real pressure, Real temperature) const
Speed of sound.
const std::string temperature
Definition: NS.h:27
const std::string pressure
Definition: NS.h:26

◆ c_from_p_T()

Real Water97FluidProperties::c_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Speed of sound.

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 325 of file Water97FluidProperties.C.

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

◆ c_from_v_e() [1/2]

Real SinglePhaseFluidProperties::c_from_v_e ( Real  v,
Real  e 
) const
virtualinherited

Sound speed from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 50 of file SinglePhaseFluidProperties.C.

Referenced by FluidPropertiesMaterial::computeQpProperties(), and NSMachAux::computeValue().

51 {
52  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
53 }
const std::string name
Definition: Setup.h:22

◆ c_from_v_e() [2/2]

void SinglePhaseFluidProperties::c_from_v_e ( Real  v,
Real  e,
Real &  c,
Real &  dc_dv,
Real &  dc_de 
) const
virtualinherited

Sound speed and its derivatives from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy
[out]dc_dvderivative of sound speed w.r.t. specific volume
[out]dc_dederivative of sound speed w.r.t. specific internal energy

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 56 of file SinglePhaseFluidProperties.C.

57 {
58  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
59 }
const std::string name
Definition: Setup.h:22

◆ cp_from_p_T()

Real Water97FluidProperties::cp_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Isobaric specific heat capacity.

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 383 of file Water97FluidProperties.C.

384 {
385  Real specific_heat, pi, tau, delta;
386 
387  // Determine which region the point is in
388  unsigned int region = inRegion(pressure, temperature);
389  switch (region)
390  {
391  case 1:
392  pi = pressure / _p_star[0];
393  tau = _T_star[0] / temperature;
394  specific_heat = -_Rw * tau * tau * d2gamma1_dtau2(pi, tau);
395  break;
396 
397  case 2:
398  pi = pressure / _p_star[1];
399  tau = _T_star[1] / temperature;
400  specific_heat = -_Rw * tau * tau * d2gamma2_dtau2(pi, tau);
401  break;
402 
403  case 3:
404  {
405  // Calculate density first, then use that in Helmholtz free energy
406  Real density3 = densityRegion3(pressure, temperature);
407  delta = density3 / _rho_critical;
408  tau = _T_star[2] / temperature;
409  specific_heat =
410  _Rw *
411  (-tau * tau * d2phi3_dtau2(delta, tau) +
412  (delta * dphi3_ddelta(delta, tau) - delta * tau * d2phi3_ddeltatau(delta, tau)) *
413  (delta * dphi3_ddelta(delta, tau) - delta * tau * d2phi3_ddeltatau(delta, tau)) /
414  (2.0 * delta * dphi3_ddelta(delta, tau) +
415  delta * delta * d2phi3_ddelta2(delta, tau)));
416  break;
417  }
418 
419  case 5:
420  pi = pressure / _p_star[4];
421  tau = _T_star[4] / temperature;
422  specific_heat = -_Rw * tau * tau * d2gamma5_dtau2(pi, tau);
423  break;
424 
425  default:
426  mooseError(name(), ": inRegion() has given an incorrect region");
427  }
428  return specific_heat;
429 }
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.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
const std::string temperature
Definition: NS.h:27
const std::array< Real, 5 > _p_star
Pressure scale for each region.
const std::array< Real, 5 > _T_star
Temperature scale for each region.
const std::string name
Definition: Setup.h:22
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.
const Real _rho_critical
Critical density (kg/m^3)
Real dphi3_ddelta(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt delta.
const std::string pressure
Definition: NS.h:26
Real d2gamma1_dtau2(Real pi, Real tau) const
Second 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) ...
Real d2gamma2_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt tau.
Real d2gamma5_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt tau.

◆ cp_from_v_e()

Real SinglePhaseFluidProperties::cp_from_v_e ( Real  v,
Real  e 
) const
virtualinherited

Isobaric (constant-pressure) specific heat from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 61 of file SinglePhaseFluidProperties.C.

Referenced by FluidPropertiesMaterial::computeQpProperties(), and GeneralVaporMixtureFluidProperties::cp_from_p_T().

62 {
63  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
64 }
const std::string name
Definition: Setup.h:22

◆ criticalDensity()

Real Water97FluidProperties::criticalDensity ( ) const
overridevirtual

Critical density.

Returns
critical density (kg/m^3)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 65 of file Water97FluidProperties.C.

66 {
67  return _rho_critical;
68 }
const Real _rho_critical
Critical density (kg/m^3)

◆ criticalInternalEnergy()

Real SinglePhaseFluidProperties::criticalInternalEnergy ( ) const
virtualinherited

Critical specific internal energy.

Returns
specific internal energy (J/kg)

Reimplemented in StiffenedGasFluidProperties.

Definition at line 232 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::p_T_from_v_e().

233 {
234  mooseError(name(), ": criticalInternalEnergy() is not implemented");
235 }
const std::string name
Definition: Setup.h:22

◆ criticalPressure()

Real Water97FluidProperties::criticalPressure ( ) const
overridevirtual

Critical pressure.

Returns
critical pressure (Pa)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 53 of file Water97FluidProperties.C.

54 {
55  return _p_critical;
56 }
const Real _p_critical
Critical pressure (Pa)

◆ criticalTemperature()

Real Water97FluidProperties::criticalTemperature ( ) const
overridevirtual

Critical temperature.

Returns
critical temperature (K)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 59 of file Water97FluidProperties.C.

60 {
61  return _T_critical;
62 }
const Real _T_critical
Critical temperature (K)

◆ cv_from_p_T()

Real Water97FluidProperties::cv_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Isochoric specific heat.

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 432 of file Water97FluidProperties.C.

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

◆ cv_from_T_v()

Real SinglePhaseFluidProperties::cv_from_T_v ( Real  T,
Real  v 
) const
virtualinherited

Specific isochoric heat capacity from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 568 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::cv_from_p_T(), and IdealRealGasMixtureFluidProperties::cv_from_T_v().

569 {
570  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
571 }
const std::string name
Definition: Setup.h:22

◆ cv_from_v_e()

Real SinglePhaseFluidProperties::cv_from_v_e ( Real  v,
Real  e 
) const
virtualinherited

Isochoric (constant-volume) specific heat from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 66 of file SinglePhaseFluidProperties.C.

Referenced by FluidPropertiesMaterial::computeQpProperties(), and GeneralVaporMixtureFluidProperties::cv_from_p_T().

67 {
68  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
69 }
const std::string name
Definition: Setup.h:22

◆ d2gamma1_dpi2()

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 964 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cv_from_p_T(), e_from_p_T(), and rho_from_p_T().

965 {
966  Real sum = 0.0;
967  for (std::size_t i = 0; i < _n1.size(); ++i)
968  sum += _n1[i] * _I1[i] * (_I1[i] - 1) * MathUtils::pow(7.1 - pi, _I1[i] - 2) *
969  MathUtils::pow(tau - 1.222, _J1[i]);
970 
971  return sum;
972 }
const std::array< int, 34 > _J1
const std::array< Real, 34 > _n1
Reference constants used in to calculate thermophysical properties of water.
const std::array< int, 34 > _I1
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ d2gamma1_dpitau()

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 997 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cv_from_p_T(), e_from_p_T(), h_from_p_T(), and rho_from_p_T().

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

◆ d2gamma1_dtau2()

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 986 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cp_from_p_T(), cv_from_p_T(), e_from_p_T(), and h_from_p_T().

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

◆ d2gamma2_dpi2()

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 1040 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cv_from_p_T(), e_from_p_T(), and rho_from_p_T().

1041 {
1042  // Ideal gas part of the Gibbs free energy
1043  Real dg0 = -1.0 / pi / pi;
1044 
1045  // Residual part of the Gibbs free energy
1046  Real dgr = 0.0;
1047  for (std::size_t i = 0; i < _n2.size(); ++i)
1048  dgr += _n2[i] * _I2[i] * (_I2[i] - 1) * MathUtils::pow(pi, _I2[i] - 2) *
1049  MathUtils::pow(tau - 0.5, _J2[i]);
1050 
1051  return dg0 + dgr;
1052 }
const std::array< Real, 43 > _n2
const std::array< int, 43 > _J2
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< int, 43 > _I2

◆ d2gamma2_dpitau()

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 1088 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cv_from_p_T(), e_from_p_T(), h_from_p_T(), and rho_from_p_T().

1089 {
1090  // Ideal gas part of the Gibbs free energy
1091  Real dg0 = 0.0;
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] * _I2[i] * _J2[i] * MathUtils::pow(pi, _I2[i] - 1) *
1097  MathUtils::pow(tau - 0.5, _J2[i] - 1);
1098 
1099  return dg0 + dgr;
1100 }
const std::array< Real, 43 > _n2
const std::array< int, 43 > _J2
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< int, 43 > _I2

◆ d2gamma2_dtau2()

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 1071 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cp_from_p_T(), cv_from_p_T(), e_from_p_T(), and h_from_p_T().

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

◆ d2gamma5_dpi2()

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 1198 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cv_from_p_T(), e_from_p_T(), and rho_from_p_T().

1199 {
1200  // Ideal gas part of the Gibbs free energy
1201  Real dg0 = -1.0 / pi / pi;
1202 
1203  // Residual part of the Gibbs free energy
1204  Real dgr = 0.0;
1205  for (std::size_t i = 0; i < _n5.size(); ++i)
1206  dgr += _n5[i] * _I5[i] * (_I5[i] - 1) * MathUtils::pow(pi, _I5[i] - 2) *
1207  MathUtils::pow(tau, _J5[i]);
1208 
1209  return dg0 + dgr;
1210 }
const std::array< int, 6 > _I5
const std::array< int, 6 > _J5
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 6 > _n5

◆ d2gamma5_dpitau()

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 1246 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cv_from_p_T(), e_from_p_T(), h_from_p_T(), and rho_from_p_T().

1247 {
1248  // Ideal gas part of the Gibbs free energy
1249  Real dg0 = 0.0;
1250 
1251  // Residual part of the Gibbs free energy
1252  Real dgr = 0.0;
1253  for (std::size_t i = 0; i < _n5.size(); ++i)
1254  dgr +=
1255  _n5[i] * _I5[i] * _J5[i] * MathUtils::pow(pi, _I5[i] - 1) * MathUtils::pow(tau, _J5[i] - 1);
1256 
1257  return dg0 + dgr;
1258 }
const std::array< int, 6 > _I5
const std::array< int, 6 > _J5
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 6 > _n5

◆ d2gamma5_dtau2()

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 1229 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cp_from_p_T(), cv_from_p_T(), e_from_p_T(), and h_from_p_T().

1230 {
1231  // Ideal gas part of the Gibbs free energy
1232  Real dg0 = 0.0;
1233  for (std::size_t i = 0; i < _n05.size(); ++i)
1234  dg0 += _n05[i] * _J05[i] * (_J05[i] - 1) * MathUtils::pow(tau, _J05[i] - 2);
1235 
1236  // Residual part of the Gibbs free energy
1237  Real dgr = 0.0;
1238  for (std::size_t i = 0; i < _n5.size(); ++i)
1239  dgr += _n5[i] * _J5[i] * (_J5[i] - 1) * MathUtils::pow(pi, _I5[i]) *
1240  MathUtils::pow(tau, _J5[i] - 2);
1241 
1242  return dg0 + dgr;
1243 }
const std::array< int, 6 > _I5
const std::array< int, 6 > _J5
const std::array< int, 6 > _J05
Constants for region 5.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 6 > _n5
const std::array< Real, 6 > _n05

◆ d2phi3_ddelta2()

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 1123 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cp_from_p_T(), e_from_p_T(), h_from_p_T(), and rho_from_p_T().

1124 {
1125  Real sum = 0.0;
1126  for (std::size_t i = 1; i < _n3.size(); ++i)
1127  sum += _n3[i] * _I3[i] * (_I3[i] - 1) * MathUtils::pow(delta, _I3[i] - 2) *
1128  MathUtils::pow(tau, _J3[i]);
1129 
1130  return -_n3[0] / delta / delta + sum;
1131 }
const std::array< int, 40 > _J3
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< int, 40 > _I3
const std::array< Real, 40 > _n3
Constants for region 3.

◆ d2phi3_ddeltatau()

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 1155 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cp_from_p_T(), e_from_p_T(), h_from_p_T(), and rho_from_p_T().

1156 {
1157  Real sum = 0.0;
1158  for (std::size_t i = 1; i < _n3.size(); ++i)
1159  sum += _n3[i] * _I3[i] * _J3[i] * MathUtils::pow(delta, _I3[i] - 1) *
1160  MathUtils::pow(tau, _J3[i] - 1);
1161 
1162  return sum;
1163 }
const std::array< int, 40 > _J3
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< int, 40 > _I3
const std::array< Real, 40 > _n3
Constants for region 3.

◆ d2phi3_dtau2()

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 1144 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cp_from_p_T(), cv_from_p_T(), e_from_p_T(), and h_from_p_T().

1145 {
1146  Real sum = 0.0;
1147  for (std::size_t i = 1; i < _n3.size(); ++i)
1148  sum += _n3[i] * _J3[i] * (_J3[i] - 1) * MathUtils::pow(delta, _I3[i]) *
1149  MathUtils::pow(tau, _J3[i] - 2);
1150 
1151  return sum;
1152 }
const std::array< int, 40 > _J3
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< int, 40 > _I3
const std::array< Real, 40 > _n3
Constants for region 3.

◆ densityRegion3()

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 1524 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cp_from_p_T(), cv_from_p_T(), e_from_p_T(), h_from_p_T(), rho_from_p_T(), and s_from_p_T().

1525 {
1526  // Region 3 is subdivided into 26 subregions, each with a given backwards equation
1527  // to directly calculate density from pressure and temperature without the need for
1528  // expensive iterations. Find the subregion id that the point is in:
1529  unsigned int sid = subregion3(pressure, temperature);
1530 
1531  Real vstar, pi, theta, a, b, c, d, e;
1532  unsigned int N;
1533 
1534  vstar = _par3[sid][0];
1535  pi = pressure / _par3[sid][1] / 1.0e6;
1536  theta = temperature / _par3[sid][2];
1537  a = _par3[sid][3];
1538  b = _par3[sid][4];
1539  c = _par3[sid][5];
1540  d = _par3[sid][6];
1541  e = _par3[sid][7];
1542  N = _par3N[sid];
1543 
1544  Real sum = 0.0;
1545  Real volume = 0.0;
1546 
1547  // Note that subregion 13 is the only different formulation
1548  if (sid == 13)
1549  {
1550  for (std::size_t i = 0; i < N; ++i)
1551  sum += _n3s[sid][i] * MathUtils::pow(pi - a, _I3s[sid][i]) *
1552  MathUtils::pow(theta - b, _J3s[sid][i]);
1553 
1554  volume = vstar * std::exp(sum);
1555  }
1556  else
1557  volume = vstar * subregionVolume(pi, theta, a, b, c, d, e, sid);
1558 
1559  // Density is the inverse of volume
1560  return 1.0 / volume;
1561 }
const std::array< std::array< Real, 8 >, 26 > _par3
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:27
const std::vector< std::vector< int > > _I3s
virtual Real c(Real pressure, Real temperature) const
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).
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:26
const std::vector< std::vector< int > > _J3s
virtual Real e(Real pressure, Real temperature) const
const std::array< unsigned int, 26 > _par3N

◆ dgamma1_dpi()

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 953 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cv_from_p_T(), e_from_p_T(), and rho_from_p_T().

954 {
955  Real sum = 0.0;
956  for (std::size_t i = 0; i < _n1.size(); ++i)
957  sum += -_n1[i] * _I1[i] * MathUtils::pow(7.1 - pi, _I1[i] - 1) *
958  MathUtils::pow(tau - 1.222, _J1[i]);
959 
960  return sum;
961 }
const std::array< int, 34 > _J1
const std::array< Real, 34 > _n1
Reference constants used in to calculate thermophysical properties of water.
const std::array< int, 34 > _I1
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ dgamma1_dtau()

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 975 of file Water97FluidProperties.C.

Referenced by e_from_p_T(), h_from_p_T(), and s_from_p_T().

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

◆ dgamma2_dpi()

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 1026 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cv_from_p_T(), e_from_p_T(), and rho_from_p_T().

1027 {
1028  // Ideal gas part of the Gibbs free energy
1029  Real dg0 = 1.0 / pi;
1030 
1031  // Residual part of the Gibbs free energy
1032  Real dgr = 0.0;
1033  for (std::size_t i = 0; i < _n2.size(); ++i)
1034  dgr += _n2[i] * _I2[i] * MathUtils::pow(pi, _I2[i] - 1) * MathUtils::pow(tau - 0.5, _J2[i]);
1035 
1036  return dg0 + dgr;
1037 }
const std::array< Real, 43 > _n2
const std::array< int, 43 > _J2
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< int, 43 > _I2

◆ dgamma2_dtau()

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 1055 of file Water97FluidProperties.C.

Referenced by e_from_p_T(), h_from_p_T(), and s_from_p_T().

1056 {
1057  // Ideal gas part of the Gibbs free energy
1058  Real dg0 = 0.0;
1059  for (std::size_t i = 0; i < _n02.size(); ++i)
1060  dg0 += _n02[i] * _J02[i] * MathUtils::pow(tau, _J02[i] - 1);
1061 
1062  // Residual part of the Gibbs free energy
1063  Real dgr = 0.0;
1064  for (std::size_t i = 0; i < _n2.size(); ++i)
1065  dgr += _n2[i] * _J2[i] * MathUtils::pow(pi, _I2[i]) * MathUtils::pow(tau - 0.5, _J2[i] - 1);
1066 
1067  return dg0 + dgr;
1068 }
const std::array< Real, 43 > _n2
const std::array< int, 9 > _J02
const std::array< int, 43 > _J2
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 9 > _n02
Constants for region 2.
const std::array< int, 43 > _I2

◆ dgamma5_dpi()

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 1184 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cv_from_p_T(), e_from_p_T(), and rho_from_p_T().

1185 {
1186  // Ideal gas part of the Gibbs free energy
1187  Real dg0 = 1.0 / pi;
1188 
1189  // Residual part of the Gibbs free energy
1190  Real dgr = 0.0;
1191  for (std::size_t i = 0; i < _n5.size(); ++i)
1192  dgr += _n5[i] * _I5[i] * MathUtils::pow(pi, _I5[i] - 1) * MathUtils::pow(tau, _J5[i]);
1193 
1194  return dg0 + dgr;
1195 }
const std::array< int, 6 > _I5
const std::array< int, 6 > _J5
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 6 > _n5

◆ dgamma5_dtau()

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 1213 of file Water97FluidProperties.C.

Referenced by e_from_p_T(), h_from_p_T(), and s_from_p_T().

1214 {
1215  // Ideal gas part of the Gibbs free energy
1216  Real dg0 = 0.0;
1217  for (std::size_t i = 0; i < _n05.size(); ++i)
1218  dg0 += _n05[i] * _J05[i] * MathUtils::pow(tau, _J05[i] - 1);
1219 
1220  // Residual part of the Gibbs free energy
1221  Real dgr = 0.0;
1222  for (std::size_t i = 0; i < _n5.size(); ++i)
1223  dgr += _n5[i] * _J5[i] * MathUtils::pow(pi, _I5[i]) * MathUtils::pow(tau, _J5[i] - 1);
1224 
1225  return dg0 + dgr;
1226 }
const std::array< int, 6 > _I5
const std::array< int, 6 > _J5
const std::array< int, 6 > _J05
Constants for region 5.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 6 > _n5
const std::array< Real, 6 > _n05

◆ dphi3_ddelta()

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 1113 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cp_from_p_T(), e_from_p_T(), h_from_p_T(), and rho_from_p_T().

1114 {
1115  Real sum = 0.0;
1116  for (std::size_t i = 1; i < _n3.size(); ++i)
1117  sum += _n3[i] * _I3[i] * MathUtils::pow(delta, _I3[i] - 1) * MathUtils::pow(tau, _J3[i]);
1118 
1119  return _n3[0] / delta + sum;
1120 }
const std::array< int, 40 > _J3
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< int, 40 > _I3
const std::array< Real, 40 > _n3
Constants for region 3.

◆ dphi3_dtau()

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 1134 of file Water97FluidProperties.C.

Referenced by e_from_p_T(), h_from_p_T(), and s_from_p_T().

1135 {
1136  Real sum = 0.0;
1137  for (std::size_t i = 1; i < _n3.size(); ++i)
1138  sum += _n3[i] * _J3[i] * MathUtils::pow(delta, _I3[i]) * MathUtils::pow(tau, _J3[i] - 1);
1139 
1140  return sum;
1141 }
const std::array< int, 40 > _J3
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< int, 40 > _I3
const std::array< Real, 40 > _n3
Constants for region 3.

◆ e()

Real SinglePhaseFluidProperties::e ( Real  pressure,
Real  temperature 
) const
virtualinherited

Definition at line 366 of file SinglePhaseFluidProperties.C.

Referenced by b2bc(), IdealGasFluidProperties::c_from_v_e(), StiffenedGasFluidProperties::c_from_v_e(), NaClFluidProperties::cp_from_p_T(), densityRegion3(), SinglePhaseFluidProperties::e_dpT(), StiffenedGasFluidProperties::e_from_p_rho(), IdealGasFluidProperties::e_from_p_rho(), HelmholtzFluidProperties::e_from_p_T(), IdealGasFluidPropertiesPT::e_from_p_T(), e_from_p_T(), IdealGasFluidProperties::e_from_p_T(), NaClFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::e_from_p_T(), SimpleFluidProperties::e_from_p_T(), TabulatedFluidProperties::e_from_p_T(), SinglePhaseFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::e_from_T_v(), IdealGasFluidProperties::e_from_T_v(), IdealGasFluidProperties::e_from_v_h(), StiffenedGasFluidProperties::e_from_v_h(), IdealGasFluidProperties::g_from_v_e(), StiffenedGasFluidProperties::g_from_v_e(), IdealGasFluidProperties::h_from_p_T(), NaClFluidProperties::h_from_p_T(), NitrogenFluidProperties::mu_drhoT_from_rho_T(), HydrogenFluidProperties::mu_drhoT_from_rho_T(), CO2FluidProperties::mu_drhoT_from_rho_T(), StiffenedGasFluidProperties::p_from_T_v(), IdealGasFluidProperties::p_from_v_e(), StiffenedGasFluidProperties::p_from_v_e(), HelmholtzFluidProperties::rho_e_dpT(), IdealGasFluidPropertiesPT::rho_e_dpT(), rho_e_dpT(), NaClFluidProperties::rho_e_dpT(), SimpleFluidProperties::rho_e_dpT(), TabulatedFluidProperties::rho_e_dpT(), StiffenedGasFluidProperties::s_from_T_v(), IdealGasFluidProperties::s_from_v_e(), StiffenedGasFluidProperties::s_from_v_e(), subregion3(), subregionVolume(), SinglePhaseFluidProperties::T_from_p_h(), StiffenedGasFluidProperties::T_from_v_e(), IdealGasFluidProperties::T_from_v_e(), StiffenedGasFluidProperties::v_e_spndl_from_T(), and vaporTemperature().

367 {
368  return e_from_p_T(p, T);
369 }
virtual Real e_from_p_T(Real p, Real T) const
Internal energy from pressure and temperature.

◆ e_dpT()

void SinglePhaseFluidProperties::e_dpT ( Real  pressure,
Real  temperature,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
virtualinherited

Definition at line 372 of file SinglePhaseFluidProperties.C.

374 {
375  e_from_p_T(pressure, temperature, e, de_dp, de_dT);
376 }
const std::string temperature
Definition: NS.h:27
virtual Real e_from_p_T(Real p, Real T) const
Internal energy from pressure and temperature.
const std::string pressure
Definition: NS.h:26
virtual Real e(Real pressure, Real temperature) const

◆ e_from_p_rho() [1/2]

Real SinglePhaseFluidProperties::e_from_p_rho ( Real  p,
Real  rho 
) const
virtualinherited

Specific internal energy from pressure and density.

Parameters
[in]ppressure
[in]rhodensity

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 502 of file SinglePhaseFluidProperties.C.

Referenced by StagnationTemperatureAux::computeValue(), InternalEnergyAux::computeValue(), and SinglePhaseFluidProperties::e_from_p_T().

503 {
504  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
505 }
const std::string name
Definition: Setup.h:22

◆ e_from_p_rho() [2/2]

void SinglePhaseFluidProperties::e_from_p_rho ( Real  p,
Real  rho,
Real &  e,
Real &  de_dp,
Real &  de_drho 
) const
virtualinherited

Specific internal energy and its derivatives from pressure and density.

Parameters
[in]ppressure
[in]rhodensity
[out]especific internal energy
[out]de_dpderivative of specific internal energy w.r.t. pressure
[out]de_drhoderivative of specific internal energy w.r.t. density

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 508 of file SinglePhaseFluidProperties.C.

509 {
510  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
511 }
const std::string name
Definition: Setup.h:22

◆ e_from_p_T() [1/2]

Real Water97FluidProperties::e_from_p_T ( Real  p,
Real  T 
) const
overridevirtual

Internal energy from pressure and temperature.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
Returns
internal energy (J/kg)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 188 of file Water97FluidProperties.C.

Referenced by e_from_p_T(), and rho_e_dpT().

189 {
190  Real internal_energy, pi, tau;
191 
192  // Determine which region the point is in
193  unsigned int region = inRegion(pressure, temperature);
194  switch (region)
195  {
196  case 1:
197  pi = pressure / _p_star[0];
198  tau = _T_star[0] / temperature;
200  _Rw * temperature * (tau * dgamma1_dtau(pi, tau) - pi * dgamma1_dpi(pi, tau));
201  break;
202 
203  case 2:
204  pi = pressure / _p_star[1];
205  tau = _T_star[1] / temperature;
207  _Rw * temperature * (tau * dgamma2_dtau(pi, tau) - pi * dgamma2_dpi(pi, tau));
208  break;
209 
210  case 3:
211  {
212  // Calculate density first, then use that in Helmholtz free energy
213  Real density3 = densityRegion3(pressure, temperature);
214  Real delta = density3 / _rho_critical;
215  tau = _T_star[2] / temperature;
216  internal_energy = _Rw * temperature * tau * dphi3_dtau(delta, tau);
217  break;
218  }
219 
220  case 5:
221  pi = pressure / _p_star[4];
222  tau = _T_star[4] / temperature;
224  _Rw * temperature * (tau * dgamma5_dtau(pi, tau) - pi * dgamma5_dpi(pi, tau));
225  break;
226 
227  default:
228  mooseError(name(), ": inRegion() has given an incorrect region");
229  }
230  // Output in J/kg
231  return internal_energy;
232 }
Real dgamma5_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt tau.
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 dgamma5_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt pi.
Real dgamma2_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt pi.
Real dgamma2_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt tau.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
const std::string temperature
Definition: NS.h:27
const std::array< Real, 5 > _p_star
Pressure scale for each region.
const std::array< Real, 5 > _T_star
Temperature scale for each region.
const std::string name
Definition: Setup.h:22
Real dgamma1_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt pi.
const Real _rho_critical
Critical density (kg/m^3)
Real dgamma1_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt tau.
const std::string pressure
Definition: NS.h:26
const std::string internal_energy
Definition: NS.h:30
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...

◆ e_from_p_T() [2/2]

void Water97FluidProperties::e_from_p_T ( Real  p,
Real  T,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
overridevirtual

Internal energy and its derivatives from pressure and temperature.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
[out]einternal energy (J/kg)
[out]de_dpderivative of internal energy w.r.t. pressure
[out]de_dTderivative of internal energy w.r.t. temperature

Reimplemented from SinglePhaseFluidProperties.

Definition at line 235 of file Water97FluidProperties.C.

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

◆ e_from_T_v() [1/2]

Real SinglePhaseFluidProperties::e_from_T_v ( Real  T,
Real  v 
) const
virtualinherited

Specific volume and specific internal energy from temerature at the vapor spinodal.

Parameters
[in]Ttemerature

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 513 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::e_from_T_v(), IdealRealGasMixtureFluidProperties::k_from_p_T(), IdealRealGasMixtureFluidProperties::k_from_T_v(), IdealRealGasMixtureFluidProperties::mu_from_p_T(), and IdealRealGasMixtureFluidProperties::mu_from_T_v().

514 {
515  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
516 }
const std::string name
Definition: Setup.h:22

◆ e_from_T_v() [2/2]

void SinglePhaseFluidProperties::e_from_T_v ( Real  T,
Real  v,
Real &  e,
Real &  de_dT,
Real &  de_dv 
) const
virtualinherited

Specific internal energy and its derivatives from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[out]especific internal energy (J/kg)
[out]de_dTderivative of specific internal energy w.r.t. temperature
[out]de_dvderivative of specific internal energy w.r.t. specific volume

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 530 of file SinglePhaseFluidProperties.C.

531 {
532  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
533 }
const std::string name
Definition: Setup.h:22

◆ e_from_v_h() [1/2]

Real SinglePhaseFluidProperties::e_from_v_h ( Real  v,
Real  h 
) const
virtualinherited

Specific internal energy as a function of specific volume and specific enthalpy.

Parameters
[in]vspecific volume
[in]hspecific enthalpy

Reimplemented in StiffenedGasFluidProperties, and IdealGasFluidProperties.

Definition at line 114 of file SinglePhaseFluidProperties.C.

Referenced by SinglePhaseFluidProperties::T_from_p_h().

115 {
116  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
117 }
const std::string name
Definition: Setup.h:22

◆ e_from_v_h() [2/2]

void SinglePhaseFluidProperties::e_from_v_h ( Real  v,
Real  h,
Real &  e,
Real &  de_dv,
Real &  de_dh 
) const
virtualinherited

Specific internal energy and derivatives as a function of specific volume and specific enthalpy.

Parameters
[in]vspecific volume
[in]hspecific enthalpy
[out]de_dvderivative of specific internal energy w.r.t. specific volume
[out]de_dhderivative of specific internal energy w.r.t. specific enthalpy

Reimplemented in StiffenedGasFluidProperties, and IdealGasFluidProperties.

Definition at line 120 of file SinglePhaseFluidProperties.C.

121 {
122  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
123 }
const std::string name
Definition: Setup.h:22

◆ e_spndl_from_v()

Real SinglePhaseFluidProperties::e_spndl_from_v ( Real  v) const
virtualinherited

Specific internal energy from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume

Reimplemented in StiffenedGasFluidProperties.

Definition at line 518 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::p_T_from_v_e().

519 {
520  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
521 }
const std::string name
Definition: Setup.h:22

◆ execute()

virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Definition at line 27 of file FluidProperties.h.

27 {}

◆ finalize()

virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Definition at line 29 of file FluidProperties.h.

29 {}

◆ fluidName()

std::string Water97FluidProperties::fluidName ( ) const
overridevirtual

Fluid name.

Returns
string representing fluid name

Reimplemented from SinglePhaseFluidProperties.

Definition at line 41 of file Water97FluidProperties.C.

42 {
43  return "water";
44 }

◆ g_from_v_e()

Real SinglePhaseFluidProperties::g_from_v_e ( Real  v,
Real  e 
) const
virtualinherited

Gibbs free energy from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy

Reimplemented in StiffenedGasFluidProperties, and IdealGasFluidProperties.

Definition at line 595 of file SinglePhaseFluidProperties.C.

Referenced by FluidPropertiesMaterial::computeQpProperties().

596 {
597  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
598 }
const std::string name
Definition: Setup.h:22

◆ gamma1()

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 943 of file Water97FluidProperties.C.

Referenced by s_from_p_T().

944 {
945  Real sum = 0.0;
946  for (std::size_t i = 0; i < _n1.size(); ++i)
947  sum += _n1[i] * MathUtils::pow(7.1 - pi, _I1[i]) * MathUtils::pow(tau - 1.222, _J1[i]);
948 
949  return sum;
950 }
const std::array< int, 34 > _J1
const std::array< Real, 34 > _n1
Reference constants used in to calculate thermophysical properties of water.
const std::array< int, 34 > _I1
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ gamma2()

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 1008 of file Water97FluidProperties.C.

Referenced by s_from_p_T().

1009 {
1010  // Ideal gas part of the Gibbs free energy
1011  Real sum0 = 0.0;
1012  for (std::size_t i = 0; i < _n02.size(); ++i)
1013  sum0 += _n02[i] * MathUtils::pow(tau, _J02[i]);
1014 
1015  Real g0 = std::log(pi) + sum0;
1016 
1017  // Residual part of the Gibbs free energy
1018  Real gr = 0.0;
1019  for (std::size_t i = 0; i < _n2.size(); ++i)
1020  gr += _n2[i] * MathUtils::pow(pi, _I2[i]) * MathUtils::pow(tau - 0.5, _J2[i]);
1021 
1022  return g0 + gr;
1023 }
const std::array< Real, 43 > _n2
const std::array< int, 9 > _J02
const std::array< int, 43 > _J2
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 9 > _n02
Constants for region 2.
const std::array< int, 43 > _I2

◆ gamma5()

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 1166 of file Water97FluidProperties.C.

Referenced by s_from_p_T().

1167 {
1168  // Ideal gas part of the Gibbs free energy
1169  Real sum0 = 0.0;
1170  for (std::size_t i = 0; i < _n05.size(); ++i)
1171  sum0 += _n05[i] * MathUtils::pow(tau, _J05[i]);
1172 
1173  Real g0 = std::log(pi) + sum0;
1174 
1175  // Residual part of the Gibbs free energy
1176  Real gr = 0.0;
1177  for (std::size_t i = 0; i < _n5.size(); ++i)
1178  gr += _n5[i] * MathUtils::pow(pi, _I5[i]) * MathUtils::pow(tau, _J5[i]);
1179 
1180  return g0 + gr;
1181 }
const std::array< int, 6 > _I5
const std::array< int, 6 > _J5
const std::array< int, 6 > _J05
Constants for region 5.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 6 > _n5
const std::array< Real, 6 > _n05

◆ gamma_from_p_T()

Real SinglePhaseFluidProperties::gamma_from_p_T ( Real  pressure,
Real  temperature 
) const
virtualinherited

Adiabatic index - ratio of specific heats.

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

Definition at line 250 of file SinglePhaseFluidProperties.C.

251 {
253 }
virtual Real cv_from_p_T(Real pressure, Real temperature) const
Isochoric specific heat.
const std::string temperature
Definition: NS.h:27
virtual Real cp_from_p_T(Real pressure, Real temperature) const
Isobaric specific heat capacity.
const std::string pressure
Definition: NS.h:26

◆ h()

Real SinglePhaseFluidProperties::h ( Real  p,
Real  T 
) const
virtualinherited

◆ h_dpT()

void SinglePhaseFluidProperties::h_dpT ( Real  pressure,
Real  temperature,
Real &  h,
Real &  dh_dp,
Real &  dh_dT 
) const
virtualinherited

Definition at line 480 of file SinglePhaseFluidProperties.C.

481 {
482  h_from_p_T(p, T, h, dh_dp, dh_dT);
483 }
virtual Real h(Real p, Real T) const
virtual Real h_from_p_T(Real p, Real T) const
Specific enthalpy from pressure and temperature.

◆ h_from_p_T() [1/2]

Real Water97FluidProperties::h_from_p_T ( Real  p,
Real  T 
) const
overridevirtual

Specific enthalpy from pressure and temperature.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
Returns
h (J/kg)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 695 of file Water97FluidProperties.C.

Referenced by inRegionPH().

696 {
697  Real enthalpy, pi, tau, delta;
698 
699  // Determine which region the point is in
700  unsigned int region = inRegion(pressure, temperature);
701  switch (region)
702  {
703  case 1:
704  pi = pressure / _p_star[0];
705  tau = _T_star[0] / temperature;
706  enthalpy = _Rw * _T_star[0] * dgamma1_dtau(pi, tau);
707  break;
708 
709  case 2:
710  pi = pressure / _p_star[1];
711  tau = _T_star[1] / temperature;
712  enthalpy = _Rw * _T_star[1] * dgamma2_dtau(pi, tau);
713  break;
714 
715  case 3:
716  {
717  // Calculate density first, then use that in Helmholtz free energy
718  Real density3 = densityRegion3(pressure, temperature);
719  delta = density3 / _rho_critical;
720  tau = _T_star[2] / temperature;
721  enthalpy =
722  _Rw * temperature * (tau * dphi3_dtau(delta, tau) + delta * dphi3_ddelta(delta, tau));
723  break;
724  }
725 
726  case 5:
727  pi = pressure / _p_star[4];
728  tau = _T_star[4] / temperature;
729  enthalpy = _Rw * _T_star[4] * dgamma5_dtau(pi, tau);
730  break;
731 
732  default:
733  mooseError("Water97FluidProperties::inRegion has given an incorrect region");
734  }
735  return enthalpy;
736 }
Real dgamma5_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt tau.
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.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
const std::string temperature
Definition: NS.h:27
const std::string enthalpy
Definition: NS.h:28
const std::array< Real, 5 > _p_star
Pressure scale for each region.
const std::array< Real, 5 > _T_star
Temperature scale for each region.
const Real _rho_critical
Critical density (kg/m^3)
Real dgamma1_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt tau.
Real dphi3_ddelta(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt delta.
const std::string pressure
Definition: NS.h:26
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...

◆ h_from_p_T() [2/2]

void Water97FluidProperties::h_from_p_T ( Real  p,
Real  T,
Real &  h,
Real &  dh_dp,
Real &  dh_dT 
) const
overridevirtual

Specific enthalpy and its derivatives from pressure and temperature.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
[out]hspecific enthalpy (J/kg)
[out]dh_dpderivative of specific enthalpy w.r.t. pressure
[out]dh_dTderivative of specific enthalpy w.r.t. temperature

Reimplemented from SinglePhaseFluidProperties.

Definition at line 739 of file Water97FluidProperties.C.

741 {
742  Real enthalpy, pi, tau, delta, denthalpy_dp, denthalpy_dT;
743 
744  // Determine which region the point is in
745  unsigned int region = inRegion(pressure, temperature);
746  switch (region)
747  {
748  case 1:
749  pi = pressure / _p_star[0];
750  tau = _T_star[0] / temperature;
751  enthalpy = _Rw * _T_star[0] * dgamma1_dtau(pi, tau);
752  denthalpy_dp = _Rw * _T_star[0] * d2gamma1_dpitau(pi, tau) / _p_star[0];
753  denthalpy_dT = -_Rw * tau * tau * d2gamma1_dtau2(pi, tau);
754  break;
755 
756  case 2:
757  pi = pressure / _p_star[1];
758  tau = _T_star[1] / temperature;
759  enthalpy = _Rw * _T_star[1] * dgamma2_dtau(pi, tau);
760  denthalpy_dp = _Rw * _T_star[1] * d2gamma2_dpitau(pi, tau) / _p_star[1];
761  denthalpy_dT = -_Rw * tau * tau * d2gamma2_dtau2(pi, tau);
762  break;
763 
764  case 3:
765  {
766  // Calculate density first, then use that in Helmholtz free energy
767  Real density3 = densityRegion3(pressure, temperature);
768  delta = density3 / _rho_critical;
769  tau = _T_star[2] / temperature;
770  Real dpdd = dphi3_ddelta(delta, tau);
771  Real d2pddt = d2phi3_ddeltatau(delta, tau);
772  Real d2pdd2 = d2phi3_ddelta2(delta, tau);
773  enthalpy = _Rw * temperature * (tau * dphi3_dtau(delta, tau) + delta * dpdd);
774  denthalpy_dp = (d2pddt + dpdd + delta * d2pdd2) / _rho_critical /
775  (2.0 * delta * dpdd + delta * delta * d2pdd2);
776  denthalpy_dT = _Rw * delta * dpdd * (1.0 - tau * d2pddt / dpdd) *
777  (1.0 - tau * d2pddt / dpdd) / (2.0 + delta * d2pdd2 / dpdd) -
778  _Rw * tau * tau * d2phi3_dtau2(delta, tau);
779  break;
780  }
781 
782  case 5:
783  pi = pressure / _p_star[4];
784  tau = _T_star[4] / temperature;
785  enthalpy = _Rw * _T_star[4] * dgamma5_dtau(pi, tau);
786  denthalpy_dp = _Rw * _T_star[4] * d2gamma5_dpitau(pi, tau) / _p_star[4];
787  denthalpy_dT = -_Rw * tau * tau * d2gamma5_dtau2(pi, tau);
788  break;
789 
790  default:
791  mooseError("Water97FluidProperties::inRegion has given an incorrect region");
792  }
793  h = enthalpy;
794  dh_dp = denthalpy_dp;
795  dh_dT = denthalpy_dT;
796 }
Real dgamma5_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt tau.
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 d2phi3_ddeltatau(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt delta and tau.
Real dgamma2_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt tau.
virtual Real h(Real p, Real T) const
Real d2gamma1_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt pi and tau.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
const std::string temperature
Definition: NS.h:27
const std::string enthalpy
Definition: NS.h:28
const std::array< Real, 5 > _p_star
Pressure scale for each region.
const std::array< Real, 5 > _T_star
Temperature scale for each region.
Real d2gamma5_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt pi and tau.
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 d2gamma2_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt pi and tau.
const Real _rho_critical
Critical density (kg/m^3)
Real dgamma1_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt tau.
Real dphi3_ddelta(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt delta.
const std::string pressure
Definition: NS.h:26
Real d2gamma1_dtau2(Real pi, Real tau) const
Second 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) ...
Real d2gamma2_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt tau.
Real d2gamma5_dtau2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt tau.

◆ h_from_T_v() [1/2]

Real SinglePhaseFluidProperties::h_from_T_v ( Real  T,
Real  v 
) const
virtualinherited

Specific enthalpy from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 546 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::cp_from_p_T(), and IdealRealGasMixtureFluidProperties::cp_from_T_v().

547 {
548  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
549 }
const std::string name
Definition: Setup.h:22

◆ h_from_T_v() [2/2]

void SinglePhaseFluidProperties::h_from_T_v ( Real  T,
Real  v,
Real &  h,
Real &  dh_dT,
Real &  dh_dv 
) const
virtualinherited

Specific enthalpy and its derivatives from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[out]hspecific enthalpy (J/kg)
[out]dh_dTderivative of specific enthalpy w.r.t. temperature
[out]dh_dvderivative of specific enthalpy w.r.t. specific volume

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 552 of file SinglePhaseFluidProperties.C.

553 {
554  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
555 }
const std::string name
Definition: Setup.h:22

◆ henryConstant()

Real SinglePhaseFluidProperties::henryConstant ( Real  temperature) const
virtualinherited

Henry's law constant for dissolution in water.

Parameters
temperaturefluid temperature (K)
Returns
Henry's constant

Reimplemented in TabulatedFluidProperties, CO2FluidProperties, SimpleFluidProperties, IdealGasFluidPropertiesPT, HydrogenFluidProperties, NitrogenFluidProperties, and MethaneFluidProperties.

Definition at line 332 of file SinglePhaseFluidProperties.C.

Referenced by TabulatedFluidProperties::henryConstant().

333 {
334  mooseError(name(), ": henryConstant() is not implemented");
335 }
const std::string name
Definition: Setup.h:22

◆ henryConstant_dT()

void SinglePhaseFluidProperties::henryConstant_dT ( Real  temperature,
Real &  Kh,
Real &  dKh_dT 
) const
virtualinherited

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

Reimplemented in TabulatedFluidProperties, CO2FluidProperties, SimpleFluidProperties, IdealGasFluidPropertiesPT, HydrogenFluidProperties, NitrogenFluidProperties, and MethaneFluidProperties.

Definition at line 338 of file SinglePhaseFluidProperties.C.

Referenced by PorousFlowWaterNCG::enthalpyOfDissolution(), PorousFlowWaterNCG::equilibriumMassFractions(), PorousFlowBrineCO2::henryConstant(), and TabulatedFluidProperties::henryConstant_dT().

341 {
342  mooseError(name(), ": henryConstant_dT() is not implemented");
343 }
const std::string name
Definition: Setup.h:22

◆ henryConstantIAPWS()

Real SinglePhaseFluidProperties::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 262 of file SinglePhaseFluidProperties.C.

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

263 {
264  Real Tr = temperature / 647.096;
265  Real tau = 1.0 - Tr;
266 
267  Real lnkh = A / Tr + B * std::pow(tau, 0.355) / Tr + C * std::pow(Tr, -0.41) * std::exp(tau);
268 
269  // The vapor pressure used in this formulation
270  std::vector<Real> a{-7.85951783, 1.84408259, -11.7866497, 22.6807411, -15.9618719, 1.80122502};
271  std::vector<Real> b{1.0, 1.5, 3.0, 3.5, 4.0, 7.5};
272  Real sum = 0.0;
273 
274  for (std::size_t i = 0; i < a.size(); ++i)
275  sum += a[i] * std::pow(tau, b[i]);
276 
277  return 22.064e6 * std::exp(sum / Tr) * std::exp(lnkh);
278 }
const std::string temperature
Definition: NS.h:27
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ henryConstantIAPWS_dT()

void SinglePhaseFluidProperties::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 281 of file SinglePhaseFluidProperties.C.

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

283 {
284  Real pc = 22.064e6;
285  Real Tc = 647.096;
286 
287  Real Tr = temperature / Tc;
288  Real tau = 1.0 - Tr;
289 
290  Real lnkh = A / Tr + B * std::pow(tau, 0.355) / Tr + C * std::pow(Tr, -0.41) * std::exp(tau);
291  Real dlnkh_dT =
292  (-A / Tr / Tr - B * std::pow(tau, 0.355) / Tr / Tr - 0.355 * B * std::pow(tau, -0.645) / Tr -
293  0.41 * C * std::pow(Tr, -1.41) * std::exp(tau) - C * std::pow(Tr, -0.41) * std::exp(tau)) /
294  Tc;
295 
296  // The vapor pressure used in this formulation
297  std::vector<Real> a{-7.85951783, 1.84408259, -11.7866497, 22.6807411, -15.9618719, 1.80122502};
298  std::vector<Real> b{1.0, 1.5, 3.0, 3.5, 4.0, 7.5};
299  Real sum = 0.0;
300  Real dsum = 0.0;
301 
302  for (std::size_t i = 0; i < a.size(); ++i)
303  {
304  sum += a[i] * std::pow(tau, b[i]);
305  dsum += a[i] * b[i] * std::pow(tau, b[i] - 1.0);
306  }
307 
308  Real p = pc * std::exp(sum / Tr);
309  Real dp_dT = -p / Tc / Tr * (sum / Tr + dsum);
310 
311  // Henry's constant and its derivative wrt temperature
312  Kh = p * std::exp(lnkh);
313  dKh_dT = (p * dlnkh_dT + dp_dT) * std::exp(lnkh);
314 }
const std::string temperature
Definition: NS.h:27
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ initialize()

virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 28 of file FluidProperties.h.

28 {}

◆ inRegion()

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 897 of file Water97FluidProperties.C.

Referenced by c_from_p_T(), cp_from_p_T(), cv_from_p_T(), e_from_p_T(), h_from_p_T(), rho_from_p_T(), and s_from_p_T().

898 {
899  // Valid for 273.15 K <= T <= 1073.15 K, p <= 100 MPa
900  // 1073.15 K <= T <= 2273.15 K, p <= 50 Mpa
901  if (temperature >= 273.15 && temperature <= 1073.15)
902  {
903  if (pressure < vaporPressure(273.15) || pressure > 100.0e6)
904  throw MooseException("Pressure " + Moose::stringify(pressure) + " is out of range in " +
905  name() + ": inRegion()");
906  }
907  else if (temperature > 1073.15 && temperature <= 2273.15)
908  {
909  if (pressure < 0.0 || pressure > 50.0e6)
910  throw MooseException("Pressure " + Moose::stringify(pressure) + " is out of range in " +
911  name() + ": inRegion()");
912  }
913  else
914  throw MooseException("Temperature " + Moose::stringify(temperature) + " is out of range in " +
915  name() + ": inRegion()");
916 
917  // Determine the phase region that the (P, T) point lies in
918  unsigned int region;
919 
920  if (temperature >= 273.15 && temperature <= 623.15)
921  {
922  if (pressure > vaporPressure(temperature) && pressure <= 100.0e6)
923  region = 1;
924  else
925  region = 2;
926  }
927  else if (temperature > 623.15 && temperature <= 863.15)
928  {
929  if (pressure <= b23p(temperature))
930  region = 2;
931  else
932  region = 3;
933  }
934  else if (temperature > 863.15 && temperature <= 1073.15)
935  region = 2;
936  else
937  region = 5;
938 
939  return region;
940 }
const std::string temperature
Definition: NS.h:27
const std::string name
Definition: Setup.h:22
Real b23p(Real temperature) const
Auxillary equation for the boundary between regions 2 and 3.
const std::string pressure
Definition: NS.h:26
virtual Real vaporPressure(Real temperature) const override
Vapor pressure.

◆ inRegionPH()

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 1564 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1565 {
1566  unsigned int region;
1567 
1568  // Need to calculate enthalpies at the boundaries to delineate regions
1569  Real p273 = vaporPressure(273.15);
1570  Real p623 = vaporPressure(623.15);
1571 
1572  if (pressure >= p273 && pressure <= p623)
1573  {
1574  if (enthalpy >= h_from_p_T(pressure, 273.15) &&
1576  region = 1;
1578  enthalpy <= h_from_p_T(pressure, 1073.15))
1579  region = 2;
1580  else if (enthalpy > h_from_p_T(pressure, 1073.15) && enthalpy <= h_from_p_T(pressure, 2273.15))
1581  region = 5;
1582  else
1583  throw MooseException("Enthalpy " + Moose::stringify(enthalpy) + " is out of range in " +
1584  name() + ": inRegionPH()");
1585  }
1586  else if (pressure > p623 && pressure <= 50.0e6)
1587  {
1588  if (enthalpy >= h_from_p_T(pressure, 273.15) && enthalpy <= h_from_p_T(pressure, 623.15))
1589  region = 1;
1590  else if (enthalpy > h_from_p_T(pressure, 623.15) &&
1592  region = 3;
1593  else if (enthalpy > h_from_p_T(pressure, b23T(pressure)) &&
1594  enthalpy <= h_from_p_T(pressure, 1073.15))
1595  region = 2;
1596  else if (enthalpy > h_from_p_T(pressure, 1073.15) && enthalpy <= h_from_p_T(pressure, 2273.15))
1597  region = 5;
1598  else
1599  throw MooseException("Enthalpy " + Moose::stringify(enthalpy) + " is out of range in " +
1600  name() + ": inRegionPH()");
1601  }
1602  else if (pressure > 50.0e6 && pressure <= 100.0e6)
1603  {
1604  if (enthalpy >= h_from_p_T(pressure, 273.15) && enthalpy <= h_from_p_T(pressure, 623.15))
1605  region = 1;
1606  else if (enthalpy > h_from_p_T(pressure, 623.15) &&
1608  region = 3;
1609  else if (enthalpy > h_from_p_T(pressure, b23T(pressure)) &&
1610  enthalpy <= h_from_p_T(pressure, 1073.15))
1611  region = 2;
1612  else
1613  throw MooseException("Enthalpy " + Moose::stringify(enthalpy) + " is out of range in " +
1614  name() + ": inRegionPH()");
1615  }
1616  else
1617  throw MooseException("Pressure " + Moose::stringify(pressure) + " is out of range in " +
1618  name() + ": inRegionPH()");
1619 
1620  return region;
1621 }
Real b23T(Real pressure) const
Auxillary equation for the boundary between regions 2 and 3.
virtual Real h_from_p_T(Real pressure, Real temperature) const override
Specific enthalpy from pressure and temperature.
const std::string enthalpy
Definition: NS.h:28
const std::string name
Definition: Setup.h:22
Real vaporTemperature(Real pressure) const
Saturation temperature as a function of pressure.
const std::string pressure
Definition: NS.h:26
virtual Real vaporPressure(Real temperature) const override
Vapor pressure.

◆ k()

Real SinglePhaseFluidProperties::k ( Real  pressure,
Real  temperature 
) const
virtualinherited

◆ k_dpT()

void SinglePhaseFluidProperties::k_dpT ( Real  pressure,
Real  temperature,
Real &  k,
Real &  dk_dp,
Real &  dk_dT 
) const
virtualinherited

Definition at line 461 of file SinglePhaseFluidProperties.C.

463 {
464  k_from_p_T(pressure, temperature, k, dk_dp, dk_dT);
465 }
const std::string temperature
Definition: NS.h:27
virtual Real k(Real pressure, Real temperature) const
virtual Real k_from_p_T(Real pressure, Real temperature) const
Thermal conductivity.
const std::string pressure
Definition: NS.h:26

◆ k_from_p_T() [1/2]

Real Water97FluidProperties::k_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Thermal conductivity.

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 599 of file Water97FluidProperties.C.

600 {
601  Real rho = this->rho_from_p_T(pressure, temperature);
602  return this->k_from_rho_T(rho, temperature);
603 }
const std::string temperature
Definition: NS.h:27
virtual Real rho(Real p, Real T) const
const std::string pressure
Definition: NS.h:26
virtual Real k_from_rho_T(Real density, Real temperature) const override
Thermal conductivity as a function of density and temperature.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.

◆ k_from_p_T() [2/2]

void Water97FluidProperties::k_from_p_T ( 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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 606 of file Water97FluidProperties.C.

608 {
609  mooseError(name(), "k_dpT() is not implemented");
610 }
const std::string name
Definition: Setup.h:22

◆ k_from_rho_T()

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)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 613 of file Water97FluidProperties.C.

Referenced by k_from_p_T().

614 {
615  // Scale the density and temperature. Note that the scales are slightly
616  // different to the critical values used in IAPWS-IF97
617  Real Tbar = temperature / 647.26;
618  Real rhobar = density / 317.7;
619 
620  // Ideal gas component
621  Real sum0 = 0.0;
622 
623  for (std::size_t i = 0; i < _k_a.size(); ++i)
624  sum0 += _k_a[i] * MathUtils::pow(Tbar, i);
625 
626  Real lambda0 = std::sqrt(Tbar) * sum0;
627 
628  // The contribution due to finite density
629  Real lambda1 = -0.39707 + 0.400302 * rhobar +
630  1.06 * std::exp(-0.171587 * Utility::pow<2>(rhobar + 2.392190));
631 
632  // Critical enhancement
633  Real DeltaT = std::abs(Tbar - 1.0) + 0.00308976;
634  Real Q = 2.0 + 0.0822994 / std::pow(DeltaT, 0.6);
635  Real S = (Tbar >= 1.0 ? 1.0 / DeltaT : 10.0932 / std::pow(DeltaT, 0.6));
636 
637  Real lambda2 =
638  (0.0701309 / Utility::pow<10>(Tbar) + 0.011852) * std::pow(rhobar, 1.8) *
639  std::exp(0.642857 * (1.0 - std::pow(rhobar, 2.8))) +
640  0.00169937 * S * std::pow(rhobar, Q) *
641  std::exp((Q / (1.0 + Q)) * (1.0 - std::pow(rhobar, 1.0 + Q))) -
642  1.02 * std::exp(-4.11717 * std::pow(Tbar, 1.5) - 6.17937 / Utility::pow<5>(rhobar));
643 
644  return lambda0 + lambda1 + lambda2;
645 }
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
std::array< Real, 4 > _k_a
Constants for thermal conductivity.

◆ k_from_v_e()

Real SinglePhaseFluidProperties::k_from_v_e ( Real  v,
Real  e 
) const
virtualinherited

Thermal conductivity from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 76 of file SinglePhaseFluidProperties.C.

Referenced by FluidPropertiesMaterial::computeQpProperties(), GeneralVaporMixtureFluidProperties::k_from_p_T(), IdealRealGasMixtureFluidProperties::k_from_p_T(), and IdealRealGasMixtureFluidProperties::k_from_T_v().

77 {
78  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
79 }
const std::string name
Definition: Setup.h:22

◆ molarMass()

Real Water97FluidProperties::molarMass ( ) const
overridevirtual

Molar mass [kg/mol].

Returns
molar mass

Reimplemented from SinglePhaseFluidProperties.

Definition at line 47 of file Water97FluidProperties.C.

48 {
49  return _Mh2o;
50 }
const Real _Mh2o
Water molar mass (kg/mol)

◆ mu()

Real SinglePhaseFluidProperties::mu ( Real  pressure,
Real  temperature 
) const
virtualinherited

◆ mu_dpT()

void SinglePhaseFluidProperties::mu_dpT ( Real  pressure,
Real  temperature,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT 
) const
virtualinherited

Dynamic viscosity and its derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]muviscosity (Pa.s)
[out]dmu_dpderivative of viscosity wrt pressure
[out]dmu_dTderivative of viscosity wrt temperature

Definition at line 418 of file SinglePhaseFluidProperties.C.

420 {
421  mu_from_p_T(pressure, temperature, mu, dmu_dp, dmu_dT);
422 }
virtual Real mu_from_p_T(Real pressure, Real temperature) const
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string temperature
Definition: NS.h:27
const std::string pressure
Definition: NS.h:26

◆ mu_drhoT_from_rho_T()

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 528 of file Water97FluidProperties.C.

Referenced by mu_from_p_T(), and rho_mu_dpT().

534 {
535  Real mu_star = 1.0e-6;
536  Real rhobar = density / _rho_critical;
537  Real Tbar = temperature / _T_critical;
538  Real drhobar_drho = 1.0 / _rho_critical;
539  Real dTbar_dT = 1.0 / _T_critical;
540 
541  // Limit of zero density. Derivative wrt rho is 0
542  Real sum0 = 0.0, dsum0_dTbar = 0.0;
543  for (std::size_t i = 0; i < _mu_H0.size(); ++i)
544  {
545  sum0 += _mu_H0[i] / MathUtils::pow(Tbar, i);
546  dsum0_dTbar -= i * _mu_H0[i] / MathUtils::pow(Tbar, i + 1);
547  }
548 
549  Real mu0 = 100.0 * std::sqrt(Tbar) / sum0;
550  Real dmu0_dTbar =
551  50.0 / std::sqrt(Tbar) / sum0 - 100.0 * std::sqrt(Tbar) * dsum0_dTbar / sum0 / sum0;
552 
553  // Residual component due to finite density
554  Real sum1 = 0.0, dsum1_drho = 0.0, dsum1_dTbar = 0.0;
555  for (std::size_t i = 0; i < _mu_H1.size(); ++i)
556  {
557  sum1 += MathUtils::pow(1.0 / Tbar - 1.0, _mu_I[i]) * _mu_H1[i] *
558  MathUtils::pow(rhobar - 1.0, _mu_J[i]);
559  dsum1_drho += MathUtils::pow(1.0 / Tbar - 1.0, _mu_I[i]) * _mu_H1[i] * _mu_J[i] *
560  MathUtils::pow(rhobar - 1.0, _mu_J[i] - 1);
561  dsum1_dTbar -= _mu_I[i] * MathUtils::pow(1.0 / Tbar - 1.0, _mu_I[i] - 1) * _mu_H1[i] *
562  MathUtils::pow(rhobar - 1.0, _mu_J[i]) / Tbar / Tbar;
563  }
564 
565  Real mu1 = std::exp(rhobar * sum1);
566  Real dmu1_drho = (sum1 + rhobar * dsum1_drho) * mu1;
567  Real dmu1_dTbar = (rhobar * dsum1_dTbar) * mu1;
568 
569  // Viscosity and its derivatives are then
570  mu = mu_star * mu0 * mu1;
571  dmu_drho = mu_star * mu0 * dmu1_drho * drhobar_drho;
572  dmu_dT = mu_star * (dmu0_dTbar * mu1 + mu0 * dmu1_dTbar) * dTbar_dT + dmu_drho * ddensity_dT;
573 }
const Real _T_critical
Critical temperature (K)
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
const std::array< int, 21 > _mu_J
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const Real _rho_critical
Critical density (kg/m^3)
const std::array< int, 21 > _mu_I
Constants from Release on the IAPWS Formulation 2008 for the Viscosity of Ordinary Water Substance...
const std::array< Real, 21 > _mu_H1
const std::array< Real, 4 > _mu_H0

◆ mu_from_p_T() [1/2]

Real Water97FluidProperties::mu_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Reimplemented from SinglePhaseFluidProperties.

Definition at line 484 of file Water97FluidProperties.C.

485 {
486  Real rho = this->rho_from_p_T(pressure, temperature);
487  return this->mu_from_rho_T(rho, temperature);
488 }
const std::string temperature
Definition: NS.h:27
virtual Real rho(Real p, Real T) const
const std::string pressure
Definition: NS.h:26
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real mu_from_rho_T(Real density, Real temperature) const override
Dynamic viscosity as a function of density and temperature.

◆ mu_from_p_T() [2/2]

void Water97FluidProperties::mu_from_p_T ( Real  pressure,
Real  temperature,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT 
) const
overridevirtual

Reimplemented from SinglePhaseFluidProperties.

Definition at line 491 of file Water97FluidProperties.C.

493 {
494  Real rho, drho_dp, drho_dT;
495  this->rho_from_p_T(pressure, temperature, rho, drho_dp, drho_dT);
496  Real dmu_drho;
497  this->mu_drhoT_from_rho_T(rho, temperature, drho_dT, mu, dmu_drho, dmu_dT);
498  dmu_dp = dmu_drho * drho_dp;
499 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string temperature
Definition: NS.h:27
virtual Real rho(Real p, Real T) const
const std::string pressure
Definition: NS.h:26
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
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.

◆ mu_from_rho_T()

Real Water97FluidProperties::mu_from_rho_T ( Real  density,
Real  temperature 
) const
overridevirtual

Dynamic viscosity as a function of density and temperature.

Parameters
densityfluid density (kg/m^3)
temperaturefluid temperature (K)
Returns
viscosity (Pa.s)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 502 of file Water97FluidProperties.C.

Referenced by mu_from_p_T(), and rho_mu().

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 < _mu_H0.size(); ++i)
511  sum0 += _mu_H0[i] / MathUtils::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 < _mu_H1.size(); ++i)
518  sum1 += MathUtils::pow(1.0 / Tbar - 1.0, _mu_I[i]) * _mu_H1[i] *
519  MathUtils::pow(rhobar - 1.0, _mu_J[i]);
520 
521  Real mu1 = std::exp(rhobar * sum1);
522 
523  // The water viscosity (in Pa.s) is then given by
524  return mu_star * mu0 * mu1;
525 }
const Real _T_critical
Critical temperature (K)
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
const std::array< int, 21 > _mu_J
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const Real _rho_critical
Critical density (kg/m^3)
const std::array< int, 21 > _mu_I
Constants from Release on the IAPWS Formulation 2008 for the Viscosity of Ordinary Water Substance...
const std::array< Real, 21 > _mu_H1
const std::array< Real, 4 > _mu_H0

◆ mu_from_v_e()

Real SinglePhaseFluidProperties::mu_from_v_e ( Real  v,
Real  e 
) const
virtualinherited

Dynamic viscosity from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 71 of file SinglePhaseFluidProperties.C.

Referenced by FluidPropertiesMaterial::computeQpProperties(), GeneralVaporMixtureFluidProperties::mu_from_p_T(), IdealRealGasMixtureFluidProperties::mu_from_p_T(), and IdealRealGasMixtureFluidProperties::mu_from_T_v().

72 {
73  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
74 }
const std::string name
Definition: Setup.h:22

◆ p_from_h_s() [1/2]

Real SinglePhaseFluidProperties::p_from_h_s ( Real  h,
Real  s 
) const
virtualinherited

Pressure from specific enthalpy and specific entropy.

Parameters
[in]hspecific enthalpy
[in]sspecific entropy

Reimplemented in StiffenedGasFluidProperties, and IdealGasFluidProperties.

Definition at line 584 of file SinglePhaseFluidProperties.C.

Referenced by StagnationPressureAux::computeValue(), and StagnationTemperatureAux::computeValue().

585 {
586  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
587 }
const std::string name
Definition: Setup.h:22

◆ p_from_h_s() [2/2]

void SinglePhaseFluidProperties::p_from_h_s ( Real  h,
Real  s,
Real &  p,
Real &  dp_dh,
Real &  dp_ds 
) const
virtualinherited

Pressure and its derivatives from specific enthalpy and specific entropy.

Parameters
[in]hspecific enthalpy
[in]sspecific entropy

Reimplemented in StiffenedGasFluidProperties, and IdealGasFluidProperties.

Definition at line 590 of file SinglePhaseFluidProperties.C.

591 {
592  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
593 }
const std::string name
Definition: Setup.h:22

◆ p_from_T_v() [1/2]

Real SinglePhaseFluidProperties::p_from_T_v ( Real  T,
Real  v 
) const
virtualinherited

Pressure from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 535 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::p_from_T_v().

536 {
537  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
538 }
const std::string name
Definition: Setup.h:22

◆ p_from_T_v() [2/2]

void SinglePhaseFluidProperties::p_from_T_v ( Real  T,
Real  v,
Real &  p,
Real &  dp_dT,
Real &  dp_dv 
) const
virtualinherited

Pressure and its derivatives from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[out]ppressure (Pa)
[out]dp_dTderivative of pressure w.r.t. temperature
[out]dp_dvderivative of pressure w.r.t. specific volume

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 541 of file SinglePhaseFluidProperties.C.

542 {
543  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
544 }
const std::string name
Definition: Setup.h:22

◆ p_from_v_e() [1/2]

Real SinglePhaseFluidProperties::p_from_v_e ( Real  v,
Real  e 
) const
virtualinherited

Pressure from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy

Reimplemented in IdealGasFluidProperties, StiffenedGasFluidProperties, and NaNInterfaceTestFluidProperties.

Definition at line 28 of file SinglePhaseFluidProperties.C.

Referenced by FluidPropertiesMaterial::computeQpProperties(), PressureAux::computeValue(), StagnationPressureAux::computeValue(), and StagnationTemperatureAux::computeValue().

29 {
30  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
31 }
const std::string name
Definition: Setup.h:22

◆ p_from_v_e() [2/2]

void SinglePhaseFluidProperties::p_from_v_e ( Real  v,
Real  e,
Real &  p,
Real &  dp_dv,
Real &  dp_de 
) const
virtualinherited

Pressure and its derivatives from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy
[out]ppressure
[out]dp_dvderivative of pressure w.r.t. specific volume
[out]dp_dederivative of pressure w.r.t. specific internal energy

Reimplemented in IdealGasFluidProperties, StiffenedGasFluidProperties, and NaNInterfaceTestFluidProperties.

Definition at line 34 of file SinglePhaseFluidProperties.C.

35 {
36  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
37 }
const std::string name
Definition: Setup.h:22

◆ phi3()

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 1103 of file Water97FluidProperties.C.

Referenced by s_from_p_T().

1104 {
1105  Real sum = 0.0;
1106  for (std::size_t i = 1; i < _n3.size(); ++i)
1107  sum += _n3[i] * MathUtils::pow(delta, _I3[i]) * MathUtils::pow(tau, _J3[i]);
1108 
1109  return _n3[0] * std::log(delta) + sum;
1110 }
const std::array< int, 40 > _J3
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< int, 40 > _I3
const std::array< Real, 40 > _n3
Constants for region 3.

◆ pp_sat_from_p_T()

Real SinglePhaseFluidProperties::pp_sat_from_p_T ( Real  p,
Real  T 
) const
virtualinherited

Partial pressure at saturation in a gas mixture.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
Returns
pp_sat (Pa)

Reimplemented in StiffenedGasFluidProperties.

Definition at line 196 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::xs_prim_from_p_T().

197 {
198  mooseError(name(), ": pp_sat_from_p_T is not implemented");
199 }
const std::string name
Definition: Setup.h:22

◆ rho()

Real SinglePhaseFluidProperties::rho ( Real  p,
Real  T 
) const
virtualinherited

Definition at line 491 of file SinglePhaseFluidProperties.C.

Referenced by SinglePhaseFluidProperties::beta_from_p_T(), StiffenedGasFluidProperties::c2_from_p_rho(), StiffenedGasFluidProperties::e_from_p_rho(), IdealGasFluidProperties::e_from_p_rho(), NaClFluidProperties::e_from_p_T(), SinglePhaseFluidProperties::e_from_p_T(), IdealGasFluidProperties::h_from_p_T(), k_from_p_T(), CO2FluidProperties::mu_from_p_T(), NitrogenFluidProperties::mu_from_p_T(), HydrogenFluidProperties::mu_from_p_T(), mu_from_p_T(), SinglePhaseFluidProperties::rho_dpT(), HelmholtzFluidProperties::rho_e_dpT(), IdealGasFluidPropertiesPT::rho_e_dpT(), rho_e_dpT(), NaClFluidProperties::rho_e_dpT(), SimpleFluidProperties::rho_e_dpT(), TabulatedFluidProperties::rho_e_dpT(), IdealGasFluidProperties::rho_from_p_s(), StiffenedGasFluidProperties::rho_from_p_s(), HelmholtzFluidProperties::rho_from_p_T(), IdealGasFluidPropertiesPT::rho_from_p_T(), StiffenedGasFluidProperties::rho_from_p_T(), CO2FluidProperties::rho_from_p_T(), IdealGasFluidProperties::rho_from_p_T(), rho_from_p_T(), NaClFluidProperties::rho_from_p_T(), SimpleFluidProperties::rho_from_p_T(), TabulatedFluidProperties::rho_from_p_T(), HelmholtzFluidProperties::rho_mu(), IdealGasFluidPropertiesPT::rho_mu(), SimpleFluidProperties::rho_mu(), rho_mu(), TabulatedFluidProperties::rho_mu(), HelmholtzFluidProperties::rho_mu_dpT(), IdealGasFluidPropertiesPT::rho_mu_dpT(), SimpleFluidProperties::rho_mu_dpT(), rho_mu_dpT(), TabulatedFluidProperties::rho_mu_dpT(), SinglePhaseFluidProperties::T_from_p_h(), and SinglePhaseFluidProperties::v_from_p_T().

492 {
493  return rho_from_p_T(p, T);
494 }
virtual Real rho_from_p_T(Real p, Real T) const
Density from pressure and temperature.

◆ rho_dpT()

void SinglePhaseFluidProperties::rho_dpT ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT 
) const
virtualinherited

Definition at line 359 of file SinglePhaseFluidProperties.C.

361 {
362  rho_from_p_T(pressure, temperature, rho, drho_dp, drho_dT);
363 }
const std::string temperature
Definition: NS.h:27
virtual Real rho(Real p, Real T) const
virtual Real rho_from_p_T(Real p, Real T) const
Density from pressure and temperature.
const std::string pressure
Definition: NS.h:26

◆ rho_e_dpT()

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 311 of file Water97FluidProperties.C.

319 {
320  rho_from_p_T(pressure, temperature, rho, drho_dp, drho_dT);
321  e_from_p_T(pressure, temperature, e, de_dp, de_dT);
322 }
virtual Real e_from_p_T(Real pressure, Real temperature) const override
Internal energy from pressure and temperature.
const std::string temperature
Definition: NS.h:27
virtual Real rho(Real p, Real T) const
const std::string pressure
Definition: NS.h:26
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real e(Real pressure, Real temperature) const

◆ rho_from_p_s() [1/2]

Real SinglePhaseFluidProperties::rho_from_p_s ( Real  p,
Real  s 
) const
virtualinherited

Density from pressure and specific entropy.

Parameters
[in]ppressure
[in]sspecific entropy

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 103 of file SinglePhaseFluidProperties.C.

Referenced by StagnationTemperatureAux::computeValue(), and SinglePhaseFluidProperties::T_from_p_h().

104 {
105  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
106 }
const std::string name
Definition: Setup.h:22

◆ rho_from_p_s() [2/2]

void SinglePhaseFluidProperties::rho_from_p_s ( Real  p,
Real  s,
Real &  rho,
Real &  drho_dp,
Real &  drho_ds 
) const
virtualinherited

Density and its derivatives from pressure and specific entropy.

Parameters
[in]ppressure
[in]sspecific entropy
[out]rhodensity
[out]drho_dpderivative of density w.r.t. pressure
[out]drho_dsderivative of density w.r.t. specific entropy

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 109 of file SinglePhaseFluidProperties.C.

110 {
111  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
112 }
const std::string name
Definition: Setup.h:22

◆ rho_from_p_T() [1/2]

Real Water97FluidProperties::rho_from_p_T ( Real  p,
Real  T 
) const
overridevirtual

Density from pressure and temperature.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
Returns
density (kg/m^3)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 83 of file Water97FluidProperties.C.

Referenced by k_from_p_T(), mu_from_p_T(), rho_e_dpT(), rho_from_p_T(), rho_mu(), and rho_mu_dpT().

84 {
85  Real density, pi, tau;
86 
87  // Determine which region the point is in
88  unsigned int region = inRegion(pressure, temperature);
89 
90  switch (region)
91  {
92  case 1:
93  pi = pressure / _p_star[0];
94  tau = _T_star[0] / temperature;
95  density = pressure / (pi * _Rw * temperature * dgamma1_dpi(pi, tau));
96  break;
97 
98  case 2:
99  pi = pressure / _p_star[1];
100  tau = _T_star[1] / temperature;
101  density = pressure / (pi * _Rw * temperature * dgamma2_dpi(pi, tau));
102  break;
103 
104  case 3:
106  break;
107 
108  case 5:
109  pi = pressure / _p_star[4];
110  tau = _T_star[4] / temperature;
111  density = pressure / (pi * _Rw * temperature * dgamma5_dpi(pi, tau));
112  break;
113 
114  default:
115  mooseError(name(), ": inRegion() has given an incorrect region");
116  }
117  return density;
118 }
unsigned int inRegion(Real pressure, Real temperature) const
Determines the phase region that the given pressure and temperature values lie in.
Real dgamma5_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt pi.
Real dgamma2_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt pi.
const std::string density
Definition: NS.h:17
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
const std::string temperature
Definition: NS.h:27
const std::array< Real, 5 > _p_star
Pressure scale for each region.
const std::array< Real, 5 > _T_star
Temperature scale for each region.
const std::string name
Definition: Setup.h:22
Real dgamma1_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt pi.
const std::string pressure
Definition: NS.h:26
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...

◆ rho_from_p_T() [2/2]

void Water97FluidProperties::rho_from_p_T ( Real  p,
Real  T,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT 
) const
overridevirtual

Density and its derivatives from pressure and temperature.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
[out]rhodensity (kg/m^3)
[out]drho_dpderivative of density w.r.t. pressure
[out]drho_dTderivative of density w.r.t. temperature

Reimplemented from SinglePhaseFluidProperties.

Definition at line 121 of file Water97FluidProperties.C.

123 {
124  Real pi, tau, ddensity_dp, ddensity_dT;
125 
126  // Determine which region the point is in
127  unsigned int region = inRegion(pressure, temperature);
128 
129  switch (region)
130  {
131  case 1:
132  {
133  pi = pressure / _p_star[0];
134  tau = _T_star[0] / temperature;
135  Real dgdp = dgamma1_dpi(pi, tau);
136  ddensity_dp = -d2gamma1_dpi2(pi, tau) / (_Rw * temperature * dgdp * dgdp);
137  ddensity_dT = -pressure * (dgdp - tau * d2gamma1_dpitau(pi, tau)) /
138  (_Rw * pi * temperature * temperature * dgdp * dgdp);
139  break;
140  }
141 
142  case 2:
143  {
144  pi = pressure / _p_star[1];
145  tau = _T_star[1] / temperature;
146  Real dgdp = dgamma2_dpi(pi, tau);
147  ddensity_dp = -d2gamma2_dpi2(pi, tau) / (_Rw * temperature * dgdp * dgdp);
148  ddensity_dT = -pressure * (dgdp - tau * d2gamma2_dpitau(pi, tau)) /
149  (_Rw * pi * temperature * temperature * dgdp * dgdp);
150  break;
151  }
152 
153  case 3:
154  {
155  // Calculate density first, then use that in Helmholtz free energy
157  Real delta = density / _rho_critical;
158  tau = _T_star[2] / temperature;
159  Real dpdd = dphi3_ddelta(delta, tau);
160  Real d2pdd2 = d2phi3_ddelta2(delta, tau);
161  ddensity_dp = 1.0 / (_Rw * temperature * delta * (2.0 * dpdd + delta * d2pdd2));
162  ddensity_dT = density * (tau * d2phi3_ddeltatau(delta, tau) - dpdd) / temperature /
163  (2.0 * dpdd + delta * d2pdd2);
164  break;
165  }
166 
167  case 5:
168  {
169  pi = pressure / _p_star[4];
170  tau = _T_star[4] / temperature;
171  Real dgdp = dgamma5_dpi(pi, tau);
172  ddensity_dp = -d2gamma5_dpi2(pi, tau) / (_Rw * temperature * dgdp * dgdp);
173  ddensity_dT = -pressure * (dgdp - tau * d2gamma5_dpitau(pi, tau)) /
174  (_Rw * pi * temperature * temperature * dgdp * dgdp);
175  break;
176  }
177 
178  default:
179  mooseError(name(), ": inRegion() has given an incorrect region");
180  }
181 
183  drho_dp = ddensity_dp;
184  drho_dT = ddensity_dT;
185 }
Real d2gamma2_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt pi.
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.
Real dgamma5_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt pi.
Real dgamma2_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt pi.
const std::string density
Definition: NS.h:17
Real d2gamma1_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt pi and tau.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
const std::string temperature
Definition: NS.h:27
virtual Real rho(Real p, Real T) const
const std::array< Real, 5 > _p_star
Pressure scale for each region.
const std::array< Real, 5 > _T_star
Temperature scale for each region.
Real d2gamma5_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt pi and tau.
const std::string name
Definition: Setup.h:22
Real d2phi3_ddelta2(Real delta, Real tau) const
Second derivative of Helmholtz free energy in Region 3 wrt delta.
Real dgamma1_dpi(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt pi.
Real d2gamma2_dpitau(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 2 wrt pi and tau.
const Real _rho_critical
Critical density (kg/m^3)
Real dphi3_ddelta(Real delta, Real tau) const
Derivative of Helmholtz free energy in Region 3 wrt delta.
const std::string pressure
Definition: NS.h:26
Real d2gamma1_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 1 wrt pi.
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
Real d2gamma5_dpi2(Real pi, Real tau) const
Second derivative of Gibbs free energy in Region 5 wrt pi.

◆ rho_mu()

void Water97FluidProperties::rho_mu ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  mu 
) const
overridevirtual

Density and viscosity.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]rhodensity (kg/m^3)
[out]muviscosity (Pa.s)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 576 of file Water97FluidProperties.C.

577 {
579  mu = this->mu_from_rho_T(rho, temperature);
580 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string temperature
Definition: NS.h:27
virtual Real rho(Real p, Real T) const
const std::string pressure
Definition: NS.h:26
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real mu_from_rho_T(Real density, Real temperature) const override
Dynamic viscosity as a function of density and temperature.

◆ rho_mu_dpT()

void Water97FluidProperties::rho_mu_dpT ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT 
) const
overridevirtual

Density and viscosity 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]muviscosity (Pa.s)
[out]dmu_dpderivative of viscosity wrt pressure
[out]dmu_dTderivative of viscosity wrt temperature

Reimplemented from SinglePhaseFluidProperties.

Definition at line 583 of file Water97FluidProperties.C.

591 {
592  this->rho_from_p_T(pressure, temperature, rho, drho_dp, drho_dT);
593  Real dmu_drho;
594  this->mu_drhoT_from_rho_T(rho, temperature, drho_dT, mu, dmu_drho, dmu_dT);
595  dmu_dp = dmu_drho * drho_dp;
596 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string temperature
Definition: NS.h:27
virtual Real rho(Real p, Real T) const
const std::string pressure
Definition: NS.h:26
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
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.

◆ s()

Real SinglePhaseFluidProperties::s ( Real  pressure,
Real  temperature 
) const
virtualinherited

◆ s_from_h_p() [1/2]

Real SinglePhaseFluidProperties::s_from_h_p ( Real  h,
Real  p 
) const
virtualinherited

Specific entropy from specific enthalpy and pressure.

Parameters
[in]hspecific enthalpy
[in]ppressure

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 92 of file SinglePhaseFluidProperties.C.

Referenced by SinglePhaseFluidProperties::T_from_p_h().

93 {
94  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
95 }
const std::string name
Definition: Setup.h:22

◆ s_from_h_p() [2/2]

void SinglePhaseFluidProperties::s_from_h_p ( Real  h,
Real  p,
Real &  s,
Real &  ds_dh,
Real &  ds_dp 
) const
virtualinherited

Specific entropy and its derivatives from specific enthalpy and pressure.

Parameters
[in]hspecific enthalpy
[in]ppressure
[out]sspecific entropy
[out]ds_dhderivative of specific entropy w.r.t. specific enthalpy
[out]ds_dpderivative of specific entropy w.r.t. pressure

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 98 of file SinglePhaseFluidProperties.C.

99 {
100  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
101 }
const std::string name
Definition: Setup.h:22

◆ s_from_p_T() [1/2]

Real Water97FluidProperties::s_from_p_T ( Real  p,
Real  T 
) const
overridevirtual

Specific entropy from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature

Reimplemented from SinglePhaseFluidProperties.

Definition at line 648 of file Water97FluidProperties.C.

649 {
650  Real entropy, pi, tau, density3, delta;
651 
652  // Determine which region the point is in
653  unsigned int region = inRegion(pressure, temperature);
654  switch (region)
655  {
656  case 1:
657  pi = pressure / _p_star[0];
658  tau = _T_star[0] / temperature;
659  entropy = _Rw * (tau * dgamma1_dtau(pi, tau) - gamma1(pi, tau));
660  break;
661 
662  case 2:
663  pi = pressure / _p_star[1];
664  tau = _T_star[1] / temperature;
665  entropy = _Rw * (tau * dgamma2_dtau(pi, tau) - gamma2(pi, tau));
666  break;
667 
668  case 3:
669  // Calculate density first, then use that in Helmholtz free energy
670  density3 = densityRegion3(pressure, temperature);
671  delta = density3 / _rho_critical;
672  tau = _T_star[2] / temperature;
673  entropy = _Rw * (tau * dphi3_dtau(delta, tau) - phi3(delta, tau));
674  break;
675 
676  case 5:
677  pi = pressure / _p_star[4];
678  tau = _T_star[4] / temperature;
679  entropy = _Rw * (tau * dgamma5_dtau(pi, tau) - gamma5(pi, tau));
680  break;
681 
682  default:
683  mooseError(name(), ": inRegion() has given an incorrect region");
684  }
685  return entropy;
686 }
Real dgamma5_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 5 wrt tau.
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 gamma5(Real pi, Real tau) const
Gibbs free energy in Region 5.
Real dgamma2_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 2 wrt tau.
Real densityRegion3(Real pressure, Real temperature) const
Density function for Region 3 - supercritical water and steam.
const std::string temperature
Definition: NS.h:27
Real phi3(Real delta, Real tau) const
Helmholtz free energy in Region 3.
const std::array< Real, 5 > _p_star
Pressure scale for each region.
const std::array< Real, 5 > _T_star
Temperature scale for each region.
const std::string name
Definition: Setup.h:22
const Real _rho_critical
Critical density (kg/m^3)
Real dgamma1_dtau(Real pi, Real tau) const
Derivative of Gibbs free energy in Region 1 wrt tau.
const std::string pressure
Definition: NS.h:26
Real gamma2(Real pi, Real tau) const
Gibbs free energy in Region 2 - superheated steam.
Real gamma1(Real pi, Real tau) const
Gibbs free energy in Region 1 - single phase liquid region.
const Real _Rw
Specific gas constant for H2O (universal gas constant / molar mass of water - J/kg/K) ...

◆ s_from_p_T() [2/2]

void Water97FluidProperties::s_from_p_T ( Real  p,
Real  T,
Real &  s,
Real &  ds_dp,
Real &  ds_dT 
) const
overridevirtual

Specific entropy and its derivatives from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[out]sspecific entropy
[out]ds_dpderivative of specific entropy w.r.t. pressure
[out]ds_dTderivative of specific entropy w.r.t. temperature

Reimplemented from SinglePhaseFluidProperties.

Definition at line 689 of file Water97FluidProperties.C.

690 {
691  SinglePhaseFluidProperties::s_from_p_T(p, T, s, ds_dp, ds_dT);
692 }
virtual Real s(Real pressure, Real temperature) const
virtual Real s_from_p_T(Real p, Real T) const
Specific entropy from pressure and temperature.

◆ s_from_T_v() [1/2]

Real SinglePhaseFluidProperties::s_from_T_v ( Real  T,
Real  v 
) const
virtualinherited

Specific entropy from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 557 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::s_from_T_v().

558 {
559  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
560 }
const std::string name
Definition: Setup.h:22

◆ s_from_T_v() [2/2]

void SinglePhaseFluidProperties::s_from_T_v ( Real  T,
Real  v,
Real &  s,
Real &  ds_dT,
Real &  ds_dv 
) const
virtualinherited

Specific entropy and its derivatives from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[out]sspecific entropy (J/kg)
[out]ds_dTderivative of specific entropy w.r.t. temperature
[out]ds_dvderivative of specific entropy w.r.t. specific volume

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 563 of file SinglePhaseFluidProperties.C.

564 {
565  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
566 }
const std::string name
Definition: Setup.h:22

◆ s_from_v_e() [1/2]

Real SinglePhaseFluidProperties::s_from_v_e ( Real  v,
Real  e 
) const
virtualinherited

Specific entropy from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 81 of file SinglePhaseFluidProperties.C.

Referenced by StagnationPressureAux::computeValue(), and StagnationTemperatureAux::computeValue().

82 {
83  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
84 }
const std::string name
Definition: Setup.h:22

◆ s_from_v_e() [2/2]

void SinglePhaseFluidProperties::s_from_v_e ( Real  v,
Real  e,
Real &  s,
Real &  ds_dv,
Real &  ds_de 
) const
virtualinherited

Specific entropy and its derivatives from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy
[out]sspecific entropy
[out]ds_dvderivative of specific entropy w.r.t. specific volume
[out]ds_dederivative of specific entropy w.r.t. specific internal energy

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 87 of file SinglePhaseFluidProperties.C.

88 {
89  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
90 }
const std::string name
Definition: Setup.h:22

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Definition at line 32 of file FluidProperties.h.

32 {}

◆ subregion2ph()

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 1624 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1625 {
1626  unsigned int subregion;
1627 
1628  if (pressure <= 4.0e6)
1629  subregion = 1;
1630  else if (pressure > 4.0e6 && pressure < 6.5467e6)
1631  subregion = 2;
1632  else
1633  {
1634  if (enthalpy >= b2bc(pressure))
1635  subregion = 2;
1636  else
1637  subregion = 3;
1638  }
1639 
1640  return subregion;
1641 }
Real b2bc(Real pressure) const
Boundary between subregions b and c in region 2.
const std::string enthalpy
Definition: NS.h:28
const std::string pressure
Definition: NS.h:26

◆ subregion3()

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 1261 of file Water97FluidProperties.C.

Referenced by densityRegion3().

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

◆ subregion3ph()

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 1644 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1645 {
1646  unsigned int subregion;
1647 
1648  if (enthalpy <= b3ab(pressure))
1649  subregion = 1;
1650  else
1651  subregion = 2;
1652 
1653  return subregion;
1654 }
const std::string enthalpy
Definition: NS.h:28
Real b3ab(Real pressure) const
Boundary between subregions a and b in region 3.
const std::string pressure
Definition: NS.h:26

◆ subregionVolume()

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 1511 of file Water97FluidProperties.C.

Referenced by densityRegion3().

1513 {
1514  Real sum = 0.0;
1515 
1516  for (std::size_t i = 0; i < _n3s[sid].size(); ++i)
1517  sum += _n3s[sid][i] * MathUtils::pow(std::pow(pi - a, c), _I3s[sid][i]) *
1518  MathUtils::pow(std::pow(theta - b, d), _J3s[sid][i]);
1519 
1520  return std::pow(sum, e);
1521 }
const std::vector< std::vector< Real > > _n3s
Constants for all 26 subregions in region 3.
const std::vector< std::vector< int > > _I3s
virtual Real c(Real pressure, Real temperature) const
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::vector< std::vector< int > > _J3s
virtual Real e(Real pressure, Real temperature) const

◆ T_from_p_h()

Real SinglePhaseFluidProperties::T_from_p_h ( Real  pressure,
Real  enthalpy 
) const
virtualinherited

Temperature from pressure and specific enthalpy.

Parameters
[in]pressurepressure (Pa)
[in]enthalpyenthalpy (J/kg)
Returns
Temperature (K)

Reimplemented in IdealGasFluidProperties.

Definition at line 601 of file SinglePhaseFluidProperties.C.

602 {
603  const Real s = s_from_h_p(h, p);
604  const Real rho = rho_from_p_s(p, s);
605  const Real v = 1. / rho;
606  const Real e = e_from_v_h(v, h);
607  return T_from_v_e(v, e);
608 }
virtual Real T_from_v_e(Real v, Real e) const
Temperature from specific volume and specific internal energy.
virtual Real s(Real pressure, Real temperature) const
virtual Real h(Real p, Real T) const
virtual Real s_from_h_p(Real h, Real p) const
Specific entropy from specific enthalpy and pressure.
virtual Real rho(Real p, Real T) const
virtual Real e_from_v_h(Real v, Real h) const
Specific internal energy as a function of specific volume and specific enthalpy.
virtual Real rho_from_p_s(Real p, Real s) const
Density from pressure and specific entropy.
virtual Real e(Real pressure, Real temperature) const

◆ T_from_v_e() [1/2]

Real SinglePhaseFluidProperties::T_from_v_e ( Real  v,
Real  e 
) const
virtualinherited

Temperature from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy
Returns
sound speed

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 39 of file SinglePhaseFluidProperties.C.

Referenced by FluidPropertiesMaterial::computeQpProperties(), StagnationTemperatureAux::computeValue(), TemperatureAux::computeValue(), IdealRealGasMixtureFluidProperties::p_T_from_v_e(), and SinglePhaseFluidProperties::T_from_p_h().

40 {
41  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
42 }
const std::string name
Definition: Setup.h:22

◆ T_from_v_e() [2/2]

void SinglePhaseFluidProperties::T_from_v_e ( Real  v,
Real  e,
Real &  T,
Real &  dT_dv,
Real &  dT_de 
) const
virtualinherited

Temperature and its derivatives from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy
[out]Ttemperature
[out]dT_dvderivative of temperature w.r.t. specific volume
[out]dT_dederivative of temperature w.r.t. specific internal energy

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 45 of file SinglePhaseFluidProperties.C.

46 {
47  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
48 }
const std::string name
Definition: Setup.h:22

◆ temperature_from_ph()

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 1670 of file Water97FluidProperties.C.

1671 {
1672  Real temperature = 0.0;
1673 
1674  // Determine which region the point is in
1675  unsigned int region = inRegionPH(pressure, enthalpy);
1676 
1677  switch (region)
1678  {
1679  case 1:
1681  break;
1682 
1683  case 2:
1684  {
1685  // First, determine which subregion the point is in:
1686  unsigned int subregion = subregion2ph(pressure, enthalpy);
1687 
1688  if (subregion == 1)
1690  else if (subregion == 2)
1692  else
1694  break;
1695  }
1696 
1697  case 3:
1698  {
1699  // First, determine which subregion the point is in:
1700  unsigned int subregion = subregion3ph(pressure, enthalpy);
1701 
1702  if (subregion == 1)
1704  else
1706  break;
1707  }
1708 
1709  case 5:
1710  mooseError(name(), ": temperature_from_ph() not implemented for region 5");
1711  break;
1712 
1713  default:
1714  mooseError(name(), ": inRegionPH() has given an incorrect region");
1715  }
1716 
1717  return temperature;
1718 }
const std::string temperature
Definition: NS.h:27
unsigned int subregion2ph(Real pressure, Real enthalpy) const
Provides the correct subregion index for a (P,h) point in region 2.
const std::string enthalpy
Definition: NS.h:28
Real temperature_from_ph2a(Real pressure, Real enthalpy) const
Backwards equation T(p, h) in Region 2a Eq.
Real temperature_from_ph1(Real pressure, Real enthalpy) const
Backwards equation T(p, h) in Region 1 Eq.
const std::string name
Definition: Setup.h:22
unsigned int subregion3ph(Real pressure, Real enthalpy) const
Provides the correct subregion index for a (P,h) point in region 3.
Real temperature_from_ph2b(Real pressure, Real enthalpy) const
Backwards equation T(p, h) in Region 2b Eq.
Real temperature_from_ph3b(Real pressure, Real enthalpy) const
Backwards equation T(p, h) in Region 3b Eq.
const std::string pressure
Definition: NS.h:26
Real temperature_from_ph3a(Real pressure, Real enthalpy) const
Backwards equation T(p, h) in Region 3a Eq.
unsigned int inRegionPH(Real pressure, Real enthalpy) const
Determines the phase region that the given pressure and enthaply values lie in.
Real temperature_from_ph2c(Real pressure, Real enthalpy) const
Backwards equation T(p, h) in Region 2c Eq.

◆ temperature_from_ph1()

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 1721 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1722 {
1723  Real pi = pressure / 1.0e6;
1724  Real eta = enthalpy / 2500.0e3;
1725  Real sum = 0.0;
1726 
1727  for (std::size_t i = 0; i < _nph1.size(); ++i)
1728  sum += _nph1[i] * MathUtils::pow(pi, _Iph1[i]) * MathUtils::pow(eta + 1.0, _Jph1[i]);
1729 
1730  return sum;
1731 }
const std::array< int, 20 > _Iph1
const std::string enthalpy
Definition: NS.h:28
const std::array< int, 20 > _Jph1
const std::array< Real, 20 > _nph1
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:26

◆ temperature_from_ph2a()

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 1734 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1735 {
1736  Real pi = pressure / 1.0e6;
1737  Real eta = enthalpy / 2000.0e3;
1738  Real sum = 0.0;
1739 
1740  for (std::size_t i = 0; i < _nph2a.size(); ++i)
1741  sum += _nph2a[i] * MathUtils::pow(pi, _Iph2a[i]) * MathUtils::pow(eta - 2.1, _Jph2a[i]);
1742 
1743  return sum;
1744 }
const std::array< Real, 36 > _nph2a
const std::array< int, 36 > _Jph2a
const std::string enthalpy
Definition: NS.h:28
const std::array< int, 36 > _Iph2a
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:26

◆ temperature_from_ph2b()

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 1747 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1748 {
1749  Real pi = pressure / 1.0e6;
1750  Real eta = enthalpy / 2000.0e3;
1751  Real sum = 0.0;
1752 
1753  for (std::size_t i = 0; i < _nph2b.size(); ++i)
1754  sum += _nph2b[i] * MathUtils::pow(pi - 2.0, _Iph2b[i]) * MathUtils::pow(eta - 2.6, _Jph2b[i]);
1755 
1756  return sum;
1757 }
const std::array< Real, 38 > _nph2b
const std::string enthalpy
Definition: NS.h:28
const std::array< int, 38 > _Jph2b
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< int, 38 > _Iph2b
const std::string pressure
Definition: NS.h:26

◆ temperature_from_ph2c()

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 1760 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1761 {
1762  Real pi = pressure / 1.0e6;
1763  Real eta = enthalpy / 2000.0e3;
1764  Real sum = 0.0;
1765 
1766  for (std::size_t i = 0; i < _nph2c.size(); ++i)
1767  sum += _nph2c[i] * MathUtils::pow(pi + 25.0, _Iph2c[i]) * MathUtils::pow(eta - 1.8, _Jph2c[i]);
1768 
1769  return sum;
1770 }
const std::array< int, 23 > _Jph2c
const std::string enthalpy
Definition: NS.h:28
const std::array< int, 23 > _Iph2c
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:26
const std::array< Real, 23 > _nph2c

◆ temperature_from_ph3a()

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 1788 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1789 {
1790  Real pi = pressure / 100.0e6;
1791  Real eta = enthalpy / 2300.0e3;
1792  Real sum = 0.0;
1793 
1794  for (std::size_t i = 0; i < _nph3a.size(); ++i)
1795  sum +=
1796  _nph3a[i] * MathUtils::pow(pi + 0.24, _Iph3a[i]) * MathUtils::pow(eta - 0.615, _Jph3a[i]);
1797 
1798  return sum * 760.0;
1799 }
const std::string enthalpy
Definition: NS.h:28
const std::array< int, 31 > _Jph3a
const std::array< int, 31 > _Iph3a
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 31 > _nph3a
const std::string pressure
Definition: NS.h:26

◆ temperature_from_ph3b()

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 1802 of file Water97FluidProperties.C.

Referenced by temperature_from_ph().

1803 {
1804  Real pi = pressure / 100.0e6;
1805  Real eta = enthalpy / 2800.0e3;
1806  Real sum = 0.0;
1807 
1808  for (std::size_t i = 0; i < _nph3b.size(); ++i)
1809  sum +=
1810  _nph3b[i] * MathUtils::pow(pi + 0.298, _Iph3b[i]) * MathUtils::pow(eta - 0.72, _Jph3b[i]);
1811 
1812  return sum * 860.0;
1813 }
const std::array< int, 33 > _Jph3b
const std::array< Real, 33 > _nph3b
const std::array< int, 33 > _Iph3b
const std::string enthalpy
Definition: NS.h:28
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::string pressure
Definition: NS.h:26

◆ tempXY()

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 1450 of file Water97FluidProperties.C.

Referenced by subregion3().

1451 {
1452  Real pi = pressure / 1.0e6;
1453 
1454  // Choose the constants based on the string xy
1455  unsigned int row;
1456 
1457  switch (xy)
1458  {
1459  case AB:
1460  row = 0;
1461  break;
1462  case CD:
1463  row = 1;
1464  break;
1465  case GH:
1466  row = 2;
1467  break;
1468  case IJ:
1469  row = 3;
1470  break;
1471  case JK:
1472  row = 4;
1473  break;
1474  case MN:
1475  row = 5;
1476  break;
1477  case OP:
1478  row = 6;
1479  break;
1480  case QU:
1481  row = 7;
1482  break;
1483  case RX:
1484  row = 8;
1485  break;
1486  case UV:
1487  row = 9;
1488  break;
1489  case WX:
1490  row = 10;
1491  break;
1492  default:
1493  row = 0;
1494  }
1495 
1496  Real sum = 0.0;
1497 
1498  if (xy == AB || xy == OP || xy == WX)
1499  for (std::size_t i = 0; i < _tempXY_n[row].size(); ++i)
1500  sum += _tempXY_n[row][i] * MathUtils::pow(std::log(pi),