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

Class for fluid properties of an arbitrary vapor mixture. More...

#include <IdealRealGasMixtureFluidProperties.h>

Inheritance diagram for IdealRealGasMixtureFluidProperties:
[legend]

Public Member Functions

 IdealRealGasMixtureFluidProperties (const InputParameters &parameters)
 
virtual unsigned int getNumberOfSecondaryVapors () const override
 Number of secondary vapors (non-condensable components) More...
 
virtual Real p_from_v_e (Real v, Real e, const std::vector< Real > &x) const override
 Pressure from specific volume and specific internal energy. More...
 
virtual void p_from_v_e (Real v, Real e, const std::vector< Real > &x, Real &p, Real &dp_dv, Real &dp_de, std::vector< Real > &dp_dx) const override
 Pressure and its derivatives from specific volume and specific internal energy. More...
 
virtual Real T_from_v_e (Real v, Real e, const std::vector< Real > &x) const override
 Temperature from specific volume and specific internal energy. More...
 
virtual void T_from_v_e (Real v, Real e, const std::vector< Real > &x, Real &T, Real &dT_dv, Real &dT_de, std::vector< Real > &dT_dx) const override
 Temperature and its derivatives from specific volume and specific internal energy. More...
 
virtual Real c_from_v_e (Real v, Real e, const std::vector< Real > &x) const override
 Speed of sound from specific volume and specific internal energy. More...
 
virtual void c_from_v_e (Real v, Real e, const std::vector< Real > &x, Real &c, Real &dc_dv, Real &dc_de, std::vector< Real > &dc_dx) const override
 Speed of sound and its derivatives from specific volume and specific internal energy. More...
 
virtual Real rho_from_p_T (Real p, Real T, const std::vector< Real > &x) const override
 Density from pressure and temperature. More...
 
virtual void rho_from_p_T (Real p, Real T, const std::vector< Real > &x, Real &rho, Real &drho_dp, Real &drho_dT, std::vector< Real > &drho_dx) const override
 Density and its derivatives from pressure and temperature. More...
 
virtual Real e_from_p_T (Real p, Real T, const std::vector< Real > &x) const override
 Specific internal energy from pressure and temperature. More...
 
virtual void e_from_p_T (Real p, Real T, const std::vector< Real > &x, Real &e, Real &de_dp, Real &de_dT, std::vector< Real > &de_dx) const override
 Specific internal energy and its derivatives from pressure and temperature. More...
 
virtual Real c_from_p_T (Real p, Real T, const std::vector< Real > &x) const override
 Speed of sound from pressure and temperature. More...
 
virtual void c_from_p_T (Real p, Real T, const std::vector< Real > &x, Real &c, Real &dc_dp, Real &dc_dT, std::vector< Real > &dc_dx) const override
 Speed of sound and its derivatives from pressure and temperature. More...
 
virtual Real cp_from_p_T (Real p, Real T, const std::vector< Real > &x) const override
 Isobaric heat capacity from pressure and temperature. More...
 
virtual Real cv_from_p_T (Real p, Real T, const std::vector< Real > &x) const override
 Isochoric heat capacity from pressure and temperature. More...
 
virtual Real mu_from_p_T (Real p, Real T, const std::vector< Real > &x) const override
 Dynamic viscosity from pressure and temperature. More...
 
virtual Real k_from_p_T (Real p, Real T, const std::vector< Real > &x) const override
 Thermal conductivity from pressure and temperature. More...
 
virtual Real v_from_p_T (Real p, Real T, const std::vector< Real > &x) const
 Specific volume from pressure and temperature. More...
 
virtual void v_from_p_T (Real p, Real T, const std::vector< Real > &x, Real &v, Real &dv_dp, Real &dv_dT, std::vector< Real > &dv_dx) const
 Specific volume and its derivatives from pressure and temperature. More...
 
virtual Real e_from_p_rho (Real p, Real rho, const std::vector< Real > &x) const override
 Specific internal energy from pressure and density. More...
 
virtual void e_from_p_rho (Real p, Real rho, const std::vector< Real > &x, Real &e, Real &de_dp, Real &de_drho, std::vector< Real > &de_dx) const override
 Specific internal energy and its derivatives from pressure and density. More...
 
void p_T_from_v_e (Real v, Real e, const std::vector< Real > &x, Real &p, Real &T) const
 Pressure and temperature from specific volume and specific internal energy. More...
 
void p_T_from_v_e (Real v, Real e, const std::vector< Real > &x, Real &p, Real &dp_dv, Real &dp_de, std::vector< Real > &dp_dx, Real &T, Real &dT_dv, Real &dT_de, std::vector< Real > &dT_dx) const
 Pressure and temperature from specific volume and specific internal energy. More...
 
Real T_from_p_v (Real p, Real v, const std::vector< Real > &x) const
 Temperature from pressure and specific volume. More...
 
void T_from_p_v (Real p, Real v, const std::vector< Real > &x, Real &T, Real &dT_dp, Real &dT_dv, std::vector< Real > &dT_dx) const
 Temperature and its derivatives from pressure and specific volume. More...
 
Real p_from_T_v (Real T, Real v, const std::vector< Real > &x) const
 Pressure from temperature and specific volume. More...
 
void p_from_T_v (Real T, Real v, const std::vector< Real > &x, Real &p, Real &dp_dT, Real &dp_dv) const
 Pressure and its derivatives from temperature and specific volume. More...
 
void p_from_T_v (Real T, Real v, const std::vector< Real > &x, Real &p, Real &dp_dT, Real &dp_dv, std::vector< Real > &dp_dx) const
 Pressure and its derivatives from temperature and specific volume. More...
 
Real e_from_T_v (Real T, Real v, const std::vector< Real > &x) const
 Specific internal energy from temperature and specific volume. More...
 
void e_from_T_v (Real T, Real v, const std::vector< Real > &x, Real &e, Real &de_dT, Real &de_dv, std::vector< Real > &de_dx) const
 Specific internal energy and its derivatives from temperature and specific volume. More...
 
void s_from_T_v (Real T, Real v, const std::vector< Real > &x, Real &s, Real &ds_dT, Real &ds_dv) const
 Specific entropy and its derivatives from temperature and specific volume. More...
 
Real c_from_T_v (Real T, Real v, const std::vector< Real > &x) const
 Speed of sound from temperature and specific volume. More...
 
void c_from_T_v (Real T, Real v, const std::vector< Real > &x, Real &c, Real &dc_dT, Real &dc_dv, std::vector< Real > &dc_dx) const
 Speed of sound and its derivatives from temperature and specific volume. More...
 
Real cp_from_T_v (Real T, Real v, const std::vector< Real > &x) const
 Isobaric heat capacity from temperature and specific volume. More...
 
Real cv_from_T_v (Real T, Real v, const std::vector< Real > &x) const
 Isochoric heat capacity from temperature and specific volume. More...
 
Real mu_from_T_v (Real T, Real v, const std::vector< Real > &x) const
 Dynamic viscosity from temperature and specific volume. More...
 
Real k_from_T_v (Real T, Real v, const std::vector< Real > &x) const
 Thermal conductivity from temperature and specific volume. More...
 
Real xs_prim_from_p_T (Real p, Real T, const std::vector< Real > &x) const
 Mass fraction of primary (condensable) component at saturation from pressure and temperature. More...
 
Real primaryMassFraction (const std::vector< Real > &x) const
 Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors. More...
 
virtual void execute () final
 
virtual void initialize () final
 
virtual void finalize () final
 
virtual void threadJoin (const UserObject &) final
 
virtual void subdomainSetup () final
 

Static Public Attributes

static const Real _R = 8.3144598
 Universal gas constant (J/mol/K) More...
 

Protected Types

enum  NaNMessage { NAN_MESSAGE_NONE = 0, NAN_MESSAGE_WARNING = 1, NAN_MESSAGE_ERROR = 2 }
 

Protected Member Functions

Real getNaN () const
 Produces errors, warnings, or just quiet NaNs. More...
 
template<typename... Args>
Real getNaN (Args &&... args) const
 

Protected Attributes

const SinglePhaseFluidProperties_fp_primary
 Primary vapor fluid properties. More...
 
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
 Secondary vapor fluid properties. More...
 
const std::vector< UserObjectName > _fp_secondary_names
 Names of secondary vapor fluid properties. More...
 
const unsigned int _n_secondary_vapors
 Number of secondary vapors. More...
 
const Real _T_mix_max
 maximum temperature of all components More...
 
const Real _T_c2k
 Conversion of temperature from Celsius to Kelvin. More...
 
const bool _allow_imperfect_jacobians
 Flag to set unimplemented Jacobian entries to zero. More...
 
