Compositional flash calculations

The miscible flow models available in PorousFlow use a compositional flash to determine the amount of each fluid phase present for the given set of persistent primary variables using the Rachford-Rice equation (Rachford and Rice, 1952)

izi(Ki1)1+V(Ki1)=0, \sum_i \frac{z_i (K_i - 1)}{1 + V (K_i - 1)} = 0,(1) where ziz_i is the total mass fraction of fluid component ii summed over all fluid phases zi=αSαραxαiαSαρα,z_i = \frac{\sum_{\alpha} S_{\alpha} \rho_{\alpha} x_{\alpha}^{i}}{\sum_{\alpha} S_{\alpha} \rho_{\alpha}}, KiK_i is the equilibrium constant Ki=yixiK_i = \frac{y_i}{x_i} that relates the mass fraction of fluid component ii in the gas phase (yiy_i) to the mass fraction in the liquid phase (xix_i), and VV is the mass fraction of fluid in the gas phase, which for a two-phase model is V=SgρgSgρg+SlρlV = \frac{S_g \rho_g}{S_g \rho_g + S_l \rho_l} where SgS_g and SlS_l are the saturations of the gas and liquid phases, respectively, and ρg\rho_g and ρl\rho_l are the densities of the gas and liquid phases, respectively.

The Rachford-Rice equation, Eq. (1), is solved for VV, after which the unknown gas saturation can be calculated. The Rachford-Rice equation can be solved analytically for the case where there are two fluid components, whereby VV is V=zi(K1K0)(K11)(K11)(K01).V = \frac{z_i (K_1 - K_0) - (K_1 - 1)}{(K_1 - 1)(K_0 - 1)}.

For cases where there are more than two fluid components, however, Eq. (1) must be solved numerically. Fortunately, the Rachford-Rice equation has the nice numerical property that Eq. (1) is monotonically varying with VV, so that numerical solution requires only a few iterations, and is therefore numerically inexpensive.

Once the vapor mass fraction VV has been calculated, the mass fractions of fluid component ii in each phase can be calculated xi=zi(Ki1)V+1,yi=ziKi(Ki1)V+1.x_i = \frac{z_i}{(K_i - 1) V + 1}, \quad y_i = \frac{z_i K_i}{(K_i - 1) V + 1}.

References

  1. H. H. Rachford and J. D. Rice. Procedure for use of electrical digital computers in calculating flash vaporisation hydrocarbon equilibrium. Journal of Petroleum Technology, 4:327–328, 1952.[BibTeX]