a model for the helmholtz energy, specifically user for cryogenic fluids More...
#include <cl_GM_Helmholtz.hpp>
Public Member Functions | |
| Helmholtz (Gas &aParent, const string &aLabel) | |
| virtual | ~Helmholtz ()=default |
| const real & | T_min () const |
| minumum temperature for gas model ( triple point ) | |
| const real & | T_max () const |
| maximum temperature for gas model | |
| const real & | T_crit () const |
| critical temperature | |
| const real & | v_crit () const |
| critical volume | |
| virtual real | p_vap (const real T) const |
| virtual real | T_vap (const real p) const |
| real | hvap (const real T, const real p) const |
| vaporization enthalpy in J/kg | |
| real | phi (const real T, const real v) const |
| the main energy function, where phi = f / ( R * T ) | |
| real | p (const real T, const real v) const |
| pressure in Pa | |
| real | v (const real T, const real p) const |
| specific volume in m^3/kg | |
| real | T (const real p, const real v) const |
| temperature in K | |
| real | dpdv (const real T, const real v) const |
| real | dpdT (const real T, const real v) const |
| real | dvdT (const real T, const real v) const |
| real | u (const real T, const real p) const |
| real | h (const real T, const real p) const |
| real | s (const real T, const real p) const |
| real | cv (const real T, const real p) const |
| real | cp (const real T, const real p) const |
| real | w (const real T, const real p) const |
| speed of sound in m/s ( helmholtz only ) | |
| real | dsdT (const real T, const real p) const |
| real | dsdp (const real T, const real p) const |
| real | alpha (const real T, const real p) const |
| thermal expansion coefficient | |
| real | beta (const real T, const real p) const |
| isochoric stress coefficient | |
| real | kappa (const real T, const real p) const |
| isothermal compressibility coefficient | |
| void | remix () |
| this function remixes the cubic help gas | |
| void | eval_critical_point (real &T, real &p, real &v) const |
| return the critical point data | |
| void | update_Tv (const real T, const real v) const |
| reset all state variales | |
| void | update_Tp (const real T, const real p) const |
| const real & | phir () const |
| the main energy function, real gas contribution | |
| const real & | phir_d () const |
| const real & | phir_dd () const |
| const real & | phir_t () const |
| const real & | phir_tt () const |
| const real & | phir_dt () const |
Ideal gas contribution to the reduced Helmholtz energy | |
phi0 and its first and second derivatives with respect to tau. They take no arguments: the state is whatever update_Tp or update_Tv last set, and tau = T_crit / T and delta = v_crit / v are read from the cache. Each is evaluated once per state and then served from that cache. | |
| const real & | phi0 () const |
| const real & | phi0_t () const |
| const real & | phi0_tt () const |
| Public Member Functions inherited from belfem::gasmodels::EoS | |
| EoS (Gas &aParent) | |
| virtual | ~EoS ()=default |
| virtual real | d2pdT2 (const real T, const real v) const |
| virtual real | d2pdv2 (const real T, const real v) const |
| virtual real | hdep (const real T, const real p) const |
| virtual real | cpdep (const real T, const real p) const |
| virtual real | sdep (const real T, const real p) const |
| virtual real | dhdepdp (const real T, const real p) const |
| virtual real | dsdepdT (const real T, const real p) const |
| virtual real | dsdepdp (const real T, const real p) const |
| virtual real | hdep0 (const real T) const |
| virtual real | cpdep0 (const real T) const |
| virtual real | sdep0 (const real T) const |
| virtual real | dsdepdT0 (const real T) const |
| virtual real | v (const uint aIndex, const real T, const real p) const |
| virtual real | hdep (const uint aIndex, const real T, const real p) const |
| virtual real | cpdep (const uint aIndex, const real T, const real p) const |
| virtual real | pi (const real T, const real p) const |
| virtual real | dpidp (const real T, const real p) const |
| Gas * | parent () |
| expose the parent of this EoS | |
Protected Member Functions | |
| void | delete_cubic_eos () |
| void | set_critical_point_in_data_object () |
| void | set_reference_point () |
| void | set_reference_point (const real aTref, const real aPref) |
| void | init_Tvap_poly () |
| virtual real | pi_vap (const real T) const |
| virtual real | psi_vap (const real T) const |
| virtual real | dpvap_dT (const real T, const real aPvap, const real aPiVap) const |
| bool | is_liquid (const real T, const real p) const |
| virtual real | compute_phi0 () const |
| virtual real | compute_phir () const |
| virtual real | compute_phi0_t () const |
| virtual real | compute_phi0_tt () const |
| virtual real | compute_phir_d () const |
| virtual real | compute_phir_dd () const |
| virtual real | compute_phir_t () const |
| virtual real | compute_phir_tt () const |
| virtual real | compute_phir_dt () const |
Static Protected Member Functions | |
| static real | ipow (real x, uint n) |
| integer power by binary exponentiation, for the coefficient tables of the residual functions. | |
| static real | hpow (const real x, const real sqrt_x, const int n) |
| x^( n / 2 ) for a signed half integer exponent given as n = 2j. | |
Protected Attributes | |
| const string | mLabel |
| EoS_Cubic * | mCubicEoS = nullptr |
| Vector< real > | mNvap |
| Vector< real > | mKvap |
| Vector< real > | mTvap |
| Vector< real > | mVliq |
| initial solution for inversion of pvap | |
| real | mH0 = 0.0 |
| real | mS0 = 0.0 |
| real | mU0 = 0.0 |
| const real & | mTau = mHelmholtzVals[ BELFEM_HELMHOLTZ_TAU ] |
| const real & | mDelta = mHelmholtzVals[ BELFEM_HELMHOLTZ_DELTA ] |
| real | mTcrit = BELFEM_QUIET_NAN |
| critical temperature in K | |
| real | mPcrit = BELFEM_QUIET_NAN |
| critical pressure in Pa | |
| real | mRhocrit = BELFEM_QUIET_NAN |
| critical density in kg/m^3 | |
| real | mVcrit = BELFEM_QUIET_NAN |
| critical specific volume in m^3/kg | |
| real | mTtriple = BELFEM_QUIET_NAN |
| triple point in K | |
| real | mTmax = BELFEM_QUIET_NAN |
| maximum temperature of gas model in K | |
| real | mPmax = BELFEM_REAL_MAX |
| Protected Attributes inherited from belfem::gasmodels::EoS | |
| Gas & | mParent |
| gas object that owns this class | |
| Statevals & | mStatevals |
| statevals object | |
| const real & | mR |
| specific gas constant | |
| const real & | mM |
| molar mass in kg/Mol | |
a model for the helmholtz energy, specifically user for cryogenic fluids
|
virtualdefault |
thermal expansion coefficient
\( \alpha = \frac{1}{v} \left( \frac{\partial v}{\partial T}\right)_p \)
Reimplemented from belfem::gasmodels::EoS.
isochoric stress coefficient
\( \beta = \frac{1}{p} \left( \frac{\partial p}{\partial T}\right)_v \)
Reimplemented from belfem::gasmodels::EoS.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented from belfem::gasmodels::EoS.
Reimplemented from belfem::gasmodels::EoS.
|
protected |
Implements belfem::gasmodels::EoS.
Implements belfem::gasmodels::EoS.
|
protectedvirtual |
Reimplemented from belfem::gasmodels::EoS.
Reimplemented from belfem::gasmodels::EoS.
Reimplemented from belfem::gasmodels::EoS.
Reimplemented from belfem::gasmodels::EoS.
|
inlinestaticprotected |
x^( n / 2 ) for a signed half integer exponent given as n = 2j.
The square root is passed in so that the caller hoists it out of the loop over the coefficient table.
|
protected |
integer power by binary exponentiation, for the coefficient tables of the residual functions.
Measured on the 40 term methane table, building tau^t with hpow() instead of std::pow costs 109 ns against 605 ns. Note that std::pow is still used elsewhere in this class, in particular for the vapor pressure ancillary.
isothermal compressibility coefficient
\( \kappa = -\frac{1}{v} \left( \frac{\partial v}{\partial p}\right)_T \)
Reimplemented from belfem::gasmodels::EoS.
| T | vapor temperature in K |
Reimplemented from belfem::gasmodels::EoS.
the main energy function, where phi = f / ( R * T )
| T | temperature in K |
| v | mass specific volume in m^3/kg |
| const real & belfem::gasmodels::Helmholtz::phi0 | ( | ) | const |
| const real & belfem::gasmodels::Helmholtz::phi0_t | ( | ) | const |
| const real & belfem::gasmodels::Helmholtz::phi0_tt | ( | ) | const |
| const real & belfem::gasmodels::Helmholtz::phir | ( | ) | const |
the main energy function, real gas contribution
| const real & belfem::gasmodels::Helmholtz::phir_d | ( | ) | const |
| const real & belfem::gasmodels::Helmholtz::phir_dd | ( | ) | const |
| const real & belfem::gasmodels::Helmholtz::phir_dt | ( | ) | const |
| const real & belfem::gasmodels::Helmholtz::phir_t | ( | ) | const |
| const real & belfem::gasmodels::Helmholtz::phir_tt | ( | ) | const |
Reimplemented in belfem::gasmodels::EoS_Oxygen.
Reimplemented in belfem::gasmodels::EoS_Oxygen.
|
virtual |
this function remixes the cubic help gas
Reimplemented from belfem::gasmodels::EoS.
Reimplemented from belfem::gasmodels::EoS.
|
protected |
|
protected |
|
protected |
temperature in K
Implements belfem::gasmodels::EoS.
|
inline |
critical temperature
|
inline |
maximum temperature for gas model
|
inline |
minumum temperature for gas model ( triple point )
| p | vapor pressure in Pa |
Reimplemented from belfem::gasmodels::EoS.
reset all state variales
specific volume in m^3/kg
Implements belfem::gasmodels::EoS.
|
inline |
critical volume
speed of sound in m/s ( helmholtz only )
| T | |
| p |
Reimplemented from belfem::gasmodels::EoS.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
critical pressure in Pa
|
protected |
|
protected |
critical density in kg/m^3
|
protected |
|
protected |
|
protected |
critical temperature in K
|
protected |
maximum temperature of gas model in K
|
protected |
triple point in K
|
protected |
|
protected |
critical specific volume in m^3/kg