const MooseObject * _moose_object
 
enum NaNMessage _emit_on_nan
 Raise mooseWarning or mooseError? More...
 

Static Protected Attributes

constexpr static const Real R_molar = 8.3144598
 molar (or universal) gas constant More...
 

Detailed Description

Class for fluid properties of an arbitrary vapor mixture.

Definition at line 26 of file IdealRealGasMixtureFluidProperties.h.

Member Enumeration Documentation

◆ NaNMessage

enum NaNInterface::NaNMessage
protectedinherited
Enumerator
NAN_MESSAGE_NONE 
NAN_MESSAGE_WARNING 
NAN_MESSAGE_ERROR 

Definition at line 33 of file NaNInterface.h.

34  {
35  NAN_MESSAGE_NONE = 0,
38  };

Constructor & Destructor Documentation

◆ IdealRealGasMixtureFluidProperties()

IdealRealGasMixtureFluidProperties::IdealRealGasMixtureFluidProperties ( const InputParameters &  parameters)

Definition at line 39 of file IdealRealGasMixtureFluidProperties.C.

41  : VaporMixtureFluidProperties(parameters),
42  NaNInterface(this),
43  _fp_secondary_names(getParam<std::vector<UserObjectName>>("fp_secondary")),
45  _T_mix_max(getParam<Real>("_T_mix_max"))
46 {
47  _fp_primary = &getUserObject<SinglePhaseFluidProperties>("fp_primary");
48 
50  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
51  _fp_secondary[i] = &getUserObjectByName<SinglePhaseFluidProperties>(_fp_secondary_names[i]);
52 }

Member Function Documentation

◆ c_from_p_T() [1/2]

Real IdealRealGasMixtureFluidProperties::c_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x 
) const
overridevirtual

Speed of sound from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[in]xvapor mass fraction values
Returns
speed of sound

Implements VaporMixtureFluidProperties.

Definition at line 265 of file IdealRealGasMixtureFluidProperties.C.

266 {
267  Real v;
268  Real p_unused, dp_dT, dp_dv;
269  Real s, ds_dT, ds_dv;
270 
271  v = v_from_p_T(p, T, x);
272  p_from_T_v(T, v, x, p_unused, dp_dT, dp_dv);
273  s_from_T_v(T, v, x, s, ds_dT, ds_dv);
274 
275  Real dp_dv_s = dp_dv - dp_dT * ds_dv / ds_dT;
276 
277  if (dp_dv_s >= 0)
278  mooseWarning(name(), ":c_from_p_T(), dp_dv_s = ", dp_dv_s, ". Should be negative.");
279  return v * std::sqrt(-dp_dv_s);
280 }

Referenced by c_from_p_T().

◆ c_from_p_T() [2/2]

void IdealRealGasMixtureFluidProperties::c_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x,
Real &  c,
Real &  dc_dp,
Real &  dc_dT,
std::vector< Real > &  dc_dx 
) const
overridevirtual

Speed of sound and its derivatives from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[in]xvapor mass fraction values
[out]cspeed of sound
[out]dc_dpderivative of speed of sound w.r.t. pressure
[out]dc_dTderivative of speed of sound w.r.t. temperature
[out]dc_dxderivative of speed of sound w.r.t. vapor mass fraction values

Implements VaporMixtureFluidProperties.

Definition at line 283 of file IdealRealGasMixtureFluidProperties.C.

290 {
291  Real p_perturbed, T_perturbed, c_perturbed;
292 
293  c = c_from_p_T(p, T, x);
294  // For derived properties, we would need higher order derivatives;
295  // therefore, numerical derivatives are used here
296  Real dp = p * 1.e-6;
297  p_perturbed = p + dp;
298  c_perturbed = c_from_p_T(p_perturbed, T, x);
299  dc_dp = (c_perturbed - c) / (dp);
300 
301  Real dT = 1.e-6;
302  T_perturbed = T + dT;
303  c_perturbed = c_from_p_T(p, T_perturbed, x);
304  dc_dT = (c_perturbed - c) / (dT);
305 
306  dc_dx.resize(_n_secondary_vapors);
307  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
308  {
309  Real c_perturbed;
310  std::vector<Real> x_perturbed(x);
311  Real dx_i = 1e-6;
312  for (unsigned int j = 0; j < _n_secondary_vapors; j++)
313  {
314  if (j != i)
315  x_perturbed[j] =
316  x[j] * (1.0 - (x[i] + dx_i)) / (1.0 - x[i]); // recalculate new mass fractions
317  }
318  x_perturbed[i] += dx_i;
319  c_perturbed = c_from_p_T(p, T, x_perturbed);
320  dc_dx[i] = ((c_perturbed - c) / dx_i);
321  }
322 }

◆ c_from_T_v() [1/2]

Real IdealRealGasMixtureFluidProperties::c_from_T_v ( Real  T,
Real  v,
const std::vector< Real > &  x 
) const

Speed of sound from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[in]xvapor mass fraction values
Returns
speed of sound

Definition at line 756 of file IdealRealGasMixtureFluidProperties.C.

757 {
758  Real p, dp_dT, dp_dv;
759  Real s, ds_dT, ds_dv;
760 
761  p_from_T_v(T, v, x, p, dp_dT, dp_dv);
762  s_from_T_v(T, v, x, s, ds_dT, ds_dv);
763 
764  Real dp_dv_s = dp_dv - dp_dT * ds_dv / ds_dT;
765 
766  if (dp_dv_s >= 0)
767  mooseWarning(name(), ":c_from_T_v(), dp_dv_s = ", dp_dv_s, ". Should be negative.");
768  return v * std::sqrt(-dp_dv_s);
769 }

Referenced by c_from_T_v(), and c_from_v_e().

◆ c_from_T_v() [2/2]

void IdealRealGasMixtureFluidProperties::c_from_T_v ( Real  T,
Real  v,
const std::vector< Real > &  x,
Real &  c,
Real &  dc_dT,
Real &  dc_dv,
std::vector< Real > &  dc_dx 
) const

Speed of sound and its derivatives from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[in]xvapor mass fraction values
[out]cspeed of sound
[out]dc_dTderivative of speed of sound w.r.t. temperature
[out]dc_dvderivative of speed of sound w.r.t. specific volume
[out]dc_dxderivative of speed of sound w.r.t. vapor mass fraction values

Definition at line 772 of file IdealRealGasMixtureFluidProperties.C.

779 {
780  Real T_perturbed, v_perturbed, c_perturbed;
781 
782  c = c_from_T_v(T, v, x);
783  // For derived properties, we would need higher order derivatives;
784  // therefore, numerical derivatives are used here.
785  Real dT = 1.e-6;
786  T_perturbed = T + dT;
787  c_perturbed = c_from_T_v(T_perturbed, v, x);
788  dc_dT = (c_perturbed - c) / (dT);
789 
790  Real dv = v * 1.e-6;
791  v_perturbed = v + dv;
792  c_perturbed = c_from_T_v(T, v_perturbed, x);
793  dc_dv = (c_perturbed - c) / (dv);
794 
795  dc_dx.resize(_n_secondary_vapors);
796  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
797  {
798  Real c_perturbed;
799  std::vector<Real> x_perturbed(x);
800  Real dx_i = 1e-6;
801  for (unsigned int j = 0; j < _n_secondary_vapors; j++)
802  {
803  if (j != i)
804  x_perturbed[j] =
805  x[j] * (1.0 - (x[i] + dx_i)) / (1.0 - x[i]); // recalculate new mass fractions
806  }
807  x_perturbed[i] += dx_i;
808  c_perturbed = c_from_T_v(T, v, x_perturbed);
809  dc_dx[i] = ((c_perturbed - c) / dx_i);
810  }
811 }

◆ c_from_v_e() [1/2]

Real IdealRealGasMixtureFluidProperties::c_from_v_e ( Real  v,
Real  e,
const std::vector< Real > &  x 
) const
overridevirtual

Speed of sound from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy
[in]xvapor mass fraction values
Returns
speed of sound

Implements VaporMixtureFluidProperties.

Definition at line 101 of file IdealRealGasMixtureFluidProperties.C.

102 {
103  Real p, T;
104  p_T_from_v_e(v, e, x, p, T);
105  return c_from_T_v(T, v, x);
106 }

◆ c_from_v_e() [2/2]

void IdealRealGasMixtureFluidProperties::c_from_v_e ( Real  v,
Real  e,
const std::vector< Real > &  x,
Real &  c,
Real &  dc_dv,
Real &  dc_de,
std::vector< Real > &  dc_dx 
) const
overridevirtual

