CALCULATION OF THE COMPRESSIBILITY FACTOR AND FUGACITY IN OIL-GAS SYSTEMS USING CUBIC EQUATIONS OF STATE V. P. de MATOS MARTINS 1, A. M. BARBOSA NETO 1, A. C. BANNWART 1 1 University of Campinas, Mechanical Engineering Faculty, Energy Department Petroleum Division E-mail for contact: aneto@dep.fem.unicamp.br ABSTRACT Knowledge of thermodynamics properties and phase behavior in complex mixtures of hydrocarbons is essential to minimize risk and optimize production during the development of subsea oil and gas fields. In this sense, the main aim of this work was to calculate the compressibility factor and the fugacity of component in oil and gas systems at liquid-vapor equilibrium. Code built in Wolfram Mathematica used an approach of compositional modeling to evaluate multicomponent mixtures of hydrocarbons. Cubic Equations of State (EoS) in general form: Peng-Robinson and Soave-Redlich-Kong, and classical mixing rules were implemented in the code. Furthermore, the algorithm developed performed Gibbs energy minimization during EoS resolution. Then, results compared to commercial simulators presented a good agreement. Therefore, tool was able to determine the compressibility factor and component fugacity of oil and gas phase composition in equilibrium condition. 1. INTRODUCTION Computational tools based on cubic equations of state have been built to calculate thermodynamic properties and to evaluate phase behavior of petroleum fluids (BARBOSA NETO et. al., 2014).This informations on fluid are essential to minimize risk and optimize production during the development of subsea oil and gas fields. In this way, a constant improvement and optimization of thermodynamics algorithms are highly recommended (CMG, 2013; Li et. al., 2014). Cubic equations of state have been used widely for the calculation of multicomponent hydrocarbon phase equilibria (Nichita, 2006). One reason for their popularity is that considering their simplicity, they yield a remarkably accurate description of the phase behavior (Michelsen, 1985). Furthermore, the use these models with a compositional approach have a strong effect on the phase behavior of petroleum systems (Di Primio et. al., 1998). In this sense, this work aimed to develop an algorithm able to calculate compressibility factor and components fugacity in gas and oil system at vapor-liquid equilibrium using cubic equations of state in general form.
2. THERMODYNAMIC MODELING This section describes the thermodynamics models implemented in the development of Phase Property Calculation Algorithm (PPCA). In this work, a general form of two-parameter cubic EoS was used. It incorporates the Soave-Redlich-Kwong (SRK), Soave (1972) and Peng-Robinson (PR), Peng- Robinson (1976) cubic Equations of State (EoS). Equation 1 presents a general form of cubic EoS (Michelsen, 1986). p = RT v b a (v + δ 1 b)(v + δ 2 b) (1) Parameters δ 1 and δ 2 are numerical constants shown in Table 1, whereas, the mixture parameters a and b are given by mixing rules. Defining the terms A and B according to Danesh (1998), as: A = a. p R 2 T 2 B = b. p RT (2) Writing compressibility factor (Z = pv RT ) in terms of pressure (p[bar]), volume (v[m 3 ]) and temperature (T[K]), with gases constant R = 8.314. 10 5 bar. m 3 mol. K, and using A and B from Equation 2, the implicit form of cubic EoS is obtained: Z 3 + [(δ 1 + δ 2 1)B 1]Z 2 + [A + δ 1 δ 2 B 2 (δ 1 + δ 2 )B(B + 1)]Z AB δ 1 δ 2 B 2 (B + 1) = 0 (3) The van der Waals mixing rules were used for determined the energy, a, and for the covolume, b. So, Equations 4 and 5 present the coefficients of the cubic EoS (Nichita, 2006; Ahmed, 2007). N c N c A = y i y j A ij i=1 j=1 N c B = y i B i i=1 (4) (5) Term A ij from Equation 4 was defined as (Nichita et al., 2006): A ij = A ii = (1 k ij ) A i A j for i, j = 1, N c (6) The terms A i and B i were determinate by Equations 7 and 8, respectively (Nichita et al., 2006): A i = Ω 2 ap ri T2 [1 + m(ω i) (1 T ri )] ri for i = 1, N c (7)
B i = Ω bp ri T ri for i = 1, N c (8) Term m i was obtained from the following empirical correlations in function of acentric factor (ω i ), grouping in Equations 9 to 11. For SRK EoS, Soave (1972) proposes: m i = 0.480 + 1.574ω i 0.176ω i 2 for i = 1, N c (9) For the PR EoS, Peng and Robinson (1976) proposes: m i = 0.37464 + 1.54226ω i 0.26992ω i 2 for i = 1, N c (10) and for hydrocarbons with ω i > 0.49 (Peng and Robinson, 1978): m i = 0.379642 + 1.48503ω i 0.164423ω i 2 + 0.016666ω i 3 for i = 1, N c (11) Table 1 presents values for parameters: δ 1, δ 2, Ω a, and Ω b, according to cubic EoS. Table 1 Parameters values for the SRK and PR EoS (CMG, 2013) EoS δ 1 δ 2 Ω a Ω b SRK 0 1 0.42747 0.08664 PR 1 + 2 1 2 0.45724 0.07780 The cubic Z-factor equation, when applied to phase composition in analysis, may yield until three real roots. In which case, the one that results in the lowest Gibb s free energy, most stable, was selected. Let Z A and Z B be the two real roots resulting in free energy G A and G B, respectively (CMG, 2013). G A G B = ln ( Z B B Z A B ) + 1 A δ 2 δ 1 B ln (Z B + δ 2 B Z A + δ 2 B If G A G B > 0, Z B was selected and vice versa. Z A + δ 1 B Z B + δ 1 B ) (Z B Z A ) (12) Fugacity coefficients were calculated by Equation 13 for both cubic EoS, SRK and PR. ln φ i = (Z 1) B i B A ln(z B) ΔB (2 ψ i A B i B ) ln (Z + δ 1B Z + δ 2 B ) for i = 1, N c (13) N c ψ i = A ij y j j=1 and Δ = δ 1 δ 2. for j = 1, N c (14)
3. METHODOLOGY A Phase Properties Calculation Algorithm (PPCA) was developed to calculate the compressibility factor and fugacity from petroleum compositions at Vapor-Liquid Equilibrium (VLE). This computational algorithm was built in Wolfram Mathematica language using programming advanced techniques. Figure 1 shows the calculation procedure implemented in PPCA and the fluid composition used to validate and analyzes this tool. Molar Fraction (%) 40 35 30 25 20 15 10 36.81 8.69 8.39 Fluid Composition 23.20 (a) N 2 CO 2 CH 4 C 2 H 6 C 3 H 8 i-c 4 Figure 1 (a) Calculation procedure of Phase Properties Calculation Algorithm (PPCA) (b) Petroleum fluid composition investigated. Following the steps shown in Figure 1 (a), checked that PPCA used as input data: phase composition, x i for oil phase or y i for gas phase in VLE; system pressure and temperature (p, T); and components properties, such as molar weight (MW i ), critical pressure (p ci ), critical temperature (T ci ) and acentric factor (ω i ). Next step, reduced pressure and temperature values were computed for each component in feed phase. After, coefficients A i and B i were determined using Equations 7 and 8, respectively. Then, parameters A and B were calculated applying Equations 4 and 5, respectively. Equation 6 was used to determine parameter A ij, required in the A calculation. Finally, using all parameters previously determined, Z factor was computed from Equation 3 according to cubic EoS chosen. Gibbs energy analyze for the Z values, was performed using Equation 12. Once has determined the Z value which corresponded minor Gibbs energy, the fugacity of each component in phase was calculation from Equation 13. The fluid composition used in this work, as shown in Figure 1 (b), corresponds a North Sea petroleum sample (Di Primio et. al., 1998). Analyzes on Z factor and fugacity were performed in pressure and temperature range of 1 to 200 bar and 313.15 to 373.15 K, respectively using both SRK and PR cubic EoS. The compositions of the gas and oil phases in VLE were obtained from PT-Flash at 5 0 1.10 0.22 1.19 4.21 Components (b) 1.35 2.03 2.61 n-c 4 i-c 5 n-c 5 C 6 4.02 4.12 C 7 C 8 2.06 C 9 C 10+
WinProp. Results obtained from PPCA were compared with generated responses at software WinProp for both, operational conditions and fluid properties, with identical values. The aim this comparison was to validate the tool developed and to evaluate thermodynamically its responses. Statistic calculation, such as, Average Absolute Relative Error (AARE) in percent, was performed using Equation 15 to quantify accuracy of the generated results. AARE% = 100 N ( C i PPCA WinProp C i ) (15) WinProp C i Term C represent Z-factor or fugacity (f) and N the operational conditions numbers evaluated. 4. RESULTS AND DISCUSSION Figure 1 shows oil compressibility factor curves in function of pressure for differents isotherms using SRK and PR EoS in both, PPCA and WinProp. Oil Compressibility Factor (adm) 1.0 0.8 0.6 0.4 0.2 0.0 0 50 100 150 200 Pressure (bar) (a) EoS SRK T = 313.15 K (PPCA) T = 313.15 K (WinProp) T = 343.15 K (PPCA) T = 343.15 K (WinProp) T = 373.15 K (PPCA) T = 373.15 K (WinProp) 0.4 EoS PR T = 313.15 K (PPCA) T = 313.15 K (WinProp) 0.2 T = 343.15 K (PPCA) T = 343.15 K (WinProp) T = 373.15 K (PPCA) T = 373.15 K (WinProp) 0.0 0 50 100 150 200 Figure 2 Oil compressibility factor as function of pressure, at 333.15, 343.15 and 363.15 K (a), SRK EoS in the PPCA and WinProp (b) PR EoS in the PPCA and WinProp. Figure 1 presents accuracy of PPCA in predicting oil compressibility factor when compared with WinProp. Furthermore, both EoS, SRK and PR, presents similar results in this study. Analyzing the Z L factor curves in function of pressure, observed a behavior non-ideal and a large variation in its values. This occurred because at high pressures, gas is solubilized in oil, changing phase composition, and consequently the Z L behavior. Analysis of different temperatures did not show mean influence on Z L curves. However, it modified bubble pressure values. Bubble pressure values of 151, 181 and 191 bar were checked for isotherms of 313.15, 343.15 and 373.15 K, respectively, using PR EoS. Oil Compressibility Factor (adm) 1.0 0.8 0.6 Pressure (bar) (b)
On the other hand, the gas compressibility factor was analyzed analogous to Z L factor. The Z V behavior generated with SRK and PR EoS in function of pressure and for three isotherms was observed in Figure 3. Results obtained of PPCA were compared with WinProp, so that generated responses presented similar results. Small quantitative differences between the Z factor calculation of SRK and PR EoS were checked. A general analysis of the results showed temperature effects on Z V curves, so that, at same pressure, changes due temperature were significant. For example, at 121 bar Z V values checked were 0.7434, 0.7919 and 0.8257 for temperatures of 313.15, 343.15 and 373.15 K, respectively, using PR EoS. Added to the pressure effect on Z V curves was observed that phase behavior of the gas change with pressure and temperature variation. Gas Compressibility Factor (adm) 1.00 EoS SRK T = 313.15 K (PPCA) T = 313.15 K (WinProp) T = 343.15 K (PPCA) 0.95 T = 343.15 K (WinProp) T = 373.15 K (PPCA) T = 373.15 K (WinProp) 0.90 0.85 0.80 Gas Compressibility Factor (adm) 1.00 EoS PR T = 313.15 K (PPCA) T = 313.15 K (Wimprop) 0.95 T = 343.15 K (PPCA) T = 343.15 K (Wimprop) T = 373.15 K (PPCA) 0.90 T = 373.15 K (Wimprop) 0.85 0.80 0.75 0.75 0 50 100 150 200 Pressure (bar) (a) 0.70 0 50 100 150 200 Figure 3 Gas compressibility factor as a function of the pressure, at 333.15, 343.15 and 363.15 K (a), SRK EoS in the PPCA and WinProp (b) PR EoS in the PPCA and WinProp. In order to determine the accuracy of compressibility factor values generated for oil and gas system investigated, it was computed AARE (%) between predicted Z values with PPCA and WinProp. Table 1 lists magnitudes of the AARE percent of Z factor obtained using SRK and PR EoS in PPCA and WinProp. Table 1 Average absolute relative error (AARE) percent computed of Z values predicted from PPCA and compared with generated responses from WinProp, using SRK and PR EoS T (K) AARE (%) SRK EoS AARE (%) PR EoS Z L Z V Z L Z V 313.15 0.2169 0.1552 0.2271 0.1896 343.15 0.2229 0.1818 0.2364 0.2351 373.15 0.2446 0.2058 0.2577 0.2526 Pressure (bar) (b)
For all operational conditions investigated, the Z values predicted from PPCA showed AARE of less than 0.3 %. This small difference can be attributed the tolerance values used in both codes evaluated. However, the algorithm developed showed reliable to determine Z factor of oil and gas system. Other phase property calculated in this work was the fugacity of distributed components in phases at equilibrium. Table 2 reports a comparison between the accuracy of the calculation methods considered in this study to calculate fugacity of each component. This fugacity values were obtained at vapor-liquid equilibrium condition. It mean that fugacity is same in both phases, gas and oil. Comp. Table 2 Fugacity of the gas and oil phases in equilibrium condition at p = 31 bar and T = 373.15 K, using SRK and PR EoS in both, PPCA and WinProp f i (bar) SRK EoS (PPCA) f i (bar) SRK EoS (WinProp) f i (bar) PR EoS (PPCA) f i (bar) PR EoS (WinProp) CO2 6.7364.10-1 6.7309.10-1 6.6488.10-1 6.6427.10-1 N2 9.8771.10-2 9.8700.10-2 9.7975.10-2 9.7896.10-2 C1 2.0436.10 1 2.0439.10 1 2.0156.10 1 2.0160.10 1 C2 3.7222.10 0 3.7230.10 0 3.6547.10 0 3.6556.10 0 C3 2.5928.10 0 2.5958.10 0 2.5324.10 0 2.5357.10 0 i-c4 2.6150.10-1 2.6236.10-1 2.5382.10-1 2.5475.10-1 n-c4 8.0698.10-1 8.0955.10-1 7.8678.10-1 7.8956.10-1 i-c5 1.6172.10-1 1.6269.10-1 1.5733.10-1 1.5837.10-1 n-c5 2.1268.10-1 2.1398.10-1 2.0734.10-1 2.0874.10-1 C6 1.3448.10-1 1.3596.10-1 1.3120.10-1 1.3277.10-1 C7 9.7465.10-2 9.9080.10-2 9.5743.10-2 9.7474.10-2 C8 4.6693.10-2 4.7774.10-2 4.6209.10-2 4.7376.10-2 C9 1.0704.10-2 1.1027.10-2 1.0733.10-2 1.1085.10-2 C10 + 2.9234.10-5 3.3304.10-5 3.2842.10-5 3.7757.10-5 AARE (%) 0.5943 0.6507 Analyzing the values shown in Table 2, was observed that the components C1, C2 and C3 present biggest fugacity, so they are more significant for Gibbs energy of the mixture. SRK and PR EoS present fugacity values with small differences. Moreover, PPCA and WinProp yield similar responses with AARE of 0.5943% and 0.6507% for SRK and PR EoS, respectively. 4. CONCLUSIONS The PPCA demonstrated its ability in acquiring good performance in terms of predictive reliable of Z factor and fugacity in VLE conditions. For all operational conditions investigated was checked a
good agreement between the results from PPCA and WinProp, so that errors values were less than 2%. Furthermore, both SRK and PR cubic EoS were able to describe physically the Z curves and components fugacity of the gas and oil system. Small differences between their numeric responses were checked in the analysis. Therefore, PPCA could be used to determine fluid phases properties in VLE. Methodology presents in this work will be implemented in PVTpetro software. 5. REFERENCES AHMED, T. Equations of State and PVT Analysis: Applications for Improved Reservoir Modeling. Houston: Gulf Publishing Company, 2007. BARBOSA NETO, A. M.; RIBEIRO, J.; AZNAR, M.; BANNWART, A. C. Thermodynamic modeling of vapor-liquid equilibrium for petroleum fluids. Brazilian Congress of Applied Mathematics to Industry, Caldas Novas, GO, 2014. CMG. Phase behaviour & reservoir fluid property program WinProp User s Guide. Version 2013. DANESH, A. PVT and Phase Behaviour of Petroleum Reservoir Fluids. Amsterdam: Elsevier, 1998. DI PRIMIO, R.; Dieckmann, V.; Mills, N. PVT and phase behavior analysis in petroleum exploration. Organic Geochemistry Journal, v. 29, p. 207-222, 1998. LI, C.; PENG, Y.; DONG, J. Prediction of compressibility factor for gas condensate under a wide range of pressure conditions based on a three parameter cubic equation of state. J. of Natural Gas Science and Engineering, v. 20, p. 380-395, 2014. MICHELSEN, M. L. Simplified flash calculations for cubic equations of state. Ind. Eng. Chem. Process Des. Dev., vol. 25, n. 1, 1986. NICHITA, D. V. A reduction method for phase equilibrium calculations with cubic equations of state. Brazilian J. of Chemical Engineering, v. 23, n. 3, p. 427-434, 2006. NICHITA, D. V. A.; BROSETA, D.; de HEMPTINNE, J-C. Multiphase equilibrium calculation using reduced variables. Fluid Phase Equilibria, v. 246, p. 15-27, 2006. PENG, D. Y.; ROBINSON, D. B. A new two-constant equation of state. Industrial & Eng. Chemistry Fundamentals, v. 15, n. 1, p. 59-64, 1976. PENG, D. Y.; ROBINSON, D. B. The characterization of the heptanes and heavier fractions for the GPA Peng-Robinson programs. Research Report, RR-28, Gas Processors Association, 1978. SOAVE, G. Equilibrium constants from a modified Redlich-Kwong equation of state. Chemical Engineering Science, v. 27, p. 1197-1203, 1972.