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

Ideal gas fluid properties for (pressure, temperature) variables. More...

#include <IdealGasFluidPropertiesPT.h>

Inheritance diagram for IdealGasFluidPropertiesPT:
[legend]

Public Member Functions

 IdealGasFluidPropertiesPT (const InputParameters &parameters)
 
virtual Real p_from_v_e (Real v, Real e) const override
 
virtual void p_from_v_e (Real v, Real e, Real &p, Real &dp_dv, Real &dp_de) const override
 
virtual Real T_from_v_e (Real v, Real e) const override
 
virtual void T_from_v_e (Real v, Real e, Real &T, Real &dT_dv, Real &dT_de) const override
 
virtual Real c_from_v_e (Real v, Real e) const override
 
virtual void c_from_v_e (Real v, Real e, Real &c, Real &dc_dv, Real &dc_de) const override
 
virtual Real cp_from_v_e (Real v, Real e) const override
 
virtual void cp_from_v_e (Real v, Real e, Real &cp, Real &dcp_dv, Real &dcp_de) const override
 
virtual Real cv_from_v_e (Real v, Real e) const override
 
virtual Real mu_from_v_e (Real v, Real e) const override
 
virtual Real k_from_v_e (Real v, Real e) const override
 
virtual Real s_from_v_e (Real v, Real e) const override
 
virtual void s_from_v_e (Real v, Real e, Real &s, Real &ds_dv, Real &ds_de) const override
 
virtual Real s_from_p_T (Real p, Real T) const override
 
virtual void s_from_p_T (Real p, Real T, Real &s, Real &ds_dp, Real &ds_dT) const override
 
virtual Real s_from_h_p (Real h, Real p) const override
 
virtual void s_from_h_p (Real h, Real p, Real &s, Real &ds_dh, Real &ds_dp) const override
 
virtual Real rho_from_p_s (Real p, Real s) const override
 
virtual void rho_from_p_s (Real p, Real s, Real &rho, Real &drho_dp, Real &drho_ds) const override
 
virtual Real e_from_v_h (Real v, Real h) const override
 
virtual void e_from_v_h (Real v, Real h, Real &e, Real &de_dv, Real &de_dh) const override
 
virtual Real rho_from_p_T (Real p, Real T) const override
 
virtual void rho_from_p_T (Real p, Real T, Real &rho, Real &drho_dp, Real &drho_dT) const override
 
virtual Real e_from_p_rho (Real p, Real rho) const override
 
virtual void e_from_p_rho (Real p, Real rho, Real &e, Real &de_dp, Real &de_drho) const override
 
virtual Real e_from_T_v (Real T, Real v) const override
 
virtual void e_from_T_v (Real T, Real v, Real &e, Real &de_dT, Real &de_dv) const override
 
virtual Real p_from_T_v (Real T, Real v) const override
 
virtual void p_from_T_v (Real T, Real v, Real &p, Real &dp_dT, Real &dp_dv) const override
 
virtual Real h_from_T_v (Real T, Real v) const override
 
virtual void h_from_T_v (Real T, Real v, Real &h, Real &dh_dT, Real &dh_dv) const override
 
virtual Real s_from_T_v (Real T, Real v) const override
 
virtual void s_from_T_v (Real T, Real v, Real &s, Real &ds_dT, Real &ds_dv) const override
 
virtual Real cv_from_T_v (Real T, Real v) const override
 
virtual Real h_from_p_T (Real p, Real T) const override
 
virtual void h_from_p_T (Real p, Real T, Real &h, Real &dh_dp, Real &dh_dT) const override
 
virtual Real e_from_p_T (Real p, Real T) const override
 Internal energy from pressure and temperature. More...
 
virtual void e_from_p_T (Real p, Real T, Real &e, Real &de_dp, Real &de_dT) const override
 Internal energy and its derivatives from pressure and temperature. More...
 
virtual Real p_from_h_s (Real h, Real s) const override
 
virtual void p_from_h_s (Real h, Real s, Real &p, Real &dp_dh, Real &dp_ds) const override
 
virtual Real g_from_v_e (Real v, Real e) const override
 
virtual Real T_from_p_h (Real p, Real h) const override
 Temperature from pressure and specific enthalpy. More...
 
virtual Real cv_from_p_T (Real p, Real T) const override
 
virtual Real cp_from_p_T (Real p, Real T) const override
 
virtual void cp_from_p_T (Real p, Real T, Real &cp, Real &dcp_dp, Real &dcp_dT) const override
 
virtual Real mu_from_p_T (Real p, Real T) const override
 
virtual void mu_from_p_T (Real p, Real T, Real &mu, Real &dmu_dp, Real &dmu_dT) const override
 
virtual Real k_from_p_T (Real pressure, Real temperature) const override
 
virtual void k_from_p_T (Real pressure, Real temperature, Real &k, Real &dk_dp, Real &dk_dT) const override
 
virtual std::string fluidName () const override
 Fluid name. More...
 
virtual Real molarMass () const override
 Molar mass [kg/mol]. More...
 
virtual Real gamma_from_v_e (Real v, Real e) const override
 Adiabatic index - ratio of specific heats. More...
 
virtual Real gamma_from_p_T (Real p, Real T) const override
 Adiabatic index - ratio of specific heats. More...
 
virtual Real c_from_p_T (Real p, Real T) const override
 
virtual Real henryConstant (Real temperature) const override
 Henry's law constant for dissolution in water. More...
 
virtual void henryConstant (Real temperature, Real &Kh, Real &dKh_dT) const override
 Henry's law constant for dissolution in water and derivative wrt temperature. More...
 
virtual Real gamma () const
 
virtual Real cv () const
 
virtual Real cp () const
 
virtual Real rho (Real p, Real T) const
 Density from pressure and temperature. More...
 
e e e e s T T T T T rho v v T virtual e Real s (Real pressure, Real temperature) const
 
virtual void mu_from_rho_T (Real density, Real temperature, Real ddensity_dT, Real &mu, Real &dmu_drho, Real &dmu_dT) const
 Dynamic viscosity and its derivatives wrt density and temperature TODO: this shouldn't need 3 input args - AD will assume/call the 2-input version. More...
 
virtual Real beta_from_p_T (Real, Real) const
 
virtual void beta_from_p_T (Real, Real, Real &, Real &, Real &) const
 
