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

Common class for multiple component fluid properties using a pressure and temperature formulation. More...

#include <MultiComponentFluidProperties.h>

Inheritance diagram for MultiComponentFluidProperties:
[legend]

Public Member Functions

 MultiComponentFluidProperties (const InputParameters &parameters)
 
virtual ~MultiComponentFluidProperties ()
 
X X virtual X std::string fluidName () const
 Fluid name. More...
 
virtual Real rho (Real pressure, Real temperature, Real xmass) const
 
virtual void rho_dpTx (Real pressure, Real temperature, Real xmass, Real &rho, Real &drho_dp, Real &drho_dT, Real &drho_dx) const
 
virtual Real mu (Real pressure, Real temperature, Real xmass) const
 
virtual void mu_dpTx (Real pressure, Real temperature, Real xmass, Real &mu, Real &dmu_dp, Real &dmu_dT, Real &dmu_dx) const
 
virtual void rho_mu_from_p_T_X (Real pressure, Real temperature, Real xmass, Real &rho, Real &mu) const
 Density and viscosity. More...
 
virtual void rho_mu_from_p_T_X (DualReal pressure, DualReal temperature, DualReal xmass, DualReal &rho, DualReal &mu) const
 
virtual void rho_mu_from_p_T_X (Real pressure, Real temperature, Real xmass, Real &rho, Real &drho_dp, Real &drho_dT, Real &drho_dx, Real &mu, Real &dmu_dp, Real &dmu_dT, Real &dmu_dx) const
 Density and viscosity and their derivatives wrt pressure, temperature and mass fraction. More...
 
virtual void rho_mu (Real pressure, Real temperature, Real xmass, Real &rho, Real &mu) const
 
virtual void rho_mu_dpTx (Real pressure, Real temperature, Real xmass, Real &rho, Real &drho_dp, Real &drho_dT, Real &drho_dx, Real &mu, Real &dmu_dp, Real &dmu_dT, Real &dmu_dx) const
 
virtual Real h (Real pressure, Real temperature, Real xmass) const
 
virtual void h_dpTx (Real pressure, Real temperature, Real xmass, Real &h, Real &dh_dp, Real &dh_dT, Real &dh_dx) const
 
virtual Real cp (Real pressure, Real temperature, Real xmass) const
 
virtual Real e (Real pressure, Real temperature, Real xmass) const
 
virtual void e_dpTx (Real pressure, Real temperature, Real xmass, Real &e, Real &de_dp, Real &de_dT, Real &de_dx) const
 
virtual Real k (Real pressure, Real temperature, Real xmass) const
 
virtual const SinglePhaseFluidPropertiesgetComponent (unsigned int component) const
 Get UserObject for specified component. More...
 
virtual void execute () final
 
virtual void initialize () final
 
virtual void finalize () final
 
virtual void threadJoin (const UserObject &) final
 
virtual void subdomainSetup () final
 

Protected Attributes

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...
 
 p
 
 T
 
p
 
T
 
X X p
 
