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

Nitrogen (N2) fluid properties as a function of pressure (Pa) and temperature (K). More...

#include <NitrogenFluidProperties.h>

Inheritance diagram for NitrogenFluidProperties:
[legend]

Public Member Functions

 NitrogenFluidProperties (const InputParameters &parameters)
 
virtual std::string fluidName () const override
 Fluid name. More...
 
virtual Real molarMass () const override
 Molar mass [kg/mol]. More...
 
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 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 k_from_rho_T (Real density, Real temperature) const override
 Thermal conductivity as a function of density 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 henryConstant (Real temperature) const override
 Henry's law constant for dissolution in water. More...
 
virtual void henryConstant_dT (Real temperature, Real &Kh, Real &dKh_dT) const override
 Henry's law constant for dissolution in water and derivative wrt temperature. More...
 
virtual Real 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 vaporPressure (Real temperature) const override
 Vapor pressure. More...
 
Real saturatedLiquidDensity (Real temperature) const
 Saturated liquid density of N2 Valid for temperatures between the triple point temperature and critical temperature. More...
 
Real saturatedVaporDensity (Real temperature) const
 Saturated vapor density of N2 Valid for temperatures between the triple point temperature and critical 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 p, Real T, 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 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 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 p, Real T, Real &h, Real &dh_dp, Real &dh_dT) const override
 Specific enthalpy and its derivatives from pressure and temperature. More...
 
virtual Real p_from_rho_T (Real rho, Real T) const
 Pressure as a function of density and temperature. 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 void vaporPressure_dT (Real temperature, Real &psat, Real &dpsat_dT) const
 Vapor pressure. More...
 
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 alpha (Real delta, Real tau) const override
 Helmholtz free energy. More...
 
virtual Real dalpha_ddelta (Real delta, Real tau) const override
 Derivative of Helmholtz free energy wrt delta. More...
 
virtual Real dalpha_dtau (Real delta, Real tau) const override
 Derivative of Helmholtz free energy wrt tau. More...
 
virtual Real d2alpha_ddelta2 (Real delta, Real tau) const override
 Second derivative of Helmholtz free energy wrt delta. More...
 
virtual Real d2alpha_dtau2 (Real delta, Real tau) const override
 Second derivative of Helmholtz free energy wrt tau. More...
 
virtual Real d2alpha_ddeltatau (Real delta, Real tau) const override
 Second derivative of Helmholtz free energy wrt delta and tau. 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 _Mn2
 Nitrogen molar mass (kg/mol) More...
 
const Real _p_critical
 Critical pressure (Pa) More...
 
const Real _T_critical
 Critical temperature (K) More...
 
const Real _rho_molar_critical
 Critical molar density (mol/l) 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, 8 > _a
 Coefficients for ideal gas component of the Helmholtz free energy. More...
 
const std::array< Real, 6 > _N1
 Coefficients for residual component of the Helmholtz free energy. More...
 
const std::array< unsigned int, 6 > _i1 {{1, 1, 2, 2, 3, 3}}
 
const std::array< Real, 6 > _j1 {{0.25, 0.875, 0.5, 0.875, 0.375, 0.75}}
 
const std::array< Real, 26 > _N2
 
const std::array< unsigned int, 26 > _i2
 
const std::array< Real, 26 > _j2
 
const std::array< unsigned int, 26 > _l2
 
const std::array< Real, 4 > _N3
 
const std::array< unsigned int, 4 > _i3 {{1, 1, 3, 2}}
 
const std::array< unsigned int, 4 > _j3 {{0, 1, 2, 3}}
 
const std::array< unsigned int, 4 > _l3 {{2, 2, 2, 2}}
 
const std::array< Real, 4 > _phi3 {{20.0, 20.0, 15.0, 25.0}}
 
const std::array< Real, 4 > _beta3 {{325.0, 325.0, 300.0, 275.0}}
 
const std::array< Real, 4 > _gamma3 {{1.16, 1.16, 1.13, 1.25}}
 
const std::array< Real, 5 > _bmu {{0.431, -0.4623, 0.08406, 0.005341, -0.00331}}
 Coefficients for viscosity. More...
 
const std::array< Real, 5 > _Nmu {{10.72, 0.03989, 0.001208, -7.402, 4.62}}
 
const std::array< Real, 5 > _tmu {{0.1, 0.25, 3.2, 0.9, 0.3}}
 
const std::array< Real, 5 > _dmu {{2, 10, 12, 2, 1}}
 
const std::array< Real, 5 > _lmu {{0, 1, 1, 2, 3}}
 
const std::array< Real, 5 > _gammamu {{0.0, 1.0, 1.0, 1.0, 1.0}}
 
const std::array< Real, 6 > _Nk {{8.862, 31.11, -73.13, 20.03, -0.7096, 0.2672}}
 Coefficients for thermal conductivity. More...
 
const std::array< Real, 6 > _tk {{0.0, 0.03, 0.2, 0.8, 0.6, 1.9}}
 
const std::array< unsigned int, 6 > _dk {{1, 2, 3, 4, 8, 10}}
 
const std::array< unsigned int, 6 > _lk {{0, 0, 1, 2, 2, 2}}
 
const std::array< Real, 6 > _gammak {{0.0, 0.0, 1.0, 1.0, 1.0}}
 
const Real _R
 Universal gas constant (J/mol/K) More...
 
const Real _T_c2k
 Conversion of temperature from Celsius to Kelvin. More...
 

Detailed Description

Nitrogen (N2) fluid properties as a function of pressure (Pa) and temperature (K).

Thermodynamic properties calculated from: Span,. Lemmon, Jacobsen, Wagner and Yokozeki, A reference equation of state for the thermodynamic properties of nitrogen for temeperatures from 63.151 to 1000 K and pressures to 2200 MPa, Journal of Physical and Chemical Reference Data, 29, 1361–1433 (2000)

Viscosity and thermal conductivity calculated from: Lemmon and Jacobsen, Viscosity and Thermal Conductivity Equations for Nitrogen, Oxygen, Argon, and Air, International Journal of Thermophysics, 25, 21–69 (2004)

Definition at line 36 of file NitrogenFluidProperties.h.

Constructor & Destructor Documentation

◆ NitrogenFluidProperties()

NitrogenFluidProperties::NitrogenFluidProperties ( const InputParameters &  parameters)

Definition at line 26 of file NitrogenFluidProperties.C.

27  : HelmholtzFluidProperties(parameters),
28  _Mn2(28.01348e-3),
29  _p_critical(3.3958e6),
30  _T_critical(126.192),
31  _rho_molar_critical(11.1839),
32  _rho_critical(313.3),
33  _p_triple(12.523e3),
34  _T_triple(63.151)
35 {
36 }
const Real _T_triple
Triple point temperature (K)
const Real _rho_molar_critical
Critical molar density (mol/l)
HelmholtzFluidProperties(const InputParameters &parameters)
const Real _rho_critical
Critical density (kg/m^3)
const Real _T_critical
Critical temperature (K)
const Real _p_critical
Critical pressure (Pa)
const Real _Mn2
Nitrogen molar mass (kg/mol)
const Real _p_triple
Triple point pressure (Pa)
virtual Real e(Real pressure, Real temperature) const

Member Function Documentation

◆ alpha()

Real NitrogenFluidProperties::alpha ( Real  delta,
Real  tau 
) const
overrideprotectedvirtual

Helmholtz free energy.

Parameters
deltascaled density (-)
tauscaled temperature (-)
Returns
alpha Helmholtz free energy

Implements HelmholtzFluidProperties.

Definition at line 279 of file NitrogenFluidProperties.C.

280 {
281  // Ideal gas component of the Helmholtz free energy
282  const Real alpha0 = std::log(delta) + _a[0] * std::log(tau) + _a[1] + _a[2] * tau + _a[3] / tau +
283  _a[4] / Utility::pow<2>(tau) + _a[5] / Utility::pow<3>(tau) +
284  _a[6] * std::log(1.0 - std::exp(-_a[7] * tau));
285 
286  // Residual component of the Helmholtz free energy
287  Real alphar = 0.0;
288 
289  for (std::size_t i = 0; i < _N1.size(); ++i)
290  alphar += _N1[i] * MathUtils::pow(delta, _i1[i]) * std::pow(tau, _j1[i]);
291 
292  for (std::size_t i = 0; i < _N2.size(); ++i)
293  alphar += _N2[i] * MathUtils::pow(delta, _i2[i]) * std::pow(tau, _j2[i]) *
294  std::exp(-MathUtils::pow(delta, _l2[i]));
295 
296  for (std::size_t i = 0; i < _N3.size(); ++i)
297  alphar += _N3[i] * MathUtils::pow(delta, _i3[i]) * std::pow(tau, _j3[i]) *
298  std::exp(-_phi3[i] * Utility::pow<2>(delta - 1.0) -
299  _beta3[i] * Utility::pow<2>(tau - _gamma3[i]));
300 
301  // The Helmholtz free energy is the sum of these two
302  return alpha0 + alphar;
303 }
const std::array< Real, 4 > _gamma3
const std::array< unsigned int, 4 > _j3
const std::array< unsigned int, 26 > _i2
const std::array< Real, 4 > _phi3
const std::array< Real, 26 > _j2
const std::array< Real, 8 > _a
Coefficients for ideal gas component of the Helmholtz free energy.
const std::array< unsigned int, 6 > _i1
const std::array< Real, 26 > _N2
const std::array< unsigned int, 4 > _i3
const std::array< Real, 6 > _j1
const std::array< unsigned int, 26 > _l2
const std::array< Real, 6 > _N1
Coefficients for residual component of the Helmholtz free energy.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 4 > _N3
const std::array< Real, 4 > _beta3