virtual void rho_dpT (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const
 Density and its derivatives from pressure and temperature. More...
 
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_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 h (Real p, Real T) const
 Specific enthalpy from pressure and temperature. More...
 
virtual void h_dpT (Real pressure, Real temperature, Real &h, Real &dh_dp, Real &dh_dT) const
 Specific enthalpy and its derivatives from pressure and temperature. More...
 
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 beta (Real pressure, Real temperature) const
 
virtual Real criticalPressure () const
 Critical pressure. More...
 
virtual Real criticalTemperature () const
 Critical temperature. More...
 
virtual Real criticalDensity () const
 Critical density. More...
 
virtual Real criticalInternalEnergy () const
 Critical specific internal energy. More...
 
virtual Real triplePointPressure () const
 Triple point pressure. More...
 
virtual Real triplePointTemperature () const
 Triple point temperature. More...
 
virtual void rho_e_from_p_T (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &e, Real &de_dp, Real &de_dT) const
 Density and internal energy and their derivatives wrt pressure and temperature. More...
 
virtual void rho_e_dpT (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &e, Real &de_dp, Real &de_dT) const
 
virtual Real c (Real pressure, Real temperature) const
 
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 void mu_drhoT_from_rho_T (Real density, Real temperature, Real ddensity_dT, Real &mu, Real &dmu_drho, Real &dmu_dT) const
 
virtual void rho_mu (Real pressure, Real temperature, Real &rho, Real &mu) const
 Density and viscosity. More...
 
virtual void rho_mu_from_p_T (Real pressure, Real temperature, Real &rho, Real &mu) const
 
virtual void rho_mu_from_p_T (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &mu, Real &dmu_dp, Real &dmu_dT) const
 Density and viscosity and their derivatives wrt pressure and temperature. 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
 
virtual Real k (Real pressure, Real temperature) const
 Thermal conductivity. More...
 
virtual void k_dpT (Real pressure, Real temperature, Real &k, Real &dk_dp, Real &dk_dT) const
 Thermal conductivity and its derivatives wrt pressure and temperature. More...
 
virtual void henryConstant_dT (Real temperature, Real &Kh, Real &dKh_dT) const
 
virtual Real vaporPressure (Real temperature) const
 Vapor pressure. More...
 
virtual void vaporPressure (Real temperature, Real &psat, Real &dpsat_dT) const
 Vapor pressure. More...
 
virtual void vaporPressure_dT (Real temperature, Real &psat, Real &dpsat_dT) const
 
virtual void execute () final
 
virtual void initialize () final
 
virtual void finalize () final
 
virtual void threadJoin (const UserObject &) final
 
virtual void subdomainSetup () final
 

Protected Member Functions

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 (Real temperature, Real &Kh, Real &dKh_dT, Real A, Real B, Real C) const
 
virtual void henryConstantIAPWS_dT (Real temperature, Real &Kh, Real &dKh_dT, Real A, Real B, Real C) const
 

Protected Attributes

Real _gamma
 Adiabatic index (ratio of specific heats cp/cv) More...
 
Real _R_specific
 Specific gas constant (R / molar mass) More...
 
Real _cv
 Specific heat at constant volume. More...
 
Real _cp
 Specific heat at constant pressure. More...
 
const Real _mu
 Dynamic viscosity. More...
 
const Real _k
 Thermal conductivity. More...
 
Real _molar_mass
 molar mass More...
 
const Real _henry_constant
 Henry constant. More...
 
const Real _R
 Universal gas constant (J/mol/K) More...
 
const Real _T_c2k
 Conversion of temperature from Celsius to Kelvin. More...
 
const bool _allow_imperfect_jacobians
 Flag to set unimplemented Jacobian entries to zero. More...
 
 propfunc (p, v, e) propfunc(T
 Compute a fluid property given for the state defined by two given properties. More...
 
e propfunc (c, v, e) propfunc(cp
 
e e propfunc (cv, v, e) propfunc(mu
 
e e e propfunc (k, v, e) propfunc(s
 
e e e e propfunc (s, h, p) propfunc(rho
 
e e e e s propfunc (e, v, h) propfunc(s
 
e e e e s T propfunc (pp_sat, p, T) propfunc(mu
 
e e e e s T T propfunc (k, rho, T) propfunc(c
 
e e e e s T T T propfunc (cp, p, T) propfunc(cv
 
e e e e s T T T T propfunc (mu, p, T) propfunc(k
 
e e e e s T T T T T propfunc (rho, p, T) propfunc(e
 
e e e e s T T T T T rho propfunc (e, T, v) propfunc(p
 
e e e e s T T T T T rho v propfunc (h, T, v) propfunc(s
 
e e e e s T T T T T rho v v propfunc (cv, T, v) propfunc(h
 
e e e e s T T T T T rho v v T propfunc (p, h, s) propfunc(g
 
 v
 
e v
 
e e v
 
e e e v
 
e e e e s T T T T T rho v v T v
 
e e e e p
 
e e e e s p
 
e e e e s T T p
 
e e e e s T T T p
 
e e e e s T T T T p
 
e e e e s T T T T T p
 
e e e e s T T T T T rho v v p
 
e e e e s T rho
 
e e e e s T T T T T rho T
 
e e e e s T T T T T rho v T
 

Detailed Description

Ideal gas fluid properties for (pressure, temperature) variables.

Default parameters are for air at atmospheric pressure and temperature.

Definition at line 27 of file IdealGasFluidPropertiesPT.h.

Constructor & Destructor Documentation

◆ IdealGasFluidPropertiesPT()

IdealGasFluidPropertiesPT::IdealGasFluidPropertiesPT ( const InputParameters &  parameters)

Definition at line 22 of file IdealGasFluidPropertiesPT.C.

23  : IdealGasFluidProperties(parameters)
24 {
25  mooseDeprecated(
26  name(),
27  ": IdealGasFluidPropertiesPT is deprecated. Just use IdealGasFluidProperties instead");
28 }
IdealGasFluidProperties(const InputParameters &parameters)
const std::string name
Definition: Setup.h:22

Member Function Documentation

◆ beta()

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

◆ beta_from_p_T() [1/2]

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

Reimplemented in SimpleFluidProperties.

Definition at line 79 of file SinglePhaseFluidProperties.C.

Referenced by SinglePhaseFluidProperties::beta().

80 {
81  // The volumetric thermal expansion coefficient is defined as
82  // 1/v dv/dT)_p
83  // It is the fractional change rate of volume with respect to temperature change
84  // at constant pressure. Here it is coded as
85  // - 1/rho drho/dT)_p
86  // using chain rule with v = v(rho)
87 
88  Real rho, drho_dp, drho_dT;
89  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
90  return -drho_dT / rho;
91 }

◆ beta_from_p_T() [2/2]

void SinglePhaseFluidProperties::beta_from_p_T ( Real  ,
Real  ,
Real &  ,
Real &  ,
Real &   
) const
virtualinherited

Reimplemented in SimpleFluidProperties.

Definition at line 73 of file SinglePhaseFluidProperties.C.

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

◆ c()

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

Definition at line 336 of file SinglePhaseFluidProperties.C.

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

337 {
338  mooseDeprecated(name(), ": c() is deprecated. Use c_from_p_T() instead");
339 
340  return c_from_p_T(p, T);
341 }
const std::string name
Definition: Setup.h:22

◆ c_from_p_T()

Real IdealGasFluidProperties::c_from_p_T ( Real  p,
Real  T 
) const
overridevirtualinherited

Definition at line 133 of file IdealGasFluidProperties.C.

134 {
135  return std::sqrt(_cp * _R * T / (_cv * _molar_mass));
136 }
const Real _R
Universal gas constant (J/mol/K)
Real _cv
Specific heat at constant volume.
Real _cp
Specific heat at constant pressure.

◆ c_from_v_e() [1/2]

Real IdealGasFluidProperties::c_from_v_e ( Real  v,
Real  e 
) const
overridevirtualinherited

Definition at line 107 of file IdealGasFluidProperties.C.

Referenced by NSInitialCondition::value().

108 {
109  Real T = T_from_v_e(v, e);
110 
111  const Real c2 = _gamma * _R_specific * T;
112  if (c2 < 0)
113  mooseException(name() + ": Sound speed squared (gamma * R * T) is negative: c2 = " +
114  Moose::stringify(c2) + ".");
115 
116  return std::sqrt(c2);
117 }
Real _R_specific
Specific gas constant (R / molar mass)
virtual Real T_from_v_e(Real v, Real e) const override
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
const std::string name
Definition: Setup.h:22
virtual Real e(Real pressure, Real temperature) const

◆ c_from_v_e() [2/2]

void IdealGasFluidProperties::c_from_v_e ( Real  v,
Real  e,
Real &  c,
Real &  dc_dv,
Real &  dc_de 
) const
overridevirtualinherited

Definition at line 120 of file IdealGasFluidProperties.C.

121 {
122  Real T, dT_dv, dT_de;
123  T_from_v_e(v, e, T, dT_dv, dT_de);
124 
125  c = std::sqrt(_gamma * _R_specific * T);
126 
127  const Real dc_dT = 0.5 / c * _gamma * _R_specific;
128  dc_dv = dc_dT * dT_dv;
129  dc_de = dc_dT * dT_de;
130 }
Real _R_specific
Specific gas constant (R / molar mass)
virtual Real T_from_v_e(Real v, Real e) const override
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
virtual Real c(Real pressure, Real temperature) const
virtual Real e(Real pressure, Real temperature) const

◆ cp()

virtual Real IdealGasFluidProperties::cp ( ) const
inlinevirtualinherited

◆ cp_from_p_T() [1/2]

Real IdealGasFluidProperties::cp_from_p_T ( Real  p,
Real  T 
) const
overridevirtualinherited

Definition at line 459 of file IdealGasFluidProperties.C.

Referenced by IdealGasFluidProperties::cp_from_p_T().

460 {
461  return _cp;
462 }
Real _cp
Specific heat at constant pressure.

◆ cp_from_p_T() [2/2]

void IdealGasFluidProperties::cp_from_p_T ( Real  p,
Real  T,
Real &  cp,
Real &  dcp_dp,
Real &  dcp_dT 
) const
overridevirtualinherited

Definition at line 465 of file IdealGasFluidProperties.C.

466 {
467  cp = cp_from_p_T(p, T);
468  dcp_dp = 0.0;
469  dcp_dT = 0.0;
470 }
virtual Real cp_from_p_T(Real p, Real T) const override

◆ cp_from_v_e() [1/2]

Real IdealGasFluidProperties::cp_from_v_e ( Real  v,
Real  e 
) const
overridevirtualinherited

Definition at line 138 of file IdealGasFluidProperties.C.

Referenced by IdealGasFluidProperties::cp_from_v_e().

138 { return _cp; }
Real _cp
Specific heat at constant pressure.

◆ cp_from_v_e() [2/2]

void IdealGasFluidProperties::cp_from_v_e ( Real  v,
Real  e,
Real &  cp,
Real &  dcp_dv,
Real &  dcp_de 
) const
overridevirtualinherited

Definition at line 141 of file IdealGasFluidProperties.C.

142 {
143  cp = cp_from_v_e(v, e);
144  dcp_dv = 0.0;
145  dcp_de = 0.0;
146 }
virtual Real cp_from_v_e(Real v, Real e) const override
virtual Real e(Real pressure, Real temperature) const

◆ criticalDensity()

Real SinglePhaseFluidProperties::criticalDensity ( ) const
virtualinherited

◆ criticalInternalEnergy()

Real SinglePhaseFluidProperties::criticalInternalEnergy ( ) const
virtualinherited

Critical specific internal energy.

Returns
specific internal energy (J/kg)

Reimplemented in StiffenedGasFluidProperties.

Definition at line 124 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::p_T_from_v_e().

125 {
126  mooseError(name(), ": criticalInternalEnergy() is not implemented");
127 }
const std::string name
Definition: Setup.h:22

◆ criticalPressure()

Real SinglePhaseFluidProperties::criticalPressure ( ) const
virtualinherited

Critical pressure.

Returns
critical pressure (Pa)

Reimplemented in HydrogenFluidProperties, CO2FluidProperties, NitrogenFluidProperties, MethaneFluidProperties, NaClFluidProperties, and Water97FluidProperties.

Definition at line 106 of file SinglePhaseFluidProperties.C.

107 {
108  mooseError(name(), ": criticalPressure() is not implemented");
109 }
const std::string name
Definition: Setup.h:22

◆ criticalTemperature()

Real SinglePhaseFluidProperties::criticalTemperature ( ) const
virtualinherited

◆ cv()

virtual Real IdealGasFluidProperties::cv ( ) const
inlinevirtualinherited

◆ cv_from_p_T()

Real IdealGasFluidProperties::cv_from_p_T ( Real  p,
Real  T 
) const
overridevirtualinherited

Definition at line 454 of file IdealGasFluidProperties.C.

455 {
456  return _cv;
457 }
Real _cv
Specific heat at constant volume.

◆ cv_from_T_v()

Real IdealGasFluidProperties::cv_from_T_v ( Real  T,
Real  v 
) const
overridevirtualinherited

Definition at line 378 of file IdealGasFluidProperties.C.

378 { return _cv; }
Real _cv
Specific heat at constant volume.

◆ cv_from_v_e()

Real IdealGasFluidProperties::cv_from_v_e ( Real  v,
Real  e 
) const
overridevirtualinherited

Definition at line 148 of file IdealGasFluidProperties.C.

148 { return _cv; }
Real _cv
Specific heat at constant volume.

◆ e()

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

Definition at line 291 of file SinglePhaseFluidProperties.C.

Referenced by Water97FluidProperties::b2bc(), StiffenedGasFluidProperties::c_from_v_e(), IdealGasFluidProperties::c_from_v_e(), NaClFluidProperties::cp_from_p_T(), StiffenedGasFluidProperties::cp_from_v_e(), IdealGasFluidProperties::cp_from_v_e(), Water97FluidProperties::densityRegion3(), SinglePhaseFluidProperties::e_dpT(), StiffenedGasFluidProperties::e_from_p_rho(), IdealGasFluidProperties::e_from_p_rho(), HelmholtzFluidProperties::e_from_p_T(), Water97FluidProperties::e_from_p_T(), NaClFluidProperties::e_from_p_T(), IdealGasFluidProperties::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(), SinglePhaseFluidProperties::gamma_from_v_e(), NaClFluidProperties::h_from_p_T(), NitrogenFluidProperties::mu_from_rho_T(), HydrogenFluidProperties::mu_from_rho_T(), CO2FluidProperties::mu_from_rho_T(), StiffenedGasFluidProperties::p_from_T_v(), StiffenedGasFluidProperties::p_from_v_e(), IdealGasFluidProperties::p_from_v_e(), SinglePhaseFluidProperties::rho_e_dpT(), SinglePhaseFluidProperties::rho_e_from_p_T(), StiffenedGasFluidProperties::s_from_T_v(), StiffenedGasFluidProperties::s_from_v_e(), IdealGasFluidProperties::s_from_v_e(), Water97FluidProperties::subregion3(), Water97FluidProperties::subregionVolume(), SinglePhaseFluidProperties::T_from_p_h(), StiffenedGasFluidProperties::T_from_v_e(), IdealGasFluidProperties::T_from_v_e(), StiffenedGasFluidProperties::v_e_spndl_from_T(), and Water97FluidProperties::vaporTemperature().

292 {
293  mooseDeprecated(name(), ": e() is deprecated. Use e_from_p_T() instead");
294 
295  return e_from_p_T(p, T);
296 }
virtual Real e_from_p_T(Real p, Real T) const
Internal energy from pressure and temperature.
const std::string name
Definition: Setup.h:22

◆ e_dpT()

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

Definition at line 299 of file SinglePhaseFluidProperties.C.

300 {
301  mooseDeprecated(name(), ": e_dpT() is deprecated. Use e_from_p_T() instead");
302 
303  e_from_p_T(p, T, e, de_dp, de_dT);
304 }
virtual Real e_from_p_T(Real p, Real T) const
Internal energy from pressure and temperature.
const std::string name
Definition: Setup.h:22
virtual Real e(Real pressure, Real temperature) const

◆ e_from_p_rho() [1/2]

Real IdealGasFluidProperties::e_from_p_rho ( Real  p,
Real  rho 
) const
overridevirtualinherited

Definition at line 304 of file IdealGasFluidProperties.C.

Referenced by IdealGasFluidProperties::e_from_p_rho().

305 {
306  return p / (_gamma - 1.0) / rho;
307 }
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)

◆ e_from_p_rho() [2/2]

void IdealGasFluidProperties::e_from_p_rho ( Real  p,
Real  rho,
Real &  e,
Real &  de_dp,
Real &  de_drho 
) const
overridevirtualinherited

Definition at line 310 of file IdealGasFluidProperties.C.

312 {
313  e = e_from_p_rho(p, rho);
314  de_dp = 1.0 / (_gamma - 1.0) / rho;
315  de_drho = -p / (_gamma - 1.0) / rho / rho;
316 }
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
virtual Real e_from_p_rho(Real p, Real rho) const override
virtual Real e(Real pressure, Real temperature) const

◆ e_from_p_T() [1/2]

Real IdealGasFluidProperties::e_from_p_T ( Real  p,
Real  T 
) const
overridevirtualinherited

Internal energy from pressure and temperature.

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 395 of file IdealGasFluidProperties.C.

Referenced by IdealGasFluidProperties::e_from_p_T().

396 {
397  return _cv * T;
398 }
Real _cv
Specific heat at constant volume.

◆ e_from_p_T() [2/2]

void IdealGasFluidProperties::e_from_p_T ( Real  p,
Real  T,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
overridevirtualinherited

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 401 of file IdealGasFluidProperties.C.

402 {
403  e = e_from_p_T(p, T);
404  de_dp = 0.0;
405  de_dT = _cv;
406 }
Real _cv
Specific heat at constant volume.
virtual Real e_from_p_T(Real p, Real T) const override
Internal energy from pressure and temperature.
virtual Real e(Real pressure, Real temperature) const

◆ e_from_T_v() [1/2]

Real IdealGasFluidProperties::e_from_T_v ( Real  T,
Real  v 
) const
overridevirtualinherited

Definition at line 319 of file IdealGasFluidProperties.C.

320 {
321  return _cv * T;
322 }
Real _cv
Specific heat at constant volume.

◆ e_from_T_v() [2/2]

void IdealGasFluidProperties::e_from_T_v ( Real  T,
Real  v,
Real &  e,
Real &  de_dT,
Real &  de_dv 
) const
overridevirtualinherited

Definition at line 325 of file IdealGasFluidProperties.C.

326 {
327  e = _cv * T;
328  de_dT = _cv;
329  de_dv = 0.0;
330 }
Real _cv
Specific heat at constant volume.
virtual Real e(Real pressure, Real temperature) const

◆ e_from_v_h() [1/2]

Real IdealGasFluidProperties::e_from_v_h ( Real  v,
Real  h 
) const
overridevirtualinherited

Definition at line 275 of file IdealGasFluidProperties.C.

Referenced by IdealGasFluidProperties::e_from_v_h().

276 {
277  return h / _gamma;
278 }
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)

◆ e_from_v_h() [2/2]

void IdealGasFluidProperties::e_from_v_h ( Real  v,
Real  h,
Real &  e,
Real &  de_dv,
Real &  de_dh 
) const
overridevirtualinherited

Definition at line 281 of file IdealGasFluidProperties.C.

282 {
283  e = e_from_v_h(v, h);
284  de_dv = 0.0;
285  de_dh = 1.0 / _gamma;
286 }
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
virtual Real e_from_v_h(Real v, Real h) const override
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
virtual Real e(Real pressure, Real temperature) const

◆ 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 451 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::p_T_from_v_e().

452 {
453  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
454 }
const std::string name
Definition: Setup.h:22

◆ execute()

virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Definition at line 35 of file FluidProperties.h.

35 {}

◆ finalize()

virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Definition at line 37 of file FluidProperties.h.

37 {}

◆ fluidName()

std::string IdealGasFluidProperties::fluidName ( ) const
overridevirtualinherited

Fluid name.

Returns
string representing fluid name

Reimplemented from SinglePhaseFluidProperties.

Definition at line 69 of file IdealGasFluidProperties.C.

70 {
71  return "ideal_gas";
72 }

◆ g_from_v_e()

Real IdealGasFluidProperties::g_from_v_e ( Real  v,
Real  e 
) const
overridevirtualinherited

Definition at line 427 of file IdealGasFluidProperties.C.

428 {
429  // g(p,T) for SGEOS is given by Equation (37) in the following reference:
430  //
431  // Ray A. Berry, Richard Saurel, Olivier LeMetayer
432  // The discrete equation method (DEM) for fully compressible, two-phase flows in
433  // ducts of spatially varying cross-section
434  // Nuclear Engineering and Design 240 (2010) p. 3797-3818
435  //
436  const Real p = p_from_v_e(v, e);
437  const Real T = T_from_v_e(v, e);
438 
439  return _gamma * _cv * T - _cv * T * std::log(std::pow(T, _gamma) / std::pow(p, _gamma - 1.0));
440 }
virtual Real p_from_v_e(Real v, Real e) const override
virtual Real T_from_v_e(Real v, Real e) const override
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
Real _cv
Specific heat at constant volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual Real e(Real pressure, Real temperature) const

◆ gamma()

virtual Real IdealGasFluidProperties::gamma ( ) const
inlinevirtualinherited

◆ gamma_from_p_T()

Real IdealGasFluidProperties::gamma_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtualinherited

Adiabatic index - ratio of specific heats.

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 152 of file IdealGasFluidProperties.C.

152 { return _gamma; }
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)

◆ gamma_from_v_e()

Real IdealGasFluidProperties::gamma_from_v_e ( Real  v,
Real  e 
) const
overridevirtualinherited

Adiabatic index - ratio of specific heats.

Parameters
vspecific volume
especific internal energy
Returns
gamma (-)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 150 of file IdealGasFluidProperties.C.

150 { return _gamma; }
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)

◆ 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

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

Definition at line 436 of file SinglePhaseFluidProperties.C.

437 {
438  mooseDeprecated(name(), ": h_dpT() is deprecated. Use h_from_p_T() instead");
439 
440  h_from_p_T(p, T, h, dh_dp, dh_dT);
441 }
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
const std::string name
Definition: Setup.h:22

◆ h_from_p_T() [1/2]

Real IdealGasFluidProperties::h_from_p_T ( Real  p,
Real  T 
) const
overridevirtualinherited

Definition at line 381 of file IdealGasFluidProperties.C.

Referenced by IdealGasFluidProperties::h_from_p_T().

382 {
383  return _cp * T;
384 }
Real _cp
Specific heat at constant pressure.

◆ h_from_p_T() [2/2]

void IdealGasFluidProperties::h_from_p_T ( Real  p,
Real  T,
Real &  h,
Real &  dh_dp,
Real &  dh_dT 
) const
overridevirtualinherited

Definition at line 387 of file IdealGasFluidProperties.C.

388 {
389  h = h_from_p_T(p, T);
390  dh_dp = 0.0;
391  dh_dT = _cp;
392 }
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
Real _cp
Specific heat at constant pressure.
virtual Real h_from_p_T(Real p, Real T) const override

◆ h_from_T_v() [1/2]

Real IdealGasFluidProperties::h_from_T_v ( Real  T,
Real  v 
) const
overridevirtualinherited

Definition at line 347 of file IdealGasFluidProperties.C.

348 {
349  return _gamma * _cv * T;
350 }
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
Real _cv
Specific heat at constant volume.

◆ h_from_T_v() [2/2]

void IdealGasFluidProperties::h_from_T_v ( Real  T,
Real  v,
Real &  h,
Real &  dh_dT,
Real &  dh_dv 
) const
overridevirtualinherited

Definition at line 353 of file IdealGasFluidProperties.C.

354 {
355  h = _gamma * _cv * T;
356  dh_dT = _gamma * _cv;
357  dh_dv = 0.0;
358 }
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
Real _cv
Specific heat at constant volume.

◆ henryConstant() [1/2]

Real IdealGasFluidProperties::henryConstant ( Real  temperature) const
overridevirtualinherited

Henry's law constant for dissolution in water.

Parameters
temperaturefluid temperature (K)
Returns
Henry's constant

Reimplemented from SinglePhaseFluidProperties.

Definition at line 498 of file IdealGasFluidProperties.C.

498 { return _henry_constant; }
const Real _henry_constant
Henry constant.

◆ henryConstant() [2/2]

void IdealGasFluidProperties::henryConstant ( Real  temperature,
Real &  Kh,
Real &  dKh_dT 
) const
overridevirtualinherited

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 from SinglePhaseFluidProperties.

Definition at line 501 of file IdealGasFluidProperties.C.

502 {
503  Kh = _henry_constant;
504  dKh_dT = 0.0;
505 }
const Real _henry_constant
Henry constant.

◆ henryConstant_dT()

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

Definition at line 255 of file SinglePhaseFluidProperties.C.

256 {
257  mooseDeprecated(name(), ": henryConstant_dT() is deprecated. Use henryConstant() instead");
258 
259  henryConstant(T, Kh, dKh_dT);
260 }
const std::string name
Definition: Setup.h:22
virtual Real henryConstant(Real temperature) const
Henry&#39;s law constant for dissolution in water.

◆ henryConstantIAPWS() [1/2]

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 160 of file SinglePhaseFluidProperties.C.

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

161 {
162  const Real Tr = T / 647.096;
163  const Real tau = 1.0 - Tr;
164 
165  const Real lnkh =
166  A / Tr + B * std::pow(tau, 0.355) / Tr + C * std::pow(Tr, -0.41) * std::exp(tau);
167 
168  // The vapor pressure used in this formulation
169  const std::vector<Real> a{
170  -7.85951783, 1.84408259, -11.7866497, 22.6807411, -15.9618719, 1.80122502};
171  const std::vector<Real> b{1.0, 1.5, 3.0, 3.5, 4.0, 7.5};
172  Real sum = 0.0;
173 
174  for (std::size_t i = 0; i < a.size(); ++i)
175  sum += a[i] * std::pow(tau, b[i]);
176 
177  return 22.064e6 * std::exp(sum / Tr) * std::exp(lnkh);
178 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ henryConstantIAPWS() [2/2]

void SinglePhaseFluidProperties::henryConstantIAPWS ( Real  temperature,
Real &  Kh,
Real &  dKh_dT,
Real  A,
Real  B,
Real  C 
) const
protectedvirtualinherited

Definition at line 181 of file SinglePhaseFluidProperties.C.

183 {
184  const Real pc = 22.064e6;
185  const Real Tc = 647.096;
186 
187  const Real Tr = T / Tc;
188  const Real tau = 1.0 - Tr;
189 
190  const Real lnkh =
191  A / Tr + B * std::pow(tau, 0.355) / Tr + C * std::pow(Tr, -0.41) * std::exp(tau);
192  const Real dlnkh_dT =
193  (-A / Tr / Tr - B * std::pow(tau, 0.355) / Tr / Tr - 0.355 * B * std::pow(tau, -0.645) / Tr -
194  0.41 * C * std::pow(Tr, -1.41) * std::exp(tau) - C * std::pow(Tr, -0.41) * std::exp(tau)) /
195  Tc;
196 
197  // The vapor pressure used in this formulation
198  const std::vector<Real> a{
199  -7.85951783, 1.84408259, -11.7866497, 22.6807411, -15.9618719, 1.80122502};
200  const std::vector<Real> b{1.0, 1.5, 3.0, 3.5, 4.0, 7.5};
201  Real sum = 0.0;
202  Real dsum = 0.0;
203 
204  for (std::size_t i = 0; i < a.size(); ++i)
205  {
206  sum += a[i] * std::pow(tau, b[i]);
207  dsum += a[i] * b[i] * std::pow(tau, b[i] - 1.0);
208  }
209 
210  const Real p = pc * std::exp(sum / Tr);
211  const Real dp_dT = -p / Tc / Tr * (sum / Tr + dsum);
212 
213  // Henry's constant and its derivative wrt temperature
214  Kh = p * std::exp(lnkh);
215  dKh_dT = (p * dlnkh_dT + dp_dT) * std::exp(lnkh);
216 }
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

Definition at line 219 of file SinglePhaseFluidProperties.C.

221 {
222  mooseDeprecated(name(),
223  ":henryConstantIAPWS_dT() is deprecated. Use henryConstantIAPWS() instead");
224 
225  henryConstantIAPWS(T, Kh, dKh_dT, A, B, C);
226 }
const std::string name
Definition: Setup.h:22
virtual Real henryConstantIAPWS(Real temperature, Real A, Real B, Real C) const
IAPWS formulation of Henry&#39;s law constant for dissolution in water From Guidelines on the Henry&#39;s con...

◆ initialize()

virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 36 of file FluidProperties.h.

36 {}

◆ k()

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

Thermal conductivity.

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

Definition at line 404 of file SinglePhaseFluidProperties.C.

Referenced by SinglePhaseFluidProperties::k_dpT(), MethaneFluidProperties::k_from_p_T(), SimpleFluidProperties::k_from_p_T(), NitrogenFluidProperties::k_from_p_T(), HydrogenFluidProperties::k_from_p_T(), NaClFluidProperties::k_from_p_T(), IdealGasFluidProperties::k_from_p_T(), StiffenedGasFluidProperties::k_from_p_T(), TabulatedFluidProperties::k_from_p_T(), and CO2FluidProperties::k_from_p_T().

405 {
406  mooseDeprecated(name(), ": k() is deprecated. Use k_from_p_T() instead");
407 
408  return k_from_p_T(p, T);
409 }
const std::string name
Definition: Setup.h:22

◆ k_dpT()

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

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

Definition at line 412 of file SinglePhaseFluidProperties.C.

413 {
414  mooseDeprecated(name(), ": k_dpT() is deprecated. Use k_from_p_T() instead");
415 
416  k_from_p_T(p, T, k, dk_dp, dk_dT);
417 }
virtual Real k(Real pressure, Real temperature) const
Thermal conductivity.
const std::string name
Definition: Setup.h:22

◆ k_from_p_T() [1/2]

Real IdealGasFluidProperties::k_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtualinherited

Definition at line 485 of file IdealGasFluidProperties.C.

Referenced by IdealGasFluidProperties::k_from_p_T().

486 {
487  return _k;
488 }
const Real _k
Thermal conductivity.

◆ k_from_p_T() [2/2]

void IdealGasFluidProperties::k_from_p_T ( Real  pressure,
Real  temperature,
Real &  k,
Real &  dk_dp,
Real &  dk_dT 
) const
overridevirtualinherited

Definition at line 491 of file IdealGasFluidProperties.C.

492 {
493  k = k_from_p_T(p, T);
494  dk_dp = 0.0;
495  dk_dT = 0.0;
496 }
virtual Real k_from_p_T(Real pressure, Real temperature) const override
virtual Real k(Real pressure, Real temperature) const
Thermal conductivity.

◆ k_from_v_e()

Real IdealGasFluidProperties::k_from_v_e ( Real  v,
Real  e 
) const
overridevirtualinherited

Definition at line 156 of file IdealGasFluidProperties.C.

156 { return _k; }
const Real _k
Thermal conductivity.

◆ molarMass()

Real IdealGasFluidProperties::molarMass ( ) const
overridevirtualinherited

Molar mass [kg/mol].

Returns
molar mass

Reimplemented from SinglePhaseFluidProperties.

Definition at line 443 of file IdealGasFluidProperties.C.

444 {
445  return _molar_mass;
446 }

◆ 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 352 of file SinglePhaseFluidProperties.C.

353 {
354  mooseDeprecated(name(), ": mu_dpT() is deprecated. Use mu_from_p_T() instead");
355 
356  mu_from_p_T(p, T, mu, dmu_dp, dmu_dT);
357 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string name
Definition: Setup.h:22

◆ mu_drhoT_from_rho_T()

void SinglePhaseFluidProperties::mu_drhoT_from_rho_T ( Real  density,
Real  temperature,
Real  ddensity_dT,
Real &  mu,
Real &  dmu_drho,
Real &  dmu_dT 
) const
virtualinherited

Definition at line 235 of file SinglePhaseFluidProperties.C.

237 {
238  mooseDeprecated(name(), ":mu_drhoT_from_rho_T() is deprecated. Use mu_from_rho_T() instead");
239 
240  mu_from_rho_T(rho, T, drho_dT, mu, dmu_drho, dmu_dT);
241 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string name
Definition: Setup.h:22
virtual void mu_from_rho_T(Real density, Real temperature, Real ddensity_dT, Real &mu, Real &dmu_drho, Real &dmu_dT) const
Dynamic viscosity and its derivatives wrt density and temperature TODO: this shouldn&#39;t need 3 input a...

◆ mu_from_p_T() [1/2]

Real IdealGasFluidProperties::mu_from_p_T ( Real  p,
Real  T 
) const
overridevirtualinherited

Definition at line 472 of file IdealGasFluidProperties.C.

Referenced by IdealGasFluidProperties::mu_from_p_T().

473 {
474  return _mu;
475 }
const Real _mu
Dynamic viscosity.

◆ mu_from_p_T() [2/2]

void IdealGasFluidProperties::mu_from_p_T ( Real  p,
Real  T,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT 
) const
overridevirtualinherited

Definition at line 478 of file IdealGasFluidProperties.C.

479 {
480  mu = this->mu_from_p_T(p, T);
481  dmu_dp = 0.0;
482  dmu_dT = 0.0;
483 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
virtual Real mu_from_p_T(Real p, Real T) const override

◆ mu_from_rho_T()

void SinglePhaseFluidProperties::mu_from_rho_T ( Real  density,
Real  temperature,
Real  ddensity_dT,
Real &  mu,
Real &  dmu_drho,
Real &  dmu_dT 
) const
virtualinherited

Dynamic viscosity and its derivatives wrt density and temperature TODO: this shouldn't need 3 input args - AD will assume/call the 2-input version.

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 in Water97FluidProperties, CO2FluidProperties, HydrogenFluidProperties, and NitrogenFluidProperties.

Definition at line 229 of file SinglePhaseFluidProperties.C.

Referenced by SinglePhaseFluidProperties::mu_drhoT_from_rho_T().

230 {
231  mooseError(name(), ": mu_from_rho_T is not implemented.");
232 }
const std::string name
Definition: Setup.h:22

◆ mu_from_v_e()

Real IdealGasFluidProperties::mu_from_v_e ( Real  v,
Real  e 
) const
overridevirtualinherited

Definition at line 154 of file IdealGasFluidProperties.C.

154 { return _mu; }
const Real _mu
Dynamic viscosity.

◆ p_from_h_s() [1/2]

Real IdealGasFluidProperties::p_from_h_s ( Real  h,
Real  s 
) const
overridevirtualinherited

Definition at line 409 of file IdealGasFluidProperties.C.

Referenced by IdealGasFluidProperties::p_from_h_s().

410 {
411  return std::pow(h / (_gamma * _cv), _gamma / (_gamma - 1.0)) *
412  std::exp(-s / ((_gamma - 1.0) * _cv));
413 }
e e e e s T T T T T rho v v T virtual e Real s(Real pressure, Real temperature) const
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
Real _cv
Specific heat at constant volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ p_from_h_s() [2/2]

void IdealGasFluidProperties::p_from_h_s ( Real  h,
Real  s,
Real &  p,
Real &  dp_dh,
Real &  dp_ds 
) const
overridevirtualinherited

Definition at line 416 of file IdealGasFluidProperties.C.

417 {
418  p = p_from_h_s(h, s);
419  dp_dh = _gamma / (_gamma - 1.0) / (_gamma * _cv) *
420  std::pow(h / (_gamma * _cv), 1.0 / (_gamma - 1.0)) *
421  std::exp(-s / ((_gamma - 1.0) * _cv));
422  dp_ds = std::pow(h / (_gamma * _cv), _gamma / (_gamma - 1)) *
423  std::exp(-s / ((_gamma - 1) * _cv)) / ((1 - _gamma) * _cv);
424 }
e e e e s T T T T T rho v v T virtual e Real s(Real pressure, Real temperature) const
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
Real _cv
Specific heat at constant volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual Real p_from_h_s(Real h, Real s) const override

◆ p_from_T_v() [1/2]

Real IdealGasFluidProperties::p_from_T_v ( Real  T,
Real  v 
) const
overridevirtualinherited

Definition at line 333 of file IdealGasFluidProperties.C.

Referenced by IdealGasFluidProperties::s_from_T_v().

334 {
335  return (_gamma - 1.0) * _cv * T / v;
336 }
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
Real _cv
Specific heat at constant volume.

◆ p_from_T_v() [2/2]

void IdealGasFluidProperties::p_from_T_v ( Real  T,
Real  v,
Real &  p,
Real &  dp_dT,
Real &  dp_dv 
) const
overridevirtualinherited

Definition at line 339 of file IdealGasFluidProperties.C.

340 {
341  p = (_gamma - 1.0) * _cv * T / v;
342  dp_dT = (_gamma - 1.0) * _cv / v;
343  dp_dv = -(_gamma - 1.0) * _cv * T / (v * v);
344 }
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
Real _cv
Specific heat at constant volume.

◆ p_from_v_e() [1/2]

Real IdealGasFluidProperties::p_from_v_e ( Real  v,
Real  e 
) const
overridevirtualinherited

Definition at line 75 of file IdealGasFluidProperties.C.

Referenced by NSPressureAux::computeValue(), IdealGasFluidProperties::g_from_v_e(), IdealGasFluidProperties::p_from_v_e(), and IdealGasFluidProperties::s_from_v_e().

76 {
77  if (v == 0.0)
78  throw MooseException(
79  name() + ": Invalid value of specific volume detected (v = " + Moose::stringify(v) + ").");
80 
81  return (_gamma - 1.0) * e / v;
82 }
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
const std::string name
Definition: Setup.h:22
virtual Real e(Real pressure, Real temperature) const

◆ p_from_v_e() [2/2]

void IdealGasFluidProperties::p_from_v_e ( Real  v,
Real  e,
Real &  p,
Real &  dp_dv,
Real &  dp_de 
) const
overridevirtualinherited

Definition at line 85 of file IdealGasFluidProperties.C.

86 {
87  p = p_from_v_e(v, e);
88  dp_dv = -(_gamma - 1.0) * e / v / v;
89  dp_de = (_gamma - 1.0) / v;
90 }
virtual Real p_from_v_e(Real v, Real e) const override
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
virtual Real e(Real pressure, Real temperature) const

◆ propfunc() [1/15]

SinglePhaseFluidProperties::propfunc ( p  ,
v  ,
e   
)
inherited

Compute a fluid property given for the state defined by two given properties.

For all functions, the first two arguments are the given properties that define the fluid state. For the two-argument variants, the desired property is the return value. The five-argument variants also provide partial derivatives dx/da and dx/db where x is the desired property being computed, a is the first given property, and b is the second given property. The desired property, dx/da, and dx/db are stored into the 3rd, 4th, and 5th arguments respectively.

Properties/parameters used in these function are listed below with their units:

p pressure [Pa] T temperature [K] e specific internal energy [J/kg] v specific volume [m^3/kg] rho density [kg/m^3] h specific enthalpy [J/kg] s specific entropy [J/(kg*K)] mu viscosity [Pa*s] k thermal conductivity [W/(m*K)] c speed of sound [m/s] cp constant-pressure specific heat [J/K] cv constant-volume specific heat [J/K] beta volumetric thermal expansion coefficient [1/K] g Gibbs free energy [J] pp_sat partial pressure at saturation [Pa]

As an example:

// calculate pressure given specific vol and energy: auto pressure = your_fluid_properties_object.p_from_v_e(specific_vol, specific_energy);

// or use the derivative variant: Real dp_dv = 0; // derivative will be stored into here Real dp_de = 0; // derivative will be stored into here your_fluid_properties_object.p_from_v_e(specific_vol, specific_energy, pressure, dp_dv, dp_de);

Automatic differentiation (AD) support is provided through x_from_a_b(DualReal a, DualReal b) versions of the functions where a and b must be ADReal/DualNumber's calculated using all AD-supporting values:

auto v = 1/rho; // rho must be an AD non-linear variable. auto e = rhoE/rho - vel_energy; // rhoE and vel_energy must be AD variables/numbers also. auto pressure = your_fluid_properties_object.p_from_v_e(v, e); // pressure now contains partial derivatives w.r.t. all degrees of freedom

◆ propfunc() [2/15]

e SinglePhaseFluidProperties::propfunc ( c  ,
v  ,
e   
)
inherited

◆ propfunc() [3/15]

e e SinglePhaseFluidProperties::propfunc ( cv  ,
v  ,
e   
)
inherited

◆ propfunc() [4/15]

e e e SinglePhaseFluidProperties::propfunc ( k  ,
v  ,
e   
)
inherited

◆ propfunc() [5/15]

e e e e SinglePhaseFluidProperties::propfunc ( s  ,
h  ,
p   
)
inherited

◆ propfunc() [6/15]

e e e e s SinglePhaseFluidProperties::propfunc ( e  ,
v  ,
h   
)
inherited

◆ propfunc() [7/15]

e e e e s T SinglePhaseFluidProperties::propfunc ( pp_sat  ,
p  ,
T   
)
inherited

◆ propfunc() [8/15]

e e e e s T T SinglePhaseFluidProperties::propfunc ( k  ,
rho  ,
T   
)
inherited

◆ propfunc() [9/15]

e e e e s T T T SinglePhaseFluidProperties::propfunc ( cp  ,
p  ,
T   
)
inherited

◆ propfunc() [10/15]

e e e e s T T T T SinglePhaseFluidProperties::propfunc ( mu  ,
p  ,
T   
)
inherited

◆ propfunc() [11/15]

e e e e s T T T T T SinglePhaseFluidProperties::propfunc ( rho  ,
p  ,
T   
)
inherited

◆ propfunc() [12/15]

e e e e s T T T T T rho SinglePhaseFluidProperties::propfunc ( e  ,
T  ,
v   
)
inherited

◆ propfunc() [13/15]

e e e e s T T T T T rho v SinglePhaseFluidProperties::propfunc ( h  ,
T  ,
v   
)
inherited

◆ propfunc() [14/15]

e e e e s T T T T T rho v v SinglePhaseFluidProperties::propfunc ( cv  ,
T  ,
v   
)
inherited

◆ propfunc() [15/15]

e e e e s T T T T T rho v v T SinglePhaseFluidProperties::propfunc ( p  ,
h  ,
s   
)
inherited

◆ rho()

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

Density from pressure and temperature.

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

◆ rho_dpT()

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

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

Definition at line 282 of file SinglePhaseFluidProperties.C.

284 {
285  mooseDeprecated(name(), ": rho_dpT() is deprecated. Use rho_from_p_T() instead");
286 
287  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
288 }
const std::string name
Definition: Setup.h:22

◆ rho_e_dpT()

void SinglePhaseFluidProperties::rho_e_dpT ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
virtualinherited

Definition at line 321 of file SinglePhaseFluidProperties.C.

329 {
330  mooseDeprecated(name(), ": rho_e_dpT() is deprecated. Use rho_e_from_p_T() instead");
331 
332  rho_e_from_p_T(p, T, rho, drho_dp, drho_dT, e, de_dp, de_dT);
333 }
virtual void rho_e_from_p_T(Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &e, Real &de_dp, Real &de_dT) const
Density and internal energy and their derivatives wrt pressure and temperature.
const std::string name
Definition: Setup.h:22
virtual Real e(Real pressure, Real temperature) const

◆ rho_e_from_p_T()

void SinglePhaseFluidProperties::rho_e_from_p_T ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
virtualinherited

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

Definition at line 307 of file SinglePhaseFluidProperties.C.

Referenced by SinglePhaseFluidProperties::rho_e_dpT().

315 {
316  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
317  e_from_p_T(p, T, e, de_dp, de_dT);
318 }
virtual Real e_from_p_T(Real p, Real T) const
Internal energy from pressure and temperature.
virtual Real e(Real pressure, Real temperature) const

◆ rho_from_p_s() [1/2]

Real IdealGasFluidProperties::rho_from_p_s ( Real  p,
Real  s 
) const
overridevirtualinherited

Definition at line 242 of file IdealGasFluidProperties.C.

243 {
244  const Real aux = (s + _cv * std::log(std::pow(p, _gamma - 1.0))) / _cv;
245  const Real T = std::pow(std::exp(aux), 1.0 / _gamma);
246  return rho_from_p_T(p, T);
247 }
virtual Real rho_from_p_T(Real p, Real T) const override
e e e e s T T T T T rho v v T virtual e Real s(Real pressure, Real temperature) const
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
Real _cv
Specific heat at constant volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ rho_from_p_s() [2/2]

void IdealGasFluidProperties::rho_from_p_s ( Real  p,
Real  s,
Real &  rho,
Real &  drho_dp,
Real &  drho_ds 
) const
overridevirtualinherited

Definition at line 250 of file IdealGasFluidProperties.C.

252 {
253  // T(p,s)
254  const Real aux = (s + _cv * std::log(std::pow(p, _gamma - 1.0))) / _cv;
255  const Real T = std::pow(std::exp(aux), 1 / _gamma);
256 
257  // dT/dp
258  const Real dT_dp = 1.0 / _gamma * std::pow(std::exp(aux), 1.0 / _gamma - 1.0) * std::exp(aux) /
259  std::pow(p, _gamma - 1.0) * (_gamma - 1.0) * std::pow(p, _gamma - 2.0);
260 
261  // dT/ds
262  const Real dT_ds =
263  1.0 / _gamma * std::pow(std::exp(aux), 1.0 / _gamma - 1.0) * std::exp(aux) / _cv;
264 
265  // Drho/Dp = d/dp[rho(p, T(p,s))] = drho/dp + drho/dT * dT/dp
266  Real drho_dp_partial, drho_dT;
267  rho_from_p_T(p, T, rho, drho_dp_partial, drho_dT);
268  drho_dp = drho_dp_partial + drho_dT * dT_dp;
269 
270  // Drho/Ds = d/ds[rho(p, T(p,s))] = drho/dT * dT/ds
271  drho_ds = drho_dT * dT_ds;
272 }
virtual Real rho_from_p_T(Real p, Real T) const override
e e e e s T T T T T rho v v T virtual e Real s(Real pressure, Real temperature) const
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
Real _cv
Specific heat at constant volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ rho_from_p_T() [1/2]

Real IdealGasFluidProperties::rho_from_p_T ( Real  p,
Real  T 
) const
overridevirtualinherited

◆ rho_from_p_T() [2/2]

void IdealGasFluidProperties::rho_from_p_T ( Real  p,
Real  T,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT 
) const
overridevirtualinherited

Definition at line 295 of file IdealGasFluidProperties.C.

297 {
298  rho = rho_from_p_T(p, T);
299  drho_dp = _molar_mass / (_R * T);
300  drho_dT = -p * _molar_mass / (_R * T * T);
301 }
virtual Real rho_from_p_T(Real p, Real T) const override
const Real _R
Universal gas constant (J/mol/K)

◆ rho_mu()

void SinglePhaseFluidProperties::rho_mu ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  mu 
) const
virtualinherited

Density and viscosity.

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

Definition at line 360 of file SinglePhaseFluidProperties.C.

361 {
362  mooseDeprecated(name(), ": rho_mu() is deprecated. Use rho_mu_from_p_T() instead");
363 
364  rho_mu_from_p_T(p, T, rho, mu);
365 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string name
Definition: Setup.h:22
virtual void rho_mu_from_p_T(Real pressure, Real temperature, Real &rho, Real &mu) const

◆ rho_mu_dpT()

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

Definition at line 375 of file SinglePhaseFluidProperties.C.

383 {
384  mooseDeprecated(name(), ": rho_mu_dpT() is deprecated. Use rho_mu_from_p_T() instead");
385 
386  rho_mu_from_p_T(p, T, rho, drho_dp, drho_dT, mu, dmu_dp, dmu_dT);
387 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string name
Definition: Setup.h:22
virtual void rho_mu_from_p_T(Real pressure, Real temperature, Real &rho, Real &mu) const

◆ rho_mu_from_p_T() [1/2]

void SinglePhaseFluidProperties::rho_mu_from_p_T ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  mu 
) const
virtualinherited

◆ rho_mu_from_p_T() [2/2]

void SinglePhaseFluidProperties::rho_mu_from_p_T ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT 
) const
virtualinherited

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 in Water97FluidProperties, CO2FluidProperties, HydrogenFluidProperties, and NitrogenFluidProperties.

Definition at line 390 of file SinglePhaseFluidProperties.C.

398 {
399  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
400  mu_from_p_T(p, T, mu, dmu_dp, dmu_dT);
401 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.

◆ s()

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

◆ s_from_h_p() [1/2]

Real IdealGasFluidProperties::s_from_h_p ( Real  h,
Real  p 
) const
overridevirtualinherited

Definition at line 220 of file IdealGasFluidProperties.C.

Referenced by IdealGasFluidProperties::s_from_h_p().

221 {
222  const Real aux = p * std::pow(h / (_gamma * _cv), -_gamma / (_gamma - 1));
223  if (aux <= 0.0)
224  throw MooseException(name() + ": Non-positive argument in the ln() function.");
225  return -(_gamma - 1) * _cv * std::log(aux);
226 }
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
const std::string name
Definition: Setup.h:22
Real _cv
Specific heat at constant volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ s_from_h_p() [2/2]

void IdealGasFluidProperties::s_from_h_p ( Real  h,
Real  p,
Real &  s,
Real &  ds_dh,
Real &  ds_dp 
) const
overridevirtualinherited

Definition at line 229 of file IdealGasFluidProperties.C.

230 {
231  s = s_from_h_p(h, p);
232 
233  const Real aux = p * std::pow(h / (_gamma * _cv), -_gamma / (_gamma - 1));
234  const Real daux_dh = p * std::pow(h / (_gamma * _cv), -_gamma / (_gamma - 1) - 1) *
235  (-_gamma / (_gamma - 1)) / (_gamma * _cv);
236  const Real daux_dp = std::pow(h / (_gamma * _cv), -_gamma / (_gamma - 1));
237  ds_dh = -(_gamma - 1) * _cv / aux * daux_dh;
238  ds_dp = -(_gamma - 1) * _cv / aux * daux_dp;
239 }
e e e e s T T T T T rho v v T virtual e Real s(Real pressure, Real temperature) const
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
virtual Real s_from_h_p(Real h, Real p) const override
Real _cv
Specific heat at constant volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ s_from_p_T() [1/2]

Real IdealGasFluidProperties::s_from_p_T ( Real  p,
Real  T 
) const
overridevirtualinherited

Definition at line 195 of file IdealGasFluidProperties.C.

Referenced by IdealGasFluidProperties::s_from_T_v().

196 {
197  const Real n = std::pow(T, _gamma) / std::pow(p, _gamma - 1.0);
198  if (n <= 0.0)
199  throw MooseException(name() + ": Negative argument in the ln() function.");
200  return _cv * std::log(n);
201 }
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
const std::string name
Definition: Setup.h:22
Real _cv
Specific heat at constant volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ s_from_p_T() [2/2]

void IdealGasFluidProperties::s_from_p_T ( Real  p,
Real  T,
Real &  s,
Real &  ds_dp,
Real &  ds_dT 
) const
overridevirtualinherited

Definition at line 204 of file IdealGasFluidProperties.C.

205 {
206  const Real n = std::pow(T, _gamma) / std::pow(p, _gamma - 1.0);
207  if (n <= 0.0)
208  throw MooseException(name() + ": Negative argument in the ln() function.");
209 
210  s = _cv * std::log(n);
211 
212  const Real dn_dT = _gamma * std::pow(T, _gamma - 1.0) / std::pow(p, _gamma - 1.0);
213  const Real dn_dp = std::pow(T, _gamma) * (1.0 - _gamma) * std::pow(p, -_gamma);
214 
215  ds_dp = _cv / n * dn_dp;
216  ds_dT = _cv / n * dn_dT;
217 }
e e e e s T T T T T rho v v T virtual e Real s(Real pressure, Real temperature) const
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
const std::string name
Definition: Setup.h:22
Real _cv
Specific heat at constant volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ s_from_T_v() [1/2]

Real IdealGasFluidProperties::s_from_T_v ( Real  T,
Real  v 
) const
overridevirtualinherited

Definition at line 361 of file IdealGasFluidProperties.C.

362 {
363  Real p = p_from_T_v(T, v);
364  return s_from_p_T(p, T);
365 }
virtual Real p_from_T_v(Real T, Real v) const override
virtual Real s_from_p_T(Real p, Real T) const override

◆ s_from_T_v() [2/2]

void IdealGasFluidProperties::s_from_T_v ( Real  T,
Real  v,
Real &  s,
Real &  ds_dT,
Real &  ds_dv 
) const
overridevirtualinherited

Definition at line 368 of file IdealGasFluidProperties.C.

369 {
370  Real p, dp_dT_v, dp_dv_T;
371  Real ds_dp_T, ds_dT_p;
372  p_from_T_v(T, v, p, dp_dT_v, dp_dv_T);
373  s_from_p_T(p, T, s, ds_dp_T, ds_dT_p);
374  ds_dT = ds_dT_p + ds_dp_T * dp_dT_v;
375  ds_dv = ds_dp_T * dp_dv_T;
376 }
e e e e s T T T T T rho v v T virtual e Real s(Real pressure, Real temperature) const
virtual Real p_from_T_v(Real T, Real v) const override
virtual Real s_from_p_T(Real p, Real T) const override

◆ s_from_v_e() [1/2]

Real IdealGasFluidProperties::s_from_v_e ( Real  v,
Real  e 
) const
overridevirtualinherited

Definition at line 159 of file IdealGasFluidProperties.C.

160 {
161  const Real T = T_from_v_e(v, e);
162  const Real p = p_from_v_e(v, e);
163  const Real n = std::pow(T, _gamma) / std::pow(p, _gamma - 1.0);
164  if (n <= 0.0)
165  throw MooseException(name() + ": Negative argument in the ln() function.");
166  return _cv * std::log(n);
167 }
virtual Real p_from_v_e(Real v, Real e) const override
virtual Real T_from_v_e(Real v, Real e) const override
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
const std::string name
Definition: Setup.h:22
Real _cv
Specific heat at constant volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual Real e(Real pressure, Real temperature) const

◆ s_from_v_e() [2/2]

void IdealGasFluidProperties::s_from_v_e ( Real  v,
Real  e,
Real &  s,
Real &  ds_dv,
Real &  ds_de 
) const
overridevirtualinherited

Definition at line 170 of file IdealGasFluidProperties.C.

171 {
172  Real T, dT_dv, dT_de;
173  T_from_v_e(v, e, T, dT_dv, dT_de);
174 
175  Real p, dp_dv, dp_de;
176  p_from_v_e(v, e, p, dp_dv, dp_de);
177 
178  const Real n = std::pow(T, _gamma) / std::pow(p, _gamma - 1.0);
179  if (n <= 0.0)
180  throw MooseException(name() + ": Negative argument in the ln() function.");
181 
182  s = _cv * std::log(n);
183 
184  const Real dn_dT = _gamma * std::pow(T, _gamma - 1.0) / std::pow(p, _gamma - 1.0);
185  const Real dn_dp = std::pow(T, _gamma) * (1.0 - _gamma) * std::pow(p, -_gamma);
186 
187  const Real dn_dv = dn_dT * dT_dv + dn_dp * dp_dv;
188  const Real dn_de = dn_dT * dT_de + dn_dp * dp_de;
189 
190  ds_dv = _cv / n * dn_dv;
191  ds_de = _cv / n * dn_de;
192 }
e e e e s T T T T T rho v v T virtual e Real s(Real pressure, Real temperature) const
virtual Real p_from_v_e(Real v, Real e) const override
virtual Real T_from_v_e(Real v, Real e) const override
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
const std::string name
Definition: Setup.h:22
Real _cv
Specific heat at constant volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual Real e(Real pressure, Real temperature) const

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Definition at line 40 of file FluidProperties.h.

40 {}

◆ T_from_p_h()

Real IdealGasFluidProperties::T_from_p_h ( Real  pressure,
Real  enthalpy 
) const
overridevirtualinherited

Temperature from pressure and specific enthalpy.

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 449 of file IdealGasFluidProperties.C.

450 {
451  return h / _gamma / _cv;
452 }
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
Real _gamma
Adiabatic index (ratio of specific heats cp/cv)
Real _cv
Specific heat at constant volume.

◆ T_from_v_e() [1/2]

Real IdealGasFluidProperties::T_from_v_e ( Real  v,
Real  e 
) const
overridevirtualinherited

◆ T_from_v_e() [2/2]

void IdealGasFluidProperties::T_from_v_e ( Real  v,
Real  e,
Real &  T,
Real &  dT_dv,
Real &  dT_de 
) const
overridevirtualinherited

Definition at line 99 of file IdealGasFluidProperties.C.

100 {
101  T = T_from_v_e(v, e);
102  dT_dv = 0.0;
103  dT_de = 1.0 / _cv;
104 }
virtual Real T_from_v_e(Real v, Real e) const override
Real _cv
Specific heat at constant volume.
virtual Real e(Real pressure, Real temperature) const

◆ threadJoin()

virtual void FluidProperties::threadJoin ( const UserObject &  )
inlinefinalvirtualinherited

Definition at line 39 of file FluidProperties.h.

39 {}

◆ triplePointPressure()

Real SinglePhaseFluidProperties::triplePointPressure ( ) const
virtualinherited

Triple point pressure.

Returns
triple point pressure (Pa)

Reimplemented in HydrogenFluidProperties, CO2FluidProperties, NitrogenFluidProperties, MethaneFluidProperties, NaClFluidProperties, and Water97FluidProperties.

Definition at line 130 of file SinglePhaseFluidProperties.C.

131 {
132  mooseError(name(), ": triplePointPressure() is not implemented");
133 }
const std::string name
Definition: Setup.h:22

◆ triplePointTemperature()

Real SinglePhaseFluidProperties::triplePointTemperature ( ) const
virtualinherited

Triple point temperature.

Returns
triple point temperature (K)

Reimplemented in HydrogenFluidProperties, CO2FluidProperties, NitrogenFluidProperties, MethaneFluidProperties, NaClFluidProperties, and Water97FluidProperties.

Definition at line 136 of file SinglePhaseFluidProperties.C.

137 {
138  mooseError(name(), ": triplePointTemperature() is not implemented");
139 }
const std::string name
Definition: Setup.h:22

◆ v_e_spndl_from_T()

void SinglePhaseFluidProperties::v_e_spndl_from_T ( Real  T,
Real &  v,
Real &  e 
) const
virtualinherited

Specific internal energy from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume

Reimplemented in StiffenedGasFluidProperties.

Definition at line 457 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::v_from_p_T().

458 {
459  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
460 }
const std::string name
Definition: Setup.h:22

◆ v_from_p_T() [1/2]

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

◆ v_from_p_T() [2/2]

void SinglePhaseFluidProperties::v_from_p_T ( Real  p,
Real  T,
Real &  v,
Real &  dv_dp,
Real &  dv_dT 
) const
virtualinherited

Specific volume and its derivatives from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[out]vspecific volume
[out]dv_dpderivative of specific volume w.r.t. pressure
[out]dv_dTderivative of specific volume w.r.t. temperature

Definition at line 60 of file SinglePhaseFluidProperties.C.

61 {
62  Real rho, drho_dp, drho_dT;
63  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
64 
65  v = 1.0 / rho;
66  const Real dv_drho = -1.0 / (rho * rho);
67 
68  dv_dp = dv_drho * drho_dp;
69  dv_dT = dv_drho * drho_dT;
70 }

◆ vaporPressure() [1/2]

Real SinglePhaseFluidProperties::vaporPressure ( Real  temperature) const
virtualinherited

Vapor pressure.

Used to delineate liquid and gas phases. Valid for temperatures between the triple point temperature and the critical temperature

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

Reimplemented in TabulatedFluidProperties, Water97FluidProperties, CO2FluidProperties, HydrogenFluidProperties, NitrogenFluidProperties, and MethaneFluidProperties.

Definition at line 262 of file SinglePhaseFluidProperties.C.

Referenced by PorousFlowWaterNCG::equilibriumMassFractions(), PorousFlowWaterNCG::gasProperties(), BrineFluidProperties::vaporPressure(), TabulatedFluidProperties::vaporPressure(), and SinglePhaseFluidProperties::vaporPressure_dT().

263 {
264  mooseError(name(), ": vaporPressure() is not implemented");
265 }
const std::string name
Definition: Setup.h:22

◆ vaporPressure() [2/2]

void SinglePhaseFluidProperties::vaporPressure ( Real  temperature,
Real &  psat,
Real &  dpsat_dT 
) const
virtualinherited

Vapor pressure.

Used to delineate liquid and gas phases. Valid for temperatures between the triple point temperature and the critical temperature

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

Reimplemented in TabulatedFluidProperties, Water97FluidProperties, CO2FluidProperties, HydrogenFluidProperties, NitrogenFluidProperties, and MethaneFluidProperties.

Definition at line 268 of file SinglePhaseFluidProperties.C.

269 {
270  mooseError(name(), ": vaporPressure() is not implemented");
271 }
const std::string name
Definition: Setup.h:22

◆ vaporPressure_dT()

void SinglePhaseFluidProperties::vaporPressure_dT ( Real  temperature,
Real &  psat,
Real &  dpsat_dT 
) const
virtualinherited

Definition at line 274 of file SinglePhaseFluidProperties.C.

275 {
276  mooseDeprecated(name(), ": vaporPressure_dT() is deprecated. Use vaporPressure() instead");
277 
278  vaporPressure(T, psat, dpsat_dT);
279 }
virtual Real vaporPressure(Real temperature) const
Vapor pressure.
const std::string name
Definition: Setup.h:22

Member Data Documentation

◆ _allow_imperfect_jacobians

const bool FluidProperties::_allow_imperfect_jacobians
protectedinherited

Flag to set unimplemented Jacobian entries to zero.

Definition at line 46 of file FluidProperties.h.

Referenced by SinglePhaseFluidProperties::fluidPropError().

◆ _cp

Real IdealGasFluidProperties::_cp
protectedinherited

◆ _cv

Real IdealGasFluidProperties::_cv
protectedinherited

◆ _gamma

Real IdealGasFluidProperties::_gamma
protectedinherited

◆ _henry_constant

const Real IdealGasFluidProperties::_henry_constant
protectedinherited

Henry constant.

Definition at line 116 of file IdealGasFluidProperties.h.

Referenced by IdealGasFluidProperties::henryConstant().

◆ _k

const Real IdealGasFluidProperties::_k
protectedinherited

Thermal conductivity.

Definition at line 112 of file IdealGasFluidProperties.h.

Referenced by IdealGasFluidProperties::k_from_p_T(), and IdealGasFluidProperties::k_from_v_e().

◆ _molar_mass

Real IdealGasFluidProperties::_molar_mass
protectedinherited

◆ _mu

const Real IdealGasFluidProperties::_mu
protectedinherited

Dynamic viscosity.

Definition at line 110 of file IdealGasFluidProperties.h.

Referenced by IdealGasFluidProperties::mu_from_p_T(), and IdealGasFluidProperties::mu_from_v_e().

◆ _R

const Real SinglePhaseFluidProperties::_R
protectedinherited

◆ _R_specific

Real IdealGasFluidProperties::_R_specific
protectedinherited

Specific gas constant (R / molar mass)

Definition at line 104 of file IdealGasFluidProperties.h.

Referenced by IdealGasFluidProperties::c_from_v_e(), and IdealGasFluidProperties::IdealGasFluidProperties().

◆ _T_c2k

const Real FluidProperties::_T_c2k
protectedinherited

◆ p [1/7]

e e e e SinglePhaseFluidProperties::p
inherited

Definition at line 146 of file SinglePhaseFluidProperties.h.

Referenced by SinglePhaseFluidProperties::beta(), SinglePhaseFluidProperties::beta_from_p_T(), SinglePhaseFluidProperties::c(), StiffenedGasFluidProperties::c_from_v_e(), IdealGasFluidProperties::cp_from_p_T(), SinglePhaseFluidProperties::e(), SinglePhaseFluidProperties::e_dpT(), StiffenedGasFluidProperties::e_from_p_rho(), IdealGasFluidProperties::e_from_p_rho(), IdealGasFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::e_from_p_T(), SinglePhaseFluidProperties::e_from_p_T(), IdealGasFluidProperties::g_from_v_e(), StiffenedGasFluidProperties::g_from_v_e(), SinglePhaseFluidProperties::gamma_from_p_T(), TabulatedFluidProperties::generateTabulatedData(), SinglePhaseFluidProperties::h(), SinglePhaseFluidProperties::h_dpT(), IdealGasFluidProperties::h_from_p_T(), StiffenedGasFluidProperties::h_from_p_T(), SinglePhaseFluidProperties::henryConstantIAPWS(), SinglePhaseFluidProperties::k(), SinglePhaseFluidProperties::k_dpT(), IdealGasFluidProperties::k_from_p_T(), SinglePhaseFluidProperties::mu(), SinglePhaseFluidProperties::mu_dpT(), IdealGasFluidProperties::p_from_h_s(), StiffenedGasFluidProperties::p_from_h_s(), StiffenedGasFluidProperties::p_from_T_v(), IdealGasFluidProperties::p_from_T_v(), StiffenedGasFluidProperties::p_from_v_e(), IdealGasFluidProperties::p_from_v_e(), SinglePhaseFluidProperties::rho_dpT(), SinglePhaseFluidProperties::rho_e_dpT(), SinglePhaseFluidProperties::rho_e_from_p_T(), StiffenedGasFluidProperties::rho_from_p_s(), IdealGasFluidProperties::rho_from_p_s(), StiffenedGasFluidProperties::rho_from_p_T(), IdealGasFluidProperties::rho_from_p_T(), SinglePhaseFluidProperties::rho_mu(), SinglePhaseFluidProperties::rho_mu_dpT(), SinglePhaseFluidProperties::rho_mu_from_p_T(), SinglePhaseFluidProperties::s(), StiffenedGasFluidProperties::s_from_h_p(), IdealGasFluidProperties::s_from_h_p(), IdealGasFluidProperties::s_from_p_T(), StiffenedGasFluidProperties::s_from_p_T(), SimpleFluidProperties::s_from_p_T(), Water97FluidProperties::s_from_p_T(), TabulatedFluidProperties::s_from_p_T(), IdealGasFluidProperties::s_from_T_v(), StiffenedGasFluidProperties::s_from_v_e(), IdealGasFluidProperties::s_from_v_e(), SinglePhaseFluidProperties::T_from_p_h(), SinglePhaseFluidProperties::v_from_p_T(), Water97FluidProperties::vaporPressure(), and TabulatedFluidProperties::writeTabulatedData().

◆ p [2/7]

e e e e s SinglePhaseFluidProperties::p
inherited

Definition at line 148 of file SinglePhaseFluidProperties.h.

◆ p [3/7]

e e e e s T T SinglePhaseFluidProperties::p
inherited

Definition at line 152 of file SinglePhaseFluidProperties.h.

◆ p [4/7]

e e e e s T T T SinglePhaseFluidProperties::p
inherited

Definition at line 154 of file SinglePhaseFluidProperties.h.

◆ p [5/7]

e e e e s T T T T SinglePhaseFluidProperties::p
inherited

Definition at line 156 of file SinglePhaseFluidProperties.h.

◆ p [6/7]

e e e e s T T T T T SinglePhaseFluidProperties::p
inherited

Definition at line 158 of file SinglePhaseFluidProperties.h.

◆ p [7/7]

e e e e s T T T T T rho v v SinglePhaseFluidProperties::p
inherited

Definition at line 164 of file SinglePhaseFluidProperties.h.

◆ rho

Real SinglePhaseFluidProperties::rho
inherited

◆ T [1/2]

e e e e s T T T T T rho SinglePhaseFluidProperties::T
inherited

Definition at line 160 of file SinglePhaseFluidProperties.h.

Referenced by SinglePhaseFluidProperties::beta(), SinglePhaseFluidProperties::beta_from_p_T(), SinglePhaseFluidProperties::c(), IdealGasFluidProperties::c_from_p_T(), IdealGasFluidProperties::c_from_v_e(), IdealGasFluidProperties::cp_from_p_T(), SinglePhaseFluidProperties::e(), SinglePhaseFluidProperties::e_dpT(), IdealGasFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::e_from_p_T(), SinglePhaseFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::e_from_T_v(), IdealGasFluidProperties::e_from_T_v(), IdealGasFluidProperties::g_from_v_e(), StiffenedGasFluidProperties::g_from_v_e(), SinglePhaseFluidProperties::gamma_from_p_T(), SinglePhaseFluidProperties::h(), SinglePhaseFluidProperties::h_dpT(), IdealGasFluidProperties::h_from_p_T(), StiffenedGasFluidProperties::h_from_p_T(), StiffenedGasFluidProperties::h_from_T_v(), IdealGasFluidProperties::h_from_T_v(), SinglePhaseFluidProperties::henryConstant_dT(), SinglePhaseFluidProperties::henryConstantIAPWS(), SinglePhaseFluidProperties::henryConstantIAPWS_dT(), SinglePhaseFluidProperties::k(), SinglePhaseFluidProperties::k_dpT(), IdealGasFluidProperties::k_from_p_T(), SinglePhaseFluidProperties::mu(), SinglePhaseFluidProperties::mu_dpT(), SinglePhaseFluidProperties::mu_drhoT_from_rho_T(), IdealGasFluidProperties::mu_from_p_T(), StiffenedGasFluidProperties::p_from_T_v(), IdealGasFluidProperties::p_from_T_v(), SinglePhaseFluidProperties::rho_dpT(), SinglePhaseFluidProperties::rho_e_dpT(), SinglePhaseFluidProperties::rho_e_from_p_T(), StiffenedGasFluidProperties::rho_from_p_s(), IdealGasFluidProperties::rho_from_p_s(), StiffenedGasFluidProperties::rho_from_p_T(), IdealGasFluidProperties::rho_from_p_T(), SinglePhaseFluidProperties::rho_mu(), SinglePhaseFluidProperties::rho_mu_dpT(), SinglePhaseFluidProperties::rho_mu_from_p_T(), SinglePhaseFluidProperties::s(), IdealGasFluidProperties::s_from_p_T(), StiffenedGasFluidProperties::s_from_p_T(), SimpleFluidProperties::s_from_p_T(), Water97FluidProperties::s_from_p_T(), TabulatedFluidProperties::s_from_p_T(), StiffenedGasFluidProperties::s_from_T_v(), IdealGasFluidProperties::s_from_T_v(), StiffenedGasFluidProperties::s_from_v_e(), IdealGasFluidProperties::s_from_v_e(), StiffenedGasFluidProperties::T_from_v_e(), IdealGasFluidProperties::T_from_v_e(), SinglePhaseFluidProperties::v_from_p_T(), and SinglePhaseFluidProperties::vaporPressure_dT().

◆ T [2/2]

e e e e s T T T T T rho v SinglePhaseFluidProperties::T
inherited

Definition at line 162 of file SinglePhaseFluidProperties.h.

◆ v [1/5]

SinglePhaseFluidProperties::v
inherited

◆ v [2/5]

e SinglePhaseFluidProperties::v
inherited

Definition at line 140 of file SinglePhaseFluidProperties.h.

◆ v [3/5]

e e SinglePhaseFluidProperties::v
inherited

Definition at line 142 of file SinglePhaseFluidProperties.h.

◆ v [4/5]

e e e SinglePhaseFluidProperties::v
inherited

Definition at line 144 of file SinglePhaseFluidProperties.h.

◆ v [5/5]

e e e e s T T T T T rho v v T SinglePhaseFluidProperties::v
inherited

Definition at line 166 of file SinglePhaseFluidProperties.h.


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