X X T
 
 propfunc (rho, p, T, X) propfunc(mu
 Compute a fluid property given for the state defined by three given properties. More...
 
propfunc (h, p, T, X) propfunc(cp
 
X X propfunc (e, p, T, X) propfunc(k
 

Detailed Description

Common class for multiple component fluid properties using a pressure and temperature formulation.

Definition at line 90 of file MultiComponentFluidProperties.h.

Constructor & Destructor Documentation

◆ MultiComponentFluidProperties()

MultiComponentFluidProperties::MultiComponentFluidProperties ( const InputParameters &  parameters)

Definition at line 20 of file MultiComponentFluidProperties.C.

21  : FluidProperties(parameters)
22 {
23 }
FluidProperties(const InputParameters &parameters)

◆ ~MultiComponentFluidProperties()

MultiComponentFluidProperties::~MultiComponentFluidProperties ( )
virtual

Definition at line 25 of file MultiComponentFluidProperties.C.

25 {}

Member Function Documentation

◆ cp()

Real MultiComponentFluidProperties::cp ( Real  pressure,
Real  temperature,
Real  xmass 
) const
virtual

Definition at line 153 of file MultiComponentFluidProperties.C.

154 {
155  mooseDeprecated(name(), ": cp() is deprecated. Use cp_from_p_T_X() instead");
156  return cp_from_p_T_X(pressure, temperature, xmass);
157 }
const std::string temperature
Definition: NS.h:26
const std::string name
Definition: Setup.h:21
const std::string pressure
Definition: NS.h:25

◆ e()

Real MultiComponentFluidProperties::e ( Real  pressure,
Real  temperature,
Real  xmass 
) const
virtual

Definition at line 160 of file MultiComponentFluidProperties.C.

Referenced by e_dpTx(), BrineFluidProperties::e_from_p_T_X(), BrineFluidProperties::haliteSolubility(), BrineFluidProperties::k_from_p_T_X(), and BrineFluidProperties::rho_from_p_T_X().

161 {
162  mooseDeprecated(name(), ": e() is deprecated. Use e_from_p_T_X() instead");
163  return e_from_p_T_X(pressure, temperature, xmass);
164 }
const std::string temperature
Definition: NS.h:26
const std::string name
Definition: Setup.h:21
const std::string pressure
Definition: NS.h:25

◆ e_dpTx()

void MultiComponentFluidProperties::e_dpTx ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  e,
Real &  de_dp,
Real &  de_dT,
Real &  de_dx 
) const
virtual

Definition at line 167 of file MultiComponentFluidProperties.C.

174 {
175  mooseDeprecated(name(), ": e_dpTx() is deprecated. Use e_from_p_T_X() instead");
176  e_from_p_T_X(pressure, temperature, xmass, e, de_dp, de_dT, de_dx);
177 }
const std::string temperature
Definition: NS.h:26
const std::string name
Definition: Setup.h:21
virtual Real e(Real pressure, Real temperature, Real xmass) const
const std::string pressure
Definition: NS.h:25

◆ 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 MultiComponentFluidProperties::fluidName ( ) const
virtual

Fluid name.

Returns
string representing fluid name

Reimplemented in BrineFluidProperties.

Definition at line 28 of file MultiComponentFluidProperties.C.

29 {
30  mooseError(name(), ": fluidName() is not implemented");
31 }
const std::string name
Definition: Setup.h:21

◆ getComponent()

const SinglePhaseFluidProperties & MultiComponentFluidProperties::getComponent ( unsigned int  component) const
virtual

Get UserObject for specified component.

Parameters
componentfluid component
Returns
reference to SinglePhaseFluidPropertiesPT UserObject for component

Reimplemented in BrineFluidProperties.

Definition at line 187 of file MultiComponentFluidProperties.C.

188 {
189  mooseError(name(), ": getComponent() is not implemented");
190 }
const std::string name
Definition: Setup.h:21

◆ h()

Real MultiComponentFluidProperties::h ( Real  pressure,
Real  temperature,
Real  xmass 
) const
virtual

Definition at line 133 of file MultiComponentFluidProperties.C.

Referenced by h_dpTx(), and BrineFluidProperties::h_from_p_T_X().

134 {
135  mooseDeprecated(name(), ": h() is deprecated. Use h_from_p_T_X() instead");
136  return h_from_p_T_X(pressure, temperature, xmass);
137 }
const std::string temperature
Definition: NS.h:26
const std::string name
Definition: Setup.h:21
const std::string pressure
Definition: NS.h:25

◆ h_dpTx()

void MultiComponentFluidProperties::h_dpTx ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  h,
Real &  dh_dp,
Real &  dh_dT,
Real &  dh_dx 
) const
virtual

Definition at line 140 of file MultiComponentFluidProperties.C.

147 {
148  mooseDeprecated(name(), ": h_dpTx() is deprecated. Use h_from_p_T_X() instead");
149  h_from_p_T_X(pressure, temperature, xmass, h, dh_dp, dh_dT, dh_dx);
150 }
virtual Real h(Real pressure, Real temperature, Real xmass) const
const std::string temperature
Definition: NS.h:26
const std::string name
Definition: Setup.h:21
const std::string pressure
Definition: NS.h:25

◆ initialize()

virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 35 of file FluidProperties.h.

35 {}

◆ k()

Real MultiComponentFluidProperties::k ( Real  pressure,
Real  temperature,
Real  xmass 
) const
virtual

Definition at line 180 of file MultiComponentFluidProperties.C.

181 {
182  mooseDeprecated(name(), ": k() is deprecated. Use k_from_p_T_X() instead");
183  return k_from_p_T_X(pressure, temperature, xmass);
184 }
const std::string temperature
Definition: NS.h:26
const std::string name
Definition: Setup.h:21
const std::string pressure
Definition: NS.h:25

◆ mu()

Real MultiComponentFluidProperties::mu ( Real  pressure,
Real  temperature,
Real  xmass 
) const
virtual

Definition at line 54 of file MultiComponentFluidProperties.C.

Referenced by mu_dpTx(), BrineFluidProperties::mu_from_p_T_X(), rho_mu(), rho_mu_dpTx(), and rho_mu_from_p_T_X().

55 {
56  mooseDeprecated(name(), ": mu() is deprecated. Use mu_from_p_T_X() instead");
57  return mu_from_p_T_X(pressure, temperature, xmass);
58 }
const std::string temperature
Definition: NS.h:26
const std::string name
Definition: Setup.h:21
const std::string pressure
Definition: NS.h:25

◆ mu_dpTx()

void MultiComponentFluidProperties::mu_dpTx ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT,
Real &  dmu_dx 
) const
virtual

