polykin.thermo.eos¤
Z_cubic_roots ¤
Z_cubic_roots(
u: float, w: float, A: float, B: float
) -> FloatVector
Find the compressibility factor roots of a cubic EOS.
\[\begin{gathered}
Z^3 + c_2 Z^2 + c_1 Z + c_0 = 0 \\
c_2 = -(1 + B - u B) \\
c_1 = A + w B^2 - u B - u B^2 \\
c_0 = -(A B + w B^2 + w B^3) \\
A = \frac{a_m P}{R^2 T^2} \\
B = \frac{b_m P}{R T}
\end{gathered}\]
| Equation | \(u\) | \(w\) |
|---|---|---|
| Redlich-Kwong | 1 | 0 |
| Soave | 1 | 0 |
| Peng-Robinson | 2 | -1 |
References
- RC Reid, JM Prausniz, and BE Poling. The properties of gases & liquids 4th edition, 1986, p. 42.
| PARAMETER | DESCRIPTION |
|---|---|
u
|
Parameter of polynomial equation.
TYPE:
|
w
|
Parameter of polynomial equation.
TYPE:
|
A
|
Parameter of polynomial equation.
TYPE:
|
B
|
Parameter of polynomial equation.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
FloatVector
|
Compressibility factor(s) of the coexisting phases. If there are two phases, the first result is the lowest value (liquid). |
Source code in src/polykin/thermo/eos/cubic.py
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 | |