A Unified Algorithm for Phase-Stability/Split Calculation for Multiphase Isobaric-Isothermal Flash

SPE Journal ◽  
2017 ◽  
Vol 23 (02) ◽  
pp. 498-521 ◽  
Author(s):  
Di Zhu ◽  
Sara Eghbali ◽  
Chandra Shekhar ◽  
Ryosuke Okuno

Summary The conventional method for multiphase flash is the sequential usage of phase-stability and phase-split calculations. Multiphase flash requires the conventional method to obtain multiple false solutions in phase-split calculations and correct them in phase-stability analysis. Improvement of the robustness and efficiency of multiphase flash is important for compositional flow simulation with complex phase behavior. This paper presents a new algorithm that solves for stationary points of the tangent-plane-distance (TPD) function defined at an equilibrium-phase composition for isobaric-isothermal (PT) flash. A solution from the new algorithm consists of two groups of stationary points: tangent and nontangent stationary points of the TPD function. Hence, equilibrium phases, at which the Gibbs free energy is tangent to the TPD function, are found as a subset of the solution. Unlike the conventional method, the new algorithm does not require finding false solutions for robust multiphase flash. The advantage of the new algorithm in terms of robustness is more pronounced for more-complex phase behavior, for which multiple local minima of the Gibbs free energy are present. Case studies show that the new algorithm converges to a lower Gibbs free energy compared with the conventional method for the complex fluids tested. It is straightforward to implement the algorithm because of the simple formulation, which also allows for an arbitrary number of iterative compositions. It can be robustly initialized even when no K value correlation is available for the fluid of interest. Although the main focus of this paper is on robust solution of multiphase flash, the new algorithm can be used to initialize a second-order convergent method in the vicinity of a solution.

SPE Journal ◽  
2012 ◽  
Vol 17 (04) ◽  
pp. 1221-1230 ◽  
Author(s):  
Chengwu Yuan ◽  
Gary A. Pope

Summary Simple methods, such as the use of density during compositional simulations, often fail to identify the phases correctly, and this can cause discontinuities in the computed relative permeability values. The results are then physically incorrect. Furthermore, numerical simulators often slow down or even stop because of discontinuities. There are many important applications in which the phase behavior can be single phase, gas/liquid, liquid/liquid, gas/ liquid/liquid, or gas/liquid/solid at different times in different gridblocks. Assigning physically correct phase identities during a compositional simulation turns out to be a difficult problem that has resisted a general solution for decades. We know that the intensive thermodynamic properties, such as molar Gibbs free energy, must be continuous, assuming local equilibrium, but this condition is difficult to impose in numerical simulators because of the discrete nature of the calculations. An alternative approach is to develop a relative permeability model that is continuous and independent of the phase numbers assigned by the flash calculation. Relative permeability is a function of saturation, but also composition, because composition affects the phase distribution in the pores (i.e., the wettability). The equilibrium distribution of fluids in pores corresponds to the minimum in the Gibbs free energy for the entire fluid/rock system, including interfaces. In general, however, this relationship is difficult to model from first principles. What we can easily do is calculate the molar Gibbs free energy (G) of each phase at reference compositions where the relative permeabilities are known or assumed to be known and then interpolate between these values by use of the G calculated during each timestep of the simulation. Relative permeability values calculated this way are unconditionally continuous for all possible phase-behavior changes, including even critical points. We tested the new relative permeability model on a variety of extremely difficult simulation problems with up to four phases, and it has not failed yet. We illustrate several of these applications.


1998 ◽  
Vol 1 (01) ◽  
pp. 36-42 ◽  
Author(s):  
Huanquan Pan ◽  
Abbas Firoozabadi