Definition at line 61 of file MultiComponentFluidProperties.C.

68 {
69  mooseDeprecated(name(), ": mu_dpTx() is deprecated. Use mu_from_p_T_X() instead");
70  mu_from_p_T_X(pressure, temperature, xmass, mu, dmu_dp, dmu_dT, dmu_dx);
71 }
const std::string temperature
Definition: NS.h:26
virtual Real mu(Real pressure, Real temperature, Real xmass) const
const std::string name
Definition: Setup.h:21
const std::string pressure
Definition: NS.h:25

◆ propfunc() [1/3]

MultiComponentFluidProperties::propfunc ( rho  ,
p  ,
T  ,
 
)

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

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

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

p pressure [Pa] T temperature [K] X solute mass fraction [-] e specific internal energy [J/kg] rho density [kg/m^3] h specific enthalpy [J/kg] 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]

As an example:

// calculate desnity given pressure, temperature and solute mass fraction: auto density = your_fluid_properties_object.rho_from_p_T_X(p, T, X);

// or use the derivative variant: Real rho = 0; // density will be stored into here Real drho_dp = 0; // derivative will be stored into here Real drho_dT = 0; // derivative will be stored into here Real drho_dX = 0; // derivative will be stored into here your_fluid_properties_object.rho_from_p_T_X(p, T, X, rho, drho_dp, drho_dT, drho_dX);

Automatic differentiation (AD) support is provided through prop_from_p_T_X(DualReal p, DualReal T, DualReal X) versions of the functions where p, T and X must be ADReal/DualNumber's calculated using all AD-supporting values.

◆ propfunc() [2/3]

X MultiComponentFluidProperties::propfunc ( h  ,
p  ,
T  ,
 
)

◆ propfunc() [3/3]

X X MultiComponentFluidProperties::propfunc ( e  ,
p  ,
T  ,
 
)

◆ rho()

Real MultiComponentFluidProperties::rho ( Real  pressure,
Real  temperature,
Real  xmass 
) const
virtual

Definition at line 34 of file MultiComponentFluidProperties.C.

Referenced by rho_dpTx(), BrineFluidProperties::rho_from_p_T_X(), rho_mu(), rho_mu_dpTx(), and rho_mu_from_p_T_X().

35 {
36  mooseDeprecated(name(), ": rho() is deprecated. Use rho_from_p_T_X() instead");
37  return rho_from_p_T_X(pressure, temperature, xmass);
38 }
const std::string temperature
Definition: NS.h:26
const std::string name
Definition: Setup.h:21
const std::string pressure
Definition: NS.h:25

◆ rho_dpTx()

void MultiComponentFluidProperties::rho_dpTx ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  drho_dx 
) const
virtual

Definition at line 41 of file MultiComponentFluidProperties.C.

48 {
49  mooseDeprecated(name(), ": rho_dpTx() is deprecated. Use rho_from_p_T_X() instead");
50  rho_from_p_T_X(pressure, temperature, xmass, rho, drho_dp, drho_dT, drho_dx);
51 }
const std::string temperature
Definition: NS.h:26
const std::string name
Definition: Setup.h:21
const std::string pressure
Definition: NS.h:25
virtual Real rho(Real pressure, Real temperature, Real xmass) const

◆ rho_mu()

void MultiComponentFluidProperties::rho_mu ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  rho,
Real &  mu 
) const
virtual

Definition at line 90 of file MultiComponentFluidProperties.C.

92 {
93  mooseDeprecated(name(), ": rho_mu() is deprecated. Use rho_mu_from_p_T_X() instead");
95 }
const std::string temperature
Definition: NS.h:26
virtual Real mu(Real pressure, Real temperature, Real xmass) const
const std::string name
Definition: Setup.h:21
const std::string pressure
Definition: NS.h:25
virtual void rho_mu_from_p_T_X(Real pressure, Real temperature, Real xmass, Real &rho, Real &mu) const
Density and viscosity.
virtual Real rho(Real pressure, Real temperature, Real xmass) const

◆ rho_mu_dpTx()

void MultiComponentFluidProperties::rho_mu_dpTx ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  drho_dx,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT,
Real &  dmu_dx 
) const
virtual

Definition at line 115 of file MultiComponentFluidProperties.C.