Speed of sound and its derivatives from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy
[in]xvapor mass fraction values
[out]cSpeed of sound
[out]dc_dvderivative of temperature w.r.t. specific volume
[out]dc_dederivative of temperature w.r.t. specific internal energy
[out]dc_dxderivative of temperature w.r.t. vapor mass fraction values

Implements VaporMixtureFluidProperties.

Definition at line 109 of file IdealRealGasMixtureFluidProperties.C.

116 {
117  Real p, T;
118  p_T_from_v_e(v, e, x, p, T);
119 
120  // sound of speed and derivatives
121  Real dc_dT_v, dc_dv_T;
122  std::vector<Real> dc_dx_Tv;
123  c_from_T_v(T, v, x, c, dc_dT_v, dc_dv_T, dc_dx_Tv);
124 
125  // internal energy and derivatives
126  Real e_unused, de_dT_v, de_dv_T;
127  std::vector<Real> de_dx_Tv;
128  e_from_T_v(T, v, x, e_unused, de_dT_v, de_dv_T, de_dx_Tv);
129 
130  // Compute derivatives using the following rules:
131  dc_dv = dc_dv_T - dc_dT_v * de_dv_T / de_dT_v;
132  dc_de = dc_dT_v / de_dT_v;
133 
134  // Derivatives with respect to mass fractions:
135  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
136  {
137  dc_dx[i] = dc_dx_Tv[i] - dc_dT_v * de_dx_Tv[i] / de_dT_v;
138  }
139 }

◆ cp_from_p_T()

Real IdealRealGasMixtureFluidProperties::cp_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x 
) const
overridevirtual

Isobaric heat capacity from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[in]xvapor mass fraction values
Returns
isobaric heat capacity

Implements VaporMixtureFluidProperties.

Definition at line 325 of file IdealRealGasMixtureFluidProperties.C.

326 {
327  Real p_unused, dp_dT, dp_dv;
328  Real h, dh_dT, dh_dv;
329 
330  Real v = v_from_p_T(p, T, x);
331  p_from_T_v(T, v, x, p_unused, dp_dT, dp_dv);
332 
333  const Real x_primary = primaryMassFraction(x);
334 
335  _fp_primary->h_from_T_v(T, v / x_primary, h, dh_dT, dh_dv);
336  Real cp = x_primary * (dh_dT - dh_dv * dp_dT / dp_dv);
337 
338  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
339  {
340  _fp_secondary[i]->h_from_T_v(T, v / x[i], h, dh_dT, dh_dv);
341  cp += x[i] * (dh_dT - dh_dv * dp_dT / dp_dv);
342  }
343 
344  return cp;
345 }

◆ cp_from_T_v()

Real IdealRealGasMixtureFluidProperties::cp_from_T_v ( Real  T,
Real  v,
const std::vector< Real > &  x 
) const

Isobaric heat capacity from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[in]xvapor mass fraction values
Returns
isobaric heat capacity

Definition at line 814 of file IdealRealGasMixtureFluidProperties.C.

815 {
816  Real p, dp_dT, dp_dv;
817  Real h, dh_dT, dh_dv;
818 
819  p_from_T_v(T, v, x, p, dp_dT, dp_dv);
820 
821  const Real x_primary = primaryMassFraction(x);
822 
823  _fp_primary->h_from_T_v(T, v / x_primary, h, dh_dT, dh_dv);
824  Real cp = x_primary * (dh_dT - dh_dv * dp_dT / dp_dv);
825 
826  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
827  {
828  _fp_secondary[i]->h_from_T_v(T, v / x[i], h, dh_dT, dh_dv);
829  cp += x[i] * (dh_dT - dh_dv * dp_dT / dp_dv);
830  }
831 
832  return cp;
833 }

◆ cv_from_p_T()

Real IdealRealGasMixtureFluidProperties::cv_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x 
) const
overridevirtual

Isochoric heat capacity from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[in]xvapor mass fraction values
Returns
isochoric heat capacity

Implements VaporMixtureFluidProperties.

Definition at line 348 of file IdealRealGasMixtureFluidProperties.C.

349 {
350  Real v = v_from_p_T(p, T, x);
351 
352  const Real x_primary = primaryMassFraction(x);
353  Real cv = x_primary * _fp_primary->cv_from_T_v(T, v / x_primary);
354 
355  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
356  cv += x[i] * _fp_secondary[i]->cv_from_T_v(T, v / x[i]);
357 
358  return cv;
359 }

◆ cv_from_T_v()

Real IdealRealGasMixtureFluidProperties::cv_from_T_v ( Real  T,
Real  v,
const std::vector< Real > &  x 
) const

Isochoric heat capacity from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[in]xvapor mass fraction values
Returns
isochoric heat capacity

Definition at line 836 of file IdealRealGasMixtureFluidProperties.C.

837 {
838  const Real x_primary = primaryMassFraction(x);
839  Real cv = x_primary * _fp_primary->cv_from_T_v(T, v / x_primary);
840 
841  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
842  cv += x[i] * _fp_secondary[i]->cv_from_T_v(T, v / x[i]);
843 
844  return cv;
845 }

Referenced by cv_from_p_T().

◆ e_from_p_rho() [1/2]

Real IdealRealGasMixtureFluidProperties::e_from_p_rho ( Real  p,
Real  rho,
const std::vector< Real > &  x 
) const
overridevirtual

Specific internal energy from pressure and density.

Parameters
[in]ppressure
[in]rhodensity
[in]xvapor mass fraction values
Returns
specific internal energy

Implements VaporMixtureFluidProperties.

Definition at line 418 of file IdealRealGasMixtureFluidProperties.C.

421 {
422  Real v = 1. / rho;
423  Real T = T_from_p_v(p, v, x);
424 
425  return e_from_T_v(T, v, x);
426 }

◆ e_from_p_rho() [2/2]

void IdealRealGasMixtureFluidProperties::e_from_p_rho ( Real  p,
Real  rho,
const std::vector< Real > &  x,
Real &  e,
Real &  de_dp,
Real &  de_drho,
std::vector< Real > &  de_dx 
) const
overridevirtual

Specific internal energy and its derivatives from pressure and density.

Parameters
[in]ppressure
[in]rhodensity
[in]xvapor mass fraction values
[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
[out]de_dxderivative of specific internal energy w.r.t. vapor mass fraction values

Implements VaporMixtureFluidProperties.

Definition at line 429 of file IdealRealGasMixtureFluidProperties.C.

436 {
437  Real v = 1. / rho;
438  Real T = T_from_p_v(p, v, x);
439  Real p_, dp_dT, dp_dv, de_dT, de_dv;
440  std::vector<Real> dp_dx_Tv;
441  std::vector<Real> de_dx_Tv;
442 
443  p_from_T_v(T, v, x, p_, dp_dT, dp_dv, dp_dx_Tv);
444  e_from_T_v(T, v, x, e, de_dT, de_dv, de_dx_Tv);
445 
446  de_dp = de_dT / dp_dT;
447  de_drho = (-v * v) * (de_dv - de_dT * dp_dv / dp_dT);
448 
449  // Derivatives with respect to mass fractions:
450  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
451  {
452  de_dx[i] = de_dx_Tv[i] - de_dT * dp_dx_Tv[i] / dp_dT;
453  }
454 }

◆ e_from_p_T() [1/2]

Real IdealRealGasMixtureFluidProperties::e_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x 
) const
overridevirtual

Specific internal energy from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[in]xvapor mass fraction values
Returns
specific internal energy

Implements VaporMixtureFluidProperties.

Definition at line 232 of file IdealRealGasMixtureFluidProperties.C.

233 {
234  Real v = v_from_p_T(p, T, x);
235  return e_from_T_v(T, v, x);
236 }

◆ e_from_p_T() [2/2]

void IdealRealGasMixtureFluidProperties::e_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x,
Real &  e,
Real &  de_dp,
Real &  de_dT,
std::vector< Real > &  de_dx 
) const
overridevirtual

Specific internal energy and its derivatives from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[in]xvapor mass fraction values
[out]especific internal energy
[out]de_dpderivative of specific internal energy w.r.t. pressure
[out]de_dTderivative of specific internal energy w.r.t. temperature
[out]de_dxderivative of specific internal energy w.r.t. vapor mass fraction values

Implements VaporMixtureFluidProperties.

Definition at line 239 of file IdealRealGasMixtureFluidProperties.C.

