www.mooseframework.org
Public Member Functions | 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 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...
 
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 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
 

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 MooseObject * _moose_object
 
enum NaNMessage _emit_on_nan
 Raise mooseWarning or mooseError? More...
 

Static Protected Attributes

static constexpr 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 27 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 34 of file NaNInterface.h.

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 }
NaNInterface(const MooseObject *moose_object)
Definition: NaNInterface.C:33
VaporMixtureFluidProperties(const InputParameters &parameters)
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
const Real _T_mix_max
maximum temperature of all components
const std::vector< UserObjectName > _fp_secondary_names
Names of secondary vapor fluid properties.
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

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 224 of file IdealRealGasMixtureFluidProperties.C.

Referenced by c_from_p_T().

225 {
226  Real v;
227  Real p_unused, dp_dT, dp_dv;
228  Real s, ds_dT, ds_dv;
229 
230  v = v_from_p_T(p, T, x);
231  p_from_T_v(T, v, x, p_unused, dp_dT, dp_dv);
232  s_from_T_v(T, v, x, s, ds_dT, ds_dv);
233 
234  Real dp_dv_s = dp_dv - dp_dT * ds_dv / ds_dT;
235 
236  if (dp_dv_s >= 0)
237  mooseWarning(name(), ":c_from_p_T(), dp_dv_s = ", dp_dv_s, ". Should be negative.");
238  return v * std::sqrt(-dp_dv_s);
239 }
virtual Real v_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Specific volume from pressure and temperature.
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.
Real p_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Pressure from temperature and specific volume.
const std::string name
Definition: Setup.h:22

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

249 {
250  Real p_perturbed, T_perturbed, c_perturbed;
251 
252  c = c_from_p_T(p, T, x);
253  // For derived properties, we would need higher order derivatives;
254  // therefore, numerical derivatives are used here
255  p_perturbed = p * 1.e-6;
256  c_perturbed = c_from_p_T(p_perturbed, T, x);
257  dc_dp = (c_perturbed - c) / (p_perturbed - p);
258 
259  Real dT = 1.e-6;
260  T_perturbed = T + dT;
261  c_perturbed = c_from_p_T(p, T_perturbed, x);
262  dc_dT = (c_perturbed - c) / (dT);
263 
264  dc_dx.resize(_n_secondary_vapors);
265  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
266  {
267  Real c_perturbed;
268  std::vector<Real> x_perturbed(x);
269  Real dx_i = 1e-6;
270  for (unsigned int j = 0; j < _n_secondary_vapors; j++)
271  {
272  if (j != i)
273  x_perturbed[j] =
274  x[j] * (1.0 - (x[i] + dx_i)) / (1.0 - x[i]); // recalculate new mass fractions
275  }
276  x_perturbed[i] += dx_i;
277  c_perturbed = c_from_p_T(p, T, x_perturbed);
278  dc_dx[i] = ((c_perturbed - c) / dx_i);
279  }
280 }
virtual Real c_from_p_T(Real p, Real T, const std::vector< Real > &x) const override
Speed of sound from pressure and temperature.
const unsigned int _n_secondary_vapors
Number of secondary vapors.

◆ 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 620 of file IdealRealGasMixtureFluidProperties.C.

Referenced by c_from_T_v().

621 {
622  Real p, dp_dT, dp_dv;
623  Real s, ds_dT, ds_dv;
624 
625  p_from_T_v(T, v, x, p, dp_dT, dp_dv);
626  s_from_T_v(T, v, x, s, ds_dT, ds_dv);
627 
628  Real dp_dv_s = dp_dv - dp_dT * ds_dv / ds_dT;
629 
630  if (dp_dv_s >= 0)
631  mooseWarning(name(), ":c_from_T_v(), dp_dv_s = ", dp_dv_s, ". Should be negative.");
632  return v * std::sqrt(-dp_dv_s);
633 }
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.
Real p_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Pressure from temperature and specific volume.
const std::string name
Definition: Setup.h:22

◆ 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 636 of file IdealRealGasMixtureFluidProperties.C.

