www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SinglePhaseFluidPropertiesPT Class Referenceabstract

Common class for single phase fluid properties using a pressure and temperature formulation. More...

#include <SinglePhaseFluidPropertiesPT.h>

Inheritance diagram for SinglePhaseFluidPropertiesPT:
[legend]

Public Member Functions

 SinglePhaseFluidPropertiesPT (const InputParameters &parameters)
 
virtual ~SinglePhaseFluidPropertiesPT ()
 
virtual std::string fluidName () const =0
 Fluid name. More...
 
virtual Real molarMass () const =0
 Molar mass. More...
 
virtual Real rho (Real pressure, Real temperature) const =0
 Density. More...
 
virtual void rho_dpT (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const =0
 Density and its derivatives wrt pressure and temperature. More...
 
virtual Real e (Real pressure, Real temperature) const =0
 Internal energy. More...
 
virtual void e_dpT (Real pressure, Real temperature, Real &e, Real &de_dp, Real &de_dT) const =0
 Internal energy and its derivatives wrt pressure and temperature. More...
 
virtual void rho_e_dpT (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &e, Real &de_dp, Real &de_dT) const =0
 Density and internal energy and their derivatives wrt pressure and temperature. More...
 
virtual Real c (Real pressure, Real temperature) const =0
 Speed of sound. More...
 
virtual Real cp (Real pressure, Real temperature) const =0
 Isobaric specific heat capacity. More...
 
virtual Real cv (Real pressure, Real temperature) const =0
 Isochoric specific heat. More...
 
virtual Real gamma (Real pressure, Real temperature) const
 Adiabatic index - ratio of specific heats. More...
 
virtual Real mu (Real pressure, Real temperature) const =0
 
virtual void mu_dpT (Real pressure, Real temperature, Real &mu, Real &dmu_dp, Real &dmu_dT) const =0
 
virtual Real mu_from_rho_T (Real density, Real temperature) const =0
 
virtual void mu_drhoT_from_rho_T (Real density, Real temperature, Real ddensity_dT, Real &mu, Real &dmu_drho, Real &dmu_dT) const =0
 Dynamic viscosity and its derivatives wrt density and temperature. More...
 
virtual Real k (Real pressure, Real temperature) const =0
 Thermal conductivity. More...
 
virtual void k_dpT (Real pressure, Real temperature, Real &k, Real &dk_dp, Real &dk_dT) const =0
 Thermal conductivity and its derivatives wrt pressure and temperature. More...
 
virtual Real k_from_rho_T (Real density, Real temperature) const =0
 Thermal conductivity as a function of density and temperature. More...
 
virtual Real s (Real pressure, Real temperature) const =0
 Specific entropy. More...
 
virtual Real h (Real p, Real T) const =0
 Specific enthalpy. More...
 
virtual void h_dpT (Real pressure, Real temperature, Real &h, Real &dh_dp, Real &dh_dT) const =0
 Enthalpy and its derivatives wrt pressure and temperature. More...
 
virtual Real beta (Real pressure, Real temperature) const =0
 Thermal expansion coefficient. More...
 
virtual Real henryConstant (Real temperature) const =0
 Henry's law constant for dissolution in water. More...
 
virtual void henryConstant_dT (Real temperature, Real &Kh, Real &dKh_dT) const =0
 Henry's law constant for dissolution in water and derivative wrt temperature. More...
 
virtual void execute () final
 
virtual void initialize () final
 
virtual void finalize () final
 

Protected Member Functions

virtual Real henryConstantIAPWS (Real temperature, Real A, Real B, Real C) const
 IAPWS formulation of Henry's law constant for dissolution in water From Guidelines on the Henry's constant and vapour liquid distribution constant for gases in H20 and D20 at high temperatures, IAPWS (2004) More...
 
virtual void henryConstantIAPWS_dT (Real temperature, Real &Kh, Real &dKh_dT, Real A, Real B, Real C) const
 IAPWS formulation of Henry's law constant for dissolution in water and derivative wrt temperature. More...
 

Protected Attributes

const Real _R
 Universal gas constant (J/mol/K) More...
 
const Real _T_c2k
 Conversion of temperature from Celcius to Kelvin. More...
 

Detailed Description

Common class for single phase fluid properties using a pressure and temperature formulation.

Definition at line 22 of file SinglePhaseFluidPropertiesPT.h.

Constructor & Destructor Documentation

SinglePhaseFluidPropertiesPT::SinglePhaseFluidPropertiesPT ( const InputParameters &  parameters)

Definition at line 19 of file SinglePhaseFluidPropertiesPT.C.

20  : FluidProperties(parameters), _R(8.3144598), _T_c2k(273.15)
21 {
22 }
FluidProperties(const InputParameters &parameters)
const Real _T_c2k
Conversion of temperature from Celcius to Kelvin.
const Real _R
Universal gas constant (J/mol/K)
SinglePhaseFluidPropertiesPT::~SinglePhaseFluidPropertiesPT ( )
virtual

Definition at line 24 of file SinglePhaseFluidPropertiesPT.C.

24 {}

Member Function Documentation

virtual Real SinglePhaseFluidPropertiesPT::beta ( Real  pressure,
Real  temperature 
) const
pure virtual

Thermal expansion coefficient.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
beta (1/K)

Implemented in CO2FluidProperties, TabulatedFluidProperties, Water97FluidProperties, NaClFluidProperties, MethaneFluidProperties, SimpleFluidProperties, and IdealGasFluidPropertiesPT.

Referenced by TabulatedFluidProperties::beta().

virtual Real SinglePhaseFluidPropertiesPT::c ( Real  pressure,
Real  temperature 
) const
pure virtual

Speed of sound.

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

Implemented in CO2FluidProperties, TabulatedFluidProperties, Water97FluidProperties, NaClFluidProperties, MethaneFluidProperties, SimpleFluidProperties, and IdealGasFluidPropertiesPT.

Referenced by TabulatedFluidProperties::c(), and FluidPropertiesMaterialPT::computeQpProperties().

virtual Real SinglePhaseFluidPropertiesPT::cp ( Real  pressure,
Real  temperature 
) const
pure virtual

Isobaric specific heat capacity.

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

Implemented in CO2FluidProperties, TabulatedFluidProperties, Water97FluidProperties, NaClFluidProperties, MethaneFluidProperties, SimpleFluidProperties, and IdealGasFluidPropertiesPT.

Referenced by FluidPropertiesMaterialPT::computeQpProperties(), BrineFluidProperties::cp(), TabulatedFluidProperties::cp(), and gamma().

virtual Real SinglePhaseFluidPropertiesPT::cv ( Real  pressure,
Real  temperature 
) const
pure virtual

Isochoric specific heat.

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

Implemented in CO2FluidProperties, TabulatedFluidProperties, Water97FluidProperties, NaClFluidProperties, MethaneFluidProperties, SimpleFluidProperties, and IdealGasFluidPropertiesPT.

Referenced by FluidPropertiesMaterialPT::computeQpProperties(), TabulatedFluidProperties::cv(), and gamma().

virtual Real SinglePhaseFluidPropertiesPT::e ( Real  pressure,
Real  temperature 
) const
pure virtual
virtual void SinglePhaseFluidPropertiesPT::e_dpT ( Real  pressure,
Real  temperature,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
pure virtual

Internal energy and its derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]einternal energy (J/kg)
[out]de_dpderivative of internal energy wrt pressure
[out]de_dTderivative of internal energy wrt temperature

Implemented in CO2FluidProperties, TabulatedFluidProperties, Water97FluidProperties, SimpleFluidProperties, NaClFluidProperties, IdealGasFluidPropertiesPT, and MethaneFluidProperties.

Referenced by PorousFlowSingleComponentFluid::computeQpProperties().

virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Definition at line 25 of file FluidProperties.h.

25 {}
virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Definition at line 27 of file FluidProperties.h.

27 {}
virtual std::string SinglePhaseFluidPropertiesPT::fluidName ( ) const
pure virtual
Real SinglePhaseFluidPropertiesPT::gamma ( Real  pressure,
Real  temperature 
) const
virtual

Adiabatic index - ratio of specific heats.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
gamma (-)

Definition at line 27 of file SinglePhaseFluidPropertiesPT.C.

Referenced by MethaneFluidProperties::c().

28 {
30 }
virtual Real cp(Real pressure, Real temperature) const =0
Isobaric specific heat capacity.
const std::string temperature
Definition: NS.h:25
virtual Real cv(Real pressure, Real temperature) const =0
Isochoric specific heat.
const std::string pressure
Definition: NS.h:24
virtual Real SinglePhaseFluidPropertiesPT::h ( Real  p,
Real  T 
) const
pure virtual
virtual void SinglePhaseFluidPropertiesPT::h_dpT ( Real  pressure,
Real  temperature,
Real &  h,
Real &  dh_dp,
Real &  dh_dT 
) const
pure virtual

Enthalpy and its derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]h(J/kg)
[out]dh_dpderivative of enthalpy wrt pressure
[out]dh_dTderivative of enthalpy wrt temperature

