Abstract
A new reduction method for mixture phase stability testing is proposed, consisting in Newton iterations with a particular set of independent variables and residual functions. The dimension of the problem does not depend on the number of components but on the number of components with nonzero binary interaction parameters in the equation of state. Numerical experiments show an improved convergence behavior, mainly for the domain located outside the stability test limit locus in the pressure–temperature plane, recommending the proposed method for any applications in which the problematic domain is crossed a very large number of times during simulations.
1 Introduction
Phase stability analysis is very important in process systems engineering and petroleum and gas reservoir, production and transport engineering. Phase stability testing assesses the state of a mixture at given specifications and is essential in the initialization of flash calculations, in checking the results of phase split calculations and in phase diagram construction. It consists in an unconstrained minimization of the tangent plane distance (TPD) function [1]. The stability test is performed in most cases at a given pressure and temperature, but many implementations using various other specifications were proposed [2,3].
The stability test limit locus (STLL) [45,6,7,] is an important underlying property of multicomponent system phase diagrams, because in its vicinity, the number of iterations for phase stability testing dramatically increases and divergence may occur. The Hessian matrix is singular at the STLL for a nontrivial trial phase composition. The cause of convergence problems in phase stability calculations in the single-phase state is the topology of the TPD surface, as explained in refs. [6,7]. At the STLL, the TPD surface exhibits a saddle point, and for conditions outside the STLL in the pressure–temperature plane at a given composition, the iterates have to cross a domain of indefiniteness of the Hessian matrix, starting from one of the two-sided initial guesses [7]. This makes stability testing in the vicinity of the STLL really challenging, and any gradient-based algorithm will experience difficulties in this region [56,7,8,].
The reduction methods [9,10], in which the solution is sought in the hyperspace defined by the reduction parameters, rather than in the compositional hyperspace, are very attractive alternatives to the conventional methods, especially for mixtures with many components, which can often be encountered in refining and chemical process simulators (mixtures may have hundreds of components, resulting from mixing several feeds) or in petroleum engineering applications. In the reduction methods, the number of independent variables does not depend on the number of components in the mixture but only on the number of components having nonzero binary interaction parameters (BIPs) in the equation of state (EoS) with the remaining ones. Reduced stability testing routines were included in several commercial and academic compositional reservoir simulators, in which thermodynamic equilibrium equations are coupled with equations of fluids flow through porous media and need to be solved a huge number of times for full-field simulations.
In this work, a new reduction method (which is an improved version of our previous formulation) for the phase stability problem is presented, consisting in Newton iterations (with a switch-back to successive substitution iterations [SSI], as a safety feature) with a new set of independent variables and residual functions. The paper is structured as follows: first, a previous reduction method for stability testing is recalled, and then, the proposed method is introduced and tested for several examples before concluding.
2 Phase stability testing using a reduction method
In conventional (in the compositional space) phase stability testing of an nc-component mixture of composition zi, Michelsen’s modified TPD function [1]
is minimized with respect to formal mole numbers of the trial phase (Yi), where φi is the fugacity coefficient.
A mixture is thermodynamically stable if D* is nonnegative for all feasible Y. The common procedure is to check the sign of D* at all calculated stationary points. In reduction methods, the nonideal part of the TPD function is expressed in terms of reduction parameters.
The M reduction parameters are defined as [10]
where q are the elements of the reduction matrix [10].
There are several procedures to achieve the reduction (to express the energy parameter A in the cubic EoS in terms of the reduction parameters of the form given by equation (2)) [9,10,11,12]. Here, the spectral decomposition of the matrix K with elements
and
where m is the rank of K (which is rank-deficient and usually m ≪ nc),
The last reduction parameter is the co-volume in the EoS (with M = m + 1 and
Since the EoS parameters, A and B, as well as
The reduction parameters were first used as independent variables in phase stability testing by Nichita et al. (2006) [13] (this method is denoted here by NBH). The M error equations are
in M unknowns,
where the index F stands for feed.
The Newton iteration equation is
where
From equation (7)
The solution of the linear system of equation (8) corresponds to a stationary point of D* [9]. The variables Q are bounded by
Extensive testing showed [5,13] that the NBL reduction method is very fast in the two-phase region (convergence starting directly with Newton iterations is unproblematic even very close to critical points, where 10 iterations are rarely exceeded). In the single-phase region, the number of iterations exhibits a peak strictly near the singularity and an erratic behavior in a domain (that becomes wider with the distance to the critical point) outside the STLL, where convergence may be slow and even problematic.
3 Proposed method
Let us define the vector
where
with
It was shown that a solution of equation (11) corresponds to a stationary point of the modified TPD function D* and honors the constraints in its minimization with respect to a specific set of variables, i.e., Y and
The error equations are
The linear system of M + 1 equations is
The elements of the Jacobian matrix are
where
and
The partial derivatives of the fugacity coefficients with respect to the reduction parameters can be found in ref. [8] for a general form of two-parameter cubic EoS, containing Peng-Robinson [14] EoS and the Soave [15] EoS; these derivatives have simpler forms than those required in conventional methods.
The block structure of the Jacobian matrix (the prime on the symbol of an array means here that the array contains only its first M elements) is
Using simple linear algebra operations, it can be shown that an equivalent problem consists in first solving the linear system of M equations
for
and then updating
The Jacobian matrix
The algorithm for the proposed reduction method is as follows:
Provide initial estimates of the equilibrium constants (Wilson’s relation for ideal K-values is used [1])
Calculate initial estimates of formal mole numbers (Yi)
Calculate the fugacity coefficients as functions of the reduced variables
Update Yi from equation (7)
Convergence test; if the error function is less than the required tolerance, the iterative process is stopped.
Calculate the TPD function; if the TPD function is increasing between two subsequent iterations, an SSI iteration is performed (go to step iii)
Calculate the required partial derivatives and assemble the Jacobian matrix
Solve the linear system of equations (the Newton method)
Update the iteration variables and go to step iv
The iterative sequence above is performed twice, for vapor-like and liquid-like initialisations [1], as described in the next section.
The proposed method was coded in FORTRAN, according to the algorithm presented above, by modifications of the original code for the NBL reduction method for stability testing. The latter was previously implemented and thoroughly tested in several academic and industry research compositional simulators.
Ethical approval: The conducted research is not related to either human or animal use.
4 Results and discussion
Phase stability testing calculations are performed for two hydrocarbon mixtures. The PR EoS is used in all calculations. Calculations start directly with Newton iterations, with a possible switch-back to SSI when reduction parameters are going out of their bounds. The iterative process is stopped if the Euclidean norm
with
Michelsen’s two-sided initialization is used, in which ideal equilibrium constants calculated with Wilson’s relation [1] are used to generate the initial guess. If the stability of a vapor-like mixture is investigated (the trial phase is liquid), initialization is denoted as type V and
The first mixture is a six-component synthetic gas-condensate (Yarborough [16]), containing normal alkanes ranging from C1 to nC10, denoted as Y8. Composition is given in ref. [16], component properties are taken from Reid et al. [17], and all BIPs are set to zero. This test problem is a benchmark problem for phase equilibrium calculation, used in many studies [5,6,7,8,12,13,18], and covers the important particular case when there are only two iteration variables (the parameters of the EoS) for phase stability testing. There is only one nonzero eigenvalue of the matrix K,
A large number of phase stability testing calculations are carried out with the proposed and NBH methods, by spanning the pressure–temperature plane using refined grids, with increments of ΔP = 1 bar and ΔT = 1 K. The temperature and pressure windows in the P−T plane are defined by [250 K, 600 K] and [1 bar, 300 bar], respectively, for the Y8 mixture (giving 105,350 test points) and by [250 K, 700 K] and [1 bar, 250 bar], respectively, for the MY10 mixture (giving 1,12,750 test points). The number of iterations for the NBH and proposed methods within the selected P−T windows are plotted in Figures 1 and 2 for the Y8 mixture with a type V initialization, Figures 3 and 4 for the MY10 mixture with a type L initialization and in Figures 5 and 6 for the MY10 mixture with a type V initialization. An increase in iteration numbers can be clearly identified in the vicinity of the STLL and in a certain domain in the single-phase region (in Figures 1–4) and in the vicinity of the spinodal curve in Figures 5 and 6. The explanation of this typical convergence behavior is given in ref. [6,7].
It appears from Figures 1–6 that the proposed method leads to a systematic decrease in the number of iterations in the single-phase region, mainly in the highly difficult P−T domains. In the two-phase region, the proposed method is slightly slower than NBH. Taking into account the above considerations, the recommended procedure is to start iterations with the proposed method and switch to NBH when the TPD function D* < 0 becomes negative (both the proposed and NBH [6,10,11,16] methods are highly robust in the two-phase region). We aimed in this paper to highlight the improvement of the original NBL method by using the proposed reduction method.
Finally, it is important to note that the results of the reduction method are identical to those obtained by any conventional methods. Differences with experimental values are those specific of the thermodynamic model (EoS) used. If the spectral expansion in equation (3) is truncated (by neglecting some small eigenvalues, as for instance in refs. [5,11]), noticeable differences may appear (see a detailed discussion in Michelsen et al. [20]).
As the proposed algorithm using the modified reduction parameters (
5 Conclusions
A reduction method for mixture phase stability testing is proposed, using a new set of error functions and independent variables (the modified reduction parameters, including the sum of formal mole number) for Newton iterations. Numerical experiments carried out by spanning the pressure–temperature plane show the robustness of the proposed method, with no failure and a significantly improved convergence behavior, mainly in the single-phase region for pressures outside the STLL (where it is faster than the previous formulation), recommending the proposed method for compositional simulators, in which the problematic domain is crossed a very large number of times during simulations. A general form of the two-parameter cubic EoS is used, but the reduction method is applicable to any EoS in which all mixing rules are decomposable to linear forms.
Conflict of interest: The authors declare no conflict of interest.
References
[1] Michelsen ML. The isothermal flash problem. Part I. Stability. Fluid Phase Equilib. 1982;9(1):1–19. 10.1016/0378-3812(82)85001-2.Search in Google Scholar
[2] Smejkal T, Mikyška J. Phase stability testing and phase equilibrium calculation at specified internal energy, volume, and moles. Fluid Phase Equilib. 2017;431:82–96. 10.1016/j.fluid.2016.09.025.Search in Google Scholar
[3] Kou J, Sun S. A stable algorithm for calculating phase equilibria with capillarity at specified moles, volume and temperature using a dynamic model. Fluid Phase Equilib. 2018;456:7–24. 10.1016/j.fluid.2017.09.018.Search in Google Scholar
[4] Whitson CH, Michelsen ML. The negative flash. Fluid Phase Equilib. 1989;53:51–71. 10.1016/0378-3812(89)80072-X.Search in Google Scholar
[5] Hoteit H, Firoozabadi A. Simple phase stability-testing algorithm in the reduction method. AIChE J. 2006;52(8):2909–20. 10.1002/aic.10908.Search in Google Scholar
[6] Nichita DV, Broseta D, Montel F. Calculation of convergence pressure/temperature and stability test limit loci of mixtures with cubic equations of state. Fluid Phase Equilib. 2007;261(1–2):176–84. 10.1016/j.fluid.2007.07.041.Search in Google Scholar
[7] Nichita DV. Phase stability testing near the stability test limit. Fluid Phase Equilib. 2016;426:25–36. 10.1016/j.fluid.2016.01.015.Search in Google Scholar
[8] Nichita DV, Petitfrere M. Phase stability analysis using a reduction method. Fluid Phase Equilib. 2013;358:27–39. 10.1016/j.fluid.2013.08.006.Search in Google Scholar
[9] Michelsen ML. Simplified flash calculations for cubic equations of state. Ind Eng Chem Proc Des Dev. 1986;25(1):184–8. 10.1021/i200032a029.Search in Google Scholar
[10] Hendriks EM. Reduction theorem for phase equilibrium problems. Ind Eng Chem Res. 1988;27(9):1728–32. 10.1021/ie00081a027.Search in Google Scholar
[11] Hendriks EM, van Bergen ARD. Application of a reduction method to phase equilibria calculations. Fluid Phase Equilib. 1992;74:17–34. 10.1016/0378-3812(92)85050-I.Search in Google Scholar
[12] Nichita DV, Minescu F. Efficient phase equilibrium calculation in a reduced flash context. Can J Chem Eng. 2004;82(6):1225–38. 10.1002/cjce.5450820610.Search in Google Scholar
[13] Nichita DV, Broseta D, de Hemptinne JC. Multiphase equilibrium calculation using reduced variables. Fluid Phase Equilib. 2006;246(1–2):15–27. 10.1016/j.fluid.2006.05.016.Search in Google Scholar
[14] Peng DY, Robinson DB, New A. Two-constant equation of state. Ind Eng Chem Fundam. 1976;15(1):59–64. 10.1021/i160057a011.Search in Google Scholar
[15] Soave G. Equilibrium constants from a modified Redlich–Kwong equation of state. Chem Eng Sci. 1972;27(6):1197–203. 10.1016/0009-2509(72)80096-4.Search in Google Scholar
[16] Yarborough L. Vapor-liquid equilibrium data for multicomponent mixtures containing hydrocarbon and nonhydrocarbon components. J Chem Eng Data. 1972;17(2):129–33. 10.1021/je60053a027.Search in Google Scholar
[17] Reid RC, Prausnitz JM, Poling BE. The properties of gases and liquids. Singapore: McGraw-Hill; 1988.Search in Google Scholar
[18] Nichita DV. A new method for critical points calculation from cubic EOS. AIChE J. 2006;52(3):1220–7. 10.1002/aic.10677.Search in Google Scholar
[19] Metcalfe RS, Yarborough L. The effect of phase equilibria on the CO2 displacement mechanism. Soc Petr Eng J. 1979;19(4):242–52. 10.2118/7061-PASearch in Google Scholar
[20] Michelsen ML, Yan W, Stenby EH. A comparative study of reduced variables-based flash and conventional flash. SPE J. 2013;18(5):952–9. 10.2118/154477-PA.Search in Google Scholar
© 2020 Dan Vladimir Nichita and Catinca Secuianu, published by De Gruyter
This work is licensed under the Creative Commons Attribution 4.0 International License.