643 {
644  Real T_perturbed, v_perturbed, c_perturbed;
645 
646  c = c_from_T_v(T, v, x);
647  // For derived properties, we would need higher order derivatives;
648  // therefore, numerical derivatives are used here.
649  Real dT = 1.e-6;
650  T_perturbed = T + dT;
651  c_perturbed = c_from_T_v(T_perturbed, v, x);
652  dc_dT = (c_perturbed - c) / (dT);
653 
654  v_perturbed = v * 1.e-6;
655  c_perturbed = c_from_T_v(T, v_perturbed, x);
656  dc_dv = (c_perturbed - c) / (v_perturbed - v);
657 
658  dc_dx.resize(_n_secondary_vapors);
659  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
660  {
661  Real c_perturbed;
662  std::vector<Real> x_perturbed(x);
663  Real dx_i = 1e-6;
664  for (unsigned int j = 0; j < _n_secondary_vapors; j++)
665  {
666  if (j != i)
667  x_perturbed[j] =
668  x[j] * (1.0 - (x[i] + dx_i)) / (1.0 - x[i]); // recalculate new mass fractions
669  }
670  x_perturbed[i] += dx_i;
671  c_perturbed = c_from_T_v(T, v, x_perturbed);
672  dc_dx[i] = ((c_perturbed - c) / dx_i);
673  }
674 }
Real c_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Speed of sound from temperature and specific volume.
const unsigned int _n_secondary_vapors
Number of secondary vapors.

◆ 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 283 of file IdealRealGasMixtureFluidProperties.C.

284 {
285  Real p_unused, dp_dT, dp_dv;
286  Real h, dh_dT, dh_dv;
287 
288  Real v = v_from_p_T(p, T, x);
289  p_from_T_v(T, v, x, p_unused, dp_dT, dp_dv);
290 
291  const Real x_primary = primaryMassFraction(x);
292 
293  _fp_primary->h_from_T_v(T, v / x_primary, h, dh_dT, dh_dv);
294  Real cp = x_primary * (dh_dT - dh_dv * dp_dT / dp_dv);
295 
296  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
297  {
298  _fp_secondary[i]->h_from_T_v(T, v / x[i], h, dh_dT, dh_dv);
299  cp += x[i] * (dh_dT - dh_dv * dp_dT / dp_dv);
300  }
301 
302  return cp;
303 }
virtual Real v_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Specific volume from pressure and temperature.
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real p_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Pressure from temperature and specific volume.
virtual Real h_from_T_v(Real T, Real v) const
Specific enthalpy from temperature and specific volume.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

◆ 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 677 of file IdealRealGasMixtureFluidProperties.C.

678 {
679  Real p, dp_dT, dp_dv;
680  Real h, dh_dT, dh_dv;
681 
682  p_from_T_v(T, v, x, p, dp_dT, dp_dv);
683 
684  const Real x_primary = primaryMassFraction(x);
685 
686  _fp_primary->h_from_T_v(T, v / x_primary, h, dh_dT, dh_dv);
687  Real cp = x_primary * (dh_dT - dh_dv * dp_dT / dp_dv);
688 
689  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
690  {
691  _fp_secondary[i]->h_from_T_v(T, v / x[i], h, dh_dT, dh_dv);
692  cp += x[i] * (dh_dT - dh_dv * dp_dT / dp_dv);
693  }
694 
695  return cp;
696 }
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real p_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Pressure from temperature and specific volume.
virtual Real h_from_T_v(Real T, Real v) const
Specific enthalpy from temperature and specific volume.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

◆ 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 306 of file IdealRealGasMixtureFluidProperties.C.

307 {
308  Real v = v_from_p_T(p, T, x);
309 
310  const Real x_primary = primaryMassFraction(x);
311  Real cv = x_primary * _fp_primary->cv_from_T_v(T, v / x_primary);
312 
313  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
314  cv += x[i] * _fp_secondary[i]->cv_from_T_v(T, v / x[i]);
315 
316  return cv;
317 }
virtual Real v_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Specific volume from pressure and temperature.
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real cv_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Isochoric heat capacity from temperature and specific volume.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.
virtual Real cv_from_T_v(Real T, Real v) const
Specific isochoric heat capacity from temperature and specific volume.

◆ 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 699 of file IdealRealGasMixtureFluidProperties.C.

Referenced by cv_from_p_T().

700 {
701  const Real x_primary = primaryMassFraction(x);
702  Real cv = x_primary * _fp_primary->cv_from_T_v(T, v / x_primary);
703 
704  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
705  cv += x[i] * _fp_secondary[i]->cv_from_T_v(T, v / x[i]);
706 
707  return cv;
708 }
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real cv_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Isochoric heat capacity from temperature and specific volume.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.
virtual Real cv_from_T_v(Real T, Real v) const
Specific isochoric heat capacity from temperature and specific volume.

◆ 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 191 of file IdealRealGasMixtureFluidProperties.C.

192 {
193  Real v = v_from_p_T(p, T, x);
194  return e_from_T_v(T, v, x);
195 }
virtual Real v_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Specific volume from pressure and temperature.
Real e_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Specific internal energy from temperature and specific volume.

◆ 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 198 of file IdealRealGasMixtureFluidProperties.C.

