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

Ideal gas fluid properties Default parameters are for air at atmospheric pressure and temperature. More...

#include <IdealGasFluidProperties.h>

Inheritance diagram for IdealGasFluidProperties:
[legend]

Public Member Functions

 IdealGasFluidProperties (const InputParameters &parameters)
 
virtual ~IdealGasFluidProperties ()
 
virtual Real p_from_v_e (Real v, Real e) const override
 
virtual void p_from_v_e (Real v, Real e, Real &p, Real &dp_dv, Real &dp_de) const override
 
virtual void p_from_v_e (const DualReal &v, const DualReal &e, DualReal &p, DualReal &dp_dv, DualReal &dp_de) const override
 
virtual Real T_from_v_e (Real v, Real e) const override
 
virtual void T_from_v_e (Real v, Real e, Real &T, Real &dT_dv, Real &dT_de) const override
 
virtual void T_from_v_e (const DualReal &v, const DualReal &e, DualReal &T, DualReal &dT_dv, DualReal &dT_de) const override
 
virtual Real c_from_v_e (Real v, Real e) const override
 
virtual void c_from_v_e (Real v, Real e, Real &c, Real &dc_dv, Real &dc_de) const override
 
virtual Real cp_from_v_e (Real v, Real e) const override
 
virtual void cp_from_v_e (Real v, Real e, Real &cp, Real &dcp_dv, Real &dcp_de) const override
 
virtual Real cv_from_v_e (Real v, Real e) const override
 
virtual void cv_from_v_e (Real v, Real e, Real &cv, Real &dcv_dv, Real &dcv_de) const override
 
virtual Real mu_from_v_e (Real v, Real e) const override
 
virtual Real k_from_v_e (Real v, Real e) const override
 
virtual Real s_from_v_e (Real v, Real e) const override
 
virtual void s_from_v_e (Real v, Real e, Real &s, Real &ds_dv, Real &ds_de) const override
 
virtual Real s_from_p_T (Real p, Real T) const override
 
virtual void s_from_p_T (Real p, Real T, Real &s, Real &ds_dp, Real &ds_dT) const override
 
virtual Real s_from_h_p (Real h, Real p) const override
 
virtual void s_from_h_p (Real h, Real p, Real &s, Real &ds_dh, Real &ds_dp) const override
 
virtual Real rho_from_p_s (Real p, Real s) const override
 
virtual void rho_from_p_s (Real p, Real s, Real &rho, Real &drho_dp, Real &drho_ds) const override
 
virtual Real e_from_v_h (Real v, Real h) const override
 
virtual void e_from_v_h (Real v, Real h, Real &e, Real &de_dv, Real &de_dh) const override
 
virtual Real rho_from_p_T (Real p, Real T) const override
 
virtual void rho_from_p_T (Real p, Real T, Real &rho, Real &drho_dp, Real &drho_dT) const override
 
virtual void rho_from_p_T (const DualReal &p, const DualReal &T, DualReal &rho, DualReal &drho_dp, DualReal &drho_dT) const override
 
virtual Real e_from_p_rho (Real p, Real rho) const override
 
virtual void e_from_p_rho (Real p, Real rho, Real &e, Real &de_dp, Real &de_drho) const override
 
virtual Real e_from_T_v (Real T, Real v) const override
 
virtual void e_from_T_v (Real T, Real v, Real &e, Real &de_dT, Real &de_dv) const override
 
virtual Real p_from_T_v (Real T, Real v) const override
 
virtual void p_from_T_v (Real T, Real v, Real &p, Real &dp_dT, Real &dp_dv) const override
 
virtual Real h_from_T_v (Real T, Real v) const override
 
virtual void h_from_T_v (Real T, Real v, Real &h, Real &dh_dT, Real &dh_dv) const override
 
virtual Real s_from_T_v (Real T, Real v) const override
 
virtual void s_from_T_v (Real T, Real v, Real &s, Real &ds_dT, Real &ds_dv) const override
 
virtual Real cv_from_T_v (Real T, Real v) const override
 
virtual Real e_spndl_from_v (Real v) const override
 Specific internal energy from temperature and specific volume. More...
 
virtual void v_e_spndl_from_T (Real T, Real &v, Real &e) const override
 Specific internal energy from temperature and specific volume. More...
 
virtual Real h_from_p_T (Real p, Real T) const override
 
virtual void h_from_p_T (Real p, Real T, Real &h, Real &dh_dp, Real &dh_dT) const override
 
virtual Real e_from_p_T (Real p, Real T) const override
 
virtual void e_from_p_T (Real p, Real T, Real &e, Real &de_dp, Real &de_dT) const override
 
virtual Real p_from_h_s (Real h, Real s) const override
 
virtual void p_from_h_s (Real h, Real s, Real &p, Real &dp_dh, Real &dp_ds) const override
 
virtual Real g_from_v_e (Real v, Real e) const override
 
virtual Real T_from_p_h (Real p, Real h) const override
 
virtual void T_from_p_h (Real p, Real h, Real &T, Real &dT_dp, Real &dT_dh) const override
 
virtual Real cv_from_p_T (Real p, Real T) const override
 
virtual void cv_from_p_T (Real p, Real T, Real &cv, Real &dcv_dp, Real &dcv_dT) const override
 
virtual Real cp_from_p_T (Real p, Real T) const override
 
virtual void cp_from_p_T (Real p, Real T, Real &cp, Real &dcp_dp, Real &dcp_dT) const override
 
virtual Real mu_from_p_T (Real p, Real T) const override
 
virtual void mu_from_p_T (Real p, Real T, Real &mu, Real &dmu_dp, Real &dmu_dT) const override
 
virtual Real k_from_p_T (Real pressure, Real temperature) const override
 
virtual void k_from_p_T (Real pressure, Real temperature, Real &k, Real &dk_dp, Real &dk_dT) const override
 
virtual std::string fluidName () const override
 
virtual Real molarMass () const override
 Fluid name. More...
 
virtual Real criticalTemperature () const override
 Critical temperature. More...
 
virtual Real criticalDensity () const override
 Critical density. More...
 
virtual Real criticalInternalEnergy () const override
 Critical specific internal energy. More...
 
virtual Real gamma_from_v_e (Real v, Real e) const override
 
virtual Real gamma_from_p_T (Real p, Real T) const override
 
virtual Real c_from_p_T (Real p, Real T) const override
 
virtual Real pp_sat_from_p_T (Real, Real) const override
 
virtual Real gamma () const
 
virtual Real cv () const
 
virtual Real cp () const
 
virtual Real criticalPressure () const
 Critical pressure. More...
 
virtual Real triplePointPressure () const
 Triple point pressure. More...
 
virtual Real triplePointTemperature () const
 Triple point temperature. More...
 
virtual Real vaporPressure (Real T) const
 Vapor pressure. More...
 
virtual void vaporPressure (Real T, Real &psat, Real &dpsat_dT) const
 
DualReal vaporPressure (const DualReal &T) const
 
virtual Real vaporTemperature (Real p) const
 Vapor temperature. More...
 
virtual void vaporTemperature (Real p, Real &Tsat, Real &dTsat_dp) const
 
DualReal vaporTemperature (const DualReal &p) const
 
virtual std::vector< Real > henryCoefficients () const
 Henry's law coefficients for dissolution in water. More...
 
virtual void rho_mu_from_p_T (Real p, Real T, Real &rho, Real &mu) const
 Combined methods. More...
 
virtual void rho_mu_from_p_T (Real p, Real T, Real &rho, Real &drho_dp, Real &drho_dT, Real &mu, Real &dmu_dp, Real &dmu_dT) const
 
virtual void rho_mu_from_p_T (const DualReal &p, const DualReal &T, DualReal &rho, DualReal &mu) const
 
virtual void rho_e_from_p_T (Real p, Real T, Real &rho, Real &drho_dp, Real &drho_dT, Real &e, Real &de_dp, Real &de_dT) const
 
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 Attributes

const Real & _gamma
 Adiabatic index (ratio of specific heats cp/cv) More...
 
const Real & _molar_mass
 molar mass More...
 
const Real _R_specific
 Specific gas constant (R / molar mass) More...
 
const Real _cp
 Specific heat at constant pressure. More...
 
const Real _cv
 Specific heat at constant volume. More...
 
const Real _mu
 Dynamic viscosity. More...
 
const Real _k
 Thermal conductivity. More...
 
Real _T_c
 
Real _rho_c
 
Real _e_c
 
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...
 

Private Member Functions

template<typename... Args>
void fluidPropError (Args... args) const
 
e e e e p h T T T T T v v v s h propfuncWithDefault (beta, p, T) propfuncWithDefault(v
 
e e e e p h T T T T T v v v s h T propfuncWithDefault (e, p, T) propfuncWithDefault(gamma
 
 propfunc (p, v, e) propfunc(T
 Compute a fluid property given for the state defined by two given properties. More...
 
propfunc (c, v, e) propfunc(cp
 
e e propfunc (cv, v, e) propfunc(mu
 
e e e propfunc (k, v, e) propfunc(s
 
e e e e propfunc (s, h, p) propfunc(T
 
e e e e p propfunc (rho, p, s) propfunc(e
 
e e e e p h propfunc (s, p, T) propfunc(pp_sat
 
e e e e p h T propfunc (mu, rho, T) propfunc(k
 
e e e e p h T T propfunc (c, p, T) propfunc(cp
 
e e e e p h T T T propfunc (cv, p, T) propfunc(mu
 
e e e e p h T T T T propfunc (k, p, T) propfunc(rho
 
e e e e p h T T T T T propfunc (e, p, rho) propfunc(e
 
e e e e p h T T T T T v propfunc (p, T, v) propfunc(h
 
e e e e p h T T T T T v v propfunc (s, T, v) propfunc(cv
 
e e e e p h T T T T T v v v propfunc (h, p, T) propfunc(p
 
e e e e p h T T T T T v v vpropfunc (g, v, e) propfuncWithDefault(T
 
 v
 
v
 
e e v
 
e e e v
 
e e e e p v
 
e e e e p h T T T T T v v v s h T v
 
e e e e h
 
e e e e p h T T T T T v v v h
 
e e e e p h p
 
e e e e p h T T p
 
e e e e p h T T T p
 
e e e e p h T T T T p
 
e e e e p h T T T T T v v vp
 
e e e e p h T T T T T v v v s h p
 
e e e e p h T rho
 
e e e e p h T T T T T T
 
e e e e p h T T T T T v T
 
e e e e p h T T T T T v v T
 
e e e e p h T T T T T v v v s h TpropfuncWithDefault (gamma, p, T)
 

Detailed Description

Ideal gas fluid properties Default parameters are for air at atmospheric pressure and temperature.

Definition at line 26 of file IdealGasFluidProperties.h.

Constructor & Destructor Documentation

◆ IdealGasFluidProperties()

IdealGasFluidProperties::IdealGasFluidProperties ( const InputParameters &  parameters)

Definition at line 33 of file IdealGasFluidProperties.C.

34  : SinglePhaseFluidProperties(parameters),
35 
36  _gamma(getParam<Real>("gamma")),
37  _molar_mass(getParam<Real>("molar_mass")),
38 
40  _cp(_gamma * _R_specific / (_gamma - 1.0)),
41  _cv(_cp / _gamma),
42 
43  _mu(getParam<Real>("mu")),
44  _k(getParam<Real>("k")),
45 
46  _T_c(getParam<Real>("T_c")),
47  _rho_c(getParam<Real>("rho_c")),
48  _e_c(getParam<Real>("e_c"))
49 {
50 }

◆ ~IdealGasFluidProperties()

IdealGasFluidProperties::~IdealGasFluidProperties ( )
virtual

Definition at line 52 of file IdealGasFluidProperties.C.

52 {}

Member Function Documentation

◆ c_from_p_T()

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

Definition at line 137 of file IdealGasFluidProperties.C.

138 {
139  return std::sqrt(_cp * _R * T / (_cv * _molar_mass));
140 }

◆ c_from_v_e() [1/2]

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

Definition at line 111 of file IdealGasFluidProperties.C.

112 {
113  Real T = T_from_v_e(v, e);
114 
115  const Real c2 = _gamma * _R_specific * T;
116  if (c2 < 0)
117  mooseException(name() + ": Sound speed squared (gamma * R * T) is negative: c2 = " +
118  Moose::stringify(c2) + ".");
119 
120  return std::sqrt(c2);
121 }

Referenced by NSInitialCondition::value().

◆ c_from_v_e() [2/2]

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

Definition at line 124 of file IdealGasFluidProperties.C.

125 {
126  Real T, dT_dv, dT_de;
127  T_from_v_e(v, e, T, dT_dv, dT_de);
128 
129  c = std::sqrt(_gamma * _R_specific * T);
130 
131  const Real dc_dT = 0.5 / c * _gamma * _R_specific;
132  dc_dv = dc_dT * dT_dv;
133  dc_de = dc_dT * dT_de;
134 }

◆ cp()

virtual Real IdealGasFluidProperties::cp ( ) const
inlinevirtual

◆ cp_from_p_T() [1/2]

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

Definition at line 526 of file IdealGasFluidProperties.C.

527 {
528  return _cp;
529 }

Referenced by cp_from_p_T().

◆ cp_from_p_T() [2/2]

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

Definition at line 532 of file IdealGasFluidProperties.C.

533 {
534  cp = cp_from_p_T(p, T);
535  dcp_dp = 0.0;
536  dcp_dT = 0.0;
537 }

◆ cp_from_v_e() [1/2]

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

Definition at line 142 of file IdealGasFluidProperties.C.

142 { return _cp; }

Referenced by cp_from_v_e().

◆ cp_from_v_e() [2/2]

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

Definition at line 145 of file IdealGasFluidProperties.C.

146 {
147  cp = cp_from_v_e(v, e);
148  dcp_dv = 0.0;
149  dcp_de = 0.0;
150 }

◆ criticalDensity()

Real IdealGasFluidProperties::criticalDensity ( ) const
overridevirtual

Critical density.

Returns
critical density (kg/m^3)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 488 of file IdealGasFluidProperties.C.

489 {
490  return _rho_c;
491 }

◆ criticalInternalEnergy()

Real IdealGasFluidProperties::criticalInternalEnergy ( ) const
overridevirtual

Critical specific internal energy.

Returns
specific internal energy (J/kg)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 494 of file IdealGasFluidProperties.C.

495 {
496  return _e_c;
497 }

◆ criticalPressure()

Real SinglePhaseFluidProperties::criticalPressure ( ) const
virtualinherited

Critical pressure.

Returns
critical pressure (Pa)

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

Definition at line 108 of file SinglePhaseFluidProperties.C.

109 {
110  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
111 }

◆ criticalTemperature()

Real IdealGasFluidProperties::criticalTemperature ( ) const
overridevirtual

Critical temperature.

Returns
critical temperature (K)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 482 of file IdealGasFluidProperties.C.

483 {
484  return _T_c;
485 }

◆ cv()

virtual Real IdealGasFluidProperties::cv ( ) const
inlinevirtual

◆ cv_from_p_T() [1/2]

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

Definition at line 513 of file IdealGasFluidProperties.C.

514 {
515  return _cv;
516 }

Referenced by cv_from_p_T().

◆ cv_from_p_T() [2/2]

void IdealGasFluidProperties::cv_from_p_T ( Real  p,
Real  T,
Real &  cv,
Real &  dcv_dp,
Real &  dcv_dT 
) const
overridevirtual

Definition at line 519 of file IdealGasFluidProperties.C.

520 {
521  cv = cv_from_p_T(p, T);
522  dcv_dp = 0.0;
523  dcv_dT = 0.0;
524 }

◆ cv_from_T_v()

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

Definition at line 402 of file IdealGasFluidProperties.C.

402 { return _cv; }

◆ cv_from_v_e() [1/2]

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

Definition at line 152 of file IdealGasFluidProperties.C.

152 { return _cv; }

Referenced by cv_from_v_e().

◆ cv_from_v_e() [2/2]

void IdealGasFluidProperties::cv_from_v_e ( Real  v,
Real  e,
Real &  cv,
Real &  dcv_dv,
Real &  dcv_de 
) const
overridevirtual

Definition at line 155 of file IdealGasFluidProperties.C.

156 {
157  cv = cv_from_v_e(v, e);
158  dcv_dv = 0.0;
159  dcv_de = 0.0;
160 }

◆ e_from_p_rho() [1/2]

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

Definition at line 328 of file IdealGasFluidProperties.C.

329 {
330  return p / (_gamma - 1.0) / rho;
331 }

Referenced by e_from_p_rho().

◆ e_from_p_rho() [2/2]

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

Definition at line 334 of file IdealGasFluidProperties.C.

336 {
337  e = e_from_p_rho(p, rho);
338  de_dp = 1.0 / (_gamma - 1.0) / rho;
339  de_drho = -p / (_gamma - 1.0) / rho / rho;
340 }

◆ e_from_p_T() [1/2]

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

Definition at line 428 of file IdealGasFluidProperties.C.

429 {
430  return _cv * T;
431 }

Referenced by e_from_p_T().

◆ e_from_p_T() [2/2]

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

Definition at line 434 of file IdealGasFluidProperties.C.

435 {
436  e = e_from_p_T(p, T);
437  de_dp = 0.0;
438  de_dT = _cv;
439 }

◆ e_from_T_v() [1/2]

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

Definition at line 343 of file IdealGasFluidProperties.C.

344 {
345  return _cv * T;
346 }

◆ e_from_T_v() [2/2]

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

Definition at line 349 of file IdealGasFluidProperties.C.

350 {
351  e = _cv * T;
352  de_dT = _cv;
353  de_dv = 0.0;
354 }

◆ e_from_v_h() [1/2]

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

Definition at line 287 of file IdealGasFluidProperties.C.

288 {
289  return h / _gamma;
290 }

Referenced by e_from_v_h().

◆ e_from_v_h() [2/2]

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

Definition at line 293 of file IdealGasFluidProperties.C.

294 {
295  e = e_from_v_h(v, h);
296  de_dv = 0.0;
297  de_dh = 1.0 / _gamma;
298 }

◆ e_spndl_from_v()

Real IdealGasFluidProperties::e_spndl_from_v ( Real  v) const
overridevirtual

Specific internal energy from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume

Reimplemented from SinglePhaseFluidProperties.

Definition at line 404 of file IdealGasFluidProperties.C.

404 { return _e_c; }

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

◆ fluidName()

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

Definition at line 55 of file IdealGasFluidProperties.C.

56 {
57  return "ideal_gas";
58 }

◆ fluidPropError()

template<typename... Args>
void SinglePhaseFluidProperties::fluidPropError ( Args...  args) const
inlineprivateinherited

Definition at line 326 of file SinglePhaseFluidProperties.h.

327  {
329  mooseDoOnce(mooseWarning(std::forward<Args>(args)...));
330  else
331  mooseError(std::forward<Args>(args)...);
332  }

Referenced by SinglePhaseFluidProperties::vaporPressure(), and SinglePhaseFluidProperties::vaporTemperature().

◆ g_from_v_e()

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

Definition at line 460 of file IdealGasFluidProperties.C.

461 {
462  // g(p,T) for SGEOS is given by Equation (37) in the following reference:
463  //
464  // Ray A. Berry, Richard Saurel, Olivier LeMetayer
465  // The discrete equation method (DEM) for fully compressible, two-phase flows in
466  // ducts of spatially varying cross-section
467  // Nuclear Engineering and Design 240 (2010) p. 3797-3818
468  //
469  const Real p = p_from_v_e(v, e);
470  const Real T = T_from_v_e(v, e);
471 
472  return _gamma * _cv * T - _cv * T * std::log(std::pow(T, _gamma) / std::pow(p, _gamma - 1.0));
473 }

◆ gamma()

virtual Real IdealGasFluidProperties::gamma ( ) const
inlinevirtual

◆ gamma_from_p_T()

Real IdealGasFluidProperties::gamma_from_p_T ( Real  p,
Real  T 
) const
overridevirtual

Definition at line 164 of file IdealGasFluidProperties.C.

164 { return _gamma; }

◆ gamma_from_v_e()

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

Definition at line 162 of file IdealGasFluidProperties.C.

162 { return _gamma; }

◆ h_from_p_T() [1/2]

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

Definition at line 414 of file IdealGasFluidProperties.C.

415 {
416  return _cp * T;
417 }

Referenced by h_from_p_T().

◆ h_from_p_T() [2/2]

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

Definition at line 420 of file IdealGasFluidProperties.C.

421 {
422  h = h_from_p_T(p, T);
423  dh_dp = 0.0;
424  dh_dT = _cp;
425 }

◆ h_from_T_v() [1/2]

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

Definition at line 371 of file IdealGasFluidProperties.C.

372 {
373  return _gamma * _cv * T;
374 }

◆ h_from_T_v() [2/2]

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

Definition at line 377 of file IdealGasFluidProperties.C.

378 {
379  h = _gamma * _cv * T;
380  dh_dT = _gamma * _cv;
381  dh_dv = 0.0;
382 }

◆ henryCoefficients()

std::vector< Real > SinglePhaseFluidProperties::henryCoefficients ( ) const
virtualinherited

Henry's law coefficients for dissolution in water.

Returns
Henry's constant coefficients

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

Definition at line 183 of file SinglePhaseFluidProperties.C.

184 {
185  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
186 }

Referenced by TabulatedFluidProperties::henryCoefficients().

◆ initialize()

virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 35 of file FluidProperties.h.

35 {}

◆ k_from_p_T() [1/2]

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

Definition at line 552 of file IdealGasFluidProperties.C.

553 {
554  return _k;
555 }

Referenced by k_from_p_T().

◆ k_from_p_T() [2/2]

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

Definition at line 558 of file IdealGasFluidProperties.C.

559 {
560  k = k_from_p_T(p, T);
561  dk_dp = 0.0;
562  dk_dT = 0.0;
563 }

◆ k_from_v_e()

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

Definition at line 168 of file IdealGasFluidProperties.C.

168 { return _k; }

◆ molarMass()

Real IdealGasFluidProperties::molarMass ( ) const
overridevirtual

Fluid name.

Returns
string representing fluid name Molar mass [kg/mol]
molar mass

Reimplemented from SinglePhaseFluidProperties.

Definition at line 476 of file IdealGasFluidProperties.C.

477 {
478  return _molar_mass;
479 }

◆ mu_from_p_T() [1/2]

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

Definition at line 539 of file IdealGasFluidProperties.C.

540 {
541  return _mu;
542 }

Referenced by mu_from_p_T().

◆ mu_from_p_T() [2/2]

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

Definition at line 545 of file IdealGasFluidProperties.C.

546 {
547  mu = this->mu_from_p_T(p, T);
548  dmu_dp = 0.0;
549  dmu_dT = 0.0;
550 }

◆ mu_from_v_e()

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

Definition at line 166 of file IdealGasFluidProperties.C.

166 { return _mu; }

◆ p_from_h_s() [1/2]

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

Definition at line 442 of file IdealGasFluidProperties.C.

443 {
444  return std::pow(h / (_gamma * _cv), _gamma / (_gamma - 1.0)) *
445  std::exp(-s / ((_gamma - 1.0) * _cv));
446 }

Referenced by p_from_h_s().

◆ p_from_h_s() [2/2]

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

Definition at line 449 of file IdealGasFluidProperties.C.

450 {
451  p = p_from_h_s(h, s);
452  dp_dh = _gamma / (_gamma - 1.0) / (_gamma * _cv) *
453  std::pow(h / (_gamma * _cv), 1.0 / (_gamma - 1.0)) *
454  std::exp(-s / ((_gamma - 1.0) * _cv));
455  dp_ds = std::pow(h / (_gamma * _cv), _gamma / (_gamma - 1)) *
456  std::exp(-s / ((_gamma - 1) * _cv)) / ((1 - _gamma) * _cv);
457 }

◆ p_from_T_v() [1/2]

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

Definition at line 357 of file IdealGasFluidProperties.C.

358 {
359  return (_gamma - 1.0) * _cv * T / v;
360 }

Referenced by s_from_T_v().

◆ p_from_T_v() [2/2]

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

Definition at line 363 of file IdealGasFluidProperties.C.

364 {
365  p = (_gamma - 1.0) * _cv * T / v;
366  dp_dT = (_gamma - 1.0) * _cv / v;
367  dp_dv = -(_gamma - 1.0) * _cv * T / (v * v);
368 }

◆ p_from_v_e() [1/3]

void IdealGasFluidProperties::p_from_v_e ( const DualReal &  v,
const DualReal &  e,
DualReal &  p,
DualReal &  dp_dv,
DualReal &  dp_de 
) const
overridevirtual

Definition at line 79 of file IdealGasFluidProperties.C.

81 {
82  p = SinglePhaseFluidProperties::p_from_v_e(v, e);
83  dp_dv = -(_gamma - 1.0) * e / v / v;
84  dp_de = (_gamma - 1.0) / v;
85 }

◆ p_from_v_e() [2/3]

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

Definition at line 61 of file IdealGasFluidProperties.C.

62 {
63  if (v == 0.0)
64  throw MooseException(
65  name() + ": Invalid value of specific volume detected (v = " + Moose::stringify(v) + ").");
66 
67  return (_gamma - 1.0) * e / v;
68 }

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

◆ p_from_v_e() [3/3]

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

Definition at line 71 of file IdealGasFluidProperties.C.

72 {
73  p = p_from_v_e(v, e);
74  dp_dv = -(_gamma - 1.0) * e / v / v;
75  dp_de = (_gamma - 1.0) / v;
76 }

◆ pp_sat_from_p_T()

Real IdealGasFluidProperties::pp_sat_from_p_T ( Real  ,
Real   
) const
overridevirtual

Definition at line 565 of file IdealGasFluidProperties.C.

566 {
567  mooseError(
568  name(), ": ", __PRETTY_FUNCTION__, " not implemented. Use a real fluid property class!");
569 }

◆ propfunc() [1/16]

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

◆ propfunc() [2/16]

e SinglePhaseFluidProperties::propfunc ( ,
v  ,
 
)
inherited

◆ propfunc() [3/16]

e e e e p h T T T SinglePhaseFluidProperties::propfunc ( cv  ,
p  ,
T   
)
inherited

◆ propfunc() [4/16]

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

◆ propfunc() [5/16]

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

◆ propfunc() [6/16]

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

◆ propfunc() [7/16]

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

◆ propfunc() [8/16]

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

◆ propfunc() [9/16]

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

◆ propfunc() [10/16]

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

◆ propfunc() [11/16]

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

◆ propfunc() [12/16]

SinglePhaseFluidProperties::propfunc ( p  ,
v  ,
 
)
inherited

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

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

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

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

As an example:

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

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

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

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

◆ propfunc() [13/16]

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

◆ propfunc() [14/16]

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

◆ propfunc() [15/16]

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

◆ propfunc() [16/16]

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

◆ propfuncWithDefault() [1/2]

e e e e p h T T T T T v v v s h SinglePhaseFluidProperties::propfuncWithDefault ( beta  ,
p  ,
T   
)
inherited

◆ propfuncWithDefault() [2/2]

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

◆ rho_e_from_p_T()

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

Definition at line 242 of file SinglePhaseFluidProperties.C.

250 {
251  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
252  e_from_p_T(p, T, e, de_dp, de_dT);
253 }

◆ rho_from_p_s() [1/2]

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

Definition at line 254 of file IdealGasFluidProperties.C.

255 {
256  const Real aux = (s + _cv * std::log(std::pow(p, _gamma - 1.0))) / _cv;
257  const Real T = std::pow(std::exp(aux), 1.0 / _gamma);
258  return rho_from_p_T(p, T);
259 }

◆ rho_from_p_s() [2/2]

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

Definition at line 262 of file IdealGasFluidProperties.C.

264 {
265  // T(p,s)
266  const Real aux = (s + _cv * std::log(std::pow(p, _gamma - 1.0))) / _cv;
267  const Real T = std::pow(std::exp(aux), 1 / _gamma);
268 
269  // dT/dp
270  const Real dT_dp = 1.0 / _gamma * std::pow(std::exp(aux), 1.0 / _gamma - 1.0) * std::exp(aux) /
271  std::pow(p, _gamma - 1.0) * (_gamma - 1.0) * std::pow(p, _gamma - 2.0);
272 
273  // dT/ds
274  const Real dT_ds =
275  1.0 / _gamma * std::pow(std::exp(aux), 1.0 / _gamma - 1.0) * std::exp(aux) / _cv;
276 
277  // Drho/Dp = d/dp[rho(p, T(p,s))] = drho/dp + drho/dT * dT/dp
278  Real drho_dp_partial, drho_dT;
279  rho_from_p_T(p, T, rho, drho_dp_partial, drho_dT);
280  drho_dp = drho_dp_partial + drho_dT * dT_dp;
281 
282  // Drho/Ds = d/ds[rho(p, T(p,s))] = drho/dT * dT/ds
283  drho_ds = drho_dT * dT_ds;
284 }

◆ rho_from_p_T() [1/3]

void IdealGasFluidProperties::rho_from_p_T ( const DualReal &  p,
const DualReal &  T,
DualReal &  rho,
DualReal &  drho_dp,
DualReal &  drho_dT 
) const
overridevirtual

Definition at line 307 of file IdealGasFluidProperties.C.

312 {
313  rho = SinglePhaseFluidProperties::rho_from_p_T(p, T);
314  drho_dp = _molar_mass / (_R * T);
315  drho_dT = -p * _molar_mass / (_R * T * T);
316 }

◆ rho_from_p_T() [2/3]

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

Definition at line 301 of file IdealGasFluidProperties.C.

302 {
303  return p * _molar_mass / (_R * T);
304 }

Referenced by rho_from_p_s(), rho_from_p_T(), NSWeakStagnationBaseBC::staticValues(), and NSInitialCondition::value().

◆ rho_from_p_T() [3/3]

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

Definition at line 319 of file IdealGasFluidProperties.C.

321 {
322  rho = rho_from_p_T(p, T);
323  drho_dp = _molar_mass / (_R * T);
324  drho_dT = -p * _molar_mass / (_R * T * T);
325 }

◆ rho_mu_from_p_T() [1/3]

void SinglePhaseFluidProperties::rho_mu_from_p_T ( const DualReal &  p,
const DualReal &  T,
DualReal &  rho,
DualReal &  mu 
) const
virtualinherited

Definition at line 277 of file SinglePhaseFluidProperties.C.

281 {
282  rho = rho_from_p_T(p, T);
283  mu = mu_from_p_T(p, T);
284 }

◆ rho_mu_from_p_T() [2/3]

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

Reimplemented in Water97FluidProperties, CO2FluidProperties, HydrogenFluidProperties, and NitrogenFluidProperties.

Definition at line 263 of file SinglePhaseFluidProperties.C.

271 {
272  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
273  mu_from_p_T(p, T, mu, dmu_dp, dmu_dT);
274 }

◆ rho_mu_from_p_T() [3/3]

void SinglePhaseFluidProperties::rho_mu_from_p_T ( Real  p,
Real  T,
Real &  rho,
Real &  mu 
) const
virtualinherited

Combined methods.

These methods are particularly useful for the PorousFlow module, where density and viscosity are typically both computed everywhere. The combined methods allow the most efficient means of calculating both properties, especially where rho(p, T) and mu(rho, T). In this case, an extra density calculation would be required to calculate mu(p, T). All propery names are described above.

Reimplemented in Water97FluidProperties, CO2FluidProperties, HydrogenFluidProperties, and NitrogenFluidProperties.

Definition at line 256 of file SinglePhaseFluidProperties.C.

257 {
258  rho = rho_from_p_T(p, T);
259  mu = mu_from_p_T(p, T);
260 }

Referenced by PorousFlowSingleComponentFluid::computeQpProperties(), PorousFlowWaterNCG::gasProperties(), PorousFlowBrineCO2::gasProperties(), and PorousFlowWaterNCG::liquidProperties().

◆ s_from_h_p() [1/2]

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

Definition at line 232 of file IdealGasFluidProperties.C.

233 {
234  const Real aux = p * std::pow(h / (_gamma * _cv), -_gamma / (_gamma - 1));
235  if (aux <= 0.0)
236  throw MooseException(name() + ": Non-positive argument in the ln() function.");
237  return -(_gamma - 1) * _cv * std::log(aux);
238 }

Referenced by s_from_h_p().

◆ s_from_h_p() [2/2]

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

Definition at line 241 of file IdealGasFluidProperties.C.

242 {
243  s = s_from_h_p(h, p);
244 
245  const Real aux = p * std::pow(h / (_gamma * _cv), -_gamma / (_gamma - 1));
246  const Real daux_dh = p * std::pow(h / (_gamma * _cv), -_gamma / (_gamma - 1) - 1) *
247  (-_gamma / (_gamma - 1)) / (_gamma * _cv);
248  const Real daux_dp = std::pow(h / (_gamma * _cv), -_gamma / (_gamma - 1));
249  ds_dh = -(_gamma - 1) * _cv / aux * daux_dh;
250  ds_dp = -(_gamma - 1) * _cv / aux * daux_dp;
251 }

◆ s_from_p_T() [1/2]

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

Definition at line 207 of file IdealGasFluidProperties.C.

208 {
209  const Real n = std::pow(T, _gamma) / std::pow(p, _gamma - 1.0);
210  if (n <= 0.0)
211  throw MooseException(name() + ": Negative argument in the ln() function.");
212  return _cv * std::log(n);
213 }

Referenced by s_from_T_v().

◆ s_from_p_T() [2/2]

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

Definition at line 216 of file IdealGasFluidProperties.C.

217 {
218  const Real n = std::pow(T, _gamma) / std::pow(p, _gamma - 1.0);
219  if (n <= 0.0)
220  throw MooseException(name() + ": Negative argument in the ln() function.");
221 
222  s = _cv * std::log(n);
223 
224  const Real dn_dT = _gamma * std::pow(T, _gamma - 1.0) / std::pow(p, _gamma - 1.0);
225  const Real dn_dp = std::pow(T, _gamma) * (1.0 - _gamma) * std::pow(p, -_gamma);
226 
227  ds_dp = _cv / n * dn_dp;
228  ds_dT = _cv / n * dn_dT;
229 }

◆ s_from_T_v() [1/2]

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

Definition at line 385 of file IdealGasFluidProperties.C.

386 {
387  Real p = p_from_T_v(T, v);
388  return s_from_p_T(p, T);
389 }

◆ s_from_T_v() [2/2]

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

Definition at line 392 of file IdealGasFluidProperties.C.

393 {
394  Real p, dp_dT_v, dp_dv_T;
395  Real ds_dp_T, ds_dT_p;
396  p_from_T_v(T, v, p, dp_dT_v, dp_dv_T);
397  s_from_p_T(p, T, s, ds_dp_T, ds_dT_p);
398  ds_dT = ds_dT_p + ds_dp_T * dp_dT_v;
399  ds_dv = ds_dp_T * dp_dv_T;
400 }

◆ s_from_v_e() [1/2]

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

Definition at line 171 of file IdealGasFluidProperties.C.

172 {
173  const Real T = T_from_v_e(v, e);
174  const Real p = p_from_v_e(v, e);
175  const Real n = std::pow(T, _gamma) / std::pow(p, _gamma - 1.0);
176  if (n <= 0.0)
177  throw MooseException(name() + ": Negative argument in the ln() function.");
178  return _cv * std::log(n);
179 }

◆ s_from_v_e() [2/2]

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

Definition at line 182 of file IdealGasFluidProperties.C.

183 {
184  Real T, dT_dv, dT_de;
185  T_from_v_e(v, e, T, dT_dv, dT_de);
186 
187  Real p, dp_dv, dp_de;
188  p_from_v_e(v, e, p, dp_dv, dp_de);
189 
190  const Real n = std::pow(T, _gamma) / std::pow(p, _gamma - 1.0);
191  if (n <= 0.0)
192  throw MooseException(name() + ": Negative argument in the ln() function.");
193 
194  s = _cv * std::log(n);
195 
196  const Real dn_dT = _gamma * std::pow(T, _gamma - 1.0) / std::pow(p, _gamma - 1.0);
197  const Real dn_dp = std::pow(T, _gamma) * (1.0 - _gamma) * std::pow(p, -_gamma);
198 
199  const Real dn_dv = dn_dT * dT_dv + dn_dp * dp_dv;
200  const Real dn_de = dn_dT * dT_de + dn_dp * dp_de;
201 
202  ds_dv = _cv / n * dn_dv;
203  ds_de = _cv / n * dn_de;
204 }

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Definition at line 39 of file FluidProperties.h.

39 {}

◆ T_from_p_h() [1/2]

Real IdealGasFluidProperties::T_from_p_h ( Real  p,
Real  h 
) const
overridevirtual

Definition at line 500 of file IdealGasFluidProperties.C.

501 {
502  return h / _gamma / _cv;
503 }

◆ T_from_p_h() [2/2]

void IdealGasFluidProperties::T_from_p_h ( Real  p,
Real  h,
Real &  T,
Real &  dT_dp,
Real &  dT_dh 
) const
overridevirtual

Definition at line 506 of file IdealGasFluidProperties.C.

507 {
508  T = h / (_gamma * _cv);
509  dT_dp = 0;
510  dT_dh = 1.0 / (_gamma * _cv);
511 }

◆ T_from_v_e() [1/3]

void IdealGasFluidProperties::T_from_v_e ( const DualReal &  v,
const DualReal &  e,
DualReal &  T,
DualReal &  dT_dv,
DualReal &  dT_de 
) const
overridevirtual

Definition at line 102 of file IdealGasFluidProperties.C.

104 {
105  T = SinglePhaseFluidProperties::T_from_v_e(v, e);
106  dT_dv = 0.0;
107  dT_de = 1.0 / _cv;
108 }

◆ T_from_v_e() [2/3]

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

Definition at line 88 of file IdealGasFluidProperties.C.

89 {
90  return e / _cv;
91 }

Referenced by c_from_v_e(), NSTemperatureAux::computeValue(), g_from_v_e(), s_from_v_e(), and T_from_v_e().

◆ T_from_v_e() [3/3]

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

Definition at line 94 of file IdealGasFluidProperties.C.

95 {
96  T = T_from_v_e(v, e);
97  dT_dv = 0.0;
98  dT_de = 1.0 / _cv;
99 }

◆ threadJoin()

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

Definition at line 38 of file FluidProperties.h.

38 {}

◆ triplePointPressure()

Real SinglePhaseFluidProperties::triplePointPressure ( ) const
virtualinherited

Triple point pressure.

Returns
triple point pressure (Pa)

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

Definition at line 132 of file SinglePhaseFluidProperties.C.

133 {
134  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
135 }

◆ triplePointTemperature()

Real SinglePhaseFluidProperties::triplePointTemperature ( ) const
virtualinherited

Triple point temperature.

Returns
triple point temperature (K)

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

Definition at line 138 of file SinglePhaseFluidProperties.C.

139 {
140  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
141 }

◆ v_e_spndl_from_T()

void IdealGasFluidProperties::v_e_spndl_from_T ( Real  T,
Real &  v,
Real &  e 
) const
overridevirtual

Specific internal energy from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume

Reimplemented from SinglePhaseFluidProperties.

Definition at line 407 of file IdealGasFluidProperties.C.

408 {
409  v = 1. / _rho_c;
410  e = _e_c;
411 }

◆ vaporPressure() [1/3]

DualReal SinglePhaseFluidProperties::vaporPressure ( const DualReal &  T) const
inherited

Definition at line 198 of file SinglePhaseFluidProperties.C.

199 {
200  Real p = 0.0;
201  Real temperature = T.value();
202  Real dpdT = 0.0;
203 
204  vaporPressure(temperature, p, dpdT);
205 
206  DualReal result = p;
207  result.derivatives() = T.derivatives() * dpdT;
208 
209  return result;
210 }

◆ vaporPressure() [2/3]

Real SinglePhaseFluidProperties::vaporPressure ( Real  T) const
virtualinherited

Vapor pressure.

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

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

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

Definition at line 177 of file SinglePhaseFluidProperties.C.

178 {
179  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
180 }

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

◆ vaporPressure() [3/3]

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

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

Definition at line 189 of file SinglePhaseFluidProperties.C.

190 {
191  fluidPropError(name(), ": ", __PRETTY_FUNCTION__, " derivatives not implemented.");
192 
193  dp_dT = 0.0;
194  p = vaporPressure(T);
195 }

◆ vaporTemperature() [1/3]

DualReal SinglePhaseFluidProperties::vaporTemperature ( const DualReal &  p) const
inherited

Definition at line 227 of file SinglePhaseFluidProperties.C.

228 {
229  Real T = 0.0;
230  Real pressure = p.value();
231  Real dTdp = 0.0;
232 
233  vaporTemperature(pressure, T, dTdp);
234 
235  DualReal result = T;
236  result.derivatives() = p.derivatives() * dTdp;
237 
238  return result;
239 }

◆ vaporTemperature() [2/3]

Real SinglePhaseFluidProperties::vaporTemperature ( Real  p) const
virtualinherited

Vapor temperature.

Used to delineate liquid and gas phases. Valid for pressures between the triple point pressure and the critical pressure

Parameters
pfluid pressure (Pa)
[out]saturationtemperature (K)
[out]derivativeof saturation temperature wrt pressure

Reimplemented in Water97FluidProperties.

Definition at line 212 of file SinglePhaseFluidProperties.C.

213 {
214  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
215 }

Referenced by PorousFlowWaterVapor::thermophysicalProperties(), and SinglePhaseFluidProperties::vaporTemperature().

◆ vaporTemperature() [3/3]

void SinglePhaseFluidProperties::vaporTemperature ( Real  p,
Real &  Tsat,
Real &  dTsat_dp 
) const
virtualinherited

Reimplemented in Water97FluidProperties.

Definition at line 218 of file SinglePhaseFluidProperties.C.

219 {
220  fluidPropError(name(), ": ", __PRETTY_FUNCTION__, " derivatives not implemented.");
221 
222  dT_dp = 0.0;
223  T = vaporTemperature(p);
224 }

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

◆ _cp

const Real IdealGasFluidProperties::_cp
protected

Specific heat at constant pressure.

Definition at line 130 of file IdealGasFluidProperties.h.

Referenced by c_from_p_T(), cp(), cp_from_p_T(), cp_from_v_e(), and h_from_p_T().

◆ _cv

const Real IdealGasFluidProperties::_cv
protected

◆ _e_c

Real IdealGasFluidProperties::_e_c
protected

◆ _gamma

const Real& IdealGasFluidProperties::_gamma
protected

◆ _k

const Real IdealGasFluidProperties::_k
protected

Thermal conductivity.

Definition at line 137 of file IdealGasFluidProperties.h.

Referenced by k_from_p_T(), and k_from_v_e().

◆ _molar_mass

const Real& IdealGasFluidProperties::_molar_mass
protected

molar mass

Definition at line 125 of file IdealGasFluidProperties.h.

Referenced by c_from_p_T(), molarMass(), and rho_from_p_T().

◆ _mu

const Real IdealGasFluidProperties::_mu
protected

Dynamic viscosity.

Definition at line 135 of file IdealGasFluidProperties.h.

Referenced by mu_from_p_T(), and mu_from_v_e().

◆ _R

const Real FluidProperties::_R = 8.3144598
staticinherited

◆ _R_specific

const Real IdealGasFluidProperties::_R_specific
protected

Specific gas constant (R / molar mass)

Definition at line 128 of file IdealGasFluidProperties.h.

Referenced by c_from_v_e().

◆ _rho_c

Real IdealGasFluidProperties::_rho_c
protected

Definition at line 141 of file IdealGasFluidProperties.h.

Referenced by criticalDensity(), and v_e_spndl_from_T().

◆ _T_c

Real IdealGasFluidProperties::_T_c
protected

Definition at line 140 of file IdealGasFluidProperties.h.

Referenced by criticalTemperature().

◆ _T_c2k

const Real FluidProperties::_T_c2k
protectedinherited

◆ h [1/2]

e e e e SinglePhaseFluidProperties::h
inherited

◆ h [2/2]

e e e e p h T T T T T v v v SinglePhaseFluidProperties::h
inherited

Definition at line 183 of file SinglePhaseFluidProperties.h.

◆ p [1/6]

e e e e p h SinglePhaseFluidProperties::p
inherited

Definition at line 167 of file SinglePhaseFluidProperties.h.

Referenced by StiffenedGasFluidProperties::c_from_v_e(), HeliumFluidProperties::c_from_v_e(), cp_from_p_T(), cv_from_p_T(), StiffenedGasFluidProperties::e_from_p_rho(), e_from_p_rho(), StiffenedGasFluidProperties::e_from_p_T(), e_from_p_T(), StiffenedGasFluidProperties::g_from_v_e(), g_from_v_e(), TabulatedFluidProperties::generateTabulatedData(), StiffenedGasFluidProperties::h_from_p_T(), h_from_p_T(), Water97FluidProperties::henryConstant(), k_from_p_T(), StiffenedGasFluidProperties::p_from_h_s(), p_from_h_s(), StiffenedGasFluidProperties::p_from_T_v(), p_from_T_v(), p_from_v_e(), StiffenedGasFluidProperties::p_from_v_e(), HeliumFluidProperties::p_from_v_e(), FlinakFluidProperties::p_from_v_e(), FlibeFluidProperties::p_from_v_e(), SinglePhaseFluidProperties::rho_e_from_p_T(), StiffenedGasFluidProperties::rho_from_p_s(), rho_from_p_s(), StiffenedGasFluidProperties::rho_from_p_T(), rho_from_p_T(), SinglePhaseFluidProperties::rho_mu_from_p_T(), StiffenedGasFluidProperties::s_from_h_p(), s_from_h_p(), StiffenedGasFluidProperties::s_from_p_T(), s_from_p_T(), SimpleFluidProperties::s_from_p_T(), Water97FluidProperties::s_from_p_T(), TabulatedFluidProperties::s_from_p_T(), s_from_T_v(), StiffenedGasFluidProperties::s_from_v_e(), s_from_v_e(), Water97FluidProperties::T_from_p_h(), FlinakFluidProperties::T_from_v_e(), FlibeFluidProperties::T_from_v_e(), Water97FluidProperties::vaporPressure(), SinglePhaseFluidProperties::vaporPressure(), Water97FluidProperties::vaporTemperature(), SinglePhaseFluidProperties::vaporTemperature(), and TabulatedFluidProperties::writeTabulatedData().

◆ p [2/6]

e e e e p h T T SinglePhaseFluidProperties::p
inherited

Definition at line 171 of file SinglePhaseFluidProperties.h.

◆ p [3/6]

e e e e p h T T T SinglePhaseFluidProperties::p
inherited

Definition at line 173 of file SinglePhaseFluidProperties.h.

◆ p [4/6]

e e e e p h T T T T SinglePhaseFluidProperties::p
inherited

Definition at line 175 of file SinglePhaseFluidProperties.h.

◆ p [5/6]

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

Definition at line 185 of file SinglePhaseFluidProperties.h.

◆ p [6/6]

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

Definition at line 187 of file SinglePhaseFluidProperties.h.

◆ propfuncWithDefault

e e e e p h T T T T T v v v s h T e SinglePhaseFluidProperties::propfuncWithDefault(gamma, p, T)
inherited

Definition at line 190 of file SinglePhaseFluidProperties.h.

◆ rho

e e e e p h T SinglePhaseFluidProperties::rho
inherited

◆ T [1/3]

e e e e p h T T T T T SinglePhaseFluidProperties::T
inherited

Definition at line 177 of file SinglePhaseFluidProperties.h.

Referenced by c_from_p_T(), c_from_v_e(), HeliumFluidProperties::c_from_v_e(), cp_from_p_T(), cv_from_p_T(), StiffenedGasFluidProperties::e_from_p_T(), e_from_p_T(), StiffenedGasFluidProperties::e_from_T_v(), e_from_T_v(), StiffenedGasFluidProperties::g_from_v_e(), g_from_v_e(), StiffenedGasFluidProperties::h_from_p_T(), h_from_p_T(), StiffenedGasFluidProperties::h_from_T_v(), h_from_T_v(), Water97FluidProperties::henryConstant(), k_from_p_T(), HeliumFluidProperties::k_from_v_e(), mu_from_p_T(), StiffenedGasFluidProperties::p_from_T_v(), p_from_T_v(), HeliumFluidProperties::p_from_v_e(), FlibeFluidProperties::p_from_v_e(), FlinakFluidProperties::p_from_v_e(), SinglePhaseFluidProperties::rho_e_from_p_T(), StiffenedGasFluidProperties::rho_from_p_s(), rho_from_p_s(), StiffenedGasFluidProperties::rho_from_p_T(), rho_from_p_T(), SinglePhaseFluidProperties::rho_mu_from_p_T(), StiffenedGasFluidProperties::s_from_p_T(), s_from_p_T(), SimpleFluidProperties::s_from_p_T(), Water97FluidProperties::s_from_p_T(), TabulatedFluidProperties::s_from_p_T(), StiffenedGasFluidProperties::s_from_T_v(), s_from_T_v(), StiffenedGasFluidProperties::s_from_v_e(), s_from_v_e(), T_from_p_h(), Water97FluidProperties::T_from_p_h(), StiffenedGasFluidProperties::T_from_v_e(), T_from_v_e(), FlinakFluidProperties::T_from_v_e(), FlibeFluidProperties::T_from_v_e(), HeliumFluidProperties::T_from_v_e(), SinglePhaseFluidProperties::vaporPressure(), Water97FluidProperties::vaporTemperature(), and SinglePhaseFluidProperties::vaporTemperature().

◆ T [2/3]

e e e e p h T T T T T v SinglePhaseFluidProperties::T
inherited

Definition at line 179 of file SinglePhaseFluidProperties.h.

◆ T [3/3]

e e e e p h T T T T T v v SinglePhaseFluidProperties::T
inherited

Definition at line 181 of file SinglePhaseFluidProperties.h.

◆ v [1/6]

SinglePhaseFluidProperties::v
inherited

Definition at line 155 of file SinglePhaseFluidProperties.h.

Referenced by StiffenedGasFluidProperties::c_from_v_e(), c_from_v_e(), HeliumFluidProperties::c_from_v_e(), StiffenedGasFluidProperties::cp_from_v_e(), cp_from_v_e(), FlibeFluidProperties::cp_from_v_e(), FlinakFluidProperties::cp_from_v_e(), HeliumFluidProperties::cp_from_v_e(), FlibeFluidProperties::cv_from_p_T(), FlinakFluidProperties::cv_from_p_T(), cv_from_v_e(), FlibeFluidProperties::cv_from_v_e(), FlinakFluidProperties::cv_from_v_e(), HeliumFluidProperties::cv_from_v_e(), FlinakFluidProperties::e_from_p_T(), FlibeFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::e_from_T_v(), e_from_v_h(), StiffenedGasFluidProperties::e_from_v_h(), StiffenedGasFluidProperties::g_from_v_e(), g_from_v_e(), FlibeFluidProperties::k_from_v_e(), FlinakFluidProperties::k_from_v_e(), HeliumFluidProperties::k_from_v_e(), FlibeFluidProperties::mu_from_v_e(), FlinakFluidProperties::mu_from_v_e(), HeliumFluidProperties::mu_from_v_e(), StiffenedGasFluidProperties::p_from_T_v(), p_from_T_v(), StiffenedGasFluidProperties::p_from_v_e(), p_from_v_e(), HeliumFluidProperties::p_from_v_e(), FlibeFluidProperties::p_from_v_e(), FlinakFluidProperties::p_from_v_e(), StiffenedGasFluidProperties::s_from_T_v(), s_from_T_v(), StiffenedGasFluidProperties::s_from_v_e(), s_from_v_e(), StiffenedGasFluidProperties::T_from_v_e(), T_from_v_e(), FlinakFluidProperties::T_from_v_e(), FlibeFluidProperties::T_from_v_e(), HeliumFluidProperties::T_from_v_e(), StiffenedGasFluidProperties::v_e_spndl_from_T(), v_e_spndl_from_T(), FlinakFluidProperties::v_from_p_T(), and FlibeFluidProperties::v_from_p_T().

◆ v [2/6]

e SinglePhaseFluidProperties::v
inherited

Definition at line 157 of file SinglePhaseFluidProperties.h.

◆ v [3/6]

e e SinglePhaseFluidProperties::v
inherited

Definition at line 159 of file SinglePhaseFluidProperties.h.

◆ v [4/6]

e e e SinglePhaseFluidProperties::v
inherited

Definition at line 161 of file SinglePhaseFluidProperties.h.

◆ v [5/6]

e e e e p SinglePhaseFluidProperties::v
inherited

Definition at line 165 of file SinglePhaseFluidProperties.h.

◆ v [6/6]

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

Definition at line 189 of file SinglePhaseFluidProperties.h.


The documentation for this class was generated from the following files:
IdealGasFluidProperties::_k
const Real _k
Thermal conductivity.
Definition: IdealGasFluidProperties.h:137
IdealGasFluidProperties::s_from_p_T
virtual Real s_from_p_T(Real p, Real T) const override
Definition: IdealGasFluidProperties.C:207
IdealGasFluidProperties::cv_from_v_e
virtual Real cv_from_v_e(Real v, Real e) const override
Definition: IdealGasFluidProperties.C:152
IdealGasFluidProperties::_mu
const Real _mu
Dynamic viscosity.
Definition: IdealGasFluidProperties.h:135
IdealGasFluidProperties::cp
virtual Real cp() const
Definition: IdealGasFluidProperties.h:119
IdealGasFluidProperties::cv_from_p_T
virtual Real cv_from_p_T(Real p, Real T) const override
Definition: IdealGasFluidProperties.C:513
IdealGasFluidProperties::_gamma
const Real & _gamma
Adiabatic index (ratio of specific heats cp/cv)
Definition: IdealGasFluidProperties.h:119
pow
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Definition: ExpressionBuilder.h:673
SinglePhaseFluidProperties::v
v
Definition: SinglePhaseFluidProperties.h:155
IdealGasFluidProperties::k_from_p_T
virtual Real k_from_p_T(Real pressure, Real temperature) const override
Definition: IdealGasFluidProperties.C:552
IdealGasFluidProperties::_cv
const Real _cv
Specific heat at constant volume.
Definition: IdealGasFluidProperties.h:132
IdealGasFluidProperties::rho_from_p_T
virtual Real rho_from_p_T(Real p, Real T) const override
Definition: IdealGasFluidProperties.C:301
IdealGasFluidProperties::_rho_c
Real _rho_c
Definition: IdealGasFluidProperties.h:141
IdealGasFluidProperties::p_from_T_v
virtual Real p_from_T_v(Real T, Real v) const override
Definition: IdealGasFluidProperties.C:357
IdealGasFluidProperties::e_from_v_h
virtual Real e_from_v_h(Real v, Real h) const override
Definition: IdealGasFluidProperties.C:287
IdealGasFluidProperties::p_from_v_e
virtual Real p_from_v_e(Real v, Real e) const override
Definition: IdealGasFluidProperties.C:61
SinglePhaseFluidProperties::SinglePhaseFluidProperties
SinglePhaseFluidProperties(const InputParameters &parameters)
Definition: SinglePhaseFluidProperties.C:22
IdealGasFluidProperties::T_from_v_e
virtual Real T_from_v_e(Real v, Real e) const override
Definition: IdealGasFluidProperties.C:88
IdealGasFluidProperties::s_from_h_p
virtual Real s_from_h_p(Real h, Real p) const override
Definition: IdealGasFluidProperties.C:232
SinglePhaseFluidProperties::T
e e e e p h T T T T T T
Definition: SinglePhaseFluidProperties.h:177
IdealGasFluidProperties::_e_c
Real _e_c
Definition: IdealGasFluidProperties.h:142
IdealGasFluidProperties::_cp
const Real _cp
Specific heat at constant pressure.
Definition: IdealGasFluidProperties.h:130
IdealGasFluidProperties::e_from_p_rho
virtual Real e_from_p_rho(Real p, Real rho) const override
Definition: IdealGasFluidProperties.C:328
IdealGasFluidProperties::e_from_p_T
virtual Real e_from_p_T(Real p, Real T) const override
Definition: IdealGasFluidProperties.C:428
IdealGasFluidProperties::_R_specific
const Real _R_specific
Specific gas constant (R / molar mass)
Definition: IdealGasFluidProperties.h:128
SinglePhaseFluidProperties::rho
e e e e p h T rho
Definition: SinglePhaseFluidProperties.h:169
SinglePhaseFluidProperties::vaporPressure
virtual Real vaporPressure(Real T) const
Vapor pressure.
Definition: SinglePhaseFluidProperties.C:177
SinglePhaseFluidProperties::vaporTemperature
virtual Real vaporTemperature(Real p) const
Vapor temperature.
Definition: SinglePhaseFluidProperties.C:212
name
const std::string name
Definition: Setup.h:21
IdealGasFluidProperties::p_from_h_s
virtual Real p_from_h_s(Real h, Real s) const override
Definition: IdealGasFluidProperties.C:442
IdealGasFluidProperties::_molar_mass
const Real & _molar_mass
molar mass
Definition: IdealGasFluidProperties.h:125
IdealGasFluidProperties::_T_c
Real _T_c
Definition: IdealGasFluidProperties.h:140
IdealGasFluidProperties::mu_from_p_T
virtual Real mu_from_p_T(Real p, Real T) const override
Definition: IdealGasFluidProperties.C:539
SinglePhaseFluidProperties::fluidPropError
void fluidPropError(Args... args) const
Definition: SinglePhaseFluidProperties.h:326
IdealGasFluidProperties::cp_from_p_T
virtual Real cp_from_p_T(Real p, Real T) const override
Definition: IdealGasFluidProperties.C:526
FluidProperties::_R
static const Real _R
Universal gas constant (J/mol/K)
Definition: FluidProperties.h:42
NS::temperature
const std::string temperature
Definition: NS.h:26
IdealGasFluidProperties::cv
virtual Real cv() const
Definition: IdealGasFluidProperties.h:118
FluidProperties::_allow_imperfect_jacobians
const bool _allow_imperfect_jacobians
Flag to set unimplemented Jacobian entries to zero.
Definition: FluidProperties.h:48
IdealGasFluidProperties::h_from_p_T
virtual Real h_from_p_T(Real p, Real T) const override
Definition: IdealGasFluidProperties.C:414
SinglePhaseFluidProperties::p
e e e e p h p
Definition: SinglePhaseFluidProperties.h:167
IdealGasFluidProperties::cp_from_v_e
virtual Real cp_from_v_e(Real v, Real e) const override
Definition: IdealGasFluidProperties.C:142
NS::pressure
const std::string pressure
Definition: NS.h:25
SinglePhaseFluidProperties::h
e e e e h
Definition: SinglePhaseFluidProperties.h:163