The thermodynamic behavior of a fluid in a tight reservoir differs from that in the conventional environment. A new phase equilibrium algorithm with capillary pressure is presented and formulated using the laws of thermodynamics. At a given temperature, volume, and moles with capillary pressure, this new algorithm is based on the Newton iteration and line search, which guarantees a global convergence. We obtain the Newton direction by utilizing the modified Cholesky factorization to ensure a descending direction and combine line search to facilitate the iterations in the feasible domain. The initial values of the new algorithm originate from Michelsen's two-sided method. All relevant derivatives are computed analytically and automatically through the Automatically Differentiable Expression Templates Library (ADETL), developed at Stanford University. The new algorithm is based on the Helmholtz free energy, and the corresponding energy surface will not be influenced by the pressure inequality between the liquid and vapor phases. We tested our algorithm on several fluids with different pore radii over a wide range of temperatures and total volumes, and no single calculation breakdown occurred. Meanwhile, the new algorithm can also determine the system phase status at a given temperature and pressure. We compared the results between the given temperature and volume and the given temperature and pressure. There is a dispute in effect of the derivatives of capillary pressure with respect to compositions on the phase equilibrium calculation in literature. We compared the results with and without the derivatives at a given temperature and volume and a given temperature and pressure. These results show that our new algorithm exhibits a good convergent performance and a robust solution even if the pore radius decreases to one nanometer, which indicates the potential of our algorithm for simulating the shale reservoir production process.

You can access this article if you purchase or spend a download.