205 {
206  Real v, de_dT_v, de_dv_T, p_unused, dp_dT_v, dp_dv_T;
207  std::vector<Real> de_dx_Tv, dp_dx_Tv;
208  de_dx_Tv.resize(_n_secondary_vapors);
209  dp_dx_Tv.resize(_n_secondary_vapors);
210 
211  v = v_from_p_T(p, T, x);
212  e_from_T_v(T, v, x, e, de_dT_v, de_dv_T, de_dx_Tv);
213  p_from_T_v(T, v, x, p_unused, dp_dT_v, dp_dv_T, dp_dx_Tv);
214 
215  de_dp = de_dv_T / dp_dv_T;
216  de_dT = de_dT_v - de_dv_T * dp_dT_v / dp_dv_T;
217 
218  de_dx.resize(_n_secondary_vapors);
219  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
220  de_dx[i] = -(de_dv_T - de_dx_Tv[i] * dp_dv_T / dp_dx_Tv[i]) * dp_dx_Tv[i] / dp_dv_T;
221 }
virtual Real v_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Specific volume from pressure and temperature.
Real e_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Specific internal energy from temperature and specific volume.
Real p_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Pressure from temperature and specific volume.
const unsigned int _n_secondary_vapors
Number of secondary vapors.

◆ 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 530 of file IdealRealGasMixtureFluidProperties.C.

Referenced by e_from_p_T(), and p_T_from_v_e().

531 {
532  const Real x_primary = primaryMassFraction(x);
533  Real e = x_primary * _fp_primary->e_from_T_v(T, v / x_primary);
534 
535  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
536  e += x[i] * _fp_secondary[i]->e_from_T_v(T, v / x[i]);
537 
538  return e;
539 }
Real e_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Specific internal energy from temperature and specific volume.
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
virtual Real e_from_T_v(Real T, Real v) const
Specific volume and specific internal energy from temerature at the vapor spinodal.
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

◆ 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 542 of file IdealRealGasMixtureFluidProperties.C.

549 {
550  Real e_primary, de_dT_primary, de_dv_primary, de_dx_primary, dxi_dx_primary;
551  Real de_dT_sec, dxj_dxi, dx_primary_dxi;
552  std::vector<Real> e_sec, de_dv_sec;
553 
554  const Real x_primary = primaryMassFraction(x);
555  de_dx.resize(_n_secondary_vapors);
556  e_sec.resize(_n_secondary_vapors);
557  de_dv_sec.resize(_n_secondary_vapors);
558 
559  _fp_primary->e_from_T_v(T, v / x_primary, e_primary, de_dT_primary, de_dv_primary);
560  e = x_primary * e_primary;
561  de_dT = x_primary * de_dT_primary;
562  de_dv = de_dv_primary;
563  de_dx_primary = e_primary - x_primary * de_dv_primary * v / (x_primary * x_primary);
564 
565  // get the partial pressures and their derivatives first
566  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
567  {
568  _fp_secondary[i]->e_from_T_v(T, v / x[i], e_sec[i], de_dT_sec, de_dv_sec[i]);
569 
570  e += x[i] * e_sec[i];
571  de_dT += x[i] * de_dT_sec;
572  de_dv += de_dv_sec[i];
573  dxi_dx_primary = -x[i] / (1. - x_primary);
574  de_dx_primary +=
575  dxi_dx_primary * e_sec[i] - x[i] * de_dv_sec[i] * v / (x[i] * x[i]) * dxi_dx_primary;
576  }
577 
578  // get the composition dependent derivatives of the secondary vapors
579  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
580  {
581  de_dx[i] = e_sec[i] - x[i] * de_dv_sec[i] * v / (x[i] * x[i]);
582  for (unsigned int j = 0; j < _n_secondary_vapors; j++)
583  {
584  if (j == i)
585  continue;
586  dxj_dxi = -x[j] / (1. - x[i]);
587  de_dx[i] += dxj_dxi * e_sec[j] - x[j] * de_dv_sec[j] * v / (x[j] * x[j]) * dxj_dxi;
588  }
589  dx_primary_dxi = -x_primary / (1. - x[i]);
590  de_dx[i] += dx_primary_dxi * e_primary -
591  x_primary * de_dv_primary * v / (x_primary * x_primary) * dx_primary_dxi;
592  }
593 }
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
virtual Real e_from_T_v(Real T, Real v) const
Specific volume and specific internal energy from temerature at the vapor spinodal.
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

◆ 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 {}

◆ getNaN() [1/2]

Real NaNInterface::getNaN ( ) const
inlineprotectedinherited

Produces errors, warnings, or just quiet NaNs.

Definition at line 49 of file NaNInterface.h.