246 {
247  Real v, de_dT_v, de_dv_T, p_unused, dp_dT_v, dp_dv_T;
248  std::vector<Real> de_dx_Tv, dp_dx_Tv;
249  de_dx_Tv.resize(_n_secondary_vapors);
250  dp_dx_Tv.resize(_n_secondary_vapors);
251 
252  v = v_from_p_T(p, T, x);
253  e_from_T_v(T, v, x, e, de_dT_v, de_dv_T, de_dx_Tv);
254  p_from_T_v(T, v, x, p_unused, dp_dT_v, dp_dv_T, dp_dx_Tv);
255 
256  de_dp = de_dv_T / dp_dv_T;
257  de_dT = de_dT_v - de_dv_T * dp_dT_v / dp_dv_T;
258 
259  de_dx.resize(_n_secondary_vapors);
260  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
261  de_dx[i] = -(de_dv_T - de_dx_Tv[i] * dp_dv_T / dp_dx_Tv[i]) * dp_dx_Tv[i] / dp_dv_T;
262 }

◆ e_from_T_v() [1/2]

Real IdealRealGasMixtureFluidProperties::e_from_T_v ( Real  T,
Real  v,
const std::vector< Real > &  x 
) const

Specific internal energy from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[in]xvapor mass fraction values
Returns
specific internal energy

Definition at line 666 of file IdealRealGasMixtureFluidProperties.C.

667 {
668  const Real x_primary = primaryMassFraction(x);
669  Real e = x_primary * _fp_primary->e_from_T_v(T, v / x_primary);
670 
671  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
672  e += x[i] * _fp_secondary[i]->e_from_T_v(T, v / x[i]);
673 
674  return e;
675 }

Referenced by c_from_v_e(), e_from_p_rho(), e_from_p_T(), and p_T_from_v_e().

◆ e_from_T_v() [2/2]

void IdealRealGasMixtureFluidProperties::e_from_T_v ( Real  T,
Real  v,
const std::vector< Real > &  x,
Real &  e,
Real &  de_dT,
Real &  de_dv,
std::vector< Real > &  de_dx 
) const

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

Parameters
[in]Ttemperature
[in]vspecific volume
[in]xvapor mass fraction values
[out]especific internal energy
[out]de_dTderivative of specific internal energy w.r.t. temperature
[out]de_dvderivative of specific internal energy w.r.t. specific volume
[out]de_dxderivative of specific internal energy w.r.t. vapor mass fraction values

Definition at line 678 of file IdealRealGasMixtureFluidProperties.C.

685 {
686  Real e_primary, de_dT_primary, de_dv_primary, de_dx_primary, dxi_dx_primary;
687  Real de_dT_sec, dxj_dxi, dx_primary_dxi;
688  std::vector<Real> e_sec, de_dv_sec;
689 
690  const Real x_primary = primaryMassFraction(x);
691  de_dx.resize(_n_secondary_vapors);
692  e_sec.resize(_n_secondary_vapors);
693  de_dv_sec.resize(_n_secondary_vapors);
694 
695  _fp_primary->e_from_T_v(T, v / x_primary, e_primary, de_dT_primary, de_dv_primary);
696  e = x_primary * e_primary;
697  de_dT = x_primary * de_dT_primary;
698  de_dv = de_dv_primary;
699  de_dx_primary = e_primary - x_primary * de_dv_primary * v / (x_primary * x_primary);
700 
701  // get the partial pressures and their derivatives first
702  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
703  {
704  _fp_secondary[i]->e_from_T_v(T, v / x[i], e_sec[i], de_dT_sec, de_dv_sec[i]);
705 
706  e += x[i] * e_sec[i];
707  de_dT += x[i] * de_dT_sec;
708  de_dv += de_dv_sec[i];
709  dxi_dx_primary = -x[i] / (1. - x_primary);
710  de_dx_primary +=
711  dxi_dx_primary * e_sec[i] - x[i] * de_dv_sec[i] * v / (x[i] * x[i]) * dxi_dx_primary;
712  }
713 
714  // get the composition dependent derivatives of the secondary vapors
715  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
716  {
717  de_dx[i] = e_sec[i] - x[i] * de_dv_sec[i] * v / (x[i] * x[i]);
718  for (unsigned int j = 0; j < _n_secondary_vapors; j++)
719  {
720  if (j == i)
721  continue;
722  dxj_dxi = -x[j] / (1. - x[i]);
723  de_dx[i] += dxj_dxi * e_sec[j] - x[j] * de_dv_sec[j] * v / (x[j] * x[j]) * dxj_dxi;
724  }
725  dx_primary_dxi = -x_primary / (1. - x[i]);
726  de_dx[i] += dx_primary_dxi * e_primary -
727  x_primary * de_dv_primary * v / (x_primary * x_primary) * dx_primary_dxi;
728  }
729 }

◆ execute()

virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Definition at line 34 of file FluidProperties.h.

34 {}

◆ finalize()

virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Definition at line 36 of file FluidProperties.h.

36 {}

◆ getNaN() [1/2]

Real NaNInterface::getNaN ( ) const
inlineprotectedinherited

◆ getNaN() [2/2]

template<typename... Args>
Real NaNInterface::getNaN ( Args &&...  args) const
inlineprotectedinherited

Definition at line 51 of file NaNInterface.h.

52  {
53  switch (_emit_on_nan)
54  {
55  case (NAN_MESSAGE_WARNING):
56  mooseWarning(_moose_object->name(), ": ", std::forward<Args>(args)...);
57  break;
58  case (NAN_MESSAGE_ERROR):
59  mooseError(_moose_object->name(), ": ", std::forward<Args>(args)...);
60  break;
61  default:
62  break;
63  }
64  // return a quiet NaN
65  return std::nan("");
66  }

◆ getNumberOfSecondaryVapors()

virtual unsigned int IdealRealGasMixtureFluidProperties::getNumberOfSecondaryVapors ( ) const
inlineoverridevirtual

Number of secondary vapors (non-condensable components)

Returns
number of secondary vapors

Implements VaporMixtureFluidProperties.

Definition at line 36 of file IdealRealGasMixtureFluidProperties.h.

36 { return _n_secondary_vapors; }

◆ initialize()

virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 35 of file FluidProperties.h.

35 {}

◆ k_from_p_T()

Real IdealRealGasMixtureFluidProperties::k_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x 
) const
overridevirtual

Thermal conductivity from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[in]xvapor mass fraction values
Returns
thermal conductivity

Implements VaporMixtureFluidProperties.

Definition at line 390 of file IdealRealGasMixtureFluidProperties.C.

391 {
392  Real v = v_from_p_T(p, T, x);
393 
394  const Real x_primary = primaryMassFraction(x);
395  Real M_primary = _fp_primary->molarMass();
396 
397  Real sum = x_primary / M_primary;
398  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
399  sum += x[i] / _fp_secondary[i]->molarMass();
400  Real M_star = 1. / sum;
401 
402  Real vp = v / x_primary;
403  Real ep = _fp_primary->e_from_T_v(T, vp);
404  Real k = x_primary * M_star / M_primary * _fp_primary->k_from_v_e(vp, ep);
405 
406  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
407  {
408  Real vi = v / x[i];
409  Real ei = _fp_secondary[i]->e_from_T_v(T, vp);
410  Real Mi = _fp_secondary[i]->molarMass();
411  k += x[i] * M_star / Mi * _fp_secondary[i]->k_from_v_e(vi, ei);
412  }
413 
414  return k;
415 }

◆ k_from_T_v()

Real IdealRealGasMixtureFluidProperties::k_from_T_v ( Real  T,
Real  v,
const std::vector< Real > &  x 
) const

Thermal conductivity from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[in]xvapor mass fraction values
Returns
thermal conductivity

Definition at line 874 of file IdealRealGasMixtureFluidProperties.C.

875 {
876  const Real x_primary = primaryMassFraction(x);
877  Real M_primary = _fp_primary->molarMass();
878 
879  Real sum = x_primary / M_primary;
880  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
881  sum += x[i] / _fp_secondary[i]->molarMass();
882  Real M_star = 1. / sum;
883 
884  Real vp = v / x_primary;
885  Real ep = _fp_primary->e_from_T_v(T, vp);
886  Real k = x_primary * M_star / M_primary * _fp_primary->k_from_v_e(vp, ep);
887 
888  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
889  {
890  Real vi = v / x[i];
891  Real ei = _fp_secondary[i]->e_from_T_v(T, vp);
892  Real Mi = _fp_secondary[i]->molarMass();
893  k += x[i] * M_star / Mi * _fp_secondary[i]->k_from_v_e(vi, ei);
894  }
895 
896  return k;
897 }

◆ mu_from_p_T()

Real IdealRealGasMixtureFluidProperties::mu_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x 
) const
overridevirtual

Dynamic viscosity from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[in]xvapor mass fraction values
Returns
dynamic viscosity

