Rachford-Rice flash
Phase equilibriumThe vapor-fraction objective every isothermal two-phase flash solves — one nonlinear equation in the vapor fraction ψ, monotonic so Newton always converges.
Governing equation
- Vapor fraction (mol vapor / mol feed) — the unknown.
- Feed mole fraction of component i.
- Vapor-liquid equilibrium ratio y_i/x_i of component i (fixed for this flash).
Derivation
- 1
Component material balance: the feed splits into liquid (fraction 1−ψ) and vapor (fraction ψ).
- 2
Substitute the equilibrium relation y_i = K_i x_i and solve the balance for the liquid mole fraction x_i.
- 3
Both phase mole fractions must sum to one; subtracting the two summation constraints removes the trivial ψ-independent root and leaves a monotonic function.
- 4
Insert x_i to obtain the Rachford-Rice form — strictly decreasing in ψ, so a single root is bracketed and Newton converges globally.
Jacobian
The matrix of the residual vector with respect to the unknowns, at the representative operating point. Every value below is computed by the exact forward-mode autodiff engine the solver uses — click a non-zero cell to see the symbolic derivative, each one verified against that engine in our test suite. This is the block a Newton step factorizes.
| ∂/∂psi | |
|---|---|
| Rachford-Rice objective |
Shaded cells are non-zero (the sparsity pattern); blanks are structural zeros.
For the residual Rachford-Rice objective with respect to psi. This exact expression is asserted equal to the autodiff value in the test suite.
Operating point
Representative operating point — a real solution of this instance.
References
- Rachford, H.H. & Rice, J.D. (1952). Procedure for use of electronic digital computers in calculating flash vaporization hydrocarbon equilibrium. J. Petroleum Technology 4(10).
- Smith, Van Ness & Abbott, Introduction to Chemical Engineering Thermodynamics, 7th ed., §10.4.