Referenced by NaNInterface::getNaN(), NaNInterfaceTestFluidProperties::p_from_v_e(), v_from_p_T(), and xs_prim_from_p_T().

49 { return getNaN("A NaN was produced."); }
Real getNaN() const
Produces errors, warnings, or just quiet NaNs.
Definition: NaNInterface.h:49

◆ getNaN() [2/2]

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

Definition at line 52 of file NaNInterface.h.

53  {
54  switch (_emit_on_nan)
55  {
56  case (NAN_MESSAGE_WARNING):
57  mooseWarning(_moose_object->name(), ": ", std::forward<Args>(args)...);
58  break;
59  case (NAN_MESSAGE_ERROR):
60  mooseError(_moose_object->name(), ": ", std::forward<Args>(args)...);
61  break;
62  default:
63  break;
64  }
65  // return a quiet NaN
66  return std::nan("");
67  }
const MooseObject * _moose_object
Definition: NaNInterface.h:41
enum NaNMessage _emit_on_nan
Raise mooseWarning or mooseError?
Definition: NaNInterface.h:44

◆ 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 37 of file IdealRealGasMixtureFluidProperties.h.

37 { return _n_secondary_vapors; }
const unsigned int _n_secondary_vapors
Number of secondary vapors.

◆ initialize()

virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 28 of file FluidProperties.h.

28 {}

◆ 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 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 M_primary = _fp_primary->molarMass();
354 
355  Real sum = x_primary / M_primary;
356  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
357  sum += x[i] / _fp_secondary[i]->molarMass();
358  Real M_star = 1. / sum;
359 
360  Real vp = v / x_primary;
361  Real ep = _fp_primary->e_from_T_v(T, vp);
362  Real k = x_primary * M_star / M_primary * _fp_primary->k_from_v_e(vp, ep);
363 
364  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
365  {
366  Real vi = v / x[i];
367  Real ei = _fp_secondary[i]->e_from_T_v(T, vp);
368  Real Mi = _fp_secondary[i]->molarMass();
369  k += x[i] * M_star / Mi * _fp_secondary[i]->k_from_v_e(vi, ei);
370  }
371 
372  return k;
373 }
virtual Real v_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Specific volume from pressure and temperature.
virtual Real molarMass() const
Molar mass [kg/mol].
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
virtual Real k_from_v_e(Real v, Real e) const
Thermal conductivity from specific volume and specific internal energy.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
virtual Real e_from_T_v(Real T, Real v) const
Specific volume and specific internal energy from temerature at the vapor spinodal.
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

◆ 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 737 of file IdealRealGasMixtureFluidProperties.C.

738 {
739  const Real x_primary = primaryMassFraction(x);
740  Real M_primary = _fp_primary->molarMass();
741 
742  Real sum = x_primary / M_primary;
743  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
744  sum += x[i] / _fp_secondary[i]->molarMass();
745  Real M_star = 1. / sum;
746 
747  Real vp = v / x_primary;
748  Real ep = _fp_primary->e_from_T_v(T, vp);
749  Real k = x_primary * M_star / M_primary * _fp_primary->k_from_v_e(vp, ep);
750 
751  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
752  {
753  Real vi = v / x[i];
754  Real ei = _fp_secondary[i]->e_from_T_v(T, vp);
755  Real Mi = _fp_secondary[i]->molarMass();
756  k += x[i] * M_star / Mi * _fp_secondary[i]->k_from_v_e(vi, ei);
757  }
758 
759  return k;
760 }
virtual Real molarMass() const
Molar mass [kg/mol].
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
virtual Real k_from_v_e(Real v, Real e) const
Thermal conductivity from specific volume and specific internal energy.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
virtual Real e_from_T_v(Real T, Real v) const
Specific volume and specific internal energy from temerature at the vapor spinodal.
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

◆ 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 320 of file IdealRealGasMixtureFluidProperties.C.

321 {
322  Real v = v_from_p_T(p, T, x);
323 
324  const Real x_primary = primaryMassFraction(x);
325  Real M_primary = _fp_primary->molarMass();
326 
327  Real sum = x_primary / M_primary;
328  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
329  sum += x[i] / _fp_secondary[i]->molarMass();
330  Real M_star = 1. / sum;
331 
332  Real vp = v / x_primary;
333  Real ep = _fp_primary->e_from_T_v(T, vp);
334  Real mu = x_primary * M_star / M_primary * _fp_primary->mu_from_v_e(vp, ep);
335 
336  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
337  {
338  Real vi = v / x[i];
339  Real ei = _fp_secondary[i]->e_from_T_v(T, vp);
340  Real Mi = _fp_secondary[i]->molarMass();
341  mu += x[i] * M_star / Mi * _fp_secondary[i]->mu_from_v_e(vi, ei);
342  }
343 
344  return mu;
345 }
virtual Real v_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Specific volume from pressure and temperature.
virtual Real mu_from_v_e(Real v, Real e) const
Dynamic viscosity from specific volume and specific internal energy.
virtual Real molarMass() const
Molar mass [kg/mol].
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
virtual Real e_from_T_v(Real T, Real v) const
Specific volume and specific internal energy from temerature at the vapor spinodal.
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