◆ beta()

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

Definition at line 256 of file SinglePhaseFluidProperties.C.

Referenced by Water97FluidProperties::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

◆ c_from_p_T()

Real HelmholtzFluidProperties::c_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtualinherited

Speed of sound.

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 123 of file HelmholtzFluidProperties.C.

124 {
125  // Require density first
126  const Real density = rho_from_p_T(pressure, temperature);
127  // Scale the input density and temperature
128  const Real delta = density / criticalDensity();
129  const Real tau = criticalTemperature() / temperature;
130 
131  const Real da_dd = dalpha_ddelta(delta, tau);
132 
133  Real w = 2.0 * delta * da_dd + delta * delta * d2alpha_ddelta2(delta, tau);
134  w -= Utility::pow<2>(delta * da_dd - delta * tau * d2alpha_ddeltatau(delta, tau)) /
135  (tau * tau * d2alpha_dtau2(delta, tau));
136 
137  return std::sqrt(_R * temperature * w / molarMass());
138 }
virtual Real d2alpha_ddeltatau(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt delta and tau.
virtual Real d2alpha_dtau2(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt tau.
virtual Real molarMass() const
Molar mass [kg/mol].
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
virtual Real d2alpha_ddelta2(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt delta.
const Real _R
Universal gas constant (J/mol/K)
virtual Real criticalTemperature() const
Critical temperature.
virtual Real dalpha_ddelta(Real delta, Real tau) const =0
Derivative of Helmholtz free energy wrt delta.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real criticalDensity() const
Critical density.
const std::string pressure
Definition: NS.h:26

◆ 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 HelmholtzFluidProperties::cp_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtualinherited

Isobaric specific heat capacity.

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 141 of file HelmholtzFluidProperties.C.

142 {
143  // Require density first
144  const Real density = rho_from_p_T(pressure, temperature);
145  // Scale the input density and temperature
146  const Real delta = density / criticalDensity();
147  const Real tau = criticalTemperature() / temperature;
148 
149  const Real da_dd = dalpha_ddelta(delta, tau);
150 
151  const Real cp = _R *
152  (-tau * tau * d2alpha_dtau2(delta, tau) +
153  Utility::pow<2>(delta * da_dd - delta * tau * d2alpha_ddeltatau(delta, tau)) /
154  (2.0 * delta * da_dd + delta * delta * d2alpha_ddelta2(delta, tau))) /
155  molarMass();
156 
157  return cp;
158 }
virtual Real d2alpha_ddeltatau(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt delta and tau.
virtual Real d2alpha_dtau2(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt tau.
virtual Real molarMass() const
Molar mass [kg/mol].
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
virtual Real d2alpha_ddelta2(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt delta.
const Real _R
Universal gas constant (J/mol/K)
virtual Real criticalTemperature() const
Critical temperature.
virtual Real dalpha_ddelta(Real delta, Real tau) const =0
Derivative of Helmholtz free energy wrt delta.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real criticalDensity() const
Critical density.
const std::string pressure
Definition: NS.h:26

◆ 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 NitrogenFluidProperties::criticalDensity ( ) const
overridevirtual

Critical density.

Returns
critical density (kg/m^3)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 63 of file NitrogenFluidProperties.C.

64 {
65  return _rho_critical;
66 }
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 NitrogenFluidProperties::criticalPressure ( ) const
overridevirtual

Critical pressure.

Returns
critical pressure (Pa)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 51 of file NitrogenFluidProperties.C.

52 {
53  return _p_critical;
54 }
const Real _p_critical
Critical pressure (Pa)

◆ criticalTemperature()

Real NitrogenFluidProperties::criticalTemperature ( ) const
overridevirtual

Critical temperature.

Returns
critical temperature (K)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 57 of file NitrogenFluidProperties.C.

58 {
59  return _T_critical;
60 }
const Real _T_critical
Critical temperature (K)

◆ cv_from_p_T()

Real HelmholtzFluidProperties::cv_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtualinherited

Isochoric specific heat.

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 161 of file HelmholtzFluidProperties.C.

162 {
163  // Require density first
164  const Real density = rho_from_p_T(pressure, temperature);
165  // Scale the input density and temperature
166  const Real delta = density / criticalDensity();
167  const Real tau = criticalTemperature() / temperature;
168 
169  return -_R * tau * tau * d2alpha_dtau2(delta, tau) / molarMass();
170 }
virtual Real d2alpha_dtau2(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt tau.
virtual Real molarMass() const
Molar mass [kg/mol].
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
const Real _R
Universal gas constant (J/mol/K)
virtual Real criticalTemperature() const
Critical temperature.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real criticalDensity() const
Critical density.
const std::string pressure
Definition: NS.h:26

◆ 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

◆ d2alpha_ddelta2()

Real NitrogenFluidProperties::d2alpha_ddelta2 ( Real  delta,
Real  tau 
) const
overrideprotectedvirtual

Second derivative of Helmholtz free energy wrt delta.

Parameters
deltascaled density (-)
tauscaled temperature (-)
Returns
second derivative of Helmholtz free energy wrt delta

Implements HelmholtzFluidProperties.

Definition at line 361 of file NitrogenFluidProperties.C.

362 {
363  // Ideal gas component of the Helmholtz free energy
364  const Real dalpha0 = -1.0 / delta / delta;
365 
366  // Residual component of the Helmholtz free energy
367  Real dalphar = 0.0;
368 
369  for (std::size_t i = 0; i < _N1.size(); ++i)
370  dalphar +=
371  _N1[i] * _i1[i] * (_i1[i] - 1.0) * MathUtils::pow(delta, _i1[i]) * std::pow(tau, _j1[i]);
372 
373  for (std::size_t i = 0; i < _N2.size(); ++i)
374  dalphar += _N2[i] * MathUtils::pow(delta, _i2[i]) * std::pow(tau, _j2[i]) *
375  std::exp(-MathUtils::pow(delta, _l2[i])) *
376  ((_i2[i] - _l2[i] * MathUtils::pow(delta, _l2[i])) *
377  (_i2[i] - 1.0 - _l2[i] * MathUtils::pow(delta, _l2[i])) -
378  _l2[i] * _l2[i] * MathUtils::pow(delta, _l2[i]));
379 
380  for (std::size_t i = 0; i < _N3.size(); ++i)
381  dalphar += _N3[i] * MathUtils::pow(delta, _i3[i]) * std::pow(tau, _j3[i]) *
382  std::exp(-_phi3[i] * Utility::pow<2>(delta - 1.0) -
383  _beta3[i] * Utility::pow<2>(tau - _gamma3[i])) *
384  (Utility::pow<2>(_i3[i] - 2.0 * delta * _phi3[i] * (delta - 1.0)) - _i3[i] -
385  2.0 * delta * delta * _phi3[i]);
386 
387  // The Helmholtz free energy
388  return dalpha0 + dalphar / delta / delta;
389 }
const std::array< Real, 4 > _gamma3
const std::array< unsigned int, 4 > _j3
const std::array< unsigned int, 26 > _i2
const std::array< Real, 4 > _phi3
const std::array< Real, 26 > _j2
const std::array< unsigned int, 6 > _i1
const std::array< Real, 26 > _N2
const std::array< unsigned int, 4 > _i3
const std::array< Real, 6 > _j1
const std::array< unsigned int, 26 > _l2
const std::array< Real, 6 > _N1
Coefficients for residual component of the Helmholtz free energy.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 4 > _N3
const std::array< Real, 4 > _beta3

◆ d2alpha_ddeltatau()

Real NitrogenFluidProperties::d2alpha_ddeltatau ( Real  delta,
Real  tau 
) const
overrideprotectedvirtual

Second derivative of Helmholtz free energy wrt delta and tau.

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

Implements HelmholtzFluidProperties.

Definition at line 423 of file NitrogenFluidProperties.C.

424 {
425  // Residual component of the Helmholtz free energy (second derivative of ideal
426  // component wrt delta and tau is 0)
427  Real dalphar = 0.0;
428 
429  for (std::size_t i = 0; i < _N1.size(); ++i)
430  dalphar += _N1[i] * _i1[i] * _j1[i] * MathUtils::pow(delta, _i1[i]) * std::pow(tau, _j1[i]);
431 
432  for (std::size_t i = 0; i < _N2.size(); ++i)
433  dalphar += _N2[i] * _j2[i] * MathUtils::pow(delta, _i2[i]) * std::pow(tau, _j2[i]) *
434  std::exp(-MathUtils::pow(delta, _l2[i])) *
435  (_i2[i] - _l2[i] * MathUtils::pow(delta, _l2[i]));
436 
437  for (std::size_t i = 0; i < _N3.size(); ++i)
438  dalphar += _N3[i] * MathUtils::pow(delta, _i3[i]) * std::pow(tau, _j3[i]) *
439  std::exp(-_phi3[i] * Utility::pow<2>(delta - 1.0) -
440  _beta3[i] * Utility::pow<2>(tau - _gamma3[i])) *
441  (_i3[i] - 2.0 * delta * _phi3[i] * (delta - 1.0)) *
442  (_j3[i] - 2.0 * tau * _beta3[i] * (tau - _gamma3[i]));
443 
444  // The Helmholtz free energy
445  return dalphar / delta / tau;
446 }
const std::array< Real, 4 > _gamma3
const std::array< unsigned int, 4 > _j3
const std::array< unsigned int, 26 > _i2
const std::array< Real, 4 > _phi3
const std::array< Real, 26 > _j2
const std::array< unsigned int, 6 > _i1
const std::array< Real, 26 > _N2
const std::array< unsigned int, 4 > _i3
const std::array< Real, 6 > _j1
const std::array< unsigned int, 26 > _l2
const std::array< Real, 6 > _N1
Coefficients for residual component of the Helmholtz free energy.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 4 > _N3
const std::array< Real, 4 > _beta3

◆ d2alpha_dtau2()

Real NitrogenFluidProperties::d2alpha_dtau2 ( Real  delta,
Real  tau 
) const
overrideprotectedvirtual

Second derivative of Helmholtz free energy wrt tau.

Parameters
deltascaled density (-)
tauscaled temperature (-)
Returns
second derivative of Helmholtz free energy wrt tau

Implements HelmholtzFluidProperties.

Definition at line 392 of file NitrogenFluidProperties.C.

393 {
394  // Ideal gas component of the Helmholtz free energy
395  const Real dalpha0 = -_a[0] + 2.0 * _a[3] / tau + 6.0 * _a[4] / Utility::pow<2>(tau) +
396  12.0 * _a[5] / Utility::pow<3>(tau) -
397  _a[6] * _a[7] * _a[7] * tau * tau * std::exp(_a[7] * tau) /
398  Utility::pow<2>(std::exp(_a[7] * tau) - 1.0);
399 
400  // Residual component of the Helmholtz free energy
401  Real dalphar = 0.0;
402 
403  for (std::size_t i = 0; i < _N1.size(); ++i)
404  dalphar +=
405  _N1[i] * _j1[i] * (_j1[i] - 1.0) * MathUtils::pow(delta, _i1[i]) * std::pow(tau, _j1[i]);
406 
407  for (std::size_t i = 0; i < _N2.size(); ++i)
408  dalphar += _N2[i] * _j2[i] * (_j2[i] - 1.0) * MathUtils::pow(delta, _i2[i]) *
409  std::pow(tau, _j2[i]) * std::exp(-MathUtils::pow(delta, _l2[i]));
410 
411  for (std::size_t i = 0; i < _N3.size(); ++i)
412  dalphar += _N3[i] * MathUtils::pow(delta, _i3[i]) * std::pow(tau, _j3[i]) *
413  std::exp(-_phi3[i] * Utility::pow<2>(delta - 1.0) -
414  _beta3[i] * Utility::pow<2>(tau - _gamma3[i])) *
415  (Utility::pow<2>(_j3[i] - 2.0 * tau * _beta3[i] * (tau - _gamma3[i])) - _j3[i] -
416  2.0 * tau * tau * _beta3[i]);
417 
418  // The Helmholtz free energy is the sum of these two
419  return (dalpha0 + dalphar) / tau / tau;
420 }
const std::array< Real, 4 > _gamma3
const std::array< unsigned int, 4 > _j3
const std::array< unsigned int, 26 > _i2
const std::array< Real, 4 > _phi3
const std::array< Real, 26 > _j2
const std::array< Real, 8 > _a
Coefficients for ideal gas component of the Helmholtz free energy.
const std::array< unsigned int, 6 > _i1
const std::array< Real, 26 > _N2
const std::array< unsigned int, 4 > _i3
const std::array< Real, 6 > _j1
const std::array< unsigned int, 26 > _l2
const std::array< Real, 6 > _N1
Coefficients for residual component of the Helmholtz free energy.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 4 > _N3
const std::array< Real, 4 > _beta3

◆ dalpha_ddelta()

Real NitrogenFluidProperties::dalpha_ddelta ( Real  delta,
Real  tau 
) const
overrideprotectedvirtual

Derivative of Helmholtz free energy wrt delta.

Parameters
deltascaled density (-)
tauscaled temperature (-)
Returns
derivative of Helmholtz free energy wrt delta

Implements HelmholtzFluidProperties.

Definition at line 306 of file NitrogenFluidProperties.C.

307 {
308  // Ideal gas component of the Helmholtz free energy
309  const Real dalpha0 = 1.0 / delta;
310 
311  // Residual component of the Helmholtz free energy
312  Real dalphar = 0.0;
313 
314  for (std::size_t i = 0; i < _N1.size(); ++i)
315  dalphar += _N1[i] * _i1[i] * MathUtils::pow(delta, _i1[i]) * std::pow(tau, _j1[i]);
316 
317  for (std::size_t i = 0; i < _N2.size(); ++i)
318  dalphar += _N2[i] * MathUtils::pow(delta, _i2[i]) * std::pow(tau, _j2[i]) *
319  std::exp(-MathUtils::pow(delta, _l2[i])) *
320  (_i2[i] - _l2[i] * MathUtils::pow(delta, _l2[i]));
321 
322  for (std::size_t i = 0; i < _N3.size(); ++i)
323  dalphar += _N3[i] * MathUtils::pow(delta, _i3[i]) * std::pow(tau, _j3[i]) *
324  std::exp(-_phi3[i] * Utility::pow<2>(delta - 1.0) -
325  _beta3[i] * Utility::pow<2>(tau - _gamma3[i])) *
326  (_i3[i] - 2.0 * delta * _phi3[i] * (delta - 1.0));
327 
328  // The Helmholtz free energy is the sum of these two
329  return dalpha0 + dalphar / delta;
330 }
const std::array< Real, 4 > _gamma3
const std::array< unsigned int, 4 > _j3
const std::array< unsigned int, 26 > _i2
const std::array< Real, 4 > _phi3
const std::array< Real, 26 > _j2
const std::array< unsigned int, 6 > _i1
const std::array< Real, 26 > _N2
const std::array< unsigned int, 4 > _i3
const std::array< Real, 6 > _j1
const std::array< unsigned int, 26 > _l2
const std::array< Real, 6 > _N1
Coefficients for residual component of the Helmholtz free energy.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 4 > _N3
const std::array< Real, 4 > _beta3

◆ dalpha_dtau()

Real NitrogenFluidProperties::dalpha_dtau ( Real  delta,
Real  tau 
) const
overrideprotectedvirtual

Derivative of Helmholtz free energy wrt tau.

Parameters
deltascaled density (-)
tauscaled temperature (-)
Returns
derivative of Helmholtz free energy wrt tau

Implements HelmholtzFluidProperties.

Definition at line 333 of file NitrogenFluidProperties.C.

334 {
335  // Ideal gas component of the Helmholtz free energy
336  const Real dalpha0 = _a[0] + _a[2] * tau - _a[3] / tau - 2.0 * _a[4] / Utility::pow<2>(tau) -
337  3.0 * _a[5] / Utility::pow<3>(tau) +
338  _a[6] * _a[7] * tau / (std::exp(_a[7] * tau) - 1.0);
339 
340  // Residual component of the Helmholtz free energy
341  Real dalphar = 0.0;
342 
343  for (std::size_t i = 0; i < _N1.size(); ++i)
344  dalphar += _N1[i] * _j1[i] * MathUtils::pow(delta, _i1[i]) * std::pow(tau, _j1[i]);
345 
346  for (std::size_t i = 0; i < _N2.size(); ++i)
347  dalphar += _N2[i] * _j2[i] * MathUtils::pow(delta, _i2[i]) * std::pow(tau, _j2[i]) *
348  std::exp(-MathUtils::pow(delta, _l2[i]));
349 
350  for (std::size_t i = 0; i < _N3.size(); ++i)
351  dalphar += _N3[i] * MathUtils::pow(delta, _i3[i]) * std::pow(tau, _j3[i]) *
352  std::exp(-_phi3[i] * Utility::pow<2>(delta - 1.0) -
353  _beta3[i] * Utility::pow<2>(tau - _gamma3[i])) *
354  (_j3[i] - 2.0 * tau * _beta3[i] * (tau - _gamma3[i]));
355 
356  // The Helmholtz free energy is the sum of these two
357  return (dalpha0 + dalphar) / tau;
358 }
const std::array< Real, 4 > _gamma3
const std::array< unsigned int, 4 > _j3
const std::array< unsigned int, 26 > _i2
const std::array< Real, 4 > _phi3
const std::array< Real, 26 > _j2
const std::array< Real, 8 > _a
Coefficients for ideal gas component of the Helmholtz free energy.
const std::array< unsigned int, 6 > _i1
const std::array< Real, 26 > _N2
const std::array< unsigned int, 4 > _i3
const std::array< Real, 6 > _j1
const std::array< unsigned int, 26 > _l2
const std::array< Real, 6 > _N1
Coefficients for residual component of the Helmholtz free energy.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const std::array< Real, 4 > _N3
const std::array< Real, 4 > _beta3

◆ e()

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

Definition at line 366 of file SinglePhaseFluidProperties.C.

Referenced by Water97FluidProperties::b2bc(), IdealGasFluidProperties::c_from_v_e(), StiffenedGasFluidProperties::c_from_v_e(), NaClFluidProperties::cp_from_p_T(), Water97FluidProperties::densityRegion3(), SinglePhaseFluidProperties::e_dpT(), StiffenedGasFluidProperties::e_from_p_rho(), IdealGasFluidProperties::e_from_p_rho(), HelmholtzFluidProperties::e_from_p_T(), IdealGasFluidPropertiesPT::e_from_p_T(), Water97FluidProperties::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(), 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(), Water97FluidProperties::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(), 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().

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 HelmholtzFluidProperties::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 65 of file HelmholtzFluidProperties.C.

Referenced by HelmholtzFluidProperties::e_from_p_T(), and HelmholtzFluidProperties::rho_e_dpT().

66 {
67  // Require density first
69  // Scale the input density and temperature
70  const Real delta = density / criticalDensity();
71  const Real tau = criticalTemperature() / temperature;
72 
73  return _R * temperature * tau * dalpha_dtau(delta, tau) / molarMass();
74 }
virtual Real molarMass() const
Molar mass [kg/mol].
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
const Real _R
Universal gas constant (J/mol/K)
virtual Real criticalTemperature() const
Critical temperature.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real dalpha_dtau(Real delta, Real tau) const =0
Derivative of Helmholtz free energy wrt tau.
virtual Real criticalDensity() const
Critical density.
const std::string pressure
Definition: NS.h:26

◆ e_from_p_T() [2/2]

void HelmholtzFluidProperties::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 77 of file HelmholtzFluidProperties.C.

79 {
80  e = this->e_from_p_T(pressure, temperature);
81 
82  // Require density first
84  // Scale the input density and temperature
85  const Real delta = density / criticalDensity();
86  const Real tau = criticalTemperature() / temperature;
87 
88  const Real da_dd = dalpha_ddelta(delta, tau);
89  const Real d2a_dd2 = d2alpha_ddelta2(delta, tau);
90  const Real d2a_ddt = d2alpha_ddeltatau(delta, tau);
91 
92  de_dp = tau * d2a_ddt / (density * (2.0 * da_dd + delta * d2a_dd2));
93  de_dT = -_R *
94  (delta * tau * d2a_ddt * (da_dd - tau * d2a_ddt) / (2.0 * da_dd + delta * d2a_dd2) +
95  tau * tau * d2alpha_dtau2(delta, tau)) /
96  molarMass();
97 }
virtual Real d2alpha_ddeltatau(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt delta and tau.
virtual Real d2alpha_dtau2(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt tau.
virtual Real molarMass() const
Molar mass [kg/mol].
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
virtual Real d2alpha_ddelta2(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt delta.
const Real _R
Universal gas constant (J/mol/K)
virtual Real criticalTemperature() const
Critical temperature.
virtual Real dalpha_ddelta(Real delta, Real tau) const =0
Derivative of Helmholtz free energy wrt delta.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real criticalDensity() const
Critical density.
const std::string pressure
Definition: NS.h:26
virtual Real e(Real pressure, Real temperature) const
virtual Real e_from_p_T(Real pressure, Real temperature) const override
Internal energy from pressure and temperature.

◆ 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 NitrogenFluidProperties::fluidName ( ) const
overridevirtual

Fluid name.

Returns
string representing fluid name

Reimplemented from SinglePhaseFluidProperties.

Definition at line 39 of file NitrogenFluidProperties.C.

40 {
41  return "nitrogen";
42 }

◆ 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

◆ 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 HelmholtzFluidProperties::h_from_p_T ( Real  p,
Real  T 
) const
overridevirtualinherited

Specific enthalpy from pressure and temperature.

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 229 of file HelmholtzFluidProperties.C.

Referenced by HelmholtzFluidProperties::h_from_p_T().

230 {
231  // Require density first
232  const Real density = rho_from_p_T(pressure, temperature);
233  // Scale the input density and temperature
234  const Real delta = density / criticalDensity();
235  const Real tau = criticalTemperature() / temperature;
236 
237  return _R * temperature * (tau * dalpha_dtau(delta, tau) + delta * dalpha_ddelta(delta, tau)) /
238  molarMass();
239 }
virtual Real molarMass() const
Molar mass [kg/mol].
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
const Real _R
Universal gas constant (J/mol/K)
virtual Real criticalTemperature() const
Critical temperature.
virtual Real dalpha_ddelta(Real delta, Real tau) const =0
Derivative of Helmholtz free energy wrt delta.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real dalpha_dtau(Real delta, Real tau) const =0
Derivative of Helmholtz free energy wrt tau.
virtual Real criticalDensity() const
Critical density.
const std::string pressure
Definition: NS.h:26

◆ h_from_p_T() [2/2]

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

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 242 of file HelmholtzFluidProperties.C.

244 {
245  h = this->h_from_p_T(pressure, temperature);
246 
247  // Require density first
248  const Real density = rho_from_p_T(pressure, temperature);
249  // Scale the input density and temperature
250  const Real delta = density / criticalDensity();
251  const Real tau = criticalTemperature() / temperature;
252 
253  const Real da_dd = dalpha_ddelta(delta, tau);
254  const Real d2a_dd2 = d2alpha_ddelta2(delta, tau);
255  const Real d2a_ddt = d2alpha_ddeltatau(delta, tau);
256 
257  dh_dp = (da_dd + delta * d2a_dd2 + tau * d2a_ddt) / (density * (2.0 * da_dd + delta * d2a_dd2));
258  dh_dT = _R *
259  (delta * da_dd * (1.0 - tau * d2a_ddt / da_dd) * (1.0 - tau * d2a_ddt / da_dd) /
260  (2.0 + delta * d2a_dd2 / da_dd) -
261  tau * tau * d2alpha_dtau2(delta, tau)) /
262  molarMass();
263 }
virtual Real d2alpha_ddeltatau(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt delta and tau.
virtual Real d2alpha_dtau2(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt tau.
virtual Real molarMass() const
Molar mass [kg/mol].
const std::string density
Definition: NS.h:17
virtual Real h(Real p, Real T) const
const std::string temperature
Definition: NS.h:27
virtual Real d2alpha_ddelta2(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt delta.
const Real _R
Universal gas constant (J/mol/K)
virtual Real criticalTemperature() const
Critical temperature.
virtual Real dalpha_ddelta(Real delta, Real tau) const =0
Derivative of Helmholtz free energy wrt delta.
virtual Real h_from_p_T(Real pressure, Real temperature) const override
Specific enthalpy from pressure and temperature.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real criticalDensity() const
Critical density.
const std::string pressure
Definition: NS.h:26

◆ 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 NitrogenFluidProperties::henryConstant ( Real  temperature) const
overridevirtual

Henry's law constant for dissolution in water.

Parameters
temperaturefluid temperature (K)
Returns
Henry's constant

Reimplemented from SinglePhaseFluidProperties.

Definition at line 216 of file NitrogenFluidProperties.C.

217 {
218  return henryConstantIAPWS(temperature, -9.67578, 4.72162, 11.70585);
219 }
const std::string temperature
Definition: NS.h:27
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...

◆ henryConstant_dT()

void NitrogenFluidProperties::henryConstant_dT ( Real  temperature,
Real &  Kh,
Real &  dKh_dT 
) const
overridevirtual

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

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 222 of file NitrogenFluidProperties.C.

223 {
224  henryConstantIAPWS_dT(temperature, Kh, dKh_dT, -9.67578, 4.72162, 11.70585);
225 }
const std::string temperature
Definition: NS.h:27
virtual void henryConstantIAPWS_dT(Real temperature, Real &Kh, Real &dKh_dT, Real A, Real B, Real C) const
IAPWS formulation of Henry&#39;s law constant for dissolution in water and derivative wrt temperature...

◆ 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(), 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(), 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 {}

◆ 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 NitrogenFluidProperties::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 194 of file NitrogenFluidProperties.C.

Referenced by k_from_p_T().

195 {
196  // Require density first
197  const Real density = rho_from_p_T(pressure, temperature);
199 }
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real k_from_rho_T(Real density, Real temperature) const override
Thermal conductivity as a function of density and temperature.
const std::string pressure
Definition: NS.h:26

◆ k_from_p_T() [2/2]

void NitrogenFluidProperties::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 202 of file NitrogenFluidProperties.C.

204 {
205  k = this->k_from_p_T(pressure, temperature);
206  // Calculate derivatives using finite differences
207  const Real eps = 1.0e-6;
208  const Real peps = pressure * eps;
209  const Real Teps = temperature * eps;
210 
211  dk_dp = (this->k_from_p_T(pressure + peps, temperature) - k) / peps;
212  dk_dT = (this->k_from_p_T(pressure, temperature + Teps) - k) / Teps;
213 }
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 override
Thermal conductivity.
const std::string pressure
Definition: NS.h:26

◆ k_from_rho_T()

Real NitrogenFluidProperties::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 173 of file NitrogenFluidProperties.C.

Referenced by k_from_p_T().

174 {
175  // Scale the input density and temperature
176  const Real delta = density / _rho_critical;
177  const Real tau = _T_critical / temperature;
178 
179  // The dilute gas component
180  const Real lambda0 =
181  1.511 * mu_from_rho_T(0.0, temperature) * 1.0e6 + 2.117 / tau - 3.332 * std::pow(tau, -0.7);
182 
183  // The residual component
184  Real lambdar = 0.0;
185  for (std::size_t i = 0; i < _Nk.size(); ++i)
186  lambdar += _Nk[i] * std::pow(tau, _tk[i]) * MathUtils::pow(delta, _dk[i]) *
187  std::exp(-_gammak[i] * MathUtils::pow(delta, _lk[i]));
188 
189  // The thermal conductivity (note: critical enhancement not implemented)
190  return (lambda0 + lambdar) * 1.0e-3;
191 }
const std::array< Real, 6 > _tk
const std::array< Real, 6 > _gammak
const std::array< Real, 6 > _Nk
Coefficients for thermal conductivity.
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
virtual Real mu_from_rho_T(Real density, Real temperature) const override
Dynamic viscosity as a function of density and temperature.
const std::array< unsigned int, 6 > _dk
const Real _rho_critical
Critical density (kg/m^3)
const std::array< unsigned int, 6 > _lk
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const Real _T_critical
Critical temperature (K)

◆ 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 NitrogenFluidProperties::molarMass ( ) const
overridevirtual

Molar mass [kg/mol].

Returns
molar mass

Reimplemented from SinglePhaseFluidProperties.

Definition at line 45 of file NitrogenFluidProperties.C.

46 {
47  return _Mn2;
48 }
const Real _Mn2
Nitrogen 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 NitrogenFluidProperties::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 107 of file NitrogenFluidProperties.C.

Referenced by mu_from_p_T().

113 {
114  // Scale the input density and temperature
115  const Real delta = density / _rho_critical;
116  const Real tau = _T_critical / temperature;
117  const Real logTstar = std::log(temperature / 98.94);
118 
119  // The dilute gas component
120  Real logOmega = 0.0, dlogOmega_dT = 0.0;
121  for (std::size_t i = 0; i < _bmu.size(); ++i)
122  {
123  logOmega += _bmu[i] * MathUtils::pow(logTstar, i);
124  dlogOmega_dT += i * _bmu[i] * MathUtils::pow(logTstar, i) / (temperature * logTstar);
125  }
126 
127  const Real mu0 =
128  0.0266958 * std::sqrt(1000.0 * _Mn2 * temperature) / (0.3656 * 0.3656 * std::exp(logOmega));
129  const Real dmu0_dT = 26.6958 * _Mn2 * (1.0 - 2.0 * temperature * dlogOmega_dT) *
130  std::exp(-logOmega) /
131  (2.0 * std::sqrt(1000.0 * _Mn2 * temperature) * 0.3656 * 0.3656);
132 
133  // The residual component
134  Real mur = 0.0, dmur_drho = 0.0, dmur_dT = 0.0;
135  Real term;
136  for (std::size_t i = 0; i < _Nmu.size(); ++i)
137  {
138  term = _Nmu[i] * std::pow(tau, _tmu[i]) * MathUtils::pow(delta, _dmu[i]) *
139  std::exp(-_gammamu[i] * MathUtils::pow(delta, _lmu[i]));
140  mur += term;
141  dmur_drho += (_dmu[i] - _lmu[i] * _gammamu[i] * MathUtils::pow(delta, _lmu[i])) * term / delta /
142  _rho_molar_critical / (1000.0 * _Mn2);
143  dmur_dT += -_tmu[i] * term / temperature;
144  }
145 
146  // The viscosity in Pa.s
147  mu = (mu0 + mur) * 1.0e-6;
148  dmu_drho = dmur_drho * 1.0e-6;
149  dmu_dT = (dmu0_dT + dmur_dT) * 1.0e-6 + dmu_drho * ddensity_dT;
150 }
const std::array< Real, 5 > _gammamu
const std::array< Real, 5 > _Nmu
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::array< Real, 5 > _bmu
Coefficients for viscosity.
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
const Real _rho_molar_critical
Critical molar density (mol/l)
const std::array< Real, 5 > _tmu
const std::array< Real, 5 > _dmu
const Real _rho_critical
Critical density (kg/m^3)
const std::array< Real, 5 > _lmu
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const Real _T_critical
Critical temperature (K)
const Real _Mn2
Nitrogen molar mass (kg/mol)
virtual Real e(Real pressure, Real temperature) const

◆ mu_from_p_T() [1/2]

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 153 of file NitrogenFluidProperties.C.

154 {
155  // Require density first
156  const Real density = rho_from_p_T(pressure, temperature);
158 }
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
virtual Real mu_from_rho_T(Real density, Real temperature) const override
Dynamic viscosity as a function of density and temperature.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
const std::string pressure
Definition: NS.h:26

◆ mu_from_p_T() [2/2]

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 161 of file NitrogenFluidProperties.C.

163 {
164  Real rho, drho_dp, drho_dT;
165  rho_from_p_T(pressure, temperature, rho, drho_dp, drho_dT);
166 
167  Real dmu_drho;
168  mu_drhoT_from_rho_T(rho, temperature, drho_dT, mu, dmu_drho, dmu_dT);
169  dmu_dp = dmu_drho * drho_dp;
170 }
virtual void mu_drhoT_from_rho_T(Real density, Real temperature, Real ddensity_dT, Real &mu, Real &dmu_drho, Real &dmu_dT) const override
Dynamic viscosity and its derivatives wrt density and temperature.
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string temperature
Definition: NS.h:27
virtual Real rho(Real p, Real T) const
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
const std::string pressure
Definition: NS.h:26

◆ mu_from_rho_T()

Real NitrogenFluidProperties::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 81 of file NitrogenFluidProperties.C.

Referenced by k_from_rho_T(), and mu_from_p_T().

82 {
83  // Scale the input density and temperature
84  const Real delta = density / _rho_critical;
85  const Real tau = _T_critical / temperature;
86  const Real logTstar = std::log(temperature / 98.94);
87 
88  // The dilute gas component
89  Real logOmega = 0.0;
90  for (std::size_t i = 0; i < _bmu.size(); ++i)
91  logOmega += _bmu[i] * MathUtils::pow(logTstar, i);
92 
93  const Real mu0 =
94  0.0266958 * std::sqrt(1000.0 * _Mn2 * temperature) / (0.3656 * 0.3656 * std::exp(logOmega));
95 
96  // The residual component
97  Real mur = 0.0;
98  for (std::size_t i = 0; i < _Nmu.size(); ++i)
99  mur += _Nmu[i] * std::pow(tau, _tmu[i]) * MathUtils::pow(delta, _dmu[i]) *
100  std::exp(-_gammamu[i] * MathUtils::pow(delta, _lmu[i]));
101 
102  // The viscosity in Pa.s
103  return (mu0 + mur) * 1.0e-6;
104 }
const std::array< Real, 5 > _gammamu
const std::array< Real, 5 > _Nmu
const std::array< Real, 5 > _bmu
Coefficients for viscosity.
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
const std::array< Real, 5 > _tmu
const std::array< Real, 5 > _dmu
const Real _rho_critical
Critical density (kg/m^3)
const std::array< Real, 5 > _lmu
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const Real _T_critical
Critical temperature (K)
const Real _Mn2
Nitrogen molar mass (kg/mol)

◆ 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_rho_T()

Real HelmholtzFluidProperties::p_from_rho_T ( Real  rho,
Real  T 
) const
virtualinherited

Pressure as a function of density and temperature.

Parameters
rhodensity (kg/m^3)
Ttemperature (K)
Returns
pressure (Pa)

Reimplemented in CO2FluidProperties.

Definition at line 266 of file HelmholtzFluidProperties.C.

Referenced by CO2FluidProperties::p_from_rho_T(), and HelmholtzFluidProperties::rho_from_p_T().

267 {
268  // Scale the input density and temperature
269  const Real delta = density / criticalDensity();
270  const Real tau = criticalTemperature() / temperature;
271 
272  return _R * density * temperature * delta * dalpha_ddelta(delta, tau) / molarMass();
273 }
virtual Real molarMass() const
Molar mass [kg/mol].
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
const Real _R
Universal gas constant (J/mol/K)
virtual Real criticalTemperature() const
Critical temperature.
virtual Real dalpha_ddelta(Real delta, Real tau) const =0
Derivative of Helmholtz free energy wrt delta.
virtual Real criticalDensity() const
Critical density.

◆ 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

◆ 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(), Water97FluidProperties::k_from_p_T(), CO2FluidProperties::mu_from_p_T(), mu_from_p_T(), HydrogenFluidProperties::mu_from_p_T(), Water97FluidProperties::mu_from_p_T(), SinglePhaseFluidProperties::rho_dpT(), HelmholtzFluidProperties::rho_e_dpT(), IdealGasFluidPropertiesPT::rho_e_dpT(), Water97FluidProperties::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(), Water97FluidProperties::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(), Water97FluidProperties::rho_mu(), TabulatedFluidProperties::rho_mu(), HelmholtzFluidProperties::rho_mu_dpT(), IdealGasFluidPropertiesPT::rho_mu_dpT(), SimpleFluidProperties::rho_mu_dpT(), Water97FluidProperties::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 HelmholtzFluidProperties::rho_e_dpT ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
overridevirtualinherited

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 100 of file HelmholtzFluidProperties.C.

108 {
109  Real density, ddensity_dp, ddensity_dT;
110  rho_from_p_T(pressure, temperature, density, ddensity_dp, ddensity_dT);
111  rho = density;
112  drho_dp = ddensity_dp;
113  drho_dT = ddensity_dT;
114 
115  Real energy, denergy_dp, denergy_dT;
116  e_from_p_T(pressure, temperature, energy, denergy_dp, denergy_dT);
117  e = energy;
118  de_dp = denergy_dp;
119  de_dT = denergy_dT;
120 }
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
virtual Real rho(Real p, Real T) const
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
const std::string pressure
Definition: NS.h:26
virtual Real e(Real pressure, Real temperature) const
virtual Real e_from_p_T(Real pressure, Real temperature) const override
Internal energy from pressure and temperature.

◆ 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 HelmholtzFluidProperties::rho_from_p_T ( Real  p,
Real  T 
) const
overridevirtualinherited

Density from pressure and temperature.

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

Reimplemented from SinglePhaseFluidProperties.

Reimplemented in CO2FluidProperties.

Definition at line 29 of file HelmholtzFluidProperties.C.

Referenced by HelmholtzFluidProperties::c_from_p_T(), HelmholtzFluidProperties::cp_from_p_T(), HelmholtzFluidProperties::cv_from_p_T(), HelmholtzFluidProperties::e_from_p_T(), HelmholtzFluidProperties::h_from_p_T(), k_from_p_T(), HydrogenFluidProperties::k_from_p_T(), mu_from_p_T(), CO2FluidProperties::mu_from_p_T(), HydrogenFluidProperties::mu_from_p_T(), HelmholtzFluidProperties::rho_e_dpT(), HelmholtzFluidProperties::rho_from_p_T(), CO2FluidProperties::rho_from_p_T(), HelmholtzFluidProperties::rho_mu(), HelmholtzFluidProperties::rho_mu_dpT(), and HelmholtzFluidProperties::s_from_p_T().

30 {
31  Real density;
32  // Initial estimate of a bracketing interval for the density
33  Real lower_density = 1.0e-2;
34  Real upper_density = 100.0;
35 
36  // The density is found by finding the zero of the pressure
37  auto pressure_diff = [&pressure, &temperature, this](Real x) {
38  return this->p_from_rho_T(x, temperature) - pressure;
39  };
40 
41  BrentsMethod::bracket(pressure_diff, lower_density, upper_density);
42  density = BrentsMethod::root(pressure_diff, lower_density, upper_density);
43 
44  return density;
45 }
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
Real root(std::function< Real(Real)> const &f, Real x1, Real x2, Real tol=1.0e-12)
Finds the root of a function using Brent&#39;s method.
Definition: BrentsMethod.C:61
virtual Real p_from_rho_T(Real rho, Real T) const
Pressure as a function of density and temperature.
const std::string pressure
Definition: NS.h:26
void bracket(std::function< Real(Real)> const &f, Real &x1, Real &x2)
Function to bracket a root of a given function.
Definition: BrentsMethod.C:17

◆ rho_from_p_T() [2/2]

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

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.

Reimplemented in CO2FluidProperties.

Definition at line 48 of file HelmholtzFluidProperties.C.

50 {
52 
53  // Scale the density and temperature
54  const Real delta = rho / criticalDensity();
55  const Real tau = criticalTemperature() / temperature;
56  const Real da_dd = dalpha_ddelta(delta, tau);
57  const Real d2a_dd2 = d2alpha_ddelta2(delta, tau);
58 
59  drho_dp = molarMass() / (_R * temperature * delta * (2.0 * da_dd + delta * d2a_dd2));
60  drho_dT = rho * (tau * d2alpha_ddeltatau(delta, tau) - da_dd) / temperature /
61  (2.0 * da_dd + delta * d2a_dd2);
62 }
virtual Real d2alpha_ddeltatau(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt delta and tau.
virtual Real molarMass() const
Molar mass [kg/mol].
const std::string temperature
Definition: NS.h:27
virtual Real d2alpha_ddelta2(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt delta.
virtual Real rho(Real p, Real T) const
const Real _R
Universal gas constant (J/mol/K)
virtual Real criticalTemperature() const
Critical temperature.
virtual Real dalpha_ddelta(Real delta, Real tau) const =0
Derivative of Helmholtz free energy wrt delta.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real criticalDensity() const
Critical density.
const std::string pressure
Definition: NS.h:26

◆ rho_mu()

void HelmholtzFluidProperties::rho_mu ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  mu 
) const
overridevirtualinherited

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 173 of file HelmholtzFluidProperties.C.

174 {
177 }
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
virtual Real rho(Real p, Real T) const
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
const std::string pressure
Definition: NS.h:26

◆ rho_mu_dpT()

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

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 180 of file HelmholtzFluidProperties.C.

188 {
189  rho_from_p_T(pressure, temperature, rho, drho_dp, drho_dT);
190  mu_from_p_T(pressure, temperature, mu, dmu_dp, dmu_dT);
191 }
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
virtual Real rho(Real p, Real T) const
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
const std::string pressure
Definition: NS.h:26

◆ 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 HelmholtzFluidProperties::s_from_p_T ( Real  p,
Real  T 
) const
overridevirtualinherited

Specific entropy from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature

Reimplemented from SinglePhaseFluidProperties.

Definition at line 194 of file HelmholtzFluidProperties.C.

Referenced by HelmholtzFluidProperties::s_from_p_T().

195 {
196  // Require density first
197  const Real density = rho_from_p_T(pressure, temperature);
198  // Scale the input density and temperature
199  const Real delta = density / criticalDensity();
200  const Real tau = criticalTemperature() / temperature;
201 
202  return _R * (tau * dalpha_dtau(delta, tau) - alpha(delta, tau)) / molarMass();
203 }
virtual Real molarMass() const
Molar mass [kg/mol].
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
const Real _R
Universal gas constant (J/mol/K)
virtual Real criticalTemperature() const
Critical temperature.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real dalpha_dtau(Real delta, Real tau) const =0
Derivative of Helmholtz free energy wrt tau.
virtual Real alpha(Real delta, Real tau) const =0
Helmholtz free energy.
virtual Real criticalDensity() const
Critical density.
const std::string pressure
Definition: NS.h:26

◆ s_from_p_T() [2/2]

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

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 206 of file HelmholtzFluidProperties.C.

208 {
209  s = this->s_from_p_T(pressure, temperature);
210 
211  // Require density first
212  const Real density = rho_from_p_T(pressure, temperature);
213  // Scale the input density and temperature
214  const Real delta = density / criticalDensity();
215  const Real tau = criticalTemperature() / temperature;
216 
217  const Real da_dd = dalpha_ddelta(delta, tau);
218  const Real da_dt = dalpha_dtau(delta, tau);
219  const Real d2a_dd2 = d2alpha_ddelta2(delta, tau);
220  const Real d2a_dt2 = d2alpha_dtau2(delta, tau);
221  const Real d2a_ddt = d2alpha_ddeltatau(delta, tau);
222 
223  ds_dp = tau * (d2a_ddt - da_dd) / (density * temperature * (2.0 * da_dd + delta * d2a_dd2));
224  ds_dT = -_R * tau * (da_dt - alpha(delta, tau) + tau * (d2a_dt2 - da_dt)) /
225  (molarMass() * temperature);
226 }
virtual Real d2alpha_ddeltatau(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt delta and tau.
virtual Real d2alpha_dtau2(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt tau.
virtual Real s(Real pressure, Real temperature) const
virtual Real molarMass() const
Molar mass [kg/mol].
const std::string density
Definition: NS.h:17
const std::string temperature
Definition: NS.h:27
virtual Real d2alpha_ddelta2(Real delta, Real tau) const =0
Second derivative of Helmholtz free energy wrt delta.
const Real _R
Universal gas constant (J/mol/K)
virtual Real criticalTemperature() const
Critical temperature.
virtual Real dalpha_ddelta(Real delta, Real tau) const =0
Derivative of Helmholtz free energy wrt delta.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Density from pressure and temperature.
virtual Real dalpha_dtau(Real delta, Real tau) const =0
Derivative of Helmholtz free energy wrt tau.
virtual Real alpha(Real delta, Real tau) const =0
Helmholtz free energy.
virtual Real criticalDensity() const
Critical density.
virtual Real s_from_p_T(Real pressure, Real temperature) const override
Specific entropy from pressure and temperature.
const std::string pressure
Definition: NS.h:26

◆ 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

◆ saturatedLiquidDensity()

Real NitrogenFluidProperties::saturatedLiquidDensity ( Real  temperature) const

Saturated liquid density of N2 Valid for temperatures between the triple point temperature and critical temperature.

Eq. (5), from Span et al (reference above)

Parameters
temperatureN2 temperature (K)
Returns
saturated liquid density (kg/m^3)

Definition at line 245 of file NitrogenFluidProperties.C.

246 {
247  if (temperature < _T_triple || temperature > _T_critical)
248  throw MooseException("Temperature is out of range in " + name() + ": vaporPressure()");
249 
250  const Real Tr = temperature / _T_critical;
251  const Real theta = 1.0 - Tr;
252 
253  const Real logpressure =
254  1.48654237 * std::pow(theta, 0.3294) - 0.280476066 * std::pow(theta, 2.0 / 3.0) +
255  0.0894143085 * std::pow(theta, 8.0 / 3.0) - 0.119879866 * std::pow(theta, 35.0 / 6.0);
256 
257  return _rho_critical * std::exp(logpressure);
258 }
const std::string temperature
Definition: NS.h:27
const std::string name
Definition: Setup.h:22
const Real _rho_critical
Critical density (kg/m^3)
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const Real _T_critical
Critical temperature (K)

◆ saturatedVaporDensity()

Real NitrogenFluidProperties::saturatedVaporDensity ( Real  temperature) const

Saturated vapor density of N2 Valid for temperatures between the triple point temperature and critical temperature.

Eq. (6), from Span et al (reference above)

Parameters
temperatureN2 temperature (K)
Returns
saturated vapor density (kg/m^3)

Definition at line 261 of file NitrogenFluidProperties.C.

262 {
263  if (temperature < _T_triple || temperature > _T_critical)
264  throw MooseException("Temperature is out of range in " + name() + ": vaporPressure()");
265 
266  const Real Tr = temperature / _T_critical;
267  const Real theta = 1.0 - Tr;
268 
269  const Real logpressure =
270  (-1.70127164 * std::pow(theta, 0.34) - 3.70402649 * std::pow(theta, 5.0 / 6.0) +
271  1.29859383 * std::pow(theta, 7.0 / 6.0) - 0.561424977 * std::pow(theta, 13.0 / 6.0) -
272  2.68505381 * std::pow(theta, 14.0 / 3.0)) /
273  Tr;
274 
275  return _rho_critical * std::exp(logpressure);
276 }
const std::string temperature
Definition: NS.h:27
const std::string name
Definition: Setup.h:22
const Real _rho_critical
Critical density (kg/m^3)
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const Real _T_critical
Critical temperature (K)

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Definition at line 32 of file FluidProperties.h.

32 {}

◆ 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

◆ threadJoin()

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

Definition at line 31 of file FluidProperties.h.

31 {}

◆ triplePointPressure()

Real NitrogenFluidProperties::triplePointPressure ( ) const
overridevirtual

Triple point pressure.

Returns
triple point pressure (Pa)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 69 of file NitrogenFluidProperties.C.

70 {
71  return _p_triple;
72 }
const Real _p_triple
Triple point pressure (Pa)

◆ triplePointTemperature()

Real NitrogenFluidProperties::triplePointTemperature ( ) const
overridevirtual

Triple point temperature.

Returns
triple point temperature (K)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 75 of file NitrogenFluidProperties.C.

76 {
77  return _T_triple;
78 }
const Real _T_triple
Triple point temperature (K)

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

Referenced by IdealRealGasMixtureFluidProperties::v_from_p_T().

525 {
526  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
527 }
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

Specific volume from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature

Definition at line 151 of file SinglePhaseFluidProperties.C.

Referenced by GeneralVaporMixtureFluidProperties::c_from_p_T(), GeneralVaporMixtureFluidProperties::cp_from_p_T(), GeneralVaporMixtureFluidProperties::cv_from_p_T(), GeneralVaporMixtureFluidProperties::k_from_p_T(), GeneralVaporMixtureFluidProperties::mu_from_p_T(), GeneralVaporMixtureFluidProperties::v_from_p_T(), and IdealRealGasMixtureFluidProperties::xs_prim_from_p_T().

152 {
153  Real rho = rho_from_p_T(p, T);
154  return 1.0 / rho;
155 }
virtual Real rho(Real p, Real T) const
virtual Real rho_from_p_T(Real p, Real T) const
Density from pressure and temperature.

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

159 {
160  Real rho, drho_dp, drho_dT;
161  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
162 
163  v = 1.0 / rho;
164  const Real dv_drho = -1.0 / (rho * rho);
165 
166  dv_dp = dv_drho * drho_dp;
167  dv_dT = dv_drho * drho_dT;
168 }
virtual Real rho(Real p, Real T) const
virtual Real rho_from_p_T(Real p, Real T) const
Density from pressure and temperature.

◆ vaporPressure()

Real NitrogenFluidProperties::vaporPressure ( Real  temperature) const
overridevirtual

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

Definition at line 228 of file NitrogenFluidProperties.C.

229 {
230  if (temperature < _T_triple || temperature > _T_critical)
231  throw MooseException("Temperature is out of range in " + name() + ": vaporPressure()");
232 
233  const Real Tr = temperature / _T_critical;
234  const Real theta = 1.0 - Tr;
235 
236  const Real logpressure =
237  (-6.12445284 * theta + 1.2632722 * std::pow(theta, 1.5) - 0.765910082 * std::pow(theta, 2.5) -
238  1.77570564 * Utility::pow<5>(theta)) /
239  Tr;
240 
241  return _p_critical * std::exp(logpressure);
242 }
const std::string temperature
Definition: NS.h:27
const std::string name
Definition: Setup.h:22
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const Real _T_critical
Critical temperature (K)
const Real _p_critical
Critical pressure (Pa)

◆ vaporPressure_dT()

void SinglePhaseFluidProperties::vaporPressure_dT ( 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 Water97FluidProperties.

Definition at line 351 of file SinglePhaseFluidProperties.C.

Referenced by PorousFlowWaterNCG::equilibriumMassFractions(), and PorousFlowWaterNCG::gasProperties().

354 {
355  mooseError(name(), ": vaporPressure_dT() is not implemented");
356 }
const std::string name
Definition: Setup.h:22

Member Data Documentation

◆ _a

const std::array<Real, 8> NitrogenFluidProperties::_a
protected
Initial value:
{{2.5,
-12.76952708,
-0.00784163,
-1.934819e-4,
-1.247742e-5,
6.678326e-8,
1.012941,
26.65788}}

Coefficients for ideal gas component of the Helmholtz free energy.

Definition at line 135 of file NitrogenFluidProperties.h.

Referenced by alpha(), d2alpha_dtau2(), and dalpha_dtau().

◆ _beta3

const std::array<Real, 4> NitrogenFluidProperties::_beta3 {{325.0, 325.0, 300.0, 275.0}}
protected

◆ _bmu

const std::array<Real, 5> NitrogenFluidProperties::_bmu {{0.431, -0.4623, 0.08406, 0.005341, -0.00331}}
protected

Coefficients for viscosity.

Definition at line 179 of file NitrogenFluidProperties.h.

Referenced by mu_drhoT_from_rho_T(), and mu_from_rho_T().

◆ _dk

const std::array<unsigned int, 6> NitrogenFluidProperties::_dk {{1, 2, 3, 4, 8, 10}}
protected

Definition at line 189 of file NitrogenFluidProperties.h.

Referenced by k_from_rho_T().

◆ _dmu

const std::array<Real, 5> NitrogenFluidProperties::_dmu {{2, 10, 12, 2, 1}}
protected

Definition at line 182 of file NitrogenFluidProperties.h.

Referenced by mu_drhoT_from_rho_T(), and mu_from_rho_T().

◆ _gamma3

const std::array<Real, 4> NitrogenFluidProperties::_gamma3 {{1.16, 1.16, 1.13, 1.25}}
protected

◆ _gammak

const std::array<Real, 6> NitrogenFluidProperties::_gammak {{0.0, 0.0, 1.0, 1.0, 1.0}}
protected

Definition at line 191 of file NitrogenFluidProperties.h.

Referenced by k_from_rho_T().

◆ _gammamu

const std::array<Real, 5> NitrogenFluidProperties::_gammamu {{0.0, 1.0, 1.0, 1.0, 1.0}}
protected

Definition at line 184 of file NitrogenFluidProperties.h.

Referenced by mu_drhoT_from_rho_T(), and mu_from_rho_T().

◆ _i1

const std::array<unsigned int, 6> NitrogenFluidProperties::_i1 {{1, 1, 2, 2, 3, 3}}
protected

◆ _i2

const std::array<unsigned int, 26> NitrogenFluidProperties::_i2
protected
Initial value:
{
{1, 1, 1, 3, 3, 4, 6, 6, 7, 7, 8, 8, 1, 2, 3, 4, 5, 8, 4, 5, 5, 8, 3, 5, 6, 9}}

Definition at line 161 of file NitrogenFluidProperties.h.

Referenced by alpha(), d2alpha_ddelta2(), d2alpha_ddeltatau(), d2alpha_dtau2(), dalpha_ddelta(), and dalpha_dtau().

◆ _i3

const std::array<unsigned int, 4> NitrogenFluidProperties::_i3 {{1, 1, 3, 2}}
protected

◆ _j1

const std::array<Real, 6> NitrogenFluidProperties::_j1 {{0.25, 0.875, 0.5, 0.875, 0.375, 0.75}}
protected

◆ _j2

const std::array<Real, 26> NitrogenFluidProperties::_j2
protected
Initial value:
{{0.5, 0.75, 2.0, 1.25, 3.5, 1.0, 0.5, 3.0, 0.0,
2.75, 0.75, 2.5, 4.0, 6.0, 6.0, 3.0, 3.0, 6.0,
16.0, 11.0, 15.0, 12.0, 12.0, 7.0, 4.0, 16.0}}

Definition at line 163 of file NitrogenFluidProperties.h.

Referenced by alpha(), d2alpha_ddelta2(), d2alpha_ddeltatau(), d2alpha_dtau2(), dalpha_ddelta(), and dalpha_dtau().

◆ _j3

const std::array<unsigned int, 4> NitrogenFluidProperties::_j3 {{0, 1, 2, 3}}
protected

◆ _l2

const std::array<unsigned int, 26> NitrogenFluidProperties::_l2
protected
Initial value:
{
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4}}

Definition at line 166 of file NitrogenFluidProperties.h.

Referenced by alpha(), d2alpha_ddelta2(), d2alpha_ddeltatau(), d2alpha_dtau2(), dalpha_ddelta(), and dalpha_dtau().

◆ _l3

const std::array<unsigned int, 4> NitrogenFluidProperties::_l3 {{2, 2, 2, 2}}
protected

Definition at line 173 of file NitrogenFluidProperties.h.

◆ _lk

const std::array<unsigned int, 6> NitrogenFluidProperties::_lk {{0, 0, 1, 2, 2, 2}}
protected

Definition at line 190 of file NitrogenFluidProperties.h.

Referenced by k_from_rho_T().

◆ _lmu

const std::array<Real, 5> NitrogenFluidProperties::_lmu {{0, 1, 1, 2, 3}}
protected

Definition at line 183 of file NitrogenFluidProperties.h.

Referenced by mu_drhoT_from_rho_T(), and mu_from_rho_T().

◆ _Mn2

const Real NitrogenFluidProperties::_Mn2
protected

Nitrogen molar mass (kg/mol)

Definition at line 120 of file NitrogenFluidProperties.h.

Referenced by molarMass(), mu_drhoT_from_rho_T(), and mu_from_rho_T().

◆ _N1

const std::array<Real, 6> NitrogenFluidProperties::_N1
protected
Initial value:
{{0.924803575275,
-0.492448489428,
0.661883336938,
-0.192902649201e1,
-0.622469309629e-1,
0.349943957581}}

Coefficients for residual component of the Helmholtz free energy.

Definition at line 144 of file NitrogenFluidProperties.h.

Referenced by alpha(), d2alpha_ddelta2(), d2alpha_ddeltatau(), d2alpha_dtau2(), dalpha_ddelta(), and dalpha_dtau().

◆ _N2

const std::array<Real, 26> NitrogenFluidProperties::_N2
protected
Initial value:
{
{0.564857472498, -0.161720005987e1, -0.481395031883, 0.421150636384,
-0.161962230825e-1, 0.172100994165, 0.735448924933e-2, 0.168077305479e-1,
-0.107626664179e-2, -0.137318088513e-1, 0.635466899859e-3, 0.304432279419e-2,
-0.435762336045e-1, -0.723174889316e-1, 0.389644315272e-1, -0.21220136391e-1,
0.4808822981509e-2, -0.551990017984e-4, -0.462016716479e-1, -0.300311716011e-2,
0.368825891208e-1, -0.25585684622e-2, 0.896915264558e-2, -0.44151337035e-2,
0.133722924858e-2, 0.264832491957e-3}}

Definition at line 153 of file NitrogenFluidProperties.h.

Referenced by alpha(), d2alpha_ddelta2(), d2alpha_ddeltatau(), d2alpha_dtau2(), dalpha_ddelta(), and dalpha_dtau().

◆ _N3

const std::array<Real, 4> NitrogenFluidProperties::_N3
protected
Initial value:
{
{0.196688194015e2, -0.20911560073e2, 0.167788306989e-1, 0.262767566274e4}}

Definition at line 169 of file NitrogenFluidProperties.h.

Referenced by alpha(), d2alpha_ddelta2(), d2alpha_ddeltatau(), d2alpha_dtau2(), dalpha_ddelta(), and dalpha_dtau().

◆ _Nk

const std::array<Real, 6> NitrogenFluidProperties::_Nk {{8.862, 31.11, -73.13, 20.03, -0.7096, 0.2672}}
protected

Coefficients for thermal conductivity.

Definition at line 187 of file NitrogenFluidProperties.h.

Referenced by k_from_rho_T().

◆ _Nmu

const std::array<Real, 5> NitrogenFluidProperties::_Nmu {{10.72, 0.03989, 0.001208, -7.402, 4.62}}
protected

Definition at line 180 of file NitrogenFluidProperties.h.

Referenced by mu_drhoT_from_rho_T(), and mu_from_rho_T().

◆ _p_critical

const Real NitrogenFluidProperties::_p_critical
protected

Critical pressure (Pa)

Definition at line 122 of file NitrogenFluidProperties.h.

Referenced by criticalPressure(), and vaporPressure().

◆ _p_triple

const Real NitrogenFluidProperties::_p_triple
protected

Triple point pressure (Pa)

Definition at line 130 of file NitrogenFluidProperties.h.

Referenced by triplePointPressure().

◆ _phi3

const std::array<Real, 4> NitrogenFluidProperties::_phi3 {{20.0, 20.0, 15.0, 25.0}}
protected

◆ _R

const Real SinglePhaseFluidProperties::_R
protectedinherited

◆ _rho_critical

const Real NitrogenFluidProperties::_rho_critical
protected

◆ _rho_molar_critical

const Real NitrogenFluidProperties::_rho_molar_critical
protected

Critical molar density (mol/l)

Definition at line 126 of file NitrogenFluidProperties.h.

Referenced by mu_drhoT_from_rho_T().

◆ _T_c2k

const Real SinglePhaseFluidProperties::_T_c2k
protectedinherited

◆ _T_critical

const Real NitrogenFluidProperties::_T_critical
protected

◆ _T_triple

const Real NitrogenFluidProperties::_T_triple
protected

Triple point temperature (K)

Definition at line 132 of file NitrogenFluidProperties.h.

Referenced by triplePointTemperature().

◆ _tk

const std::array<Real, 6> NitrogenFluidProperties::_tk {{0.0, 0.03, 0.2, 0.8, 0.6, 1.9}}
protected

Definition at line 188 of file NitrogenFluidProperties.h.

Referenced by k_from_rho_T().

◆ _tmu

const std::array<Real, 5> NitrogenFluidProperties::_tmu {{0.1, 0.25, 3.2, 0.9, 0.3}}
protected

Definition at line 181 of file NitrogenFluidProperties.h.

Referenced by mu_drhoT_from_rho_T(), and mu_from_rho_T().


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