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

Detailed Description

Definition at line 18 of file UNIFAC.h.

#include <UNIFAC.h>

Public Member Functions

 UNIFACMixture (const UNIFACLibrary::UNIFACParameterLibrary &library, const double T_r)
 
void set_interaction_parameters ()
 Set all the interaction parameters between groups. More...
 
void set_interaction_parameter (const std::size_t mgi1, const std::size_t mgi2, const std::string &parameter, const double value)
 
double get_interaction_parameter (const std::size_t mgi1, const std::size_t mgi2, const std::string &parameter)
 Get one of the mgi-mgi interaction pairs. More...
 
void set_mole_fractions (const std::vector< double > &z)
 Set the mole fractions of the components in the mixtures (not the groups) More...
 
const std::vector< double > & get_mole_fractions ()
 Get the mole fractions of the components in the mixtures (not the groups) More...
 
void set_temperature (const double T)
 Set the temperature of the components in the mixtures (not the groups) More...
 
double get_temperature () const
 Get the temperature. More...
 
double Psi (std::size_t sgi1, std::size_t sgi2) const
 
double theta_pure (std::size_t i, std::size_t sgi) const
 
void activity_coefficients (double tau, const std::vector< double > &z, std::vector< double > &gamma)
 
double ln_gamma_R (const double tau, std::size_t i, std::size_t itau)
 
std::size_t group_count (std::size_t i, std::size_t sgi) const
 
void add_component (const UNIFACLibrary::Component &comp)
 Add a component with the defined groups defined by (count, sgi) pairs. More...
 
void set_components (const std::string &identifier_type, std::vector< std::string > identifiers)
 
const std::vector< UNIFACLibrary::Component > & get_components ()
 
void set_pure_data ()
 Calculate the parameters X and theta for the pure components, which does not depend on temperature nor molar fraction. More...
 
void set_Q_k (const size_t sgi, const double value)
 Modify the surface parameter Q_k of the sub group sgi. More...
 
double get_Q_k (const size_t sgi) const
 Get the surface parameter Q_k of the sub group sgi. More...
 

Constructor & Destructor Documentation

◆ UNIFACMixture()

UNIFAC::UNIFACMixture::UNIFACMixture ( const UNIFACLibrary::UNIFACParameterLibrary library,
const double  T_r 
)
inline

Definition at line 54 of file UNIFAC.h.

Member Function Documentation

◆ activity_coefficients()

void UNIFAC::UNIFACMixture::activity_coefficients ( double  tau,
const std::vector< double > &  z,
std::vector< double > &  gamma 
)

Definition at line 218 of file UNIFAC.cpp.

◆ add_component()

void UNIFAC::UNIFACMixture::add_component ( const UNIFACLibrary::Component comp)

Add a component with the defined groups defined by (count, sgi) pairs.

Definition at line 250 of file UNIFAC.cpp.

◆ get_components()

const std::vector<UNIFACLibrary::Component>& UNIFAC::UNIFACMixture::get_components ( )
inline

Definition at line 98 of file UNIFAC.h.

◆ get_interaction_parameter()

double UNIFAC::UNIFACMixture::get_interaction_parameter ( const std::size_t  mgi1,
const std::size_t  mgi2,
const std::string &  parameter 
)

Get one of the mgi-mgi interaction pairs.

Definition at line 37 of file UNIFAC.cpp.

◆ get_mole_fractions()

const std::vector<double>& UNIFAC::UNIFACMixture::get_mole_fractions ( void  )
inline

Get the mole fractions of the components in the mixtures (not the groups)

Definition at line 71 of file UNIFAC.h.

◆ get_Q_k()

double UNIFAC::UNIFACMixture::get_Q_k ( const size_t  sgi) const

Get the surface parameter Q_k of the sub group sgi.

Modify the surface parameter Q_k of the sub group sgi.

Definition at line 324 of file UNIFAC.cpp.

◆ get_temperature()

double UNIFAC::UNIFACMixture::get_temperature ( ) const
inline

Get the temperature.

Definition at line 79 of file UNIFAC.h.

◆ group_count()

std::size_t UNIFAC::UNIFACMixture::group_count ( std::size_t  i,
std::size_t  sgi 
) const

Definition at line 122 of file UNIFAC.cpp.

◆ ln_gamma_R()

double UNIFAC::UNIFACMixture::ln_gamma_R ( const double  tau,
std::size_t  i,
std::size_t  itau 
)

Definition at line 201 of file UNIFAC.cpp.

◆ Psi()

double UNIFAC::UNIFACMixture::Psi ( std::size_t  sgi1,
std::size_t  sgi2 
) const

Definition at line 101 of file UNIFAC.cpp.

◆ set_components()

void UNIFAC::UNIFACMixture::set_components ( const std::string &  identifier_type,
std::vector< std::string >  identifiers 
)

Calculate the parameters X and theta for the pure components, which does not depend on temperature nor molar fraction

Definition at line 257 of file UNIFAC.cpp.

◆ set_interaction_parameter()

void UNIFAC::UNIFACMixture::set_interaction_parameter ( const std::size_t  mgi1,
const std::size_t  mgi2,
const std::string &  parameter,
const double  value 
)

Definition at line 25 of file UNIFAC.cpp.

◆ set_interaction_parameters()

void UNIFAC::UNIFACMixture::set_interaction_parameters ( )

Set all the interaction parameters between groups.

Parameters
subgroupsA vector of the set of the unique Group forming the mixture - these permutations represent the set of posisble binary interactions

Definition at line 3 of file UNIFAC.cpp.

◆ set_mole_fractions()

void UNIFAC::UNIFACMixture::set_mole_fractions ( const std::vector< double > &  z)

Set the mole fractions of the components in the mixtures (not the groups)

Calculations for each group in the total mixture

Now come back through and divide by the sum(z_i*count) for this fluid

Now come back through and divide by the sum(X*Q) for this fluid

Definition at line 55 of file UNIFAC.cpp.

◆ set_pure_data()

void UNIFAC::UNIFACMixture::set_pure_data ( )

Calculate the parameters X and theta for the pure components, which does not depend on temperature nor molar fraction.

Now come back through and divide by the total # groups for this fluid

Now come back through and divide by the sum(X*Q) for this fluid

Definition at line 275 of file UNIFAC.cpp.

◆ set_Q_k()

void UNIFAC::UNIFACMixture::set_Q_k ( const size_t  sgi,
const double  value 
)

Modify the surface parameter Q_k of the sub group sgi.

Re-calculate the parameters X and theta for the pure components, which does not depend on temperature nor molar fraction

Definition at line 310 of file UNIFAC.cpp.

◆ set_temperature()

void UNIFAC::UNIFACMixture::set_temperature ( const double  T)

Set the temperature of the components in the mixtures (not the groups)

Definition at line 136 of file UNIFAC.cpp.

◆ theta_pure()

double UNIFAC::UNIFACMixture::theta_pure ( std::size_t  i,
std::size_t  sgi 
) const

Definition at line 132 of file UNIFAC.cpp.


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