◆ 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 711 of file IdealRealGasMixtureFluidProperties.C.

712 {
713  const Real x_primary = primaryMassFraction(x);
714  Real M_primary = _fp_primary->molarMass();
715 
716  Real sum = x_primary / M_primary;
717  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
718  sum += x[i] / _fp_secondary[i]->molarMass();
719  Real M_star = 1. / sum;
720 
721  Real vp = v / x_primary;
722  Real ep = _fp_primary->e_from_T_v(T, vp);
723  Real mu = x_primary * M_star / M_primary * _fp_primary->mu_from_v_e(vp, ep);
724 
725  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
726  {
727  Real vi = v / x[i];
728  Real ei = _fp_secondary[i]->e_from_T_v(T, vp);
729  Real Mi = _fp_secondary[i]->molarMass();
730  mu += x[i] * M_star / Mi * _fp_secondary[i]->mu_from_v_e(vi, ei);
731  }
732 
733  return mu;
734 }
virtual Real mu_from_v_e(Real v, Real e) const
Dynamic viscosity from specific volume and specific internal energy.
virtual Real molarMass() const
Molar mass [kg/mol].
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
virtual Real e_from_T_v(Real T, Real v) const
Specific volume and specific internal energy from temerature at the vapor spinodal.
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

◆ 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 444 of file IdealRealGasMixtureFluidProperties.C.

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

445 {
446  const Real x_primary = primaryMassFraction(x);
447  Real p = _fp_primary->p_from_T_v(T, v / x_primary);
448 
449  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
450  p += _fp_secondary[i]->p_from_T_v(T, v / x[i]);
451 
452  return p;
453 }
virtual Real p_from_T_v(Real T, Real v) const
Pressure from temperature and specific volume.
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real p_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Pressure from temperature and specific volume.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

◆ 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 456 of file IdealRealGasMixtureFluidProperties.C.

458 {
459  Real p_primary, dp_dT_primary, dp_dv_primary;
460  Real p_sec, dp_dT_sec, dp_dv_sec;
461 
462  const Real x_primary = primaryMassFraction(x);
463 
464  _fp_primary->p_from_T_v(T, v / x_primary, p_primary, dp_dT_primary, dp_dv_primary);
465  p = p_primary;
466  dp_dT = dp_dT_primary;
467  dp_dv = dp_dv_primary / x_primary;
468 
469  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
470  {
471  _fp_secondary[i]->p_from_T_v(T, v / x[i], p_sec, dp_dT_sec, dp_dv_sec);
472 
473  p += p_sec;
474  dp_dT += dp_dT_sec;
475  dp_dv += dp_dv_sec / x[i];
476  }
477 }
virtual Real p_from_T_v(Real T, Real v) const
Pressure from temperature and specific volume.
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

◆ 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 480 of file IdealRealGasMixtureFluidProperties.C.

487 {
488  Real p_primary, dp_dT_primary, dp_dv_primary, dp_dx_primary, dxi_dx_primary;
489  Real p_sec, dp_dT_sec, dxj_dxi;
490  std::vector<Real> dp_dv_sec;
491 
492  const Real x_primary = primaryMassFraction(x);
493  dp_dx.resize(_n_secondary_vapors);
494  dp_dv_sec.resize(_n_secondary_vapors);
495 
496  _fp_primary->p_from_T_v(T, v / x_primary, p_primary, dp_dT_primary, dp_dv_primary);
497  p = p_primary;
498  dp_dT = dp_dT_primary;
499  dp_dv = dp_dv_primary / x_primary;
500  dp_dx_primary = -dp_dv_primary * v / (x_primary * x_primary);
501 
502  // get the partial pressures and their derivatives first
503  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
504  {
505  _fp_secondary[i]->p_from_T_v(T, v / x[i], p_sec, dp_dT_sec, dp_dv_sec[i]);
506 
507  p += p_sec;
508  dp_dT += dp_dT_sec;
509  dp_dv += dp_dv_sec[i] / x[i];
510  dxi_dx_primary = -x[i] / (1. - x_primary);
511  dp_dx_primary += -dp_dv_sec[i] * v / (x[i] * x[i]) * dxi_dx_primary;
512  }
513 
514  // get the composition dependent derivatives of the secondary vapors
515  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
516  {
517  dp_dx[i] = -dp_dv_sec[i] * v / (x[i] * x[i]);
518  for (unsigned int j = 0; j < _n_secondary_vapors; j++)
519  {
520  if (j == i)
521  continue;
522  dxj_dxi = -x[j] / (1. - x[i]);
523  dp_dx[i] += -dp_dv_sec[j] * v / (x[j] * x[j]) * dxj_dxi;
524  }
525  dp_dx[i] += -dp_dv_primary * v / (x_primary * x_primary) * (-x_primary / (1. - x[i]));
526  }
527 }
virtual Real p_from_T_v(Real T, Real v) const
Pressure from temperature and specific volume.
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

