CoolProp  6.6.1dev
An open-source fluid property and humid air property database
Classes | Enumerations | Functions
CoolProp::SaturationSolvers Namespace Reference

Classes

struct  saturation_T_pure_Akasaka_options
 
struct  saturation_T_pure_options
 
struct  saturation_D_pure_options
 
struct  mixture_VLE_IO
 
struct  saturation_PHSU_pure_options
 
class  WilsonK_resid
 
struct  SuccessiveSubstitutionStep
 
struct  newton_raphson_twophase_options
 
class  newton_raphson_twophase
 A class to do newton raphson solver for mixture VLE for p,Q or T,Q. More...
 
struct  newton_raphson_saturation_options
 
class  newton_raphson_saturation
 A class to do newton raphson solver mixture bubble point and dew point calculations. More...
 
struct  PTflash_twophase_options
 
class  PTflash_twophase
 

Enumerations

enum  sstype_enum { imposed_T , imposed_p }
 

Functions

void saturation_D_pure (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl rhomolar, saturation_D_pure_options &options)
 
void saturation_T_pure (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl T, saturation_T_pure_options &options)
 
void saturation_T_pure_Akasaka (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl T, saturation_T_pure_Akasaka_options &options)
 
void saturation_T_pure_Maxwell (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl T, saturation_T_pure_Akasaka_options &options)
 
void saturation_PHSU_pure (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl specified_value, saturation_PHSU_pure_options &options)
 
void saturation_P_pure_1D_T (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl p, saturation_PHSU_pure_options &options)
 
void saturation_T_pure_1D_P (HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl T, saturation_T_pure_options &options)
 
void saturation_critical (HelmholtzEOSMixtureBackend &HEOS, CoolProp::parameters ykey, CoolPropDbl y)
 
void successive_substitution (HelmholtzEOSMixtureBackend &HEOS, const CoolPropDbl beta, CoolPropDbl T, CoolPropDbl p, const std::vector< CoolPropDbl > &z, std::vector< CoolPropDbl > &K, mixture_VLE_IO &options)
 
void x_and_y_from_K (CoolPropDbl beta, const std::vector< CoolPropDbl > &K, const std::vector< CoolPropDbl > &z, std::vector< CoolPropDbl > &x, std::vector< CoolPropDbl > &y)
 Extract the mole fractions of liquid (x) and vapor (y) given the bulk composition (z), vapor mole fraction and K-factors. More...
 
double saturation_preconditioner (HelmholtzEOSMixtureBackend &HEOS, double input_value, sstype_enum input_type, const std::vector< CoolPropDbl > &z)
 
double saturation_Wilson (HelmholtzEOSMixtureBackend &HEOS, double beta, double input_value, sstype_enum input_type, const std::vector< CoolPropDbl > &z, double guess)
 

Enumeration Type Documentation

◆ sstype_enum

Enumerator
imposed_T 
imposed_p 

Definition at line 41 of file VLERoutines.h.

Function Documentation

◆ saturation_critical()

void CoolProp::SaturationSolvers::saturation_critical ( HelmholtzEOSMixtureBackend HEOS,
CoolProp::parameters  ykey,
CoolPropDbl  y 
)

Definition at line 11 of file VLERoutines.cpp.

◆ saturation_D_pure()

void CoolProp::SaturationSolvers::saturation_D_pure ( HelmholtzEOSMixtureBackend HEOS,
CoolPropDbl  rhomolar,
saturation_D_pure_options options 
)

Definition at line 604 of file VLERoutines.cpp.

◆ saturation_P_pure_1D_T()

void CoolProp::SaturationSolvers::saturation_P_pure_1D_T ( HelmholtzEOSMixtureBackend HEOS,
CoolPropDbl  p,
saturation_PHSU_pure_options options 
)

Definition at line 121 of file VLERoutines.cpp.

◆ saturation_PHSU_pure()

void CoolProp::SaturationSolvers::saturation_PHSU_pure ( HelmholtzEOSMixtureBackend HEOS,
CoolPropDbl  specified_value,
saturation_PHSU_pure_options options 
)

Definition at line 162 of file VLERoutines.cpp.

◆ saturation_preconditioner()

double CoolProp::SaturationSolvers::saturation_preconditioner ( HelmholtzEOSMixtureBackend HEOS,
double  input_value,
sstype_enum  input_type,
const std::vector< CoolPropDbl > &  z 
)
inline

Definition at line 192 of file VLERoutines.h.

◆ saturation_T_pure()

void CoolProp::SaturationSolvers::saturation_T_pure ( HelmholtzEOSMixtureBackend HEOS,
CoolPropDbl  T,
saturation_T_pure_options options 
)

Definition at line 753 of file VLERoutines.cpp.

◆ saturation_T_pure_1D_P()

void CoolProp::SaturationSolvers::saturation_T_pure_1D_P ( HelmholtzEOSMixtureBackend HEOS,
CoolPropDbl  T,
saturation_T_pure_options options 
)

Definition at line 76 of file VLERoutines.cpp.

◆ saturation_T_pure_Akasaka()

void CoolProp::SaturationSolvers::saturation_T_pure_Akasaka ( HelmholtzEOSMixtureBackend HEOS,
CoolPropDbl  T,
saturation_T_pure_Akasaka_options options 
)

Definition at line 775 of file VLERoutines.cpp.

◆ saturation_T_pure_Maxwell()

void CoolProp::SaturationSolvers::saturation_T_pure_Maxwell ( HelmholtzEOSMixtureBackend HEOS,
CoolPropDbl  T,
saturation_T_pure_Akasaka_options options 
)

Definition at line 923 of file VLERoutines.cpp.

◆ saturation_Wilson()

double CoolProp::SaturationSolvers::saturation_Wilson ( HelmholtzEOSMixtureBackend HEOS,
double  beta,
double  input_value,
sstype_enum  input_type,
const std::vector< CoolPropDbl > &  z,
double  guess 
)
inline

Wilson gives the K-factor as

\[ \ln K_i = \ln\left(\frac{p_{c,i}}{p}\right)+5.373(1+\omega_i)\left(1-\frac{T_{c,i}}{T}\right) \]

From Rachford-Rice:

\[ \sum_i \frac{x_i(K_i-1)}{1 - \beta + \beta K_i} = 0 \]

When \(T\) is known for \(\beta=0$, \)p \(can be obtained from \f[ -1+\sum_i K_ix_i=0, \f] or \f[ p = \sum_i x_ip_{c,i}\exp(5.373(1+\omega_i)(1-T_{c,i}/T). \f] Or when \)@_fakenlT \( is known for \)\beta=1 \(, \)p

Definition at line 246 of file VLERoutines.h.

◆ successive_substitution()

void CoolProp::SaturationSolvers::successive_substitution ( HelmholtzEOSMixtureBackend HEOS,
const CoolPropDbl  beta,
CoolPropDbl  T,
CoolPropDbl  p,
const std::vector< CoolPropDbl > &  z,
std::vector< CoolPropDbl > &  K,
mixture_VLE_IO options 
)

Definition at line 1123 of file VLERoutines.cpp.

◆ x_and_y_from_K()

void CoolProp::SaturationSolvers::x_and_y_from_K ( CoolPropDbl  beta,
const std::vector< CoolPropDbl > &  K,
const std::vector< CoolPropDbl > &  z,
std::vector< CoolPropDbl > &  x,
std::vector< CoolPropDbl > &  y 
)

Extract the mole fractions of liquid (x) and vapor (y) given the bulk composition (z), vapor mole fraction and K-factors.

Parameters
betaVapor molar fraction [-]
KK-factors for the components [-]
zBulk molar composition [-]
xLiquid molar composition [-]
yVapor molar composition [-]

Definition at line 1114 of file VLERoutines.cpp.