Implements VaporMixtureFluidProperties.

Definition at line 362 of file IdealRealGasMixtureFluidProperties.C.

363 {
364  Real v = v_from_p_T(p, T, x);
365 
366  const Real x_primary = primaryMassFraction(x);
367  Real M_primary = _fp_primary->molarMass();
368 
369  Real sum = x_primary / M_primary;
370  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
371  sum += x[i] / _fp_secondary[i]->molarMass();
372  Real M_star = 1. / sum;
373 
374  Real vp = v / x_primary;
375  Real ep = _fp_primary->e_from_T_v(T, vp);
376  Real mu = x_primary * M_star / M_primary * _fp_primary->mu_from_v_e(vp, ep);
377 
378  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
379  {
380  Real vi = v / x[i];
381  Real ei = _fp_secondary[i]->e_from_T_v(T, vp);
382  Real Mi = _fp_secondary[i]->molarMass();
383  mu += x[i] * M_star / Mi * _fp_secondary[i]->mu_from_v_e(vi, ei);
384  }
385 
386  return mu;
387 }

◆ mu_from_T_v()

Real IdealRealGasMixtureFluidProperties::mu_from_T_v ( Real  T,
Real  v,
const std::vector< Real > &  x 
) const

Dynamic viscosity from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[in]xvapor mass fraction values
Returns
dynamic viscosity

Definition at line 848 of file IdealRealGasMixtureFluidProperties.C.

849 {
850  const Real x_primary = primaryMassFraction(x);
851  Real M_primary = _fp_primary->molarMass();
852 
853  Real sum = x_primary / M_primary;
854  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
855  sum += x[i] / _fp_secondary[i]->molarMass();
856  Real M_star = 1. / sum;
857 
858  Real vp = v / x_primary;
859  Real ep = _fp_primary->e_from_T_v(T, vp);
860  Real mu = x_primary * M_star / M_primary * _fp_primary->mu_from_v_e(vp, ep);
861 
862  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
863  {
864  Real vi = v / x[i];
865  Real ei = _fp_secondary[i]->e_from_T_v(T, vp);
866  Real Mi = _fp_secondary[i]->molarMass();
867  mu += x[i] * M_star / Mi * _fp_secondary[i]->mu_from_v_e(vi, ei);
868  }
869 
870  return mu;
871 }

◆ p_from_T_v() [1/3]

Real IdealRealGasMixtureFluidProperties::p_from_T_v ( Real  T,
Real  v,
const std::vector< Real > &  x 
) const

Pressure from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[in]xvapor mass fraction values
Returns
pressure

Definition at line 580 of file IdealRealGasMixtureFluidProperties.C.

581 {
582  const Real x_primary = primaryMassFraction(x);
583  Real p = _fp_primary->p_from_T_v(T, v / x_primary);
584 
585  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
586  p += _fp_secondary[i]->p_from_T_v(T, v / x[i]);
587 
588  return p;
589 }

Referenced by c_from_p_T(), c_from_T_v(), cp_from_p_T(), cp_from_T_v(), e_from_p_rho(), e_from_p_T(), p_T_from_v_e(), T_from_p_v(), and v_from_p_T().

◆ p_from_T_v() [2/3]

void IdealRealGasMixtureFluidProperties::p_from_T_v ( Real  T,
Real  v,
const std::vector< Real > &  x,
Real &  p,
Real &  dp_dT,
Real &  dp_dv 
) const

Pressure and its derivatives from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[in]xvapor mass fraction values
[out]ppressure
[out]dp_dTderivative of pressure w.r.t. temperature
[out]dp_dvderivative of pressure w.r.t. specific volume

Definition at line 592 of file IdealRealGasMixtureFluidProperties.C.

594 {
595  Real p_primary, dp_dT_primary, dp_dv_primary;
596  Real p_sec, dp_dT_sec, dp_dv_sec;
597 
598  const Real x_primary = primaryMassFraction(x);
599 
600  _fp_primary->p_from_T_v(T, v / x_primary, p_primary, dp_dT_primary, dp_dv_primary);
601  p = p_primary;
602  dp_dT = dp_dT_primary;
603  dp_dv = dp_dv_primary / x_primary;
604 
605  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
606  {
607  _fp_secondary[i]->p_from_T_v(T, v / x[i], p_sec, dp_dT_sec, dp_dv_sec);
608 
609  p += p_sec;
610  dp_dT += dp_dT_sec;
611  dp_dv += dp_dv_sec / x[i];
612  }
613 }

◆ p_from_T_v() [3/3]

void IdealRealGasMixtureFluidProperties::p_from_T_v ( Real  T,
Real  v,
const std::vector< Real > &  x,
Real &  p,
Real &  dp_dT,
Real &  dp_dv,
std::vector< Real > &  dp_dx 
) const

Pressure and its derivatives from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[in]xvapor mass fraction values
[out]ppressure
[out]dp_dTderivative of pressure w.r.t. temperature
[out]dp_dvderivative of pressure w.r.t. specific volume
[out]dp_dxderivative of pressure w.r.t. vapor mass fraction values

Definition at line 616 of file IdealRealGasMixtureFluidProperties.C.

623 {
624  Real p_primary, dp_dT_primary, dp_dv_primary, dp_dx_primary, dxi_dx_primary;
625  Real p_sec, dp_dT_sec, dxj_dxi;
626  std::vector<Real> dp_dv_sec;
627 
628  const Real x_primary = primaryMassFraction(x);
629  dp_dx.resize(_n_secondary_vapors);
630  dp_dv_sec.resize(_n_secondary_vapors);
631 
632  _fp_primary->p_from_T_v(T, v / x_primary, p_primary, dp_dT_primary, dp_dv_primary);
633  p = p_primary;
634  dp_dT = dp_dT_primary;
635  dp_dv = dp_dv_primary / x_primary;
636  dp_dx_primary = -dp_dv_primary * v / (x_primary * x_primary);
637 
638  // get the partial pressures and their derivatives first
639  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
640  {
641  _fp_secondary[i]->p_from_T_v(T, v / x[i], p_sec, dp_dT_sec, dp_dv_sec[i]);
642 
643  p += p_sec;
644  dp_dT += dp_dT_sec;
645  dp_dv += dp_dv_sec[i] / x[i];
646  dxi_dx_primary = -x[i] / (1. - x_primary);
647  dp_dx_primary += -dp_dv_sec[i] * v / (x[i] * x[i]) * dxi_dx_primary;
648  }
649 
650  // get the composition dependent derivatives of the secondary vapors
651  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
652  {
653  dp_dx[i] = -dp_dv_sec[i] * v / (x[i] * x[i]);
654  for (unsigned int j = 0; j < _n_secondary_vapors; j++)
655  {
656  if (j == i)
657  continue;
658  dxj_dxi = -x[j] / (1. - x[i]);
659  dp_dx[i] += -dp_dv_sec[j] * v / (x[j] * x[j]) * dxj_dxi;
660  }
661  dp_dx[i] += -dp_dv_primary * v / (x_primary * x_primary) * (-x_primary / (1. - x[i]));
662  }
663 }

◆ p_from_v_e() [1/2]

Real IdealRealGasMixtureFluidProperties::p_from_v_e ( Real  v,
Real  e,
const std::vector< Real > &  x 
) const
overridevirtual

Pressure from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy
[in]xvapor mass fraction values
Returns
pressure

Implements VaporMixtureFluidProperties.

Definition at line 55 of file IdealRealGasMixtureFluidProperties.C.

56 {
57  Real p, T;
58  p_T_from_v_e(v, e, x, p, T);
59 
60  return p;
61 }

◆ p_from_v_e() [2/2]

void IdealRealGasMixtureFluidProperties::p_from_v_e ( Real  v,
Real  e,
const std::vector< Real > &  x,
Real &  p,
Real &  dp_dv,
Real &  dp_de,
std::vector< Real > &  dp_dx 
) const
overridevirtual

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

Parameters
[in]vspecific volume
[in]especific internal energy
[in]xvapor mass fraction values
[out]ppressure
[out]dp_dvderivative of pressure w.r.t. specific volume
[out]dp_dederivative of pressure w.r.t. specific internal energy
[out]dp_dxderivative of pressure w.r.t. vapor mass fraction values

Implements VaporMixtureFluidProperties.

Definition at line 64 of file IdealRealGasMixtureFluidProperties.C.

71 {
72  Real T, dT_dv, dT_de;
73  std::vector<Real> dT_dx(_n_secondary_vapors);
74  p_T_from_v_e(v, e, x, p, dp_dv, dp_de, dp_dx, T, dT_dv, dT_de, dT_dx);
75 }

