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

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

#include <NaClFluidProperties.h>

Inheritance diagram for NaClFluidProperties:
[legend]

Public Member Functions

 NaClFluidProperties (const InputParameters &parameters)
 
virtual ~NaClFluidProperties ()
 
virtual std::string fluidName () const override
 
virtual Real molarMass () const override
 Fluid name. More...
 
virtual Real criticalPressure () const override
 Critical pressure. More...
 
virtual Real criticalTemperature () const override
 Critical temperature. More...
 
virtual Real criticalDensity () const override
 Critical density. More...
 
virtual Real triplePointPressure () const override
 Triple point pressure. More...
 
virtual Real triplePointTemperature () const override
 Triple point temperature. More...
 
virtual Real rho_from_p_T (Real pressure, Real temperature) const override
 
virtual void rho_from_p_T (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const override
 
virtual Real e_from_p_T (Real pressure, Real temperature) const override
 
virtual void e_from_p_T (Real pressure, Real temperature, Real &e, Real &de_dp, Real &de_dT) const override
 
virtual Real cp_from_p_T (Real pressure, Real temperature) const override
 
virtual Real cv_from_p_T (Real pressure, Real temperature) 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 Real h_from_p_T (Real pressure, Real temperature) const override
 
virtual void h_from_p_T (Real pressure, Real temperature, Real &h, Real &dh_dp, Real &dh_dT) const override
 
virtual Real criticalInternalEnergy () const
 Critical specific internal energy. More...
 
virtual Real e_spndl_from_v (Real v) const
 Specific internal energy from temperature and specific volume. More...
 
virtual void v_e_spndl_from_T (Real T, Real &v, Real &e) const
 Specific internal energy from temperature and specific volume. More...
 
virtual Real 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 _Mnacl
 NaCl molar mass (kg/mol) More...
 
const Real _p_critical
 Critical pressure (Pa) More...
 
const Real _T_critical
 Critical temperature (K) More...
 
const Real _rho_critical
 Critical density (kg/m^3) More...
 
const Real _p_triple
 Triple point pressure (Pa) More...
 
const Real _T_triple
 Triple point temperature (K) More...
 
const 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

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

Note: only solid state (halite) properties are currently implemented to use in brine formulation

Most properties from: Driesner, The system H2O-NaCl. Part II: Correlations for molar volume, enthalpy, and isobaric heat capacity from 0 to 1000 C, 1 to 500 bar, and 0 to 1 Xnacl, Geochimica et Cosmochimica Acta 71, 4902-4919 (2007)

Thermal conductivity from: Urqhart and Bauer, Experimental determination of single-crystal halite thermal conductivity, diffusivity and specific heat from -75 C to 300 C, Int. J. Rock Mech. and Mining Sci., 78 (2015) Note: The function given in this reference doesn't satisfactorily match their experimental data, so the data was refitted using a third order polynomial

NaCl critical properties from: From Anderko and Pitzer, Equation of state for pure sodium chloride, Fluid Phase Equil., 79 (1992)

Definition at line 43 of file NaClFluidProperties.h.

Constructor & Destructor Documentation

◆ NaClFluidProperties()

NaClFluidProperties::NaClFluidProperties ( const InputParameters &  parameters)

Definition at line 23 of file NaClFluidProperties.C.

24  : SinglePhaseFluidProperties(parameters),
25  _Mnacl(58.443e-3),
26  _p_critical(1.82e7),
27  _T_critical(3841.15),
28  _rho_critical(108.43),
29  _p_triple(50.0),
30  _T_triple(1073.85)
31 {
32 }

◆ ~NaClFluidProperties()

NaClFluidProperties::~NaClFluidProperties ( )
virtual

Definition at line 34 of file NaClFluidProperties.C.

34 {}

Member Function Documentation

◆ cp_from_p_T()

Real NaClFluidProperties::cp_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 137 of file NaClFluidProperties.C.

138 {
139  // Correlation needs pressure in bar
140  Real pbar = pressure * 10.0e-5;
141  // Correlation requires temperature in Celcius
142  Real Tc = temperature - _T_c2k;
143  // Triple point temperature of NaCl (in C)
144  Real Tt = _T_triple - _T_c2k;
145  // Coefficients used in the correlation
146  Real r3 = -1.7099e-3 - 3.82734e-6 * Tc - 8.65455e-9 * Tc * Tc;
147  Real r4 = 5.29063e-8 - 9.63084e-11 * Tc + 6.50745e-13 * Tc * Tc;
148 
149  // Halite isobaric heat capapcity
150  return 1148.81 + 0.551548 * (Tc - Tt) + 2.64309e-4 * (Tc - Tt) * (Tc - Tt) + r3 * pbar +
151  r4 * pbar * pbar;
152 }

◆ criticalDensity()

Real NaClFluidProperties::criticalDensity ( ) const
overridevirtual

Critical density.

Returns
critical density (kg/m^3)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 61 of file NaClFluidProperties.C.

62 {
63  return _rho_critical;
64 }

◆ criticalInternalEnergy()

Real SinglePhaseFluidProperties::criticalInternalEnergy ( ) const
virtualinherited

Critical specific internal energy.

Returns
specific internal energy (J/kg)

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 126 of file SinglePhaseFluidProperties.C.

127 {
128  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
129 }

Referenced by IdealRealGasMixtureFluidProperties::p_T_from_v_e(), and IdealRealGasMixtureFluidProperties::T_from_p_v().

◆ criticalPressure()

Real NaClFluidProperties::criticalPressure ( ) const
overridevirtual

Critical pressure.

Returns
critical pressure (Pa)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 49 of file NaClFluidProperties.C.

50 {
51  return _p_critical;
52 }

◆ criticalTemperature()

Real NaClFluidProperties::criticalTemperature ( ) const
overridevirtual

Critical temperature.

Returns
critical temperature (K)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 55 of file NaClFluidProperties.C.

56 {
57  return _T_critical;
58 }

◆ cv_from_p_T()

Real NaClFluidProperties::cv_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 155 of file NaClFluidProperties.C.

156 {
158 }

◆ e_from_p_T() [1/2]

Real NaClFluidProperties::e_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 117 of file NaClFluidProperties.C.

Referenced by cv_from_p_T().

◆ e_from_p_T() [2/2]

void NaClFluidProperties::e_from_p_T ( Real  pressure,
Real  temperature,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
overridevirtual

Definition at line 123 of file NaClFluidProperties.C.

125 {
126  Real h, dh_dp, dh_dT;
127  h_from_p_T(pressure, temperature, h, dh_dp, dh_dT);
128  Real rho, drho_dp, drho_dT;
129  rho_from_p_T(pressure, temperature, rho, drho_dp, drho_dT);
130 
131  e = h - pressure / rho;
132  de_dp = dh_dp + pressure * drho_dp / rho / rho - 1.0 / rho;
133  de_dT = dh_dT + pressure * drho_dT / rho / rho;
134 }

◆ e_spndl_from_v()

Real SinglePhaseFluidProperties::e_spndl_from_v ( Real  v) const
virtualinherited

Specific internal energy from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 286 of file SinglePhaseFluidProperties.C.

287 {
288  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
289 }

Referenced by IdealRealGasMixtureFluidProperties::p_T_from_v_e(), and IdealRealGasMixtureFluidProperties::T_from_p_v().

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

Definition at line 37 of file NaClFluidProperties.C.

38 {
39  return "nacl";
40 }

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

◆ h_from_p_T() [1/2]

Real NaClFluidProperties::h_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 182 of file NaClFluidProperties.C.

183 {
184  // Correlation needs pressure in bar
185  Real pbar = pressure * 1.0e-5;
186  // Correlation requires temperature in Celcius
187  Real Tc = temperature - _T_c2k;
188  // Triple point temperature of water (in C)
189  Real Tt = 273.16 - _T_c2k;
190  // Triple point presure of water (in bar)
191  Real pt = 611.657 * 1.0e-5;
192 
193  // Note: the enthalpy of halite is 0 at the triple point of water
194  return 8.7664e2 * (Tc - Tt) + 6.4139e-2 * (Tc * Tc - Tt * Tt) +
195  8.8101e-5 * (Tc * Tc * Tc - Tt * Tt * Tt) + 44.14 * (pbar - pt);
196 }

Referenced by e_from_p_T().

◆ h_from_p_T() [2/2]

void NaClFluidProperties::h_from_p_T ( Real  pressure,
Real  temperature,
Real &  h,
Real &  dh_dp,
Real &  dh_dT 
) const
overridevirtual

Definition at line 199 of file NaClFluidProperties.C.

201 {
202  // Correlation needs pressure in bar
203  Real pbar = pressure * 1.0e-5;
204  // Correlation requires temperature in Celcius
205  Real Tc = temperature - _T_c2k;
206  // Triple point temperature of water (in C)
207  Real Tt = 273.16 - _T_c2k;
208  // Triple point presure of water (in bar)
209  Real pt = 611.657 * 1.0e-5;
210 
211  // Note: the enthalpy of halite is 0 at the triple point of water
212  h = 8.7664e2 * (Tc - Tt) + 6.4139e-2 * (Tc * Tc - Tt * Tt) +
213  8.8101e-5 * (Tc * Tc * Tc - Tt * Tt * Tt) + 44.14 * (pbar - pt);
214 
215  dh_dp = 44.14 * 1.0e-5;
216  dh_dT = 8.7664e2 + 2.0 * 6.4139e-2 * Tc + 3.0 * 8.8101e-5 * Tc * Tc;
217 }

◆ 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 NaClFluidProperties::k_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 161 of file NaClFluidProperties.C.

162 {
163  // Correlation requires temperature in Celcius
164  Real Tc = temperature - _T_c2k;
165 
166  return 6.82793 - 3.16584e-2 * Tc + 1.03451e-4 * Tc * Tc - 1.48207e-7 * Tc * Tc * Tc;
167 }

◆ k_from_p_T() [2/2]

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

Definition at line 170 of file NaClFluidProperties.C.

172 {
173  // Correlation requires temperature in Celcius
174  Real Tc = temperature - _T_c2k;
175 
176  k = 6.82793 - 3.16584e-2 * Tc + 1.03451e-4 * Tc * Tc - 1.48207e-7 * Tc * Tc * Tc;
177  dk_dp = 0.0;
178  dk_dT = -3.16584e-2 + 2.06902e-4 * Tc - 4.44621e-7 * Tc * Tc;
179 }

◆ molarMass()

Real NaClFluidProperties::molarMass ( ) const
overridevirtual

Fluid name.

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

Reimplemented from SinglePhaseFluidProperties.

Definition at line 43 of file NaClFluidProperties.C.

44 {
45  return _Mnacl;
46 }

◆ 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_T() [1/2]

Real NaClFluidProperties::rho_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 79 of file NaClFluidProperties.C.

80 {
81  // Correlation needs pressure in bar
82  Real pbar = pressure * 1.0e-5;
83  // Correlation requires temperature in Celcius
84  Real Tc = temperature - _T_c2k;
85 
86  // Halite density at 0 Pa
87  Real density_P0 = 2.17043e3 - 2.4599e-1 * Tc - 9.5797e-5 * Tc * Tc;
88 
89  // Halite density as a function of pressure
90  Real l = 5.727e-3 + 2.715e-3 * std::exp(Tc / 733.4);
91 
92  return density_P0 + l * pbar;
93 }

Referenced by e_from_p_T(), and rho_from_p_T().

◆ rho_from_p_T() [2/2]

void NaClFluidProperties::rho_from_p_T ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT 
) const
overridevirtual

Definition at line 96 of file NaClFluidProperties.C.

98 {
100 
101  // Correlation needs pressure in bar
102  Real pbar = pressure * 1.0e-5;
103  // Correlation requires temperature in Celcius
104  Real Tc = temperature - _T_c2k;
105 
106  // Halite density at 0 Pa
107  Real ddensity_P0_dT = -2.4599e-1 - 1.91594e-4 * Tc;
108 
109  Real l = 5.727e-3 + 2.715e-3 * std::exp(Tc / 733.4);
110  Real dl_dT = 2.715e-3 * std::exp(Tc / 733.4) / 733.4;
111 
112  drho_dp = l * 1.0e-5;
113  drho_dT = ddensity_P0_dT + dl_dT * pbar;
114 }

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

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Definition at line 39 of file FluidProperties.h.

39 {}

◆ threadJoin()

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

Definition at line 38 of file FluidProperties.h.

38 {}

◆ triplePointPressure()

Real NaClFluidProperties::triplePointPressure ( ) const
overridevirtual

Triple point pressure.

Returns
triple point pressure (Pa)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 67 of file NaClFluidProperties.C.

68 {
69  return _p_triple;
70 }

◆ triplePointTemperature()

Real NaClFluidProperties::triplePointTemperature ( ) const
overridevirtual

Triple point temperature.

Returns
triple point temperature (K)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 73 of file NaClFluidProperties.C.

74 {
75  return _T_triple;
76 }

◆ v_e_spndl_from_T()

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

Specific internal energy from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume

Reimplemented in IdealGasFluidProperties, and StiffenedGasFluidProperties.

Definition at line 292 of file SinglePhaseFluidProperties.C.

293 {
294  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
295 }

Referenced by IdealRealGasMixtureFluidProperties::v_from_p_T().

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

◆ _Mnacl

const Real NaClFluidProperties::_Mnacl
protected

NaCl molar mass (kg/mol)

Definition at line 91 of file NaClFluidProperties.h.

Referenced by molarMass().

◆ _p_critical

const Real NaClFluidProperties::_p_critical
protected

Critical pressure (Pa)

Definition at line 93 of file NaClFluidProperties.h.

Referenced by criticalPressure().

◆ _p_triple

const Real NaClFluidProperties::_p_triple
protected

Triple point pressure (Pa)

Definition at line 99 of file NaClFluidProperties.h.

Referenced by triplePointPressure().

◆ _R

const Real FluidProperties::_R = 8.3144598
staticinherited

◆ _rho_critical

const Real NaClFluidProperties::_rho_critical
protected

Critical density (kg/m^3)

Definition at line 97 of file NaClFluidProperties.h.

Referenced by criticalDensity().

◆ _T_c2k

const Real FluidProperties::_T_c2k
protectedinherited

◆ _T_critical

const Real NaClFluidProperties::_T_critical
protected

Critical temperature (K)

Definition at line 95 of file NaClFluidProperties.h.

Referenced by criticalTemperature().

◆ _T_triple

const Real NaClFluidProperties::_T_triple
protected

Triple point temperature (K)

Definition at line 101 of file NaClFluidProperties.h.

Referenced by cp_from_p_T(), and triplePointTemperature().

◆ 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(), IdealGasFluidProperties::cp_from_p_T(), IdealGasFluidProperties::cv_from_p_T(), StiffenedGasFluidProperties::e_from_p_rho(), IdealGasFluidProperties::e_from_p_rho(), StiffenedGasFluidProperties::e_from_p_T(), IdealGasFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::g_from_v_e(), IdealGasFluidProperties::g_from_v_e(), TabulatedFluidProperties::generateTabulatedData(), StiffenedGasFluidProperties::h_from_p_T(), IdealGasFluidProperties::h_from_p_T(), Water97FluidProperties::henryConstant(), IdealGasFluidProperties::k_from_p_T(), StiffenedGasFluidProperties::p_from_h_s(), IdealGasFluidProperties::p_from_h_s(), StiffenedGasFluidProperties::p_from_T_v(), IdealGasFluidProperties::p_from_T_v(), IdealGasFluidProperties::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(), IdealGasFluidProperties::rho_from_p_s(), StiffenedGasFluidProperties::rho_from_p_T(), IdealGasFluidProperties::rho_from_p_T(), SinglePhaseFluidProperties::rho_mu_from_p_T(), StiffenedGasFluidProperties::s_from_h_p(), IdealGasFluidProperties::s_from_h_p(), StiffenedGasFluidProperties::s_from_p_T(), IdealGasFluidProperties::s_from_p_T(), SimpleFluidProperties::s_from_p_T(), Water97FluidProperties::s_from_p_T(), TabulatedFluidProperties::s_from_p_T(), IdealGasFluidProperties::s_from_T_v(), StiffenedGasFluidProperties::s_from_v_e(), IdealGasFluidProperties::s_from_v_e(), 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 IdealGasFluidProperties::c_from_p_T(), IdealGasFluidProperties::c_from_v_e(), HeliumFluidProperties::c_from_v_e(), IdealGasFluidProperties::cp_from_p_T(), IdealGasFluidProperties::cv_from_p_T(), StiffenedGasFluidProperties::e_from_p_T(), IdealGasFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::e_from_T_v(), IdealGasFluidProperties::e_from_T_v(), StiffenedGasFluidProperties::g_from_v_e(), IdealGasFluidProperties::g_from_v_e(), StiffenedGasFluidProperties::h_from_p_T(), IdealGasFluidProperties::h_from_p_T(), StiffenedGasFluidProperties::h_from_T_v(), IdealGasFluidProperties::h_from_T_v(), Water97FluidProperties::henryConstant(), IdealGasFluidProperties::k_from_p_T(), HeliumFluidProperties::k_from_v_e(), IdealGasFluidProperties::mu_from_p_T(), StiffenedGasFluidProperties::p_from_T_v(), IdealGasFluidProperties::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(), IdealGasFluidProperties::rho_from_p_s(), StiffenedGasFluidProperties::rho_from_p_T(), IdealGasFluidProperties::rho_from_p_T(), SinglePhaseFluidProperties::rho_mu_from_p_T(), StiffenedGasFluidProperties::s_from_p_T(), IdealGasFluidProperties::s_from_p_T(), SimpleFluidProperties::s_from_p_T(), Water97FluidProperties::s_from_p_T(), TabulatedFluidProperties::s_from_p_T(), StiffenedGasFluidProperties::s_from_T_v(), IdealGasFluidProperties::s_from_T_v(), StiffenedGasFluidProperties::s_from_v_e(), IdealGasFluidProperties::s_from_v_e(), IdealGasFluidProperties::T_from_p_h(), Water97FluidProperties::T_from_p_h(), StiffenedGasFluidProperties::T_from_v_e(), IdealGasFluidProperties::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(), IdealGasFluidProperties::c_from_v_e(), HeliumFluidProperties::c_from_v_e(), StiffenedGasFluidProperties::cp_from_v_e(), IdealGasFluidProperties::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(), IdealGasFluidProperties::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(), IdealGasFluidProperties::e_from_v_h(), StiffenedGasFluidProperties::e_from_v_h(), StiffenedGasFluidProperties::g_from_v_e(), IdealGasFluidProperties::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(), IdealGasFluidProperties::p_from_T_v(), StiffenedGasFluidProperties::p_from_v_e(), IdealGasFluidProperties::p_from_v_e(), HeliumFluidProperties::p_from_v_e(), FlibeFluidProperties::p_from_v_e(), FlinakFluidProperties::p_from_v_e(), StiffenedGasFluidProperties::s_from_T_v(), IdealGasFluidProperties::s_from_T_v(), StiffenedGasFluidProperties::s_from_v_e(), IdealGasFluidProperties::s_from_v_e(), StiffenedGasFluidProperties::T_from_v_e(), IdealGasFluidProperties::T_from_v_e(), FlinakFluidProperties::T_from_v_e(), FlibeFluidProperties::T_from_v_e(), HeliumFluidProperties::T_from_v_e(), StiffenedGasFluidProperties::v_e_spndl_from_T(), IdealGasFluidProperties::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:
NaClFluidProperties::h_from_p_T
virtual Real h_from_p_T(Real pressure, Real temperature) const override
Definition: NaClFluidProperties.C:182
NaClFluidProperties::_p_triple
const Real _p_triple
Triple point pressure (Pa)
Definition: NaClFluidProperties.h:99
NaClFluidProperties::_rho_critical
const Real _rho_critical
Critical density (kg/m^3)
Definition: NaClFluidProperties.h:97
SinglePhaseFluidProperties::SinglePhaseFluidProperties
SinglePhaseFluidProperties(const InputParameters &parameters)
Definition: SinglePhaseFluidProperties.C:22
FluidProperties::_T_c2k
const Real _T_c2k
Conversion of temperature from Celsius to Kelvin.
Definition: FluidProperties.h:46
SinglePhaseFluidProperties::T
e e e e p h T T T T T T
Definition: SinglePhaseFluidProperties.h:177
NaClFluidProperties::e_from_p_T
virtual Real e_from_p_T(Real pressure, Real temperature) const override
Definition: NaClFluidProperties.C:117
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
NaClFluidProperties::_p_critical
const Real _p_critical
Critical pressure (Pa)
Definition: NaClFluidProperties.h:93
SinglePhaseFluidProperties::fluidPropError
void fluidPropError(Args... args) const
Definition: SinglePhaseFluidProperties.h:326
NS::temperature
const std::string temperature
Definition: NS.h:26
FluidProperties::_allow_imperfect_jacobians
const bool _allow_imperfect_jacobians
Flag to set unimplemented Jacobian entries to zero.
Definition: FluidProperties.h:48
NaClFluidProperties::_Mnacl
const Real _Mnacl
NaCl molar mass (kg/mol)
Definition: NaClFluidProperties.h:91
NaClFluidProperties::_T_critical
const Real _T_critical
Critical temperature (K)
Definition: NaClFluidProperties.h:95
SinglePhaseFluidProperties::p
e e e e p h p
Definition: SinglePhaseFluidProperties.h:167
NaClFluidProperties::rho_from_p_T
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
Definition: NaClFluidProperties.C:79
NaClFluidProperties::_T_triple
const Real _T_triple
Triple point temperature (K)
Definition: NaClFluidProperties.h:101
NS::pressure
const std::string pressure
Definition: NS.h:25
SinglePhaseFluidProperties::h
e e e e h
Definition: SinglePhaseFluidProperties.h:163