CoolProp  6.6.0
An open-source fluid property and humid air property database
Classes | Static Public Member Functions | List of all members
CoolProp::FlashRoutines Class Reference

Detailed Description

This class is a friend class of HelmholtzEOSMixtureBackend, therefore the static methods contained in it have access to the private and protected variables in the HelmholtzEOSMixtureBackend instance.

In this way the Flash routines can be kept in their own separate file and not pollute the HelmholtzEOSMixtureBackend namespace

Definition at line 28 of file FlashRoutines.h.

#include <FlashRoutines.h>

Classes

struct  HS_flash_singlephaseOptions
 
struct  HS_flash_twophaseOptions
 

Static Public Member Functions

template<class T >
static T g_RachfordRice (const std::vector< T > &z, const std::vector< T > &lnK, T beta)
 
template<class T >
static T dgdbeta_RachfordRice (const std::vector< T > &z, const std::vector< T > &lnK, T beta)
 
static void PQ_flash (HelmholtzEOSMixtureBackend &HEOS)
 
static void PQ_flash_with_guesses (HelmholtzEOSMixtureBackend &HEOS, const GuessesStructure &guess)
 
static void QT_flash_with_guesses (HelmholtzEOSMixtureBackend &HEOS, const GuessesStructure &guess)
 
static void PT_flash_with_guesses (HelmholtzEOSMixtureBackend &HEOS, const GuessesStructure &guess)
 
static void QT_flash (HelmholtzEOSMixtureBackend &HEOS)
 
static void QS_flash (HelmholtzEOSMixtureBackend &HEOS)
 
static void DQ_flash (HelmholtzEOSMixtureBackend &HEOS)
 
static void HQ_flash (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl Tguess=-1)
 
static void PT_Q_flash_mixtures (HelmholtzEOSMixtureBackend &HEOS, parameters other, CoolPropDbl value)
 
static void PT_flash (HelmholtzEOSMixtureBackend &HEOS)
 
static void PT_flash_mixtures (HelmholtzEOSMixtureBackend &HEOS)
 
static double T_DP_PengRobinson (HelmholtzEOSMixtureBackend &HEOS, double rhomolar, double p)
 Use Peng-Robinson to get guess for temperature for given density and pressure. More...
 
static void DP_flash (HelmholtzEOSMixtureBackend &HEOS)
 
static void solver_for_rho_given_T_oneof_HSU (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl T, CoolPropDbl value, parameters other)
 
static void DHSU_T_flash (HelmholtzEOSMixtureBackend &HEOS, parameters other)
 
static void HSU_P_flash (HelmholtzEOSMixtureBackend &HEOS, parameters other)
 
static void HSU_P_flash_singlephase_Newton (HelmholtzEOSMixtureBackend &HEOS, parameters other, CoolPropDbl T0, CoolPropDbl rhomolar0)
 
static void HSU_P_flash_singlephase_Brent (HelmholtzEOSMixtureBackend &HEOS, parameters other, CoolPropDbl value, CoolPropDbl Tmin, CoolPropDbl Tmax, phases phase)
 
static void HSU_D_flash_twophase (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl rhomolar_spec, parameters other, CoolPropDbl value)
 
static void HSU_D_flash (HelmholtzEOSMixtureBackend &HEOS, parameters other)
 
static void HS_flash (HelmholtzEOSMixtureBackend &HEOS)
 
static void HS_flash_generate_TP_singlephase_guess (HelmholtzEOSMixtureBackend &HEOS, double &T, double &p)
 
static void HS_flash_singlephase (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl hmolar_spec, CoolPropDbl smolar_spec, HS_flash_singlephaseOptions &options)
 
static void HS_flash_twophase (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl hmolar_spec, CoolPropDbl smolar_spec, HS_flash_twophaseOptions &options)
 

Member Function Documentation

◆ dgdbeta_RachfordRice()

template<class T >
static T CoolProp::FlashRoutines::dgdbeta_RachfordRice ( const std::vector< T > &  z,
const std::vector< T > &  lnK,
beta 
)
inlinestatic

Definition at line 42 of file FlashRoutines.h.

◆ DHSU_T_flash()

void CoolProp::FlashRoutines::DHSU_T_flash ( HelmholtzEOSMixtureBackend HEOS,
parameters  other 
)
static

A generic flash routine for the pairs (T,D), (T,H), (T,S), and (T,U). Similar analysis is needed

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
otherThe index for the other input from CoolProp::parameters; allowed values are iDmolar, iHmolar, iSmolar, iUmolar

Definition at line 1768 of file FlashRoutines.cpp.

◆ DP_flash()

void CoolProp::FlashRoutines::DP_flash ( HelmholtzEOSMixtureBackend HEOS)
static

Flash for given density and pressure

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

Definition at line 185 of file FlashRoutines.cpp.

◆ DQ_flash()

void CoolProp::FlashRoutines::DQ_flash ( HelmholtzEOSMixtureBackend HEOS)
static

Flash for given molar density and (molar) quality

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

Definition at line 253 of file FlashRoutines.cpp.

◆ g_RachfordRice()

template<class T >
static T CoolProp::FlashRoutines::g_RachfordRice ( const std::vector< T > &  z,
const std::vector< T > &  lnK,
beta 
)
inlinestatic

Definition at line 32 of file FlashRoutines.h.

◆ HQ_flash()

void CoolProp::FlashRoutines::HQ_flash ( HelmholtzEOSMixtureBackend HEOS,
CoolPropDbl  Tguess = -1 
)
static

Flash for given molar enthalpy and (molar) quality

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
Tguess(optional) The guess temperature in K to start from, ignored if < 0

Definition at line 278 of file FlashRoutines.cpp.

◆ HS_flash()

void CoolProp::FlashRoutines::HS_flash ( HelmholtzEOSMixtureBackend HEOS)
static

A flash routine for (H,S)

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

Definition at line 1976 of file FlashRoutines.cpp.

◆ HS_flash_generate_TP_singlephase_guess()

void CoolProp::FlashRoutines::HS_flash_generate_TP_singlephase_guess ( HelmholtzEOSMixtureBackend HEOS,
double &  T,
double &  p 
)
static

Randomly generate a single phase set of inputs for T and p - searches entire single-phase region

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
TThe temperature in K
pThe pressure in Pa

Definition at line 1970 of file FlashRoutines.cpp.

◆ HS_flash_singlephase()

void CoolProp::FlashRoutines::HS_flash_singlephase ( HelmholtzEOSMixtureBackend HEOS,
CoolPropDbl  hmolar_spec,
CoolPropDbl  smolar_spec,
HS_flash_singlephaseOptions options 
)
static

Definition at line 1920 of file FlashRoutines.cpp.

◆ HS_flash_twophase()

void CoolProp::FlashRoutines::HS_flash_twophase ( HelmholtzEOSMixtureBackend HEOS,
CoolPropDbl  hmolar_spec,
CoolPropDbl  smolar_spec,
HS_flash_twophaseOptions options 
)
static

Definition at line 1886 of file FlashRoutines.cpp.

◆ HSU_D_flash()

void CoolProp::FlashRoutines::HSU_D_flash ( HelmholtzEOSMixtureBackend HEOS,
parameters  other 
)
static

A generic flash routine for the pairs (D,P), (D,H), (D,S), and (D,U). Similar analysis is needed

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
otherThe index for the other input from CoolProp::parameters; allowed values are iP, iHmolar, iSmolar, iUmolar

Something homogeneous to avoid flash calls

TODO: separate TL and TV for ppure

Definition at line 1053 of file FlashRoutines.cpp.

◆ HSU_D_flash_twophase()

void CoolProp::FlashRoutines::HSU_D_flash_twophase ( HelmholtzEOSMixtureBackend HEOS,
CoolPropDbl  rhomolar_spec,
parameters  other,
CoolPropDbl  value 
)
static

A generic flash routine for the pairs (D,H), (D,S), and (D,U) for twophase state. Similar analysis is needed

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
otherThe index for the other input from CoolProp::parameters; allowed values are iP, iHmolar, iSmolar, iUmolar

Definition at line 1014 of file FlashRoutines.cpp.

◆ HSU_P_flash()

void CoolProp::FlashRoutines::HSU_P_flash ( HelmholtzEOSMixtureBackend HEOS,
parameters  other 
)
static

A generic flash routine for the pairs (P,H), (P,S), and (P,U). Similar analysis is needed

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
otherThe index for the other input from CoolProp::parameters; allowed values are iHmolar, iSmolar, iUmolar

Definition at line 1520 of file FlashRoutines.cpp.

◆ HSU_P_flash_singlephase_Brent()

void CoolProp::FlashRoutines::HSU_P_flash_singlephase_Brent ( HelmholtzEOSMixtureBackend HEOS,
parameters  other,
CoolPropDbl  value,
CoolPropDbl  Tmin,
CoolPropDbl  Tmax,
phases  phase 
)
static

The single-phase flash routine for the pairs (P,H), (P,S), and (P,U). Similar analysis is needed

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
otherThe index for the other input from CoolProp::parameters; allowed values are iHmolar, iSmolar, iUmolar
valueThe value of the other input
TminThe lower temperature limit [K]
TmaxThe higher temperature limit [K]
phaseThe phase of the fluid that we should get back

Definition at line 1391 of file FlashRoutines.cpp.

◆ HSU_P_flash_singlephase_Newton()

void CoolProp::FlashRoutines::HSU_P_flash_singlephase_Newton ( HelmholtzEOSMixtureBackend HEOS,
parameters  other,
CoolPropDbl  T0,
CoolPropDbl  rhomolar0 
)
static

The single-phase flash routine for the pairs (P,H), (P,S), and (P,U). Similar analysis is needed

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
otherThe index for the other input from CoolProp::parameters; allowed values are iHmolar, iSmolar, iUmolar
T0The initial guess value for the temperature [K]
rhomolar0The initial guess value for the density [mol/m^3]

Definition at line 1301 of file FlashRoutines.cpp.

◆ PQ_flash()

void CoolProp::FlashRoutines::PQ_flash ( HelmholtzEOSMixtureBackend HEOS)
static

Flash for given pressure and (molar) quality

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

Definition at line 568 of file FlashRoutines.cpp.

◆ PQ_flash_with_guesses()

void CoolProp::FlashRoutines::PQ_flash_with_guesses ( HelmholtzEOSMixtureBackend HEOS,
const GuessesStructure guess 
)
static

Flash for given pressure and (molar) quality with guess values provided

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
guessThe GuessesStructure to be used

Definition at line 739 of file FlashRoutines.cpp.

◆ PT_flash()

void CoolProp::FlashRoutines::PT_flash ( HelmholtzEOSMixtureBackend HEOS)
static

Flash for given pressure and temperature

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

Definition at line 88 of file FlashRoutines.cpp.

◆ PT_flash_mixtures()

void CoolProp::FlashRoutines::PT_flash_mixtures ( HelmholtzEOSMixtureBackend HEOS)
static

Flash for given pressure and temperature for mixtures

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

Definition at line 15 of file FlashRoutines.cpp.

◆ PT_flash_with_guesses()

void CoolProp::FlashRoutines::PT_flash_with_guesses ( HelmholtzEOSMixtureBackend HEOS,
const GuessesStructure guess 
)
static

Flash for given pressure and temperature with guess values provided for molar density

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
guessThe GuessesStructure to be used

Definition at line 799 of file FlashRoutines.cpp.

◆ PT_Q_flash_mixtures()

void CoolProp::FlashRoutines::PT_Q_flash_mixtures ( HelmholtzEOSMixtureBackend HEOS,
parameters  other,
CoolPropDbl  value 
)
static

Flash for mixture given temperature or pressure and (molar) quality

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
otherThe parameter that is imposed, either iT or iP
valueThe value for the imposed parameter

Definition at line 824 of file FlashRoutines.cpp.

◆ QS_flash()

void CoolProp::FlashRoutines::QS_flash ( HelmholtzEOSMixtureBackend HEOS)
static

Flash for given molar entropy and (molar) quality

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

Definition at line 305 of file FlashRoutines.cpp.

◆ QT_flash()

void CoolProp::FlashRoutines::QT_flash ( HelmholtzEOSMixtureBackend HEOS)
static

Flash for given temperature and (molar) quality

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

Definition at line 342 of file FlashRoutines.cpp.

◆ QT_flash_with_guesses()

void CoolProp::FlashRoutines::QT_flash_with_guesses ( HelmholtzEOSMixtureBackend HEOS,
const GuessesStructure guess 
)
static

Flash for given temperature and (molar) quality with guess values provided

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
guessThe GuessesStructure to be used

Definition at line 766 of file FlashRoutines.cpp.

◆ solver_for_rho_given_T_oneof_HSU()

void CoolProp::FlashRoutines::solver_for_rho_given_T_oneof_HSU ( HelmholtzEOSMixtureBackend HEOS,
CoolPropDbl  T,
CoolPropDbl  value,
parameters  other 
)
static

The flash routine for T given and one of H,S,U

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used
TThe temperature
valueThe value for the other variable
otherThe index for the other input from CoolProp::parameters; allowed values are iDmolar, iHmolar, iSmolar, iUmolar

Definition at line 1622 of file FlashRoutines.cpp.

◆ T_DP_PengRobinson()

double CoolProp::FlashRoutines::T_DP_PengRobinson ( HelmholtzEOSMixtureBackend HEOS,
double  rhomolar,
double  p 
)
static

Use Peng-Robinson to get guess for temperature for given density and pressure.

Definition at line 161 of file FlashRoutines.cpp.


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