Phase Envelope Generator

Generate rigorous Pressure-Temperature (PT) phase envelopes using Peng-Robinson or SRK Equations of State to identify retrograde regions, cricondentherms, and cricondenbars.

Advertisement

Project Data


bara
°C

Gas Comp.

Total
Composition must equal 100% when assumption is off.
Duplicate gases detected in the list.
Solving Flash Equations...
PT Diagram & Critical Points
Water detected. Aqueous systems (VLLE) require specialized mixing rules. Envelope displayed is for vapor-liquid only.
Highly supercritical component (Tr > 5) detected. The phase envelope may be open or unbounded.
$T_{max}$ Cricondentherm -
$P_{max}$ Cricondenbar -
$Tc$ Critical Temp -
$Pc$ Critical Press -
Operating Point
Phase At operating T, P -
$\Delta T$ Distance to saturation (T) -
$\Delta P$ Distance to saturation (P) -
Advertisement

Engineering Reference & Technical Basis

1. Equations of State (EOS) & Mixing Rules

This application implements two foundational cubic equations of state: Peng-Robinson (PR, 1978) and Soave-Redlich-Kwong (SRK, 1972). The generalized cubic EOS form is:

$$ P = \frac{RT}{v - b} - \frac{a(T)}{v^2 + u b v + w b^2} $$

Where for PR: $u = 2, w = -1$ and for SRK: $u = 1, w = 0$.

The mixture parameters $a_{mix}$ and $b_{mix}$ are calculated using the classical van der Waals one-fluid mixing rules with binary interaction parameters ($k_{ij}$):

$$ a_{mix} = \sum_{i} \sum_{j} z_i z_j \sqrt{a_i a_j} (1 - k_{ij}) \quad \text{and} \quad b_{mix} = \sum_{i} z_i b_i $$
2. Supercritical Extrapolation (Boston-Mathias)

Standard EOS alpha functions ($\alpha$) decay incorrectly at high temperatures, which causes severe inaccuracies and solver collapse when computing mixtures with highly supercritical components like Hydrogen ($H_2$), Helium ($He$), or Nitrogen ($N_2$).

To resolve this, the Boston-Mathias (1980) extension is used for components where the reduced temperature $T_r > 1$. It forces the $\alpha$-function to extrapolate exponentially, preserving thermodynamic stability:

$$ \alpha_i(T) = \exp \left[ c_i \left( 1 - T_{r,i}^{d_i} \right) \right] $$

Where $d_i = 1 + m_i / 2$ and $c_i = 1 - 1/d_i$. This ensures both the function and its first derivative match the standard subcritical formulation perfectly at $T_r = 1$.

3. Phase Envelope Construction (Michelsen Continuation)

Traditional pressure-sweep algorithms fail at the cricondenbar (maximum pressure) and cricondentherm (maximum temperature) because the curve tangent becomes infinite relative to the search axis. This engine utilizes Michelsen's (1980) Arc-Length Continuation method. The phase boundary is treated as a continuous mathematical curve defined by a system of $N+2$ equations solved simultaneously via a multidimensional Newton-Raphson technique:

  • Fugacity Equality ($N$ equations): $\ln K_i + \ln \hat{\phi}_i^V(\vec{y}, T, P) - \ln \hat{\phi}_i^L(\vec{x}, T, P) = 0$
  • Rachford-Rice Mass Balance (1 eq): $\sum_{i} \frac{z_i (K_i - 1)}{1 + \beta (K_i - 1)} = 0 \quad$ (where $\beta=0$ for bubble, $\beta=1$ for dew)
  • Arc-length Step (1 eq): $X_{spec} - X_{spec}^{old} - \Delta S = 0$

The solver dynamically switches the independent specification variable ($X_{spec}$) between $\ln P$ and $\ln T$ depending on the tangential trajectory, allowing it to seamlessly navigate around the critical point without numerical discontinuities.

4. Operating Point Flash Calculation

The operating point state is determined using a rigorous isothermal (PT) flash algorithm. It solves the Rachford-Rice objective function for the vapor fraction ($\beta$) coupled with successive substitution (SS) of K-values.

$$ f(\beta) = \sum_{i=1}^{N} \frac{z_i (K_i - 1)}{1 + \beta (K_i - 1)} = 0 $$

The flash limits the solution bounds mathematically to accurately detect sub-cooled liquids ($\beta \le 0$) and superheated vapors ($\beta \ge 1$), ensuring reliable phase identification even outside the two-phase dome.

5. Literature References
  1. Peng, D. Y., & Robinson, D. B. (1976). "A New Two-Constant Equation of State." Industrial & Engineering Chemistry Fundamentals, 15(1), 59-64.
  2. Soave, G. (1972). "Equilibrium constants from a modified Redlich-Kwong equation of state." Chemical Engineering Science, 27(6), 1197-1203.
  3. Michelsen, M. L. (1980). "Calculation of phase envelopes and critical points for multicomponent mixtures." Fluid Phase Equilibria, 4(1-2), 1-10.
  4. Boston, J. F., & Mathias, P. M. (1980). "Phase equilibria in a third-generation process simulator." Proceedings of the 2nd International Conference on Phase Equilibria and Fluid Properties in the Chemical Industry, Berlin.
  5. Søreide, I., & Whitson, C. H. (1992). "Peng-Robinson predictions for hydrocarbons, CO2, N2, and H2S with ties to water." Fluid Phase Equilibria, 77, 217-240.