"The superancillary equation gives the co-existing liquid and vapor (orthobaric) densities as a function of temperature. The set of Chebyshev expansions was developed in https://pubs.acs.org/doi/abs/10.1021/acs.iecr.1c00847 . These superancillary equations are more accurate than iterative calculations in double precision arithmetic and also at least 10 times faster to calculate, and cannot fail in iterative routines, even extremely close to the critical point. \n",
"\n",
"The superancillary equation is only exposed for pure fluids to remove ambiguity when considering mixtures. The returned tuple is the liquid and vapor densities"
The quantities $a_m$ and $b_m$ are described (with exact solutions for the numerical coefficients) for each of these EOS in https://pubs.acs.org/doi/abs/10.1021/acs.iecr.1c00847.
The models in teqp are instantiated based on knowledge of the critical temperature, pressure, and acentric factor. Thereafter all quantities are obtained from derivatives of $\alpha^r$.
%% Cell type:code id:9a884dab tags:
``` python
importteqp
# Values taken from http://dx.doi.org/10.6028/jres.121.011
Tc_K=[190.564,154.581,150.687]
pc_Pa=[4599200,5042800,4863000]
acentric=[0.011,0.022,-0.002]
# Instantiate Peng-Robinson model
modelPR=teqp.canonical_PR(Tc_K,pc_Pa,acentric)
# Instantiate Soave-Redlich-Kwong model
modelSRK=teqp.canonical_SRK(Tc_K,pc_Pa,acentric)
```
%% Cell type:markdown id:615c7830 tags:
## Adjusting k_ij
Fine-tuned values of $k_{ij}$ can be provided when instantiating the model, for Peng-Robinson and SRK. A complete matrix of all the $k_{ij}$ values must be provided. This allows for asymmetric mixing models in which $k_{ij}\neq k_{ji}$.
%% Cell type:code id:a8c87890 tags:
``` python
k_12=0.01
kmat=[[0,k_12,0],[k_12,0,0],[0,0,0]]
teqp.canonical_PR(Tc_K,pc_Pa,acentric,kmat)
teqp.canonical_SRK(Tc_K,pc_Pa,acentric,kmat)
```
%% Output
<teqp.teqp.GenericCubic at 0x20b222799b0>
<teqp.teqp.GenericCubic at 0x18f604c3a70>
%% Cell type:markdown id:c3a62795 tags:
## Superancillary
The superancillary equation gives the co-existing liquid and vapor (orthobaric) densities as a function of temperature. The set of Chebyshev expansions was developed in https://pubs.acs.org/doi/abs/10.1021/acs.iecr.1c00847 . These superancillary equations are more accurate than iterative calculations in double precision arithmetic and also at least 10 times faster to calculate, and cannot fail in iterative routines, even extremely close to the critical point.
The superancillary equation is only exposed for pure fluids to remove ambiguity when considering mixtures. The returned tuple is the liquid and vapor densities