◆ p_T_from_v_e() [1/2]

void IdealRealGasMixtureFluidProperties::p_T_from_v_e ( Real  v,
Real  e,
const std::vector< Real > &  x,
Real &  p,
Real &  dp_dv,
Real &  dp_de,
std::vector< Real > &  dp_dx,
Real &  T,
Real &  dT_dv,
Real &  dT_de,
std::vector< Real > &  dT_dx 
) const

Pressure and temperature from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy
[in]xvapor mass fraction values
[out]ppressure
[out]dp_dvderivative of pressure w.r.t. specific volume
[out]dp_dederivative of pressure w.r.t. specific internal energy
[out]dp_dxderivative of pressure w.r.t. vapor mass fraction values
[out]Ttemperature
[out]dT_dvderivative of temperature w.r.t. specific volume
[out]dT_dederivative of temperature w.r.t. specific internal energy
[out]dT_dxderivative of temperature w.r.t. vapor mass fraction values

Definition at line 486 of file IdealRealGasMixtureFluidProperties.C.

497 {
498  p_T_from_v_e(v, e, x, p, T);
499 
500  // pressure and derivatives
501  Real p_unused, dp_dT_v, dp_dv_T;
502  std::vector<Real> dp_dx_Tv;
503  p_from_T_v(T, v, x, p_unused, dp_dT_v, dp_dv_T, dp_dx_Tv);
504 
505  // internal energy and derivatives
506  Real e_unused, de_dT_v, de_dv_T;
507  std::vector<Real> de_dx_Tv;
508  e_from_T_v(T, v, x, e_unused, de_dT_v, de_dv_T, de_dx_Tv);
509 
510  // Compute derivatives using the following rules:
511  dp_dv = dp_dv_T - dp_dT_v * de_dv_T / de_dT_v;
512  dp_de = dp_dT_v / de_dT_v;
513  dT_dv = -de_dv_T / de_dT_v;
514  dT_de = 1. / de_dT_v;
515 
516  // Derivatives with respect to mass fractions:
517  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
518  {
519  dT_dx[i] = -de_dx_Tv[i] / de_dT_v;
520  dp_dx[i] = dp_dx_Tv[i] + dp_dT_v * dT_dx[i];
521  }
522 }

◆ p_T_from_v_e() [2/2]

void IdealRealGasMixtureFluidProperties::p_T_from_v_e ( Real  v,
Real  e,
const std::vector< Real > &  x,
Real &  p,
Real &  T 
) const

Pressure and temperature from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy
[in]xvapor mass fraction values
[out]ppressure
[out]Ttemperature

Definition at line 457 of file IdealRealGasMixtureFluidProperties.C.

459 {
460  Real v_primary = v / primaryMassFraction(x);
461  static const Real vc = 1. / _fp_primary->criticalDensity();
462  static const Real ec = _fp_primary->criticalInternalEnergy();
463 
464  // Initial estimate of a bracketing interval for the temperature
465  Real lower_temperature, upper_temperature;
466  if (v_primary > vc)
467  {
468  Real e_sat_primary = _fp_primary->e_spndl_from_v(v_primary);
469  lower_temperature = _fp_primary->T_from_v_e(v_primary, e_sat_primary);
470  }
471  else
472  lower_temperature = _fp_primary->T_from_v_e(v_primary, ec);
473 
474  upper_temperature = _T_mix_max;
475 
476  // Use BrentsMethod to find temperature
477  auto energy_diff = [&v, &e, &x, this](Real T) { return this->e_from_T_v(T, v, x) - e; };
478 
479  BrentsMethod::bracket(energy_diff, lower_temperature, upper_temperature);
480  T = BrentsMethod::root(energy_diff, lower_temperature, upper_temperature);
481 
482  p = p_from_T_v(T, v, x);
483 }

Referenced by c_from_v_e(), p_from_v_e(), p_T_from_v_e(), and T_from_v_e().

◆ primaryMassFraction()

Real VaporMixtureFluidProperties::primaryMassFraction ( const std::vector< Real > &  x) const
inherited

Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors.

This uses the relation

\[ \sum\limits_i^N x_i = 1 , \]

where the mass fractions \(x_i, i=2\ldots N\) correspond to the secondary vapors.

Definition at line 29 of file VaporMixtureFluidProperties.C.

30 {
31  return 1 - std::accumulate(x.begin(), x.end(), 0.0);
32 }

Referenced by cp_from_p_T(), cp_from_T_v(), cv_from_p_T(), cv_from_T_v(), e_from_T_v(), k_from_p_T(), k_from_T_v(), mu_from_p_T(), mu_from_T_v(), p_from_T_v(), p_T_from_v_e(), s_from_T_v(), T_from_p_v(), v_from_p_T(), and xs_prim_from_p_T().

◆ rho_from_p_T() [1/2]

Real IdealRealGasMixtureFluidProperties::rho_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x 
) const
overridevirtual

Density from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[in]xvapor mass fraction values
Returns
density

Implements VaporMixtureFluidProperties.

Definition at line 142 of file IdealRealGasMixtureFluidProperties.C.

143 {
144  return 1.0 / v_from_p_T(p, T, x);
145 }

◆ rho_from_p_T() [2/2]

void IdealRealGasMixtureFluidProperties::rho_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
std::vector< Real > &  drho_dx 
) const
overridevirtual

Density and its derivatives from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[in]xvapor mass fraction values
[out]rhodensity
[out]drho_dpderivative of density w.r.t. pressure
[out]drho_dTderivative of density w.r.t. temperature
[out]drho_dxderivative of density w.r.t. vapor mass fraction values

Implements VaporMixtureFluidProperties.

Definition at line 148 of file IdealRealGasMixtureFluidProperties.C.

155 {
156  Real v, dv_dp, dv_dT;
157  std::vector<Real> dv_dx;
158  v_from_p_T(p, T, x, v, dv_dp, dv_dT, dv_dx);
159 
160  rho = 1.0 / v;
161  const Real drho_dv = -1.0 / (v * v);
162  drho_dp = drho_dv * dv_dp;
163  drho_dT = drho_dv * dv_dT;
164  drho_dx.resize(_n_secondary_vapors);
165  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
166  drho_dx[i] = drho_dv * dv_dx[i];
167 }

◆ s_from_T_v()

void IdealRealGasMixtureFluidProperties::s_from_T_v ( Real  T,
Real  v,
const std::vector< Real > &  x,
Real &  s,
Real &  ds_dT,
Real &  ds_dv 
) const

Specific entropy and its derivatives from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume
[in]xvapor mass fraction values
[out]sspecific entropy
[out]ds_dTderivative of specific entropy w.r.t. temperature
[out]ds_dvderivative of specific entropy w.r.t. specific volume
[out]ds_dxderivative of specific entropy w.r.t. vapor mass fraction values

Definition at line 732 of file IdealRealGasMixtureFluidProperties.C.

734 {
735  Real s_primary, ds_dT_primary, ds_dv_primary;
736  Real s_sec, ds_dT_sec, ds_dv_sec;
737 
738  const Real x_primary = primaryMassFraction(x);
739 
740  _fp_primary->s_from_T_v(T, v / x_primary, s_primary, ds_dT_primary, ds_dv_primary);
741  s = x_primary * s_primary;
742  ds_dT = x_primary * ds_dT_primary;
743  ds_dv = ds_dv_primary;
744 
745  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
746  {
747  _fp_secondary[i]->s_from_T_v(T, v / x[i], s_sec, ds_dT_sec, ds_dv_sec);
748 
749  s += x[i] * s_sec;
750  ds_dT += x[i] * ds_dT_sec;
751  ds_dv += ds_dv_sec;
752  }
753 }

Referenced by c_from_p_T(), and c_from_T_v().

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Definition at line 39 of file FluidProperties.h.

39 {}

◆ T_from_p_v() [1/2]

Real IdealRealGasMixtureFluidProperties::T_from_p_v ( Real  p,
Real  v,
const std::vector< Real > &  x 
) const

Temperature from pressure and specific volume.

Parameters
[in]ppressure
[in]vspecific volume
[in]xvapor mass fraction values
Returns
temperature

Definition at line 525 of file IdealRealGasMixtureFluidProperties.C.

