Base class for fluid properties of vapor mixtures. More...
#include <VaporMixtureFluidProperties.h>
Public Member Functions | |
VaporMixtureFluidProperties (const InputParameters ¶meters) | |
virtual | ~VaporMixtureFluidProperties () |
virtual unsigned int | getNumberOfSecondaryVapors () const =0 |
Returns the number of secondary vapors. More... | |
virtual Real | p_from_v_e (Real v, Real e, const std::vector< Real > &x) const =0 |
Pressure from specific volume and specific internal energy. More... | |
virtual void | p_from_v_e (Real v, Real e, const std::vector< Real > &x, Real &p, Real &dp_dv, Real &dp_de, std::vector< Real > &dp_dx) const =0 |
Pressure and its derivatives from specific volume and specific internal energy. More... | |
virtual Real | T_from_v_e (Real v, Real e, const std::vector< Real > &x) const =0 |
Temperature from specific volume and specific internal energy. More... | |
virtual void | T_from_v_e (Real v, Real e, const std::vector< Real > &x, Real &T, Real &dT_dv, Real &dT_de, std::vector< Real > &dT_dx) const =0 |
Temperature and its derivatives from specific volume and specific internal energy. More... | |
virtual Real | c_from_v_e (Real v, Real e, const std::vector< Real > &x) const =0 |
Speed of sound from specific volume and specific internal energy. More... | |
virtual void | c_from_v_e (Real v, Real e, const std::vector< Real > &x, Real &c, Real &dc_dv, Real &dc_de, std::vector< Real > &dc_dx) const =0 |
Speed of sound and its derivatives from specific volume and specific internal energy. More... | |
virtual Real | rho_from_p_T (Real p, Real T, const std::vector< Real > &x) const =0 |
Density from pressure and temperature. More... | |
virtual void | rho_from_p_T (Real p, Real T, const std::vector< Real > &x, Real &rho, Real &drho_dp, Real &drho_dT, std::vector< Real > &drho_dx) const =0 |
Density and its derivatives from pressure and temperature. More... | |
virtual Real | e_from_p_T (Real p, Real T, const std::vector< Real > &x) const =0 |
Specific internal energy from pressure and temperature. More... | |
virtual void | e_from_p_T (Real p, Real T, const std::vector< Real > &x, Real &e, Real &de_dp, Real &de_dT, std::vector< Real > &de_dx) const =0 |
Specific internal energy and its derivatives from pressure and temperature. More... | |
virtual Real | c_from_p_T (Real p, Real T, const std::vector< Real > &x) const =0 |
Sound speed from pressure and temperature. More... | |
virtual void | c_from_p_T (Real p, Real T, const std::vector< Real > &x, Real &c, Real &dc_dp, Real &dc_dT, std::vector< Real > &dc_dx) const =0 |
Sound speed and its derivatives from pressure and temperature. More... | |
virtual Real | cp_from_p_T (Real p, Real T, const std::vector< Real > &x) const =0 |
Isobaric (constant-pressure) specific heat from pressure and temperature. More... | |
virtual Real | cv_from_p_T (Real p, Real T, const std::vector< Real > &x) const =0 |
Isochoric (constant-volume) specific heat from pressure and temperature. More... | |
virtual Real | mu_from_p_T (Real p, Real T, const std::vector< Real > &x) const =0 |
Dynamic viscosity from pressure and temperature. More... | |
virtual Real | k_from_p_T (Real p, Real T, const std::vector< Real > &x) const =0 |
Thermal conductivity from pressure and temperature. More... | |
virtual Real | e_from_p_rho (Real p, Real rho, const std::vector< Real > &x) const =0 |
Specific internal energy from pressure and density. More... | |
virtual void | e_from_p_rho (Real p, Real rho, const std::vector< Real > &x, Real &e, Real &de_dp, Real &de_drho, std::vector< Real > &de_dx) const =0 |
Specific internal energy and its derivatives from pressure and density. More... | |
Real | primaryMassFraction (const std::vector< Real > &x) const |
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors. More... | |
virtual void | execute () final |
virtual void | initialize () final |
virtual void | finalize () final |
virtual void | threadJoin (const UserObject &) final |
virtual void | subdomainSetup () final |
Static Public Attributes | |
static const Real | _R = 8.3144598 |
Universal gas constant (J/mol/K) More... | |
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... | |
Base class for fluid properties of vapor mixtures.
Each interface, in addition to requiring 2 intensive thermodynamic properties, requires the mass fractions of N-1 vapors in the mixture, where N is the number of vapors in the mixture. The mass fraction of the remaining vapor is inferred from the fact that the mass fractions sum to unity.
Definition at line 27 of file VaporMixtureFluidProperties.h.
VaporMixtureFluidProperties::VaporMixtureFluidProperties | ( | const InputParameters & | parameters | ) |
Definition at line 21 of file VaporMixtureFluidProperties.C.
|
virtual |
Definition at line 26 of file VaporMixtureFluidProperties.C.
|
pure virtual |
Sound speed from pressure and temperature.
[in] | p | pressure |
[in] | T | temperature |
[in] | x | vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
Referenced by FluidPropertiesInterrogator::computeVaporMixture().
|
pure virtual |
Sound speed and its derivatives from pressure and temperature.
[in] | p | pressure |
[in] | T | temperature |
[in] | x | vapor mass fraction values |
[out] | c | sound speed |
[out] | dc_dp | derivative of sound speed w.r.t. pressure |
[out] | dc_dT | derivative of sound speed w.r.t. temperature |
[out] | dc_dx | derivative of sound speed w.r.t. vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
|
pure virtual |
Speed of sound from specific volume and specific internal energy.
[in] | v | specific volume |
[in] | e | specific internal energy |
[in] | x | vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
|
pure virtual |
Speed of sound and its derivatives from specific volume and specific internal energy.
[in] | v | specific volume |
[in] | e | specific internal energy |
[in] | x | vapor mass fraction values |
[out] | c | Speed of sound |
[out] | dc_dv | derivative of temperature w.r.t. specific volume |
[out] | dc_de | derivative of temperature w.r.t. specific internal energy |
[out] | dc_dx | derivative of temperature w.r.t. vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
|
pure virtual |
Isobaric (constant-pressure) specific heat from pressure and temperature.
[in] | p | pressure |
[in] | T | temperature |
[in] | x | vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
Referenced by FluidPropertiesInterrogator::computeVaporMixture().
|
pure virtual |
Isochoric (constant-volume) specific heat from pressure and temperature.
[in] | p | pressure |
[in] | T | temperature |
[in] | x | vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
Referenced by FluidPropertiesInterrogator::computeVaporMixture().
|
pure virtual |
Specific internal energy from pressure and density.
[in] | p | pressure |
[in] | rho | density |
[in] | x | vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
|
pure virtual |
Specific internal energy and its derivatives from pressure and density.
[in] | p | pressure |
[in] | rho | density |
[in] | x | vapor mass fraction values |
[out] | e | specific internal energy |
[out] | de_dp | derivative of specific internal energy w.r.t. pressure |
[out] | de_drho | derivative of specific internal energy w.r.t. density |
[out] | de_dx | derivative of specific internal energy w.r.t. vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
|
pure virtual |
Specific internal energy from pressure and temperature.
[in] | p | pressure |
[in] | T | temperature |
[in] | x | vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
Referenced by FluidPropertiesInterrogator::computeVaporMixture().
|
pure virtual |
Specific internal energy and its derivatives from pressure and temperature.
[in] | p | pressure |
[in] | T | temperature |
[in] | x | vapor mass fraction values |
[in] | x | vapor mass fraction values |
[out] | e | specific internal energy |
[out] | de_dp | derivative of specific internal energy w.r.t. pressure |
[out] | de_dT | derivative of specific internal energy w.r.t. temperature |
[out] | de_dx | derivative of specific internal energy w.r.t. vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
|
inlinefinalvirtualinherited |
Definition at line 34 of file FluidProperties.h.
|
inlinefinalvirtualinherited |
Definition at line 36 of file FluidProperties.h.
|
pure virtual |
Returns the number of secondary vapors.
Implemented in IdealRealGasMixtureFluidProperties.
Referenced by TwoPhaseNCGFluidProperties::getNumberOfNCGs().
|
inlinefinalvirtualinherited |
Definition at line 35 of file FluidProperties.h.
|
pure virtual |
Thermal conductivity from pressure and temperature.
[in] | p | pressure |
[in] | T | temperature |
[in] | x | vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
Referenced by FluidPropertiesInterrogator::computeVaporMixture().
|
pure virtual |
Dynamic viscosity from pressure and temperature.
[in] | p | pressure |
[in] | T | temperature |
[in] | x | vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
Referenced by FluidPropertiesInterrogator::computeVaporMixture().
|
pure virtual |
Pressure from specific volume and specific internal energy.
[in] | v | specific volume |
[in] | e | specific internal energy |
[in] | x | vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
Referenced by FluidPropertiesInterrogator::computeVaporMixture().
|
pure virtual |
Pressure and its derivatives from specific volume and specific internal energy.
[in] | v | specific volume |
[in] | e | specific internal energy |
[in] | x | vapor mass fraction values |
[out] | p | pressure |
[out] | dp_dv | derivative of pressure w.r.t. specific volume |
[out] | dp_de | derivative of pressure w.r.t. specific internal energy |
[out] | dp_dx | derivative of pressure w.r.t. vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
Real VaporMixtureFluidProperties::primaryMassFraction | ( | const std::vector< Real > & | x | ) | const |
Computes the mass fraction of the primary vapor given mass fractions of the secondary vapors.
This uses the relation
\[ \sum\limits_i^N x_i = 1 , \]
where the mass fractions \(x_i, i=2\ldots N\) correspond to the secondary vapors.
Definition at line 29 of file VaporMixtureFluidProperties.C.
Referenced by IdealRealGasMixtureFluidProperties::cp_from_p_T(), IdealRealGasMixtureFluidProperties::cp_from_T_v(), IdealRealGasMixtureFluidProperties::cv_from_p_T(), IdealRealGasMixtureFluidProperties::cv_from_T_v(), IdealRealGasMixtureFluidProperties::e_from_T_v(), IdealRealGasMixtureFluidProperties::k_from_p_T(), IdealRealGasMixtureFluidProperties::k_from_T_v(), IdealRealGasMixtureFluidProperties::mu_from_p_T(), IdealRealGasMixtureFluidProperties::mu_from_T_v(), IdealRealGasMixtureFluidProperties::p_from_T_v(), IdealRealGasMixtureFluidProperties::p_T_from_v_e(), IdealRealGasMixtureFluidProperties::s_from_T_v(), IdealRealGasMixtureFluidProperties::T_from_p_v(), IdealRealGasMixtureFluidProperties::v_from_p_T(), and IdealRealGasMixtureFluidProperties::xs_prim_from_p_T().
|
pure virtual |
Density from pressure and temperature.
[in] | p | pressure |
[in] | T | temperature |
[in] | x | vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
Referenced by FluidPropertiesInterrogator::computeVaporMixture().
|
pure virtual |
Density and its derivatives from pressure and temperature.
[in] | p | pressure |
[in] | T | temperature |
[in] | x | vapor mass fraction values |
[in] | x | vapor mass fraction values |
[out] | rho | density |
[out] | drho_dp | derivative of density w.r.t. pressure |
[out] | drho_dT | derivative of density w.r.t. temperature |
[out] | drho_dx | derivative of density w.r.t. vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
|
inlinefinalvirtualinherited |
Definition at line 39 of file FluidProperties.h.
|
pure virtual |
Temperature from specific volume and specific internal energy.
[in] | v | specific volume |
[in] | e | specific internal energy |
[in] | x | vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
Referenced by FluidPropertiesInterrogator::computeVaporMixture().
|
pure virtual |
Temperature and its derivatives from specific volume and specific internal energy.
[in] | v | specific volume |
[in] | e | specific internal energy |
[in] | x | vapor mass fraction values |
[out] | T | temperature |
[out] | dT_dv | derivative of temperature w.r.t. specific volume |
[out] | dT_de | derivative of temperature w.r.t. specific internal energy |
[out] | dT_dx | derivative of temperature w.r.t. vapor mass fraction values |
Implemented in IdealRealGasMixtureFluidProperties.
|
inlinefinalvirtualinherited |
Definition at line 38 of file FluidProperties.h.
|
protectedinherited |
Flag to set unimplemented Jacobian entries to zero.
Definition at line 48 of file FluidProperties.h.
Referenced by SinglePhaseFluidProperties::fluidPropError().
|
staticinherited |
Universal gas constant (J/mol/K)
Definition at line 42 of file FluidProperties.h.
Referenced by HelmholtzFluidProperties::c_from_p_T(), IdealGasFluidProperties::c_from_p_T(), HelmholtzFluidProperties::cp_from_p_T(), HelmholtzFluidProperties::cv_from_p_T(), HelmholtzFluidProperties::e_from_p_T(), HelmholtzFluidProperties::h_from_p_T(), HelmholtzFluidProperties::p_from_rho_T(), HelmholtzFluidProperties::rho_from_p_T(), IdealGasFluidProperties::rho_from_p_T(), and HelmholtzFluidProperties::s_from_p_T().
|
protectedinherited |
Conversion of temperature from Celsius to Kelvin.
Definition at line 46 of file FluidProperties.h.
Referenced by NaClFluidProperties::cp_from_p_T(), BrineFluidProperties::cp_from_p_T_X(), NaClFluidProperties::h_from_p_T(), BrineFluidProperties::h_from_p_T_X(), BrineFluidProperties::haliteSolubility(), NaClFluidProperties::k_from_p_T(), BrineFluidProperties::k_from_p_T_X(), BrineFluidProperties::mu_from_p_T_X(), CO2FluidProperties::partialDensity(), NaClFluidProperties::rho_from_p_T(), and BrineFluidProperties::rho_from_p_T_X().