Implemented in CO2FluidProperties, Water97FluidProperties, TabulatedFluidProperties, NaClFluidProperties, SimpleFluidProperties, MethaneFluidProperties, and IdealGasFluidPropertiesPT.

Referenced by PorousFlowSingleComponentFluid::computeQpProperties().

virtual Real SinglePhaseFluidPropertiesPT::henryConstant ( Real  temperature) const
pure virtual

Henry's law constant for dissolution in water.

Parameters
temperaturefluid temperature (K)
Returns
Henry's constant

Implemented in Water97FluidProperties, CO2FluidProperties, TabulatedFluidProperties, NaClFluidProperties, SimpleFluidProperties, MethaneFluidProperties, and IdealGasFluidPropertiesPT.

Referenced by TabulatedFluidProperties::henryConstant(), and PorousFlowFluidStateWaterNCG::thermophysicalProperties().

virtual void SinglePhaseFluidPropertiesPT::henryConstant_dT ( Real  temperature,
Real &  Kh,
Real &  dKh_dT 
) const
pure virtual

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

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

Implemented in Water97FluidProperties, CO2FluidProperties, TabulatedFluidProperties, NaClFluidProperties, SimpleFluidProperties, MethaneFluidProperties, and IdealGasFluidPropertiesPT.

Referenced by TabulatedFluidProperties::henryConstant_dT(), and PorousFlowFluidStateWaterNCG::thermophysicalProperties().