526 {
527  Real v_primary = v / primaryMassFraction(x);
528  static const Real vc = 1. / _fp_primary->criticalDensity();
529  static const Real ec = _fp_primary->criticalInternalEnergy();
530 
531  // Initial estimate of a bracketing interval for the temperature
532  Real lower_temperature, upper_temperature;
533  if (v_primary > vc)
534  {
535  Real e_sat_primary = _fp_primary->e_spndl_from_v(v_primary);
536  lower_temperature = _fp_primary->T_from_v_e(v_primary, e_sat_primary);
537  }
538  else
539  lower_temperature = _fp_primary->T_from_v_e(v_primary, ec);
540 
541  upper_temperature = _T_mix_max;
542 
543  // Use BrentsMethod to find temperature
544  auto pressure_diff = [&p, &v, &x, this](Real T) { return this->p_from_T_v(T, v, x) - p; };
545 
546  BrentsMethod::bracket(pressure_diff, lower_temperature, upper_temperature);
547  Real T = BrentsMethod::root(pressure_diff, lower_temperature, upper_temperature);
548 
549  return T;
550 }

Referenced by e_from_p_rho(), and T_from_p_v().

◆ T_from_p_v() [2/2]

void IdealRealGasMixtureFluidProperties::T_from_p_v ( Real  p,
Real  v,
const std::vector< Real > &  x,
Real &  T,
Real &  dT_dp,
Real &  dT_dv,
std::vector< Real > &  dT_dx 
) const

Temperature and its derivatives from pressure and specific volume.

Parameters
[in]ppressure
[in]vspecific volume
[in]xvapor mass fraction values
[out]Ttemperature
[out]dT_dpderivative of temperature w.r.t. pressure
[out]dT_dvderivative of temperature w.r.t. specific volume
[out]dT_dxderivative of temperature w.r.t. vapor mass fraction values

Definition at line 553 of file IdealRealGasMixtureFluidProperties.C.

560 {
561  T = T_from_p_v(p, v, x);
562 
563  // pressure and derivatives
564  Real p_unused, dp_dT_v, dp_dv_T;
565  std::vector<Real> dp_dx_Tv;
566  p_from_T_v(T, v, x, p_unused, dp_dT_v, dp_dv_T, dp_dx_Tv);
567 
568  // Compute derivatives using the following rules:
569  dT_dp = 1. / dp_dT_v;
570  dT_dv = -dp_dv_T / dp_dT_v;
571 
572  // Derivatives with respect to mass fractions:
573  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
574  {
575  dT_dx[i] = -dp_dx_Tv[i] / dp_dT_v;
576  }
577 }

◆ T_from_v_e() [1/2]

Real IdealRealGasMixtureFluidProperties::T_from_v_e ( Real  v,
Real  e,
const std::vector< Real > &  x 
) const
overridevirtual

Temperature from specific volume and specific internal energy.

Parameters
[in]vspecific volume
[in]especific internal energy
[in]xvapor mass fraction values
Returns
temperature

Implements VaporMixtureFluidProperties.

Definition at line 78 of file IdealRealGasMixtureFluidProperties.C.

79 {
80  Real p, T;
81  p_T_from_v_e(v, e, x, p, T);
82 
83  return T;
84 }

◆ T_from_v_e() [2/2]

void IdealRealGasMixtureFluidProperties::T_from_v_e ( Real  v,
Real  e,
const std::vector< Real > &  x,
Real &  T,
Real &  dT_dv,
Real &  dT_de,
std::vector< Real > &  dT_dx 
) const
overridevirtual

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

Parameters
[in]vspecific volume
[in]especific internal energy
[in]xvapor mass fraction values
[out]Ttemperature
[out]dT_dvderivative of temperature w.r.t. specific volume
[out]dT_dederivative of temperature w.r.t. specific internal energy
[out]dT_dxderivative of temperature w.r.t. vapor mass fraction values

Implements VaporMixtureFluidProperties.

Definition at line 87 of file IdealRealGasMixtureFluidProperties.C.

94 {
95  Real p, dp_dv, dp_de;
96  std::vector<Real> dp_dx(_n_secondary_vapors);
97  p_T_from_v_e(v, e, x, p, dp_dv, dp_de, dp_dx, T, dT_dv, dT_de, dT_dx);
98 }

◆ threadJoin()

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

Definition at line 38 of file FluidProperties.h.

38 {}

◆ v_from_p_T() [1/2]

Real IdealRealGasMixtureFluidProperties::v_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x 
) const
virtual

Specific volume from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[in]xvapor mass fraction values
Returns
specific volume

Definition at line 170 of file IdealRealGasMixtureFluidProperties.C.

171 {
172  const Real x_primary = primaryMassFraction(x);
173  Real M_primary = _fp_primary->molarMass();
174 
175  Real sum = x_primary / M_primary;
176  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
177  sum += x[i] / _fp_secondary[i]->molarMass();
178  Real M_star = 1. / sum;
179  Real v_ideal = R_molar * T / (M_star * p);
180 
181  // check range of validity for primary (condensable) component
182  static const Real Tc = _fp_primary->criticalTemperature();
183  static const Real vc = 1. / _fp_primary->criticalDensity();
184  Real v_spndl, e_spndl;
185  if (T < Tc)
186  _fp_primary->v_e_spndl_from_T(T, v_spndl, e_spndl);
187  else
188  v_spndl = vc;
189 
190  Real lower_spec_volume = v_spndl * x_primary;
191  Real upper_spec_volume = v_ideal; // p*v/(RT) <= 1
192 
193  // Initial estimate of a bracketing interval for the temperature
194  Real p_max = p_from_T_v(T, lower_spec_volume, x);
195  if (p > p_max || upper_spec_volume < lower_spec_volume)
196  return getNaN();
197 
198  // Use BrentsMethod to find temperature
199  auto pressure_diff = [&T, &p, &x, this](Real v) { return this->p_from_T_v(T, v, x) - p; };
200 
201  BrentsMethod::bracket(pressure_diff, lower_spec_volume, upper_spec_volume);
202  Real v = BrentsMethod::root(pressure_diff, lower_spec_volume, upper_spec_volume);
203 
204  return v;
205 }

Referenced by c_from_p_T(), cp_from_p_T(), cv_from_p_T(), e_from_p_T(), k_from_p_T(), mu_from_p_T(), rho_from_p_T(), and v_from_p_T().

◆ v_from_p_T() [2/2]

void IdealRealGasMixtureFluidProperties::v_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x,
Real &  v,
Real &  dv_dp,
Real &  dv_dT,
std::vector< Real > &  dv_dx 
) const
virtual

Specific volume and its derivatives from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[in]xvapor mass fraction values
[out]vspecific volume
[out]dv_dpderivative of specific volume w.r.t. pressure
[out]dv_dTderivative of specific volume w.r.t. temperature
[out]dv_dxderivative of specific volume w.r.t. vapor mass fraction values

Definition at line 208 of file IdealRealGasMixtureFluidProperties.C.

215 {
216  Real p_unused, dp_dT, dp_dv;
217  std::vector<Real> dp_dx;
218  dp_dx.resize(_n_secondary_vapors);
219 
220  v = v_from_p_T(p, T, x);
221  p_from_T_v(T, v, x, p_unused, dp_dT, dp_dv, dp_dx);
222 
223  dv_dp = 1. / dp_dv;
224  dv_dT = -dp_dT / dp_dv;
225 
226  dv_dx.resize(_n_secondary_vapors);
227  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
228  dv_dx[i] = -dp_dx[i] / dp_dv;
229 }

◆ xs_prim_from_p_T()

Real IdealRealGasMixtureFluidProperties::xs_prim_from_p_T ( Real  p,
Real  T,
const std::vector< Real > &  x 
) const

Mass fraction of primary (condensable) component at saturation from pressure and temperature.

Parameters
[in]Ttemperature
[in]ppressure
Returns
mass fraction of primary (condensable) component at saturation

Definition at line 900 of file IdealRealGasMixtureFluidProperties.C.