Summary The computational problems in reservoir fluid systems are mainly in the critical region and in liquid-liquid (LL), vapor-liquid-liquid (VLL), and higher-phase equilibria. The conventional methods to perform phase-equilibrium calculations with the equality of chemical potentials cannot guarantee a correct solution. In this study, we propose a simple method to calculate the equilibrium state by direct minimization of the Gibbs free energy of the system at constant temperature and pressure. We use the simulated annealing (SA) algorithm to perform the global minimization. Estimates of key parameters of the SA algorithm are also made for phase-behavior calculations. Several examples, including (1) VL equilibria in the critical region, (2) VLL equilibria for reservoir fluid systems, (3) VLL equilibria for an H2S-containing mixture, and (4) VL-multisolid equilibria for reservoir fluids, show the reliability of the method. Introduction Consider the multicomponent-multiphase flash at constant temperature and pressure sketched in Fig. 1. The equilibrium state (the right side of Fig. 1) consists of np phases; each Phase j consists of n1j,n2j,n3j,. . . nncj, moles. From the second law of thermodynamics, the equilibrium state is a state in which the Gibbs free energy of the system is a minimum. The minimum of Gibbs free energy is a sufficient and necessary condition for the equilibrium state. At constant temperature and pressure (note that all calculations will be performed at this condition), the Gibbs free energy of the system in Fig. 1 can be written asEquation 1 where Gj is the Gibbs free energy of Phase j, and G is the total Gibbs free energy of the system. When G is minimized with respect to nij (i=1, 2, . . ., nc; j=1, 2, . . ., np) subject to the following constraints:material balance of Component i,Equation 2the non-negative mole number of Component i in Phase j,Equation 3 The optimized values, ni(i=1, 2, . . ., nc; j=1, 2, . . ., np) are the mole numbers of the equilibrium state. The global minimization with the constraints is difficult to implement; as a consequence, direct minimization of the Gibbs free energy has not been widely applied. Conventional Approach for Phase-Equilibrium Calculations The equality of chemical potentials of each species in all phases is often used to perform the phase-equilibrium calculations:Equation 4 The number of equations in Eq. 4 is nc×(np-1), plus nc material-balance equations given by Eq. 2; a total of nc×np equations are provided. The mole numbers nij (i=1, 2, . . ., nc; j=1, 2, . . ., np) of the equilibrium state are determined by solving these nc×np nonlinear equations. The widely used solution methods are the successive substitution method through phase-equilibrium constants Ki (i=1, 2, . . ., nc) and direct application of the Newton method. Both approaches require an initial guess and work quite well for VL equilibria except in the near-critical region. In the critical region, the successive substitution becomes intolerably slow and the Newton method may fail when the initial guess is not close to the true solution. In LL and VLL equilibria, both methods may compute false solutions. The falseness is because Eq. 4 is only a necessary condition for an equilibrium state.1 The tangent-plane-distance (TPD) approach has been introduced to recognize the false solution.1,2 The concept of stability analysis is used to derive the TPD. Tangent-Plane-Distance Approach Suppose w is a given overall composition. The mathematical expression of the TPD function isEquation 5a where D(u) is the distance function between the Gibbs free energy surface and its tangent plane at composition w. When D(u) is minimized with respect to ui(i=1, 2, . . ., nc) subject toEquations 5b and 5c the optimized value, D*, provides the stability analysis of the mixture at composition w. If D* 0, the system is absolutely stable; if D*<0, the system is unstable. The optimized composition u* is a good approximation of the incipient phase composition. The application of TPD criterion improves the reliability of conventional-phase equilibrium by providing a guideline to judge that the mixture is absolutely stable. When unstable, a good initial composition u* strengthens the convergence of the Newton or the successive substitution methods. Unfortunately, the solution to Eq. 5 is also an optimization problem with constraints. Michelson2 has solved the problem by locating the stationary points of the TPD function. This approach needs to solve (nc-1) nonlinear equations. A good initial guess is required to avoid the trivial solution. Because not all stationary points can be found with this method, phase stability cannot always be guaranteed.3 Later, we will give an example of a CO2-crude system for which the approach of locating the stationary points misses the true solution in spite of its novelty and strengths. Several methods have been proposed to improve the calculation of the TPD function. These include homotopy-continuation,4 branch and bound3 and differential geometry, and the theory of differential equations.5


2010 ◽  
Vol 120 (2-3) ◽  
pp. 446-451 ◽  
Author(s):  
Shiyun Xiong ◽  
Weihong Qi ◽  
Baiyun Huang ◽  
Mingpu Wang ◽  
Yejun Li

SPE Journal ◽  
2017 ◽  
Vol 22 (05) ◽  
pp. 1519-1529 ◽  
Author(s):  
Ashwin Venkatraman ◽  
Birol Dindoruk ◽  
Hani Elshahawi ◽  
Larry W. Lake ◽  
Russell T. Johns

