CoolProp
6.6.0
An open-source fluid property and humid air property database
|
#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 ¶meter, const double value) |
double | get_interaction_parameter (const std::size_t mgi1, const std::size_t mgi2, const std::string ¶meter) |
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... | |
|
inline |
void UNIFAC::UNIFACMixture::activity_coefficients | ( | double | tau, |
const std::vector< double > & | z, | ||
std::vector< double > & | gamma | ||
) |
Definition at line 218 of file UNIFAC.cpp.
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.
|
inline |
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.
|
inline |
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.
|
inline |
std::size_t UNIFAC::UNIFACMixture::group_count | ( | std::size_t | i, |
std::size_t | sgi | ||
) | const |
Definition at line 122 of file UNIFAC.cpp.
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.
double UNIFAC::UNIFACMixture::Psi | ( | std::size_t | sgi1, |
std::size_t | sgi2 | ||
) | const |
Definition at line 101 of file UNIFAC.cpp.
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.
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.
void UNIFAC::UNIFACMixture::set_interaction_parameters | ( | ) |
Set all the interaction parameters between groups.
subgroups | A 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.
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.
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.
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.
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.
double UNIFAC::UNIFACMixture::theta_pure | ( | std::size_t | i, |
std::size_t | sgi | ||
) | const |
Definition at line 132 of file UNIFAC.cpp.