903 {
904  Real T_c = _fp_primary->criticalTemperature();
905  Real xs;
906  if (T > T_c)
907  // return 1. to indicate that no water would condense for
908  // given (p,T)
909  xs = 1.;
910  else
911  {
912  Real pp_sat = _fp_primary->pp_sat_from_p_T(p, T);
913  if (pp_sat < 0.)
914  {
915  // return 1. to indicate that no water would condense for
916  // given (p,T)
917  xs = 1.;
918  return xs;
919  }
920  Real v_primary = _fp_primary->v_from_p_T(pp_sat, T);
921  Real pp_sat_secondary = p - pp_sat;
922 
923  Real v_secondary;
924  if (_n_secondary_vapors == 1)
925  v_secondary = _fp_secondary[0]->v_from_p_T(pp_sat_secondary, T);
926  else
927  {
928  std::vector<Real> x_sec(_n_secondary_vapors);
929  const Real x_primary = primaryMassFraction(x);
930  Real sum = 0.;
931  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
932  {
933  x_sec[i] = x[i] / (1. - x_primary);
934  sum += x_sec[i] / _fp_secondary[i]->molarMass();
935  }
936  Real M_star = 1. / sum;
937  v_secondary = R_molar * T / (M_star * pp_sat_secondary);
938  int it = 0;
939  double f = 1., df_dvs, pp_sec, p_sec, dp_dT_sec, dp_dv_sec, dp_dT, dp_dv;
940  double tol_p = 1.e-8;
941  while (std::fabs(f / pp_sat_secondary) > tol_p)
942  {
943  pp_sec = 0.;
944  dp_dT = 0.;
945  dp_dv = 0.;
946  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
947  {
948  _fp_secondary[i]->p_from_T_v(T, v_secondary / x_sec[i], p_sec, dp_dT_sec, dp_dv_sec);
949  pp_sec += p_sec;
950  dp_dT += dp_dT_sec;
951  dp_dv += dp_dv_sec / x_sec[i];
952  }
953  f = pp_sec - pp_sat_secondary;
954  df_dvs = dp_dv;
955  v_secondary -= f / df_dvs;
956  if (it++ > 15)
957  return getNaN();
958  }
959  }
960 
961  xs = v_secondary / (v_primary + v_secondary);
962  }
963 
964  return xs;
965 }

Member Data Documentation

◆ _allow_imperfect_jacobians

const bool FluidProperties::_allow_imperfect_jacobians
protectedinherited

Flag to set unimplemented Jacobian entries to zero.

Definition at line 48 of file FluidProperties.h.

Referenced by SinglePhaseFluidProperties::fluidPropError().

◆ _emit_on_nan

enum NaNMessage NaNInterface::_emit_on_nan
protectedinherited

Raise mooseWarning or mooseError?

Definition at line 43 of file NaNInterface.h.

Referenced by NaNInterface::getNaN().

◆ _fp_primary

const SinglePhaseFluidProperties* IdealRealGasMixtureFluidProperties::_fp_primary
protected

◆ _fp_secondary

std::vector<const SinglePhaseFluidProperties *> IdealRealGasMixtureFluidProperties::_fp_secondary
protected

◆ _fp_secondary_names

const std::vector<UserObjectName> IdealRealGasMixtureFluidProperties::_fp_secondary_names
protected

Names of secondary vapor fluid properties.

Definition at line 546 of file IdealRealGasMixtureFluidProperties.h.

Referenced by IdealRealGasMixtureFluidProperties().

◆ _moose_object

const MooseObject* NaNInterface::_moose_object
protectedinherited

Definition at line 40 of file NaNInterface.h.

Referenced by NaNInterface::getNaN(), and NaNInterface::NaNInterface().

◆ _n_secondary_vapors

const unsigned int IdealRealGasMixtureFluidProperties::_n_secondary_vapors
protected

◆ _R

const Real FluidProperties::_R = 8.3144598
staticinherited

◆ _T_c2k

const Real FluidProperties::_T_c2k
protectedinherited

◆ _T_mix_max

const Real IdealRealGasMixtureFluidProperties::_T_mix_max
protected

maximum temperature of all components

Definition at line 552 of file IdealRealGasMixtureFluidProperties.h.

Referenced by p_T_from_v_e(), and T_from_p_v().

◆ R_molar

constexpr static const Real IdealRealGasMixtureFluidProperties::R_molar = 8.3144598
staticconstexprprotected

molar (or universal) gas constant

Definition at line 550 of file IdealRealGasMixtureFluidProperties.h.

Referenced by v_from_p_T(), and xs_prim_from_p_T().


The documentation for this class was generated from the following files:
IdealRealGasMixtureFluidProperties::c_from_p_T
virtual Real c_from_p_T(Real p, Real T, const std::vector< Real > &x) const override
Speed of sound from pressure and temperature.
Definition: IdealRealGasMixtureFluidProperties.C:265
IdealRealGasMixtureFluidProperties::v_from_p_T
virtual Real v_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Specific volume from pressure and temperature.
Definition: IdealRealGasMixtureFluidProperties.C:170
SinglePhaseFluidProperties::v_e_spndl_from_T
virtual void v_e_spndl_from_T(Real T, Real &v, Real &e) const
Specific internal energy from temperature and specific volume.
Definition: SinglePhaseFluidProperties.C:292
IdealRealGasMixtureFluidProperties::_T_mix_max
const Real _T_mix_max
maximum temperature of all components
Definition: IdealRealGasMixtureFluidProperties.h:552
IdealRealGasMixtureFluidProperties::T_from_p_v
Real T_from_p_v(Real p, Real v, const std::vector< Real > &x) const
Temperature from pressure and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:525
SinglePhaseFluidProperties::criticalInternalEnergy
virtual Real criticalInternalEnergy() const
Critical specific internal energy.
Definition: SinglePhaseFluidProperties.C:126
BrentsMethod::root
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's method.
Definition: BrentsMethod.C:61
VaporMixtureFluidProperties::primaryMassFraction
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors.
Definition: VaporMixtureFluidProperties.C:29
IdealRealGasMixtureFluidProperties::_fp_primary
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Definition: IdealRealGasMixtureFluidProperties.h:542
NaNInterface::_moose_object
const MooseObject * _moose_object
Definition: NaNInterface.h:40
NaNInterface::_emit_on_nan
enum NaNMessage _emit_on_nan
Raise mooseWarning or mooseError?
Definition: NaNInterface.h:43
NaNInterface::NAN_MESSAGE_ERROR
Definition: NaNInterface.h:37
IdealRealGasMixtureFluidProperties::p_from_T_v
Real p_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Pressure from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:580
SinglePhaseFluidProperties::criticalTemperature
virtual Real criticalTemperature() const
Critical temperature.
Definition: SinglePhaseFluidProperties.C:114
NaNInterface::NAN_MESSAGE_NONE
Definition: NaNInterface.h:35
SinglePhaseFluidProperties::e_spndl_from_v
virtual Real e_spndl_from_v(Real v) const
Specific internal energy from temperature and specific volume.
Definition: SinglePhaseFluidProperties.C:286
name
const std::string name
Definition: Setup.h:21
NaNInterface::NAN_MESSAGE_WARNING
Definition: NaNInterface.h:36
SinglePhaseFluidProperties::criticalDensity
virtual Real criticalDensity() const
Critical density.
Definition: SinglePhaseFluidProperties.C:120
IdealRealGasMixtureFluidProperties::_fp_secondary_names
const std::vector< UserObjectName > _fp_secondary_names
Names of secondary vapor fluid properties.
Definition: IdealRealGasMixtureFluidProperties.h:546
IdealRealGasMixtureFluidProperties::s_from_T_v
void s_from_T_v(Real T, Real v, const std::vector< Real > &x, Real &s, Real &ds_dT, Real &ds_dv) const
Specific entropy and its derivatives from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:732
SinglePhaseFluidProperties::molarMass
virtual virtual std Real molarMass() const
Fluid name.
Definition: SinglePhaseFluidProperties.C:96
IdealRealGasMixtureFluidProperties::_fp_secondary
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.
Definition: IdealRealGasMixtureFluidProperties.h:544
IdealRealGasMixtureFluidProperties::_n_secondary_vapors
const unsigned int _n_secondary_vapors
Number of secondary vapors.
Definition: IdealRealGasMixtureFluidProperties.h:548
NaNInterface::getNaN
Real getNaN() const
Produces errors, warnings, or just quiet NaNs.
Definition: NaNInterface.h:48
IdealRealGasMixtureFluidProperties::e_from_T_v
Real e_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Specific internal energy from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:666
VaporMixtureFluidProperties::VaporMixtureFluidProperties
VaporMixtureFluidProperties(const InputParameters &parameters)
Definition: VaporMixtureFluidProperties.C:21
IdealRealGasMixtureFluidProperties::c_from_T_v
Real c_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Speed of sound from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:756
IdealRealGasMixtureFluidProperties::p_T_from_v_e
void p_T_from_v_e(Real v, Real e, const std::vector< Real > &x, Real &p, Real &T) const
Pressure and temperature from specific volume and specific internal energy.
Definition: IdealRealGasMixtureFluidProperties.C:457
IdealRealGasMixtureFluidProperties::R_molar
constexpr static const Real R_molar
molar (or universal) gas constant
Definition: IdealRealGasMixtureFluidProperties.h:550
BrentsMethod::bracket
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
IdealRealGasMixtureFluidProperties::cv_from_T_v
Real cv_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Isochoric heat capacity from temperature and specific volume.
Definition: IdealRealGasMixtureFluidProperties.C:836
NaNInterface::NaNInterface
NaNInterface(const MooseObject *moose_object)
Definition: NaNInterface.C:33