126 {
127  mooseDeprecated(name(), ": rho_mu_dpTx() is deprecated. Use rho_mu_from_p_T_X() instead");
129  pressure, temperature, xmass, rho, drho_dp, drho_dT, drho_dx, mu, dmu_dp, dmu_dT, dmu_dx);
130 }
const std::string temperature
Definition: NS.h:26
virtual Real mu(Real pressure, Real temperature, Real xmass) const
const std::string name
Definition: Setup.h:21
const std::string pressure
Definition: NS.h:25
virtual void rho_mu_from_p_T_X(Real pressure, Real temperature, Real xmass, Real &rho, Real &mu) const
Density and viscosity.
virtual Real rho(Real pressure, Real temperature, Real xmass) const

◆ rho_mu_from_p_T_X() [1/3]

void MultiComponentFluidProperties::rho_mu_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  rho,
Real &  mu 
) const
virtual

Density and viscosity.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
xmassmass fraction (-)
[out]rhodensity (kg/m^3)

Definition at line 74 of file MultiComponentFluidProperties.C.

Referenced by rho_mu(), and rho_mu_dpTx().

76 {
77  rho = rho_from_p_T_X(pressure, temperature, xmass);
78  mu = mu_from_p_T_X(pressure, temperature, xmass);
79 }
const std::string temperature
Definition: NS.h:26
virtual Real mu(Real pressure, Real temperature, Real xmass) const
const std::string pressure
Definition: NS.h:25
virtual Real rho(Real pressure, Real temperature, Real xmass) const

◆ rho_mu_from_p_T_X() [2/3]

void MultiComponentFluidProperties::rho_mu_from_p_T_X ( DualReal  pressure,
DualReal  temperature,
DualReal  xmass,
DualReal &  rho,
DualReal &  mu 
) const
virtual

Definition at line 82 of file MultiComponentFluidProperties.C.

84 {
85  rho = rho_from_p_T_X(pressure, temperature, xmass);
86  mu = mu_from_p_T_X(pressure, temperature, xmass);
87 }
const std::string temperature
Definition: NS.h:26
virtual Real mu(Real pressure, Real temperature, Real xmass) const
const std::string pressure
Definition: NS.h:25
virtual Real rho(Real pressure, Real temperature, Real xmass) const

◆ rho_mu_from_p_T_X() [3/3]

void MultiComponentFluidProperties::rho_mu_from_p_T_X ( Real  pressure,
Real  temperature,
Real  xmass,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  drho_dx,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT,
Real &  dmu_dx 
) const
virtual

Density and viscosity and their derivatives wrt pressure, temperature and mass fraction.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
xmassmass fraction (-)
[out]rhodensity (kg/m^3)
[out]drho_dpderivative of density wrt pressure
[out]drho_dTderivative of density wrt temperature
[out]drho_dxderivative of density wrt mass fraction
[out]muviscosity (Pa.s)
[out]dmu_dpderivative of viscosity wrt pressure
[out]dmu_dTderivative of viscosity wrt temperature
[out]dmu_dxderivative of viscosity wrt mass fraction

Definition at line 98 of file MultiComponentFluidProperties.C.

109 {
110  rho_from_p_T_X(pressure, temperature, xmass, rho, drho_dp, drho_dT, drho_dx);
111  mu_from_p_T_X(pressure, temperature, xmass, mu, dmu_dp, dmu_dT, dmu_dx);
112 }
const std::string temperature
Definition: NS.h:26
virtual Real mu(Real pressure, Real temperature, Real xmass) const
const std::string pressure
Definition: NS.h:25
virtual Real rho(Real pressure, Real temperature, Real xmass) const

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

Member Data Documentation

◆ _allow_imperfect_jacobians

const bool FluidProperties::_allow_imperfect_jacobians
protectedinherited

Flag to set unimplemented Jacobian entries to zero.

Definition at line 45 of file FluidProperties.h.

Referenced by SinglePhaseFluidProperties::fluidPropError().

◆ _T_c2k

const Real FluidProperties::_T_c2k
protectedinherited

◆ p [1/3]

MultiComponentFluidProperties::p

◆ p [2/3]

X MultiComponentFluidProperties::p

Definition at line 146 of file MultiComponentFluidProperties.h.

◆ p [3/3]

X X MultiComponentFluidProperties::p

Definition at line 148 of file MultiComponentFluidProperties.h.

◆ T [1/3]

MultiComponentFluidProperties::T

◆ T [2/3]

X MultiComponentFluidProperties::T

Definition at line 146 of file MultiComponentFluidProperties.h.

◆ T [3/3]

X X MultiComponentFluidProperties::T

Definition at line 148 of file MultiComponentFluidProperties.h.


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