Summary Carbon dioxide (CO2) injection in oil reservoirs has the dual benefit of enhancing oil recovery from declining reservoirs and sequestering a greenhouse gas to combat climate change. CO2 injected in carbonate reservoirs, such as those found in the Middle East, can react with ions present in the brine and the solid calcite in the carbonate rocks. These geochemical reactions affect the overall mole numbers and, in some extreme cases, even the number of phases at equilibrium, affecting oil-recovery predictions obtained from compositional simulations. Hence, it is important to model the effect of geochemical reactions on a real-reservoir-fluid mixture during CO2 injection. In this study, the Gibbs free-energy function is used to integrate phase-behavior computations and geochemical reactions to find equilibrium composition. The Gibbs free-energy minimization method by use of elemental-balance constraint is used to obtain equilibrium composition arising out of phase and chemical equilibrium. The solid phase is assumed to be calcite, the hydrocarbon phases are characterized by use of the Peng-Robinson (PR) equation of state (EOS) (Robinson et al. 1985), and the aqueous-phase components are described by use of the Pitzer activity-coefficient model (Pitzer 1973). The binary-interaction parameters for the EOS and the activity-coefficient model are obtained by use of experimental data. The effect of the changes in phase behavior of a real-reservoir fluid with 22 components is presented in this paper. We observe that the changes in phase behavior of the resulting reservoir-fluid mixture in the presence of geochemical reactions depend on two factors: the volume ratio (and hence molar ratio) of the aqueous phase to the hydrocarbon phase and the salinity of the brine. These changes represent a maximum effect of geochemical reactions because all reactions are assumed to be at equilibrium. This approach can be adapted to any reservoir brine and hydrocarbon as long as the initial formation-water composition and their Gibbs free energy at standard states are known. The resultant model can be integrated in any reservoir simulator because any algorithm can be used for minimizing the Gibbs free-energy function of the entire system.


SPE Journal ◽  
2019 ◽  
Vol 24 (02) ◽  
pp. 579-595 ◽  
Author(s):  
Amir Salehi ◽  
Denis V. Voskov ◽  
Hamdi A. Tchelepi

Summary Enhanced-oil-recovery (EOR) processes involve complex flow, transport, and thermodynamic interactions; as a result, compositional simulation is necessary for accurate representation of the physics. Flow simulation of compositional systems with high-resolution reservoir models is computationally intensive because of the large number of unknowns and the strong nonlinear interactions. Thus, there is a great need for upscaling methods of compositional processes. The complex multiscale interactions between the phase behavior and the heterogeneities lie at the core of the difficulty in constructing consistent upscaling procedures. We use a mass-conservative formulation and introduce upscaled phase-molar-mobility functions for coarse-scale modeling of multiphase flow. These upscaled flow functions account for the subgrid effects caused by the absolute permeability and relative permeability variations, as well as the effects of compressibility. Upscaling of the phase behavior is performed as follows. We assume that instantaneous thermodynamic equilibrium is valid on the fine scale, and we derive coarse-scale equations in which the phase behavior may not necessarily be at equilibrium. The upscaled thermodynamic functions, which represent differences in the component fugacities, are used to account for the nonequilibrium effects on the coarse scale. We demonstrate that the upscaled phase-behavior functions transform the equilibrium phase space on the fine scale to a region of similar shape, but with tilted tie-lines on the coarse space. The numerical framework uses K-values that depend on the orientation of the tie-lines in the new nonequilibrium phase space and the sign of upscaled thermodynamic functions. The proposed methodology is applied to challenging gas-injection problems with large numbers of components and highly heterogeneous permeability fields. The K-value-based coarse-scale operator produces results that are in good agreement with the fine-scale solutions for the quantities of interest, including the component overall compositions and saturation distributions.


Author(s):  
Dennis Sherwood ◽  
Paul Dalby

Building on the previous chapter, this chapter examines gas phase chemical equilibrium, and the equilibrium constant. This chapter takes a rigorous, yet very clear, ‘first principles’ approach, expressing the total Gibbs free energy of a reaction mixture at any time as the sum of the instantaneous Gibbs free energies of each component, as expressed in terms of the extent-of-reaction. The equilibrium reaction mixture is then defined as the point at which the total system Gibbs free energy is a minimum, from which concepts such as the equilibrium constant emerge. The chapter also explores the temperature dependence of equilibrium, this being one example of Le Chatelier’s principle. Finally, the chapter links thermodynamics to chemical kinetics by showing how the equilibrium constant is the ratio of the forward and backward rate constants. We also introduce the Arrhenius equation, closing with a discussion of the overall effect of temperature on chemical equilibrium.


Sign in / Sign up

Export Citation Format

Share Document