◆ 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 }
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.

◆ 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 }
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.
const unsigned int _n_secondary_vapors
Number of secondary vapors.

◆ 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 &  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 376 of file IdealRealGasMixtureFluidProperties.C.

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

378 {
379  Real v_primary = v / primaryMassFraction(x);
380  static const Real vc = 1. / _fp_primary->criticalDensity();
381  static const Real ec = _fp_primary->criticalInternalEnergy();
382 
383  // Initial estimate of a bracketing interval for the temperature
384  Real lower_temperature, upper_temperature;
385  if (v_primary > vc)
386  {
387  Real e_sat_primary = _fp_primary->e_spndl_from_v(v_primary);
388  lower_temperature = _fp_primary->T_from_v_e(v_primary, e_sat_primary);
389  }
390  else
391  lower_temperature = _fp_primary->T_from_v_e(v_primary, ec);
392 
393  upper_temperature = _T_mix_max;
394 
395  // Use BrentsMethod to find temperature
396  auto energy_diff = [&v, &e, &x, this](Real T) { return this->e_from_T_v(T, v, x) - e; };
397 
398  BrentsMethod::bracket(energy_diff, lower_temperature, upper_temperature);
399  T = BrentsMethod::root(energy_diff, lower_temperature, upper_temperature);
400 
401  p = p_from_T_v(T, v, x);
402 }
Real e_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Specific internal energy from temperature and specific volume.
virtual Real T_from_v_e(Real v, Real e) const
Temperature from specific volume and specific internal energy.
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
const Real _T_mix_max
maximum temperature of all components
virtual Real criticalInternalEnergy() const
Critical specific internal energy.
Real p_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Pressure from temperature and specific volume.
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 e_spndl_from_v(Real v) const
Specific internal energy from temperature and specific volume.
virtual Real criticalDensity() const
Critical density.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
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

◆ 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 &  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 405 of file IdealRealGasMixtureFluidProperties.C.

416 {
417  p_T_from_v_e(v, e, x, p, T);
418 
419  // pressure and derivatives
420  Real p_unused, dp_dT_v, dp_dv_T;
421  std::vector<Real> dp_dx_Tv;
422  p_from_T_v(T, v, x, p_unused, dp_dT_v, dp_dv_T, dp_dx_Tv);
423 
424  // internal energy and derivatives
425  Real e_unused, de_dT_v, de_dv_T;
426  std::vector<Real> de_dx_Tv;
427  e_from_T_v(T, v, x, e_unused, de_dT_v, de_dv_T, de_dx_Tv);
428 
429  // Compute derivatives using the following rules:
430  dp_dv = dp_dv_T - dp_dT_v * de_dv_T / de_dT_v;
431  dp_de = dp_dT_v / de_dT_v;
432  dT_dv = -de_dv_T / de_dT_v;
433  dT_de = 1. / de_dT_v;
434 
435  // Derivatives with respect to mass fractions:
436  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
437  {
438  dT_dx[i] = -de_dx_Tv[i] / de_dT_v;
439  dp_dx[i] = dp_dx_Tv[i] + dp_dT_v * dT_dx[i];
440  }
441 }
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.
Real e_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Specific internal energy from temperature and specific volume.
Real p_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Pressure from temperature and specific volume.
const unsigned int _n_secondary_vapors
Number of secondary vapors.

◆ 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.

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

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

◆ 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 101 of file IdealRealGasMixtureFluidProperties.C.

102 {
103  return 1.0 / v_from_p_T(p, T, x);
104 }
virtual Real v_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Specific volume from pressure and temperature.

◆ 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 107 of file IdealRealGasMixtureFluidProperties.C.

