Methods in the pcsaft class
ThermoPack - 2.1.0
The pcsaft
class, found in addon/pycThermopack/thermopack/pcsaft.py
, inherits from the saft class, and is the interface to the
PC-SAFT Equation of State. This class implements utility methods to access mixing parameters etc.
Table of contents
Constructor
Methods to initialise PC-SAFT model.
Table of contents
__init__(self, comps=None, parameter_reference='Default', simplified=False, polar=False)
Initialize PC-SAFT model in thermopack If no components are specified, model must be initialized for specific components later by direct call to ‘init’. Model can at any time be re-initialized for new components or parameters by direct calls to ‘init’
Args:
comps (str, optional):
Comma separated list of component names
parameter_reference (str, optional):
Which parameters to use?. Defaults to “Default”.
simplified (bool):
Use simplified PC-SAFT (sPC-SAFT: 10.1021/ie020753p) (Default False)
polar (bool):
Use dipole and quadrupole contributions PCP-SAFT (10.1002/aic.10502, 10.1002/aic.10683 and 10.1021/jp072619u) (Default False)
init(self, comps, parameter_reference='Default', simplified=False, polar=False)
Initialize PC-SAFT model in thermopack
Args:
comps (str):
Comma separated list of component names
parameter_reference (str, optional):
Which parameters to use?. Defaults to “Default”.
simplified (bool):
Use simplified PC-SAFT (sPC-SAFT: 10.1021/ie020753p) (Default False)
polar (bool):
Use dipole and quadrupole contributions PCP-SAFT (10.1002/aic.10502, 10.1002/aic.10683 and 10.1021/jp072619u) (Default True)
Utility methods
Set- and get methods for interaction parameters, mixing parameters …
Table of contents
association_energy_density(self, temp, n_alpha, phi=None, phi_t=None, phi_n=None, phi_tt=None, phi_tn=None, phi_nn=None)
Calculate association functional of Sauer and Gross https://doi.org/10/f95br5
Args:
temp (float):
Temperature (K)
n_alpha (np.ndarray):
Weighted densities
phi (No type, optional):
Flag to activate calculation. Defaults to None.
phi_T (No type, optional):
Flag to activate calculation. Defaults to None.
phi_n (No type, optional):
Flag to activate calculation. Defaults to None.
phi_TT (No type, optional):
Flag to activate calculation. Defaults to None.
phi_Tn (No type, optional):
Flag to activate calculation. Defaults to None.
phi_nn (No type, optional):
Flag to activate calculation. Defaults to None.
Returns:
Optionally energy density and differentials
get_kij(self, c1, c2)
Get binary well depth interaction parameter
Args:
c1 (int):
Component one
c2 (int):
Component two
Returns:
kij (float):
Well depth interaction parameter
lng_ii(self, temp, volume, n, i, lng_t=None, lng_v=None, lng_n=None, lng_tt=None, lng_vv=None, lng_tv=None, lng_tn=None, lng_vn=None, lng_nn=None)
Calculate logarithm of the radial distribution function at contact given temperature, volume and mol numbers. Differentials are computed as functions of (T, V, n).
Args:
temp (float):
Temperature (K)
volume (float):
Volume (m3)
n (array_like):
Mol numbers (mol)
i (int):
FORTRAN component index
lng_t (No type, optional):
Flag to activate calculation. Defaults to None.
lng_v (No type, optional):
Flag to activate calculation. Defaults to None.
lng_n (No type, optional):
Flag to activate calculation. Defaults to None.
lng_tt (No type, optional):
Flag to activate calculation. Defaults to None.
lng_vv (No type, optional):
Flag to activate calculation. Defaults to None.
lng_tv (No type, optional):
Flag to activate calculation. Defaults to None.
lng_tn (No type, optional):
Flag to activate calculation. Defaults to None.
lng_vn (No type, optional):
Flag to activate calculation. Defaults to None.
lng_nn (No type, optional):
Flag to activate calculation. Defaults to None.
Returns:
ndarry:
Optionally differentials
set_kij(self, c1, c2, kij)
Set binary well depth interaction parameter
Args:
c1 (int):
Component one
c2 (int):
Component two
kij (float):
Well depth interaction parameter
get_pure_params(self, c)
Get pure fluid PC-SAFT parameters
Args:
c (int):
Component index (FORTRAN)
Returns:
m (float):
Mean number of segments
sigma (float):
Segment diameter (m)
eps_div_kb (float):
Well depth divided by Boltzmann’s constant (K)
eps (float):
Association energy (J/mol)
beta (float):
Association volume (-)
set_pure_params(self, c, m, sigma, eps_div_kb, eps=0.0, beta=0.0)
Set pure fluid PC-SAFT parameters
Args:
c (int):
Component index (FORTRAN)
m (float):
Mean number of segments
sigma (float):
Segment diameter (m)
eps_div_kb (float):
Well depth divided by Boltzmann’s constant (K)
eps (float):
Association energy (J/mol)
beta (float):
Association volume (-)