Real SinglePhaseFluidPropertiesPT::henryConstantIAPWS ( Real  temperature,
Real  A,
Real  B,
Real  C 
) const
protectedvirtual

IAPWS formulation of Henry's law constant for dissolution in water From Guidelines on the Henry's constant and vapour liquid distribution constant for gases in H20 and D20 at high temperatures, IAPWS (2004)

Definition at line 33 of file SinglePhaseFluidPropertiesPT.C.

Referenced by MethaneFluidProperties::henryConstant(), and CO2FluidProperties::henryConstant().

34 {
35  Real Tr = temperature / 647.096;
36  Real tau = 1.0 - Tr;
37 
38  Real lnkh = A / Tr + B * std::pow(tau, 0.355) / Tr + C * std::pow(Tr, -0.41) * std::exp(tau);
39 
40  // The vapor pressure used in this formulation
41  std::vector<Real> a{-7.85951783, 1.84408259, -11.7866497, 22.6807411, -15.9618719, 1.80122502};
42  std::vector<Real> b{1.0, 1.5, 3.0, 3.5, 4.0, 7.5};
43  Real sum = 0.0;
44 
45  for (std::size_t i = 0; i < a.size(); ++i)
46  sum += a[i] * std::pow(tau, b[i]);
47 
48  return 22.064e6 * std::exp(sum / Tr) * std::exp(lnkh);
49 }
const std::string temperature
Definition: NS.h:25
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
void SinglePhaseFluidPropertiesPT::henryConstantIAPWS_dT ( Real  temperature,
Real &  Kh,
Real &  dKh_dT,
Real  A,
Real  B,
Real  C 
) const
protectedvirtual

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

Definition at line 52 of file SinglePhaseFluidPropertiesPT.C.

Referenced by MethaneFluidProperties::henryConstant_dT(), and CO2FluidProperties::henryConstant_dT().

54 {
55  Real pc = 22.064e6;
56  Real Tc = 647.096;
57 
58  Real Tr = temperature / Tc;
59  Real tau = 1.0 - Tr;
60 
61  Real lnkh = A / Tr + B * std::pow(tau, 0.355) / Tr + C * std::pow(Tr, -0.41) * std::exp(tau);
62  Real dlnkh_dT =
63  (-A / Tr / Tr - B * std::pow(tau, 0.355) / Tr / Tr - 0.355 * B * std::pow(tau, -0.645) / Tr -
64  0.41 * C * std::pow(Tr, -1.41) * std::exp(tau) - C * std::pow(Tr, -0.41) * std::exp(tau)) /
65  Tc;
66 
67  // The vapor pressure used in this formulation
68  std::vector<Real> a{-7.85951783, 1.84408259, -11.7866497, 22.6807411, -15.9618719, 1.80122502};
69  std::vector<Real> b{1.0, 1.5, 3.0, 3.5, 4.0, 7.5};
70  Real sum = 0.0;
71  Real dsum = 0.0;
72 
73  for (std::size_t i = 0; i < a.size(); ++i)
74  {
75  sum += a[i] * std::pow(tau, b[i]);
76  dsum += a[i] * b[i] * std::pow(tau, b[i] - 1.0);
77  }
78 
79  Real p = pc * std::exp(sum / Tr);
80  Real dp_dT = -p / Tc / Tr * (sum / Tr + dsum);
81 
82  // Henry's constant and its derivative wrt temperature
83  Kh = p * std::exp(lnkh);
84  dKh_dT = (p * dlnkh_dT + dp_dT) * std::exp(lnkh);
85 }
const std::string temperature
Definition: NS.h:25
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 26 of file FluidProperties.h.

26 {}
virtual Real SinglePhaseFluidPropertiesPT::k ( Real  pressure,
Real  temperature 
) const
pure virtual

Thermal conductivity.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
thermal conductivity (W/m/K)

