Multiphase Equilibrium
Mathematical Formulation: From Energy Minimization to the Rachford-Rice Equation
Rachford-Rice Equation (Flash Calculation)
Variable: $\psi$ (Vapor Fraction)
1. Introduction: Nature Seeks Stability
Whether it is water evaporating from a glass or gas and liquid coexisting in a pressurized vessel, there is a strict, invisible rule governing these phenomena: "Multiphase Equilibrium."
Every system in nature, if left alone, transitions toward its "most comfortable state," which corresponds to the state of minimum energy. Finding this "stable point" is one of the grand themes in engineering, ranging from chemical plant design to advanced materials development.
In this article, we outline the process starting from the thermodynamic principle of "Energy Minimization," proceeding through the Method of Lagrange Multipliers, and finally deriving the "Rachford-Rice Equation," a fundamental equation in chemical engineering.
2. Thermodynamic Approach: Gibbs Free Energy
The indicator that must be minimized at equilibrium is the Gibbs Free Energy ($G$).
In a multicomponent system, the total Gibbs free energy $G_{total}$ is expressed as the sum of the products of the "Chemical Potential ($\mu$)" and the "Amount of Substance ($n$)" for each component.
Here, the chemical potential $\mu_i$ is defined as follows, including a logarithmic term (entropy term):
\[ \mu_i = \mu_i^\circ + RT \ln \frac{n_i}{N} \]The logarithmic term ($RT \ln \dots$) originates from entropy. It represents the property that "the lower the concentration (more dilute), the lower the potential (approaching $-\infty$)." This is the source of the driving force that causes substances to diffuse from "concentrated areas" to "dilute areas."
3. Derivation via Lagrange Multipliers
Simply minimizing $G$ is not enough. In a closed system, there is a Constraint (Mass Balance) that "the total amount of each component does not change."
The most powerful tool for solving "constrained minimization problems" is the Method of Lagrange Multipliers.
In a vapor-liquid two-phase system, the total moles $N_i$ of component $i$ is constant.
\[ g_i(n) = n_{i, Gas} + n_{i, Liq} - N_i = 0 \]Construct the Lagrangian function $\mathcal{L}$ by subtracting the product of the constraint $g_i$ and the Lagrange multiplier $\lambda_i$ from the objective function $G_{total}$.
\[ \mathcal{L} = \sum_{i} (n_{i, G} \mu_{i, G} + n_{i, L} \mu_{i, L}) - \sum_{i} \lambda_i (n_{i, G} + n_{i, L} - N_i) \]At the stable point (extremum), the partial derivatives with respect to each variable become zero. For example, differentiating with respect to the gas phase moles $n_{i, G}$:
\[ \frac{\partial \mathcal{L}}{\partial n_{i, G}} = \mu_{i, G} - \lambda_i = 0 \quad \Rightarrow \quad \mu_{i, G} = \lambda_i \]Similarly, for the liquid phase, $\mu_{i, L} = \lambda_i$.
As a result, via the multiplier $\lambda_i$, the following important conclusion is mathematically derived:
Starting from this physical condition, the practical vapor-liquid equilibrium constant $y_i = K_i x_i$ is defined.
4. The Rachford-Rice Equation
By combining the above equilibrium condition with the mass balance equations and introducing the variable "Vapor Fraction $\psi$" (the fraction of the system that is in the gas phase), we arrive at the Rachford-Rice equation.
\[ \sum_{i=1}^N \frac{z_i (K_i - 1)}{1 + \psi (K_i - 1)} = 0 \]Finding the solution $\psi$ to this equation is the goal of Flash Calculation (Vapor-Liquid Equilibrium calculation).
5. Simulation Conditions and Parameters
To obtain a specific numerical solution, we conducted a simulation using the following model and constants.
Model Used: Raoult's Law
The equilibrium constant $K_i$ is a function of temperature $T$ and pressure $P$. Assuming an ideal system, we adopted the following model using vapor pressure from the Antoine Equation.
\[ K_i(T) = \frac{P_i^{sat}(T)}{P_{sys}}, \quad \log_{10} P_i^{sat} = A_i - \frac{B_i}{T + C_i} \]($P_{sys}$: Total Pressure, $P_i^{sat}$: Vapor Pressure of pure component)
Simulation Conditions
- System: Methane (C1) / Ethane (C2) / Propane (C3) ternary system
- Total Pressure ($P_{sys}$): 20.265 bar
Feed Composition ($z_i$) and Antoine Constants ($A, B, C$):
| Component | Composition $z_i$ | A | B | C |
|---|---|---|---|---|
| Methane (C1) | 0.20 | 4.22 | 516.68 | 11.19 |
| Ethane (C2) | 0.30 | 4.50 | 663.70 | -16.64 |
| Propane (C3) | 0.50 | 4.53 | 803.81 | -24.79 |
(Antoine constants are converted for bar, K units)
6. Results
The results of solving the Rachford-Rice equation with the above constants using Pseudo-Transient Analysis are shown below.
The horizontal axis represents Temperature $T$ and the vertical axis represents Vapor Fraction $\psi$, tracking the phase transition from a pure liquid state to a pure gas state.
- Around -61.2℃: $\psi$ starts rising from 0, indicating the start of boiling (Bubble Point).
- -61.2℃ to -15.6℃: A transition region where the three components vaporize gradually due to differences in volatility.
- Around -15.6℃: $\psi$ reaches 1, indicating all liquid has evaporated (Dew Point).
By employing Pseudo-Transient Analysis incorporating the Penalty Method, we successfully obtained a continuous S-shaped solution curve. The solution remained within the physical domain ($0 \le \psi \le 1$) without divergence, even in regions of rapid phase change.
Analysis Environment
- SPICE: Mac SPICE3
- PC: MacBook
- OS: macOS Monterey 12.7.6
- CPU: 1.2GHz Dual-Core Intel Core m5
- RAM: 8GB
Given the scale of this calculation, convergence was instantaneous on the current PC environment, so detailed computation time measurements are omitted.