114 {
115  Real v, dv_dp, dv_dT;
116  std::vector<Real> dv_dx;
117  v_from_p_T(p, T, x, v, dv_dp, dv_dT, dv_dx);
118 
119  rho = 1.0 / v;
120  const Real drho_dv = -1.0 / (v * v);
121  drho_dp = drho_dv * dv_dp;
122  drho_dT = drho_dv * dv_dT;
123  drho_dx.resize(_n_secondary_vapors);
124  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
125  drho_dx[i] = drho_dv * dv_dx[i];
126 }
virtual Real v_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Specific volume from pressure and temperature.
const unsigned int _n_secondary_vapors
Number of secondary vapors.

◆ 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 596 of file IdealRealGasMixtureFluidProperties.C.

Referenced by c_from_p_T(), and c_from_T_v().

598 {
599  Real s_primary, ds_dT_primary, ds_dv_primary;
600  Real s_sec, ds_dT_sec, ds_dv_sec;
601 
602  const Real x_primary = primaryMassFraction(x);
603 
604  _fp_primary->s_from_T_v(T, v / x_primary, s_primary, ds_dT_primary, ds_dv_primary);
605  s = x_primary * s_primary;
606  ds_dT = x_primary * ds_dT_primary;
607  ds_dv = ds_dv_primary;
608 
609  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
610  {
611  _fp_secondary[i]->s_from_T_v(T, v / x[i], s_sec, ds_dT_sec, ds_dv_sec);
612 
613  s += x[i] * s_sec;
614  ds_dT += x[i] * ds_dT_sec;
615  ds_dv += ds_dv_sec;
616  }
617 }
virtual Real s_from_T_v(Real T, Real v) const
Specific entropy from temperature and specific volume.
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Definition at line 32 of file FluidProperties.h.

32 {}

◆ 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 }
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.

◆ 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 }
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.
const unsigned int _n_secondary_vapors
Number of secondary vapors.

◆ threadJoin()

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

Definition at line 31 of file FluidProperties.h.

31 {}

◆ 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 129 of file IdealRealGasMixtureFluidProperties.C.

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().

130 {
131  const Real x_primary = primaryMassFraction(x);
132  Real M_primary = _fp_primary->molarMass();
133 
134  Real sum = x_primary / M_primary;
135  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
136  sum += x[i] / _fp_secondary[i]->molarMass();
137  Real M_star = 1. / sum;
138  Real v_ideal = R_molar * T / (M_star * p);
139 
140  // check range of validity for primary (condensable) component
141  static const Real Tc = _fp_primary->criticalTemperature();
142  static const Real vc = 1. / _fp_primary->criticalDensity();
143  Real v_spndl, e_spndl;
144  if (T < Tc)
145  _fp_primary->v_e_spndl_from_T(T, v_spndl, e_spndl);
146  else
147  v_spndl = vc;
148 
149  Real lower_spec_volume = v_spndl * x_primary;
150  Real upper_spec_volume = v_ideal; // p*v/(RT) <= 1
151 
152  // Initial estimate of a bracketing interval for the temperature
153  Real p_max = p_from_T_v(T, lower_spec_volume, x);
154  if (p > p_max || upper_spec_volume < lower_spec_volume)
155  return getNaN();
156 
157  // Use BrentsMethod to find temperature
158  auto pressure_diff = [&T, &p, &x, this](Real v) { return this->p_from_T_v(T, v, x) - p; };
159 
160  BrentsMethod::bracket(pressure_diff, lower_spec_volume, upper_spec_volume);
161  Real v = BrentsMethod::root(pressure_diff, lower_spec_volume, upper_spec_volume);
162 
163  return v;
164 }
virtual Real molarMass() const
Molar mass [kg/mol].
Real getNaN() const
Produces errors, warnings, or just quiet NaNs.
Definition: NaNInterface.h:49
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
Real p_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Pressure from temperature and specific volume.
virtual Real criticalTemperature() const
Critical temperature.
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 void v_e_spndl_from_T(Real T, Real &v, Real &e) const
Specific internal energy from temperature and specific volume.
static constexpr const Real R_molar
molar (or universal) gas constant
virtual Real criticalDensity() const
Critical density.
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.
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

◆ 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 167 of file IdealRealGasMixtureFluidProperties.C.

174 {
175  Real p_unused, dp_dT, dp_dv;
176  std::vector<Real> dp_dx;
177  dp_dx.resize(_n_secondary_vapors);
178 
179  v = v_from_p_T(p, T, x);
180  p_from_T_v(T, v, x, p_unused, dp_dT, dp_dv, dp_dx);
181 
182  dv_dp = 1. / dp_dv;
183  dv_dT = -dp_dT / dp_dv;
184 
185  dv_dx.resize(_n_secondary_vapors);
186  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
187  dv_dx[i] = -dp_dx[i] / dp_dv;
188 }
virtual Real v_from_p_T(Real p, Real T, const std::vector< Real > &x) const
Specific volume from pressure and temperature.
Real p_from_T_v(Real T, Real v, const std::vector< Real > &x) const
Pressure from temperature and specific volume.
const unsigned int _n_secondary_vapors
Number of secondary vapors.

◆ 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 763 of file IdealRealGasMixtureFluidProperties.C.

766 {
767  Real T_c = _fp_primary->criticalTemperature();
768  Real xs;
769  if (T > T_c)
770  // return 1. to indicate that no water would condense for
771  // given (p,T)
772  xs = 1.;
773  else
774  {
775  Real pp_sat = _fp_primary->pp_sat_from_p_T(p, T);
776  if (pp_sat < 0.)
777  {
778  // return 1. to indicate that no water would condense for
779  // given (p,T)
780  xs = 1.;
781  return xs;
782  }
783  Real v_primary = _fp_primary->v_from_p_T(pp_sat, T);
784  Real pp_sat_secondary = p - pp_sat;
785 
786  Real v_secondary;
787  if (_n_secondary_vapors == 1)
788  v_secondary = _fp_secondary[0]->v_from_p_T(pp_sat_secondary, T);
789  else
790  {
791  std::vector<Real> x_sec(_n_secondary_vapors);
792  const Real x_primary = primaryMassFraction(x);
793  Real sum = 0.;
794  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
795  {
796  x_sec[i] = x[i] / (1. - x_primary);
797  sum += x_sec[i] / _fp_secondary[i]->molarMass();
798  }
799  Real M_star = 1. / sum;
800  v_secondary = R_molar * T / (M_star * pp_sat_secondary);
801  int it = 0;
802  double f = 1., df_dvs, pp_sec, p_sec, dp_dT_sec, dp_dv_sec, dp_dT, dp_dv;
803  double tol_p = 1.e-8;
804  while (std::fabs(f / pp_sat_secondary) > tol_p)
805  {
806  pp_sec = 0.;
807  dp_dT = 0.;
808  dp_dv = 0.;
809  for (unsigned int i = 0; i < _n_secondary_vapors; i++)
810  {
811  _fp_secondary[i]->p_from_T_v(T, v_secondary / x_sec[i], p_sec, dp_dT_sec, dp_dv_sec);
812  pp_sec += p_sec;
813  dp_dT += dp_dT_sec;
814  dp_dv += dp_dv_sec / x_sec[i];
815  }
816  f = pp_sec - pp_sat_secondary;
817  df_dvs = dp_dv;
818  v_secondary -= f / df_dvs;
819  if (it++ > 15)
820  return getNaN();
821  }
822  }
823 
824  xs = v_secondary / (v_primary + v_secondary);
825  }
826 
827  return xs;
828 }
Real getNaN() const
Produces errors, warnings, or just quiet NaNs.
Definition: NaNInterface.h:49
const SinglePhaseFluidProperties * _fp_primary
Primary vapor fluid properties.
virtual Real criticalTemperature() const
Critical temperature.
static constexpr const Real R_molar
molar (or universal) gas constant
Real primaryMassFraction(const std::vector< Real > &x) const
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors...
virtual Real pp_sat_from_p_T(Real p, Real T) const
Partial pressure at saturation in a gas mixture.
const unsigned int _n_secondary_vapors
Number of secondary vapors.
std::vector< const SinglePhaseFluidProperties * > _fp_secondary
Secondary vapor fluid properties.
virtual Real v_from_p_T(Real p, Real T) const
Specific volume from pressure and temperature.

Member Data Documentation

◆ _emit_on_nan

enum NaNMessage NaNInterface::_emit_on_nan
protectedinherited

Raise mooseWarning or mooseError?

Definition at line 44 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 460 of file IdealRealGasMixtureFluidProperties.h.

Referenced by IdealRealGasMixtureFluidProperties().

◆ _moose_object

const MooseObject* NaNInterface::_moose_object
protectedinherited

Definition at line 41 of file NaNInterface.h.

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

◆ _n_secondary_vapors

const unsigned int IdealRealGasMixtureFluidProperties::_n_secondary_vapors
protected

◆ _T_mix_max

const Real IdealRealGasMixtureFluidProperties::_T_mix_max
protected

maximum temperature of all components

Definition at line 466 of file IdealRealGasMixtureFluidProperties.h.

Referenced by p_T_from_v_e().

◆ R_molar

constexpr const Real IdealRealGasMixtureFluidProperties::R_molar = 8.3144598
staticprotected

molar (or universal) gas constant

Definition at line 464 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: