CoolProp
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

#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)
 Flash for given pressure and (molar) quality. More...
 
static void PQ_flash_with_guesses (HelmholtzEOSMixtureBackend &HEOS, const GuessesStructure &guess)
 Flash for given pressure and (molar) quality with guess values provided. More...
 
static void QT_flash_with_guesses (HelmholtzEOSMixtureBackend &HEOS, const GuessesStructure &guess)
 Flash for given temperature and (molar) quality with guess values provided. More...
 
static void PT_flash_with_guesses (HelmholtzEOSMixtureBackend &HEOS, const GuessesStructure &guess)
 Flash for given pressure and temperature with guess values provided for molar density. More...
 
static void QT_flash (HelmholtzEOSMixtureBackend &HEOS)
 Flash for given temperature and (molar) quality. More...
 
static void QS_flash (HelmholtzEOSMixtureBackend &HEOS)
 Flash for given molar entropy and (molar) quality. More...
 
static void DQ_flash (HelmholtzEOSMixtureBackend &HEOS)
 Flash for given molar density and (molar) quality. More...
 
static void HQ_flash (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl Tguess=-1)
 Flash for given molar enthalpy and (molar) quality. More...
 
static void PT_Q_flash_mixtures (HelmholtzEOSMixtureBackend &HEOS, parameters other, CoolPropDbl value)
 Flash for mixture given temperature or pressure and (molar) quality. More...
 
static void PT_flash (HelmholtzEOSMixtureBackend &HEOS)
 Flash for given pressure and temperature. More...
 
static void PT_flash_mixtures (HelmholtzEOSMixtureBackend &HEOS)
 Flash for given pressure and temperature for mixtures. More...
 
static double T_DP_PengRobinson (HelmholtzEOSMixtureBackend &HEOS, double rhomolar, double p)
 Use Peng-Robinson to get guess for temperature for given density and pressure.
 
static void DP_flash (HelmholtzEOSMixtureBackend &HEOS)
 Flash for given density and pressure. More...
 
static void solver_for_rho_given_T_oneof_HSU (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl T, CoolPropDbl value, parameters other)
 The flash routine for T given and one of H,S,U. More...
 
static void DHSU_T_flash (HelmholtzEOSMixtureBackend &HEOS, parameters other)
 A generic flash routine for the pairs (T,D), (T,H), (T,S), and (T,U). More...
 
static void HSU_P_flash (HelmholtzEOSMixtureBackend &HEOS, parameters other)
 A generic flash routine for the pairs (P,H), (P,S), and (P,U). More...
 
static void HSU_P_flash_singlephase_Newton (HelmholtzEOSMixtureBackend &HEOS, parameters other, CoolPropDbl T0, CoolPropDbl rhomolar0)
 The single-phase flash routine for the pairs (P,H), (P,S), and (P,U). More...
 
static void HSU_P_flash_singlephase_Brent (HelmholtzEOSMixtureBackend &HEOS, parameters other, CoolPropDbl value, CoolPropDbl Tmin, CoolPropDbl Tmax, phases phase)
 The single-phase flash routine for the pairs (P,H), (P,S), and (P,U). More...
 
static void HSU_D_flash_twophase (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl rhomolar_spec, parameters other, CoolPropDbl value)
 A generic flash routine for the pairs (D,H), (D,S), and (D,U) for twophase state. More...
 
static void HSU_D_flash (HelmholtzEOSMixtureBackend &HEOS, parameters other)
 A generic flash routine for the pairs (D,P), (D,H), (D,S), and (D,U). More...
 
static void HS_flash (HelmholtzEOSMixtureBackend &HEOS)
 A flash routine for (H,S) More...
 
static void HS_flash_generate_TP_singlephase_guess (HelmholtzEOSMixtureBackend &HEOS, double &T, double &p)
 Randomly generate a single phase set of inputs for T and p - searches entire single-phase region. More...
 
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

§ 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

§ DP_flash()

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

Flash for given density and pressure.

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

§ DQ_flash()

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

Flash for given molar density and (molar) quality.

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

§ 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

§ HS_flash()

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

A flash routine for (H,S)

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

§ 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

§ 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

§ 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

§ 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

§ 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

§ 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]

§ PQ_flash()

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

Flash for given pressure and (molar) quality.

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

§ 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

§ PT_flash()

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

Flash for given pressure and temperature.

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

§ 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

§ 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

§ 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

§ QS_flash()

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

Flash for given molar entropy and (molar) quality.

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

§ QT_flash()

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

Flash for given temperature and (molar) quality.

Parameters
HEOSThe HelmholtzEOSMixtureBackend to be used

§ 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

§ 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

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