# (215d) Fast and Robust Three-Phase Free-Water Flash Calculations

#### AIChE Annual Meeting

#### 2021

#### 2021 Annual Meeting

#### Engineering Sciences and Fundamentals

#### Thermodynamic and Transport Properties Under Pressure

#### Monday, November 8, 2021 - 4:26pm to 4:45pm

The free-water flash (FWF) allows simpler and faster solutions than a full three-phase flash. However, in all approaches proposed previously for the FWF, the first-order successive substitution (SSI) method is used. SSI is robust but it may be extremely slow in some cases, thus it is not suitable for compositional simulators, in which the phase equilibrium problem must be solved a huge number of times. The purpose of this work is to develop an efficient and robust method for three-phase hydrocarbon-water equilibrium, suitable for compositional simulation. Second-order methods in a minimization of the Gibbs free energy framework are used rather than fixed point methods for solving a nonlinear system of equations. For the FWF, the Newton method is used to solve nc+1 equations (stationarity conditions); using mole numbers or the natural logarithms of equilibrium constants as independent variables.

In an outer loop, the equilibrium constants are updated, using a combined solution method, consisting in successive substitution iterations (SSI) in early iteration stages, followed by a switch to the second-order Newton method. The gradient vector and Hessian matrix are split into ideal and residual parts. The Jacobian matrix needs not to be assembled; a linear system is solved for mole numbers, then equilibrium constants are obtained by a simple matrix-vector product. The calculation procedure takes full advantage of symmetry at all stages (calculation of partial derivatives, building the Hessian matrix, linear system resolution and in restoring the positive definiteness of the Hessian matrix if some of its eigenvalues become negative). A modified Cholesky factorization ensures a descent direction even when the Hessian matrix is not positive definite (this procedure is reliable and more efficient than a switch-back to SSI iterations). An inexact line search using Wolfe criteria ensures a decrease of the Gibbs free energy at each iteration. A modified version is developed for the negative flash case, in which phase mole fractions are allowed to take values outside their physical range (leading to continuous derivatives at phase boundaries). In this case, partial derivatives are calculated with respect to mole fractions instead of mole numbers and some symmetry properties are lost. The expressions of analytical partial derivatives are given in both cases.

A Modified Rachford-Rice (MRR) equation is solved in an inner loop. It is shown that the MRR equation, earlier obtained by algebraic manipulations of the original Rachford-Rice (RR) equation, is exactly the zero-gradient condition in the minimization of the Gibbs free energy at fixed equilibrium constants under the FWF assumption. Convex transformations of the MRR equation are obtained using a change of variables and tight solution windows are defined, having very simple forms, depending only on feed composition and on the modified equilibrium constants giving the adjacent asymptotes bordering the feasible interval. With the proposed convex transformations, the Newton method can be used without interval-control and convergence is generally obtained in 2 to 5 iterations. Note that solving the MRR equation is as fast as solving a classical RR equation for two-phase flashes

The FWF approach is faster than conventional three-phase methods. The number of variables and equations is nc+1 in the FWF vs. 2nc in the full three-phase flash. The number of fugacity coefficients calculations is 2nc+1 in the FWF vs. 3nc in the full three-phase flash. In FWF, the MRR nonlinear equation is solved (using appropriate convex transformations for which the Newton method can be safely used, with no line search and no interval control), whilst in full three-phase flashes the resolution of a 2x2 nonlinear system of equations is required (with line search and feasibility check required in Newton iterations).

A new initialization strategy, simpler than those used in full three-phase VLW equilibrium and adapted to FWF is proposed, sequentially using phase stability testing and two-phase flash calculations and taking advantage of the simplified mathematical structure of the problem.

The proposed method is tested for several hydrocarbon-water mixtures in a broad range of pressure, temperature and composition conditions, focusing on the convergence behavior in the vicinity of boundaries of the three-phase domain and at near-critical conditions and proved to be robust and efficient (faster than previous FWF methods from the literature). Using the high quality initial guesses from phase stability testing, a limited number of SSI iterations is required and the Newton method converges typically in 3-6 iterations. In all test cases, the FWF assumption leads to highly accurate approximations of the exact solutions of a full three-phase flash. Finally, some limitations of the FWF approach are discussed. The proposed method is not model-dependent and any EoS can be used to describe the equilibrium phases. Second-order methods are used for first time in FWF calculations; together with the novel adapted sequential initialization strategy, the proposed approach is a strong candidate to be included in compositional simulators.