Skip to content
BY 4.0 license Open Access Published by De Gruyter Open Access November 5, 2020

An improved reduction method for phase stability testing in the single-phase region

  • Dan Vladimir Nichita and Catinca Secuianu EMAIL logo
From the journal Open Chemistry

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]

(1)D(Y)=1i=1ncYi+i=1ncYi(lnYi+lnϕi(Y)lnzilnϕi(z))

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]

(2)Qα=i=1ncqαixi;α=1,M

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 (1kij);i,j=1,nc [11] is used (where kij is the BIP between components i and j) and A is reduced from a quadratic to a linear form:

(3)A=α=1mλαQα2

and

(4)Axi=α=1mAQαQαxi=2α=1mλαqαiQα;i=1,nc

where m is the rank of K (which is rank-deficient and usually m ≪ nc), λα;α=1,m are the eigenvalues of the matrix K and qαi;α=1,m;i=1,nc are the corresponding eigenvectors. It is worth noting that the eigenvalue-eigenvector problem has many applications in theoretical physics, engineering and chemistry (for instance, such eigenproblem has been translated for the alignment of molecules).

The last reduction parameter is the co-volume in the EoS (with M = m + 1 and qMi=Bi;i=1,nc).

(5)BQM=i=1ncBixi

Since the EoS parameters, A and B, as well as A/xi are functions of reduction parameters, the fugacity coefficient is also a function of reduction parameters at P and T specifications, that is, φi=φi(P,T,Q), unlike in conventional methods where it is a function of phase composition, φi=φi(P,T,n).

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

(6)Fα(Q)Qαi=1ncYi(Q)i=1ncqαiYi(Q)=0;α=1,M

in M unknowns, Q=(Q1,Q2,...,QM)T, and the trial phase mole numbers, Yi, are calculated from

(7)lnYi(Q)=lnzi+lnϕi(QF)lnϕi(Q);i=1,nc

where the index F stands for feed.

The Newton iteration equation is

(8)J(R)ΔQ=F

where J(R) is the Jacobian matrix and F is the error vector given by equation (6),

(9)Jαβ(R)=FαQβ=δαβi=1ncYi+Qαi=1ncYiQβi=1ncqαiYiQβ;α,β=1,M

From equation (7)

(10)YiQβ=Yilnϕi(Q)Qβ;i=1,nc;β=1,M

The solution of the linear system of equation (8) corresponds to a stationary point of D* [9]. The variables Q are bounded by mini=1,ncqαiQαmini=1,ncqαi;α=1,M. Calculations start directly with Newton iterations; if a variable hits its bounds or if the TPD function increases between two subsequent Newton iterations, either a line search is preformed [13] or iterations are reverted to SSI [5]. SSI iterations are based on updating Y from equation (7) and Q from equations (2) and (5) using the normalised mole fractions.

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 Q¯=(Q¯1,,Q¯M,S)T of M + 1 modified reduction parameters, with elements

(11a)Q¯α=i=1ncqαiYi;α=1,M

where Q¯α=SQα, as Yi=Sxi, and

(11b)Q¯M+1S=i=1ncqM+1,iYi

with qM+1,i=1;i=1,nc.

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 Q¯=(Q¯1,,Q¯M,S)T [8].

The error equations are

(12a)eα(Q¯)Q¯αi=1ncqαiYi(Q¯)=0:α=1,M
(12b)eM+1(Q¯)Si=1ncYi(Q¯)=0

The linear system of M + 1 equations is

(13)JΔQ¯=e

The elements of the Jacobian matrix are

(14a)Jαβ=eαQ¯β=δαβi=1ncqαiYiQ¯β;α,β=1,M
(14b)Jα,M+1=eαS=i=1ncqαiYiS;α=1,M
(14c)JM+1,β=eM+1Q¯β=i=1ncYiQ¯β;β=1,M
(14d)JM+1,M+1=eM+1S=1i=1ncYiS

where

(15)YiQ¯β=xilnϕiQβ

and

(16)YiS=xiγ=1MQγlnϕiQγ

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

(17)eQ¯eSeM+1Q¯eM+1SΔQ¯ΔS=eeM+1;α,β=1,M

Using simple linear algebra operations, it can be shown that an equivalent problem consists in first solving the linear system of M equations

(18)JΔQ¯=e

for ΔQ¯α;α=1,M, where

(19)Jαβ'=eαQ¯βeαSeM+1S1eM+1Q¯β;α,β=1,M

and then updating Q¯M+1 (S) from

(20)ΔQ¯M+1ΔS=eM+1β=1MJM+1,βΔQβ

The Jacobian matrix J differs from its block counterpart in J by a rank one matrix (thus no additional summations are required), that is, the Schur complement of JM+1,M+1 is J; moreover, the condition number of J is not affected by the bordering vectors in equation (17). By this way, the dimensionality of the linear system resolution is not increased by adding an additional independent variable.

The algorithm for the proposed reduction method is as follows:

  1. Provide initial estimates of the equilibrium constants (Wilson’s relation for ideal K-values is used [1])

  2. Calculate initial estimates of formal mole numbers (Yi)

  3. Calculate initial values of the iteration variables from equations (11a) and (11b);

  4. Calculate the fugacity coefficients as functions of the reduced variables

  5. Update Yi from equation (7)

  6. Evaluate the error function (the Euclidean norm of the error vector in equations (12a) and (12b)

  7. Convergence test; if the error function is less than the required tolerance, the iterative process is stopped.

  8. Calculate the TPD function; if the TPD function is increasing between two subsequent iterations, an SSI iteration is performed (go to step iii)

  9. Calculate the required partial derivatives and assemble the Jacobian matrix

  10. Solve the linear system of equations (the Newton method)

  11. 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.

  1. 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

(21)Eα=1Meα(Q¯)1/2ε

with ε=1010 in all calculations.

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 YiV(0)=zi/Ki(0); for a liquid-like mixture (the trial phase is vapor), the initialization is denoted as type L and YiL(0)=ziKi(0).

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, λ1=nc=6. The critical point calculated with the PR EoS using a reduction method [18] is Tc = 293.78 K and Pc = 210.67 bar. The second mixture (Metcalfe and Yarborough [19]), denoted as MY10, is a ten-component synthetic oil containing normal alkanes ranging from C1 to nC14; feed composition, component properties and nonzero BIPs are taken from ref. [5]. The matrix K is of rank 3; the three nonzero eigenvalues are λ1=9.957353, λ2=0.070650 and λ3=0.028003. The calculated critical point using the PR EoS [18] is Tc = 572.23 K and Pc = 79.94 bar.

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 PT 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 PT 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].

Figure 1 Number of iterations for the Y8 mixture, NBH method with type V initialization.
Figure 1

Number of iterations for the Y8 mixture, NBH method with type V initialization.

Figure 2 Number of iterations for the Y8 mixture, proposed method with type V initialization.
Figure 2

Number of iterations for the Y8 mixture, proposed method with type V initialization.

Figure 3 Number of iterations for the MY10 mixture, NBH method with type L initialization.
Figure 3

Number of iterations for the MY10 mixture, NBH method with type L initialization.

Figure 4 Number of iterations for the MY10 mixture, proposed method with type L initialization.
Figure 4

Number of iterations for the MY10 mixture, proposed method with type L initialization.

Figure 5 Number of iterations for the MY10 mixture, NBH method with type V initialization.
Figure 5

Number of iterations for the MY10 mixture, NBH method with type V initialization.

Figure 6 Number of iterations for the MY10 mixture, proposed method with type V initialization.
Figure 6

Number of iterations for the MY10 mixture, proposed method with type V initialization.

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 PT 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 (Q¯) performs better than the original one using the reduction parameters (Q), the immediate practical consequence of this work is to extend the use of the new set of variables to more complex algorithms in a TPD function minimization framework.

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.

  1. 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

Received: 2020-06-16
Revised: 2020-08-25
Accepted: 2020-08-28
Published Online: 2020-11-05

© 2020 Dan Vladimir Nichita and Catinca Secuianu, published by De Gruyter

This work is licensed under the Creative Commons Attribution 4.0 International License.

Downloaded on 25.4.2024 from https://www.degruyter.com/document/doi/10.1515/chem-2020-0173/html
Scroll to top button