Implemented in CO2FluidProperties, TabulatedFluidProperties, Water97FluidProperties, NaClFluidProperties, MethaneFluidProperties, SimpleFluidProperties, and IdealGasFluidPropertiesPT.

virtual void SinglePhaseFluidPropertiesPT::k_dpT ( Real  pressure,
Real  temperature,
Real &  k,
Real &  dk_dp,
Real &  dk_dT 
) const
pure virtual

Thermal conductivity and its derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]thermalconductivity (W/m/K)
[out]derivativeof thermal conductivity wrt pressure
[out]derivativeof thermal conductivity wrt temperature

Implemented in CO2FluidProperties, TabulatedFluidProperties, Water97FluidProperties, NaClFluidProperties, MethaneFluidProperties, SimpleFluidProperties, and IdealGasFluidPropertiesPT.

virtual Real SinglePhaseFluidPropertiesPT::k_from_rho_T ( Real  density,
Real  temperature 
) const
pure virtual

Thermal conductivity as a function of density and temperature.

Parameters
densityfluid density (kg/m^3)
temperaturefluid temperature (K)
Returns
thermal conductivity (W/m/K)

Implemented in CO2FluidProperties, TabulatedFluidProperties, Water97FluidProperties, NaClFluidProperties, MethaneFluidProperties, SimpleFluidProperties, and IdealGasFluidPropertiesPT.

Referenced by FluidPropertiesMaterialPT::computeQpProperties(), BrineFluidProperties::k_from_rho_T(), and TabulatedFluidProperties::k_from_rho_T().

virtual Real SinglePhaseFluidPropertiesPT::molarMass ( ) const
pure virtual
virtual Real SinglePhaseFluidPropertiesPT::mu ( Real  pressure,
Real  temperature 
) const
pure virtual
virtual void SinglePhaseFluidPropertiesPT::mu_dpT ( Real  pressure,
Real  temperature,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT 
) const
pure virtual
virtual void SinglePhaseFluidPropertiesPT::mu_drhoT_from_rho_T ( Real  density,
Real  temperature,
Real  ddensity_dT,
Real &  mu,
Real &  dmu_drho,
Real &  dmu_dT 
) const
pure virtual

Dynamic viscosity and its derivatives wrt density and temperature.

Parameters
densityfluid density (kg/m^3)
temperaturefluid temperature (K)
ddensity_dTderivative of density wrt temperature
[out]muviscosity (Pa.s)
[out]dmu_drhoderivative of viscosity wrt density
[out]dmu_dTderivative of viscosity wrt temperature

Implemented in TabulatedFluidProperties, Water97FluidProperties, NaClFluidProperties, SimpleFluidProperties, IdealGasFluidPropertiesPT, MethaneFluidProperties, and CO2FluidProperties.

Referenced by PorousFlowSingleComponentFluid::computeQpProperties(), TabulatedFluidProperties::mu_drhoT_from_rho_T(), BrineFluidProperties::mu_drhoTx(), PorousFlowFluidStateWaterNCG::thermophysicalProperties(), and PorousFlowFluidStateBrineCO2::thermophysicalProperties().

virtual Real SinglePhaseFluidPropertiesPT::mu_from_rho_T ( Real  density,
Real  temperature 
) const
pure virtual
virtual Real SinglePhaseFluidPropertiesPT::rho ( Real  pressure,
Real  temperature 
) const
pure virtual
virtual void SinglePhaseFluidPropertiesPT::rho_dpT ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT 
) const
pure virtual
virtual void SinglePhaseFluidPropertiesPT::rho_e_dpT ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
pure virtual

Density and internal energy and their derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]rhodensity (kg/m^3)
[out]drho_dpderivative of density wrt pressure
[out]drho_dTderivative of density wrt temperature
[out]einternal energy (J/kg)
[out]de_dpderivative of internal energy wrt pressure
[out]de_dTderivative of internal energy wrt temperature

Implemented in CO2FluidProperties, TabulatedFluidProperties, Water97FluidProperties, SimpleFluidProperties, NaClFluidProperties, IdealGasFluidPropertiesPT, and MethaneFluidProperties.

virtual Real SinglePhaseFluidPropertiesPT::s ( Real  pressure,
Real  temperature 
) const
pure virtual

Specific entropy.

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

Implemented in CO2FluidProperties, TabulatedFluidProperties, Water97FluidProperties, NaClFluidProperties, MethaneFluidProperties, SimpleFluidProperties, and IdealGasFluidPropertiesPT.

Referenced by FluidPropertiesMaterialPT::computeQpProperties(), and TabulatedFluidProperties::s().

Member Data Documentation

const Real SinglePhaseFluidPropertiesPT::_R
protected
const Real SinglePhaseFluidPropertiesPT::_T_c2k
protected

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