lib.PR78 module

class lib.EoS.Cubic.PR78.PR78(T, P, mezcla, **kwargs)[source]

Bases: PR

Peng-Robinson cubic equation of state

\[\begin{split}\begin{array}[t]{l} P = \frac{RT}{V-b}-\frac{a}{V\left(V+b\right)+b\left(V-b\right)}\\ a = 0.45747\frac{R^2T_c^2}{P_c}\alpha\\ b = 0.0778\frac{RT_c}{P_c}\\ \alpha^{0.5} = 1 + m\left(1-Tr^{0.5}\right)\\ m = 0.37464 + 1.54226\omega-0.26992\omega^2 if \omega < 0.491\\ m = 0.379642 + 1.48503\omega - 0.164423*\omega^2 + 0.016666*\omega^3\\ \end{array}\end{split}\]

Examples

Helmholtz energy formulation example for supplementary documentatión from [4]_, the critical parameter are override for the valued used in paper to get the values of test with high precision

>>> from lib.mezcla import Mezcla
>>> from lib import unidades
>>> from lib.compuestos import Componente
>>> ch4 = Componente(2)
>>> ch4.Tc, ch4.Pc, ch4.f_acent = 190.564, 4599200, 0.011
>>> o2 = Componente(47)
>>> o2.Tc, o2.Pc, o2.f_acent = 154.581, 5042800, 0.022
>>> ar = Componente(98)
>>> ar.Tc, ar.Pc, ar.f_acent = 150.687, 4863000, -0.002
>>> mix = Mezcla(5, customCmp=[ch4, o2, ar], caudalMolar=1,
...              fraccionMolar=[0.5, 0.3, 0.2])
>>> eq = PR78(800, 36451227.52066596, mix, R=8.3144598)
>>> fir = eq._phir(800, 5000, eq.yi)
>>> delta = 5000
>>> tau = 1/800
>>> print("fir: %0.15f" % (fir["fir"]))
fir: 0.084339749584296
>>> print("fird: %0.15f" % (fir["fird"]*delta))
fird: 0.096019116018396
>>> print("firt: %0.14f" % (fir["firt"]*tau))
firt: -0.10134978074971
>>> print("firdd: %0.15f" % (fir["firdd"]*delta**2))
firdd: 0.023611667278971
>>> print("firdt: %0.15f" % (fir["firdt"]*delta*tau))
firdt: -0.092099683110520
>>> print("firtt: %0.15f" % (fir["firtt"]*tau**2))
firtt: -0.078186052271240
>>> print("firddd: %0.16f" % (fir["firddd"]*delta**3))
firddd: 0.0017433108161805
>>> print("firddt: %0.15f" % (fir["firddt"]*delta**2*tau))
firddt: 0.015574974734224
>>> print("firdtt: %0.15f" % (fir["firdtt"]*delta*tau**2))
firdtt: -0.071050085995025
>>> print("firttt: %0.14f" % (fir["firttt"]*tau**3))
firttt: 0.11727907840686
_alfa(cmp, T)[source]

Custom expression for α

References