Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Journal of Natural Gas Science and Engineering 16 (2014) 8e17

Contents lists available at ScienceDirect

Journal of Natural Gas Science and Engineering


journal homepage: www.elsevier.com/locate/jngse

Efficient estimation of natural gas compressibility factor using


a rigorous method
Amir Fayazi a, Milad Arabloo a, Amir H. Mohammadi b, c, *
a
Department of Petroleum Engineering, Petroleum University of Technology, Ahwaz, Iran
b
Institut de Recherche en Génie Chimique et Pétrolier (IRGCP), Paris Cedex, France
c
Thermodynamics Research Unit, School of Engineering, University of KwaZulu-Natal, Howard College Campus, King George V Avenue,
Durban 4041, South Africa

a r t i c l e i n f o a b s t r a c t

Article history: The compressibility factor (Z-factor) of natural gases is necessary in many gas reservoir engineering
Received 3 August 2013 calculations. Accurate determination of this parameter is of crucial need and challenges a large number
Received in revised form of used simulators in petroleum engineering. Although numerous studies for prediction of gas
6 October 2013
compressibility factor have been reported in the literature, the accurate prediction of this parameter has
Accepted 28 October 2013
Available online 12 December 2013
been a topic of debate in the literature. For this purpose, a new soft computing approach namely, least
square support vector machine (LSSVM) modeling optimized with coupled simulated annealing opti-
mization technique is implemented. The model is developed and tested using a large database consisting
Keywords:
Natural gas
of more than 2200 samples of sour and sweet gas compositions. The developed model can predict the
Compressibility factor natural gas compressibility factor as a function of the gas composition (mole percent of C1eC7þ, H2S, CO2,
Least square support vector machine and N2), molecular weight of the C7þ, pressure and temperature. The calculated Z-factor values by
Sour gas developed intelligent model are also compared with predictions of other well-known empirical corre-
lations. Statistical error analysis shows that the developed LSSVM model outperforms all existing pre-
dictive models with average absolute relative error of 0.19% and correlation coefficient of 0.999. Results
from present study show that implementation of LSSVM can lead to more accurate and reliable esti-
mation of natural gas compressibility factor.
 2013 Elsevier B.V. All rights reserved.

1. Introduction The most reliable and accurate way to obtain physical properties is
from accurate experimental measurements. These experiments are
The role of natural gas in meeting the world energy demand has expensive and time-consuming and it is impossible to measure
been increasing because of its abundance, versatility, and clean properties for all possible compositions of natural gases (Ahmed,
burning (Wang and Economides, 2009). Natural gas often contains 2001). However, when laboratory analyses are not available, it is
some amounts of heavier hydrocarbon and non-hydrocarbon the task of empirical correlations and equations of state (EoS) to
components that contribute to its properties. It is important to estimate the petroleum fluid properties as a function of the reser-
obtain accurate and reliable estimates of the physical properties of voir’s readily available characteristics (Ahmed, 1989). Empirical
natural gas for optimal exploitation and usage. In most upstream correlations, which are used to predict natural gas Z-factor, are
and downstream petroleum and natural gas engineering calcula- much easier and faster than equations of state. Sometimes these
tions, the compressibility factor of natural gases are necessary to correlations have comparable accuracy to equations of state
gas metering, gas compression, design of pipelines and surface fa- (Elsharkawy, 2004). In addition, equations of state (EoS) are more
cilities (Azizi et al., 2010; Elsharkawy, 2004). complex than the empirical correlations, involving a large number
The common sources of Z-factor values are experimental of parameters, which require more complicated and longer
measurements, equations of state (EoS) and empirical correlations. computations.
The recent development and success of applying support vector
machine modeling to solve various difficult engineering problems
has drawn the attention to its potential applications in the petro-
* Corresponding author. Institut de Recherche en Génie Chimique et Pétrolier
(IRGCP), Paris Cedex, France. leum industry (Arabloo et al., 2013; Farasat et al., 2013; Shokrollahi
E-mail address: a.h.m@irgcp.fr (A.H. Mohammadi). et al., 2013). This study presents a new compositional model for

1875-5100/$ e see front matter  2013 Elsevier B.V. All rights reserved.
http://dx.doi.org/10.1016/j.jngse.2013.10.004
A. Fayazi et al. / Journal of Natural Gas Science and Engineering 16 (2014) 8e17 9

estimation of gas compressibility factor based on support vector experimental chart. Particularly for natural hydrocarbon gases,
machine modeling approach. A total of 2249 data points for a va- Standing and Katz (1942) and Katz et al. (1959) charts are standards
riety of natural gases, covering lean, sweet to rich and acid or sour in oil and gas industry. Several attempts were made to fit the
gases (H2S, and CO2) are collected from open literature. The pro- Standing Katz chart mathematically (Dranchuk and Abou-Kassem,
posed model efficiency is compared to five commonly used 1975; Hall and Iglesias-Silva, 2007; Heidaryan et al., 2010;
empirical correlations (Beggs and Brill, 1973; Kumar, 2004; Londono et al., 2005). However, these charts were prepared for
Heidaryan et al., 2010; Azizi et al., 2010; Sanjari and Lay, 2012) and binary mixtures of low molecular weight sweet gases.
several criteria are used to evaluate the developed model including
the coefficient of determination (R2), average relative error (ARE),
2.1. Equations of state
average absolute relative error (AARE), and root mean square error
(RMSE).
Several forms of EoS have been presented to the petroleum in-
In the following section, a review on some existing Z-factor
dustry to calculate hydrocarbon reservoir fluid properties. Volu-
estimation techniques is presented. Then, backgrounds of the
metric behavior is calculated by solving the cubic equation, usually
proposed model and computation procedure are discussed in the
expressed in terms of Z:
subsequent sections. Accuracy and validation of the proposed
models is checked later in Section 4. Subsequently, key findings of Z 3 þ A1 Z 2 þ A2 Z þ A3 ¼ 0 (4)
the present work are presented in Section 5.
where constants A1, A2 and A3 are functions of pressure, temperature
2. Natural gas compressibility factor and phase composition. The most widely used EoSs are: Soavee
RedlicheKwong (Soave, 1972) and Peng and Robinson (1976).
The ratio of the real volume to the ideal volume, which is a
measure of the amount the gas deviating from perfect behavior, is 2.2. Empirical correlations
called the compressibility factor. It is also called the gas deviation
factor and is denoted by the symbol Z. Gas properties such as gas The lack of knowledge to calculate critical properties, acentric
volume, density and viscosity can be estimated using the gas de- factors of plus-fraction’s components and the binary interaction
viation factor. parameters involved in equations of state calculations resulted in
The principle underlying development of all early correlations utilization of empirical correlations which facilitated the com-
for gas compressibility factor is the law of corresponding states that putations and seemed to be more user-friendly models. This
originally proposed by van der Waals (1873). This law proposes that section presents a review of several widely used empirical
all gases will exhibit the same behavior, e.g. Z-factor, when viewed correlations.
in terms of reduced pressure and reduced temperature. Mathe-
matically, this principle can be defined as: 2.2.1. Beggs and Brill (1973)
Beggs and Brill (1973) introduced an equation generated from
Z ¼ f ðTr ; Pr Þ (1)
Standing and Katz (1942) Z-factor chart. This correlation is a func-
tion of pseudo-reduced pressure and temperature. Their proposed
By definition,
equation is as follow:
P    
Pr ¼ (2) Z ¼ A þ 1  A exp  B þ CPD (5)
Pc pr

T where
Tr ¼ (3)
Pc  0:5
A ¼ 1:39 Tpr  0:92  0:36Tpr  0:101 (6)
where Pc and Tc are critical pressure and critical temperature of
the gas, respectively. We should also note that only single-    
component gases have distinct, single-valued critical pressures 0:066 2
B ¼ 0:62  0:23Tpr Ppr þ  0:037 Ppr
and temperatures. We often observe a range of pressures over Tpr  0:86
 
which a natural gas mixture will liquefy at a given temperature 0:32 6
and a range of temperatures at which a liquid may exist at a given þ Ppr (7)
10ð9ðTpr 1ÞÞ
pressure, so it is often very difficult to determine the exact critical
properties of a natural gas mixture (Calhoun, 1951). Conse-
C ¼ 0:132  0:32logðTpr Þ (8)
quently, the petroleum industry has embraced use of pseudo-
critical properties as correlating parameters for natural gas
mixtures. The values of critical properties for gas mixtures can be
D ¼ 10ð0:31060:49Tpr þ0:1824Tpr Þ
2

calculated via one of the mixing rules. Kay (1936), SBV (Stewart (9)
et al., 1959), and SSBV (SBV modified by Sutton, 1985) are three
widely used mixing rules in the petroleum industry to calculate This method is not suggested to be used for reduced tempera-
pseudo critical properties of natural gases, if the composition of ture (Tpr ) values less than 0.92.
the gas and the critical properties of the individual components
are known. Otherwise, the pseudo critical temperature and 2.2.2. Shell oil company
pressure may be estimated using correlations based on gas spe- Kumar (2004) referenced the shell company model for estima-
cific gravity. tion of Z-factor as:
Therefore, the compressibility of a natural gas at a given pres-  4
sure and temperature can be obtained from the pseudo-reduced     Ppr
Z ¼ A þ BPpr þ 1  A exp  C  D (10)
pressure and temperature by using either the EoS or the 10
10 A. Fayazi et al. / Journal of Natural Gas Science and Engineering 16 (2014) 8e17

where state within the ranges of 1:01  Tpr  3 and 0:01  Ppr  15. It
divides the pressure region into two sections resulting two sets of
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi coefficients for 0:01  Ppr  3 and 3  Ppr  15. This model
A ¼ 0:101  0:36Tpr þ 1:3868 Tpr  0:919 (11) (Eq. (25)) has two dependent variables (Tpr and Ppr ) and 8 inde-
pendent variables (A1  A8 ).
0:04275
B ¼ 0:021 þ (12) A4
A3 Ppr
ðA þ1Þ
A6 Ppr 4
ðA þ2Þ
A8 Ppr 4
Tpr  0:65 2
Z ¼ 1 þ A1 Ppr þ A2 Ppr þ A5
þ A7
þ ðA þ1Þ
(25)
Tpr Tpr Tpr 7
 
4
C ¼ Ppr E þ FPPr þ GPpr (13) The application range of some empirical correlations is limited
to the experimental conditions for building the correlations and fail
   badly close and beyond to their limits. Also, some correlations
D ¼ 0:122exp  11:3 Tpr  1 (14)
require an iterative procedures to obtain the corresponding Z-fac-
tor, such as Dranchuk and Abou-Kassem (1975), and may even
E ¼ 0:6222  0:224Tpr (15)
present different results dependent on the initial guess for the
initial iteration.
0:0657 Therefore, the main objective of this study is to present a reliable
F ¼  0:037 (16)
Tpr  0:85 predictive compositional model based on Least Squares Support
Vector Machine (LSSVM) (Suykens and Vandewalle, 1999)
  
G ¼ 0:32exp  19:53 Tpr  1 (17) modeling approach to predict gas compressibility factor without
the need for estimation of critical properties, acentric factors of
plus-fraction components, and the binary interaction parameters.
2.2.3. Heidaryan et al. (2010)
Multiple regression analysis was carried out by Heidaryan et al. 3. Support vector machine (SVM) model
(2010) to develop a correlation benefiting of 1220 data points in
range of 0:2  Ppr  15 and 1:2  Tpr  3. Their proposed correlation 3.1. Background
for Z-Factor has 0.40% and 1.37% of absolute average error respec-
tively versus Standing and Katz (1942) chart and experimental data. The SVM is a new and supervised machine learning technique
This correlation is given by: based on the statistical learning theory (Cortes and Vapnik, 1995;
0 Suykens and Vandewalle, 1999; Vapnik, 2000). It has been studied
   2  1
A þ A3 ln Ppr þ TApr5 þ A7 lnPpr þ TA29 þ AT11 ln Ppr extensively for both classification and regression analysis
B 1 pr C
Z ¼ ln@   A4 
pr
2 A8 A10   A (18) (Amendolia et al., 2003; Baylar et al., 2009; Chen et al., 2011; Rafiee-
1 þ A2 ln Ppr þ Tpr þ A6 lnPpr þ T 2 þ Tpr ln Ppr Taghanaki et al., 2013; Shokrollahi et al., 2013; Übeyli, 2010). The
pr
SVM algorithm builds a separating hyper-surface in the input space.
This process is performed as follows (Amendolia et al., 2003;
2.2.4. Azizi et al. (2010) Bazzani et al., 2001; Cortes and Vapnik, 1995; Suykens et al., 2002;
In 2010, Azizi et al. (2010) developed a model based on linear Suykens and Vandewalle, 1999):
genetic programming approach to estimate the sweet gases
compressibility factor over the range of 0:2  Ppr  11 (217 Ppr 1) It maps the input patterns into a higher dimensional feature
values) and 1:1  Tpr  2 (14 Tpr values) as: space through nonlinear mapping.
2) Builds a separating hyper-plane with maximum margin.
BþC
Z ¼ Aþ (19)
DþE Consider a given training sampleððx1 ; y1 Þ; ðx2 ; y2 Þ; :::; ðxn ; yn ÞÞ
with input data xi ˛Rn and output data yi ˛R with class labels 1, 1
where for classes 1 and 2, respectively. If this data sample is linearly
 0:5 separable in the feature space, then the following regression model
2:16 1:028 1:58 2:1
A ¼ aTpr þ bPpr þ cPpr Tpr þ dln Tpr (20) can be constructed:

2:4 1:56 0:124 3:033 y ¼ wT FðxÞ þ b (26)


B ¼ e þ fTpr þ gPpr þ hPpr Tpr (21)
where FðxÞ represents the nonlinear function that maps x into
 1:28  1:37    2 n-dimensional feature space and performs linear regression; w and
C ¼ iln Tpr þ jln Tpr þ kln Ppr þ lln Ppr
    b are weight vector and bias term, respectively. When the data of
þ mln Ppr ln Tpr (22) the two classes are separable, one can say:
 
5:55
D ¼ 1 þ nTpr 0:68 0:33
þ oPpr Tpr (23) wT F xk þ b  þ1 if yk ¼ þ1
  (27)
w F xk þ b  1
T if yk ¼ 1
 1:18  2:1    2
E ¼ pln Tpr þ qln Tpr þ rln Ppr þ sln Ppr which is equivalent to:
   
þ tln Ppr ln Tpr (24) h i
yk wT Fðxk Þ þ b  þ1 k ¼ 1; 2; :::; N (28)

2.2.5. Sanjari and Lay (2012) The extension of linear SVMs to non-separable case was also
By using multiple regression analysis, Sanjari and Lay (2012) made by Cortes and Vapnik (1995) in 1995. Basically, it is done by
developed an empirical correlation based on Virial equation of introducing additional slack variables into Eq. (28) as follows:
A. Fayazi et al. / Journal of Natural Gas Science and Engineering 16 (2014) 8e17 11

h i Table 1
yk wT Fðxk Þ þ b  1  zk k ¼ 1; 2; :::; N (29) Statistical description of the data bank used for modeling.

Property Max. Min. Avg. SD


zk  0 k ¼ 1; :::; N (30) N2, mole % 20.00 0.00 2.39 5.03
CO2, mole % 40.16 0.00 3.04 7.14
The generalized optimal separating hyper-plane is determined H2S, mole % 22.60 0.00 1.57 4.47
by the vector w that minimizes the cost function: C1, mole % 99.50 30.64 84.27 13.28
C2, mole % 35.33 0.00 5.78 7.22

1 T C XN C3, mole % 20.69 0.00 2.07 4.41


Cost ðw; zÞ ¼ w wþ zp (31) i-C4, mole % 5.87 0.00 0.25 0.75
2 2 i¼1 i n-C4, mole % 3.76 0.00 0.17 0.47
i-C5, mole % 0.91 0.00 0.08 0.17
n-C5, mole % 0.66 0.00 0.03 0.08
Subject to the constraints:
C6, mole % 1.09 0.00 0.07 0.14
h i C7þ, mole % 1.31 0.00 0.27 0.45
yk wT Fðxk Þ þ b  1  zk k ¼ 1; 2; :::; N (32) MW C7þ 236.71 0 80.95 93.62
Temperature, K 441.80 240.00 334.87 42.16
Pressure, MPa 118.89 0.66 37.88 31.95
where C is a positive real constant that determines the tradeoff Z-factor 2.1927 0.4230 1.0866 0.3354
between the maximum margin and the minimum classification Gas gravity 1.0817 0.5625 0.6753 0.0034
error (Suykens et al., 2002; Suykens and Vandewalle, 1999; Übeyli,
2010). In the conventional SVM, optimal separating hyper-plane is
obtained by solving the above quadratic programming problem. 8 PN
i¼1 ai yi Fðxi Þ
> vL
The solution to the optimization problem of Eq. (31) under the >
> vw ¼ 0 0 w ¼
>
>
>
> P
i¼1 ai yi ¼ 0
constraints of Eq. (32) is given by the saddle point of the Lagrangian vL ¼ 0 0
< vb N
(Minoux, 1986), (37)
>
> vL ¼ 0 0 a ¼ gz
>
> vzi i i i ¼ 1; :::; N
h i >
>
1 CX N XN
: vL ¼ 0 0 y
wT Fx  þ b ¼ 1  z
>
Jðw; b; a; z; bÞ ¼ wT w þ zi  ai ðyi wT Fðxi Þ þ b  1 þ zi Þ vai i i i i ¼ 1; :::; N
2 2 i¼1 i¼1
X
N By defining Y ¼ ½y1 ; :::; yN , 1N ¼ ½1; :::; 1, z ¼ ½z1 ; :::; zN ,
 bi zi a ¼ ½a1 ; :::; aN  and eliminating w and z, following KarusheKuhne
i¼1 Trucker system is obtained (Suykens et al., 2002; Suykens and
(33) Vandewalle, 1999):

where a, b are the Lagrange multipliers. A modified version of SVM, 0 1TN b 0
¼ (38)
least square SVM (LSSVM), has been developed by Suykens and 1N U þ g1 IN a Y
Vandewalle (1999) for reducing the SVM model complexity and
its improvement. In LSSVM algorithm, solution is obtained by where IN is an N  N identity matrix, and U˛RNN is the kernel
solving a linear set of equations instead of solving a quadratic matrix defined by:
programming problem involved by standard SVM (Suykens et al.,      
2002; Suykens and Vandewalle, 1999). Uij ¼ F xi F xj ¼ K xi ; xj (39)
In contrast to SVM, the LSSVM is trained by minimizing the cost
function which is defined as follow (Suykens and Vandewalle, For LSSVM, there are many kernel function including linear, poly-
1999): nomial, spline, radial basis function (RBF), sigmoid, etc. (Gunn,
1998; Muller et al., 2001). However, most widely used kernel
1 T gX N functions are RBF (Eq. (40)) and polynomial (Eq. (41)).
Q ðw; zÞ ¼ w wþ z2 (34)
2 2 i¼1 i     2 
K xi ; xj ¼ exp  xi  xj  =s2 (40)
Subject to the constraints (Suykens and Vandewalle, 1999):
h i    d
yi wT Fðxi Þ þ b ¼ 1  zi i ¼ 1; 2; :::; N (35) K xi ; xj ¼ 1 þ xTi xj =c (41)

In the LSSVM, one works with equality instead of inequality where s2 is the squared variance of the Gaussian function and d is
constraints. Therefore, the optimal solution can be obtained by the polynomial degree, which should be optimized by the user to
solving a set of linear equations instead of solving a quadratic obtain the support vector.
programming problem (Suykens and Vandewalle, 1999). To derive
the dual problem for LSSVM non-linear classification problem, the
Lagrange function is defined as: Table 2
Statistical quality measures of the developed LSSVM model to determine the
n h i o compressibility factor.
  1 gX N XN  
L w;b; z; a ¼ wT wþ z2i  ai yi wT F xi þb 1þ zi Statistical parameter Training Validation Test Total
2 2 i¼1 i¼1 set set set
(36) Coefficient of determination (R2) 0.9999 0.9998 0.9997 0.9999
Average absolute relative error 0.16 0.27 0.26 0.19
where ai values are Lagrange multipliers, which is positive or (AARE %)
negative due to LSSVM formulation. The conditions for optimality Root mean square error (RMSE) 0.0032 0.0052 0.0052 0.0039
Number of experimental data set 1574 337 338 2249
of upper function yield (Suykens et al., 2002):
12 A. Fayazi et al. / Journal of Natural Gas Science and Engineering 16 (2014) 8e17

and specific gravity of the C7þ, experimentally measured


compressibility factors, pressures and temperatures. A complete
statistical description of the data bank is reported in Table 1.
The database was first divided into three sets. The first part
known as training set is used for construction and training of the
model (70% of main data set). The second part namely validation set
is used for selecting optimal parameters of the LSSVM model and
also to avoid the over-fitting problems (15% of main data set). The
task of remaining data, i.e. test set, is to evaluate the capability of
proposed model for prediction of unused data within the model
development (Arabloo et al., 2013; Mohammadi et al., 2011). It
should be noted that the division of database into three mentioned
sections is performed randomly. The benefit of this kind of data
allocation is that in each subset there is enough representative data
for whole ranges of operating conditions.

3.3. Designing the LSSVM model

To build the LSSVM model for precise prediction of gas


compressibility factor, gas composition (mole percent of C1eC7þ,
Fig. 1. Comparison between the results of the developed LSSVM model and the
experimental data. H2S, CO2, and N2), molecular weight of C7þ, pressure and temper-
ature are assumed as the correlating variables as:
   
3.2. Data collection Z ¼ f yi ; MWC7þ ; P; T yi ˛ yC1 ; yC2 ; :::; yC6 ; yC7þ ; yH2 S ; yCO2 ; yN2
(42)
In order to perform the work plan explained in this study, a large
number of data for a variety of natural gases were collected from The mean square error (MSE) between the developed model
open literature (Buxton and Campbell, 1967; Capla et al., 2002; results and corresponding experimental values, as defined by Eq.
Chamorro et al., 2006; Li and Guo, 1991; Liu et al., 2013; May et al., (43), is considered as objective function during model computation.
2001; McElroy et al., 2001; McLeod, 1968; Satter and Campbell,
PN  2
j¼1 tj  oj
1963; Sun et al., 2012; Yan et al., 2013). These data contain prop-
erties of 2249 gases, covering lean, sweet to rich and acid or sour MSE ¼ (43)
N
gases (H2S and CO2). These measurements include gas composi-
tions (mole percent of C1eC7þ, H2S, CO2, and N2), molecular weight where t and o are target and estimated values, respectively.

20

15

10

5
(Zexp−Zpred)/Zexp*100

−5

−10

−15 Training
Validation
Test
−20
0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4
Experimental Z−factor

Fig. 2. Relative errors of the gas compressibility factor values obtained by the developed model from experimental data base values.
A. Fayazi et al. / Journal of Natural Gas Science and Engineering 16 (2014) 8e17 13

2.5 2.5

2 2
Predicted Z−factor

Predicted Z−factor
1.5 1.5

1 1

0.5 0.5

0 0
0 0.5 1 1.5 2 2.5 0 0.5 1 1.5 2 2.5
Experimental Z−factor Experimental Z−factor

Fig. 3. Comparison between the results of the Beggs and Brill (BB) correlation and the Fig. 5. Comparison between the results of the HeidaryaneMoghadasieRahimi (HMR)
experimental data. correlation and the experimental data.

4. Results and discussion Table 2 indicates the statistical parameters of the developed
model including coefficient of determination (R2), average absolute
4.1. Accuracy of the model relative error (AARE), and root mean square error (RMSE) for pre-
diction of compressibility factor.
There are generally two parameters in LSSVM algorithm The scatter diagram that compares developed model outputs
including s2 and g, which are supposed to be optimized regarding versus experimental values is shown in Fig. 1. A tight cloud of points
the specified problem (Farasat et al., 2013; Hemmati-Sarapardeh about 45 line for training, validation and testing data sets indicate
et al., 2014; Rafiee-Taghanaki et al., 2013). The optimization pro- the robustness of the proposed model.
cedure has been repeated several times as attempts to reach to the Fig. 2 shows the relative error distribution for all experimental
global optimum of the problem. In this work, we have applied the data points. The results illustrate that excellent agreement exists
Coupled Simulated Annealing (CSA) optimization technique between the prediction of LSSVM model and the experimental
(Xavier-de-Souza et al., 2010). The optimized values of the LSSVM data. It would also be interesting to see the performance and ac-
algorithm have been calculated as follows: curacy of the proposed model against existing correlations. For
this purpose, the data sets used to develop the LSSVM model were
g ¼ 6:048046E þ 4 utilized to evaluate the accuracy of the model against existing
correlations: Beggs and Brill (BB) (Beggs and Brill, 1973), Shell Oil
s2 ¼ 8:647087E  1 Company (S) (Kumar, 2004), HeidaryaneMoghadasieRahimi

2.5 2.5

2 2
Predicted Z−factor
Predicted Z−factor

1.5 1.5

1 1

0.5 0.5

0 0
0 0.5 1 1.5 2 2.5 0 0.5 1 1.5 2 2.5
Experimental Z−factor Experimental Z−factor

Fig. 4. Comparison between the results of the Shell Oil Company (S) correlation and Fig. 6. Comparison between the results of the AzizieBehbahanieIsazadeh (ABI) cor-
the experimental data. relation and the experimental data.
14 A. Fayazi et al. / Journal of Natural Gas Science and Engineering 16 (2014) 8e17

Table 5
Compositions of four natural gas mixtures used for validation.

Component Mole (%)

No. 1 No. 2 No. 3 No. 4

N2 0.52 0 0.52 5.84


CO2 1.31 0 20.16 0
H2S 5.7 19.7 0 0
C1 91.51 71.3 74.58 54.35
C2 0.84 9 4.74 16.32
C3 0.08 0 0 16.2
i-C4 0.02 0 0 5.87
n-C4 0.02 0 0 0
i-C5 0 0 0 0.91
n-C5 0 0 0 0
C6 0 0 0 0.18

study has the smallest average relative error (ARE), average abso-
lute relative error (AARE), root mean square error (RMSE), and the
highest coefficient of determination (R2) for all types of natural
gases considered.
Fig. 7. Comparison between the results of the Sanjari and Nemati Lay (SN) correlation
and the experimental data.
4.2. Validity of the model

(HMR) (Heidaryan et al., 2010), AzizieBehbahanieIsazadeh (ABI) To make sure that the proposed model is physically correct, its
(Azizi et al., 2010), and Sanjari and Nemati Lay (SN) (Sanjari and validity should be checked (Chamkalani et al., 2013). For this pur-
Lay, 2012). pose, the experimental data and computed Z-factor values from
Figs. 3e7 illustrate the predicted results applying the above- LSSVM model as well as other mentioned empirical correlations
mentioned correlations versus experimental values of Z-factor for versus pseudo-reduced pressure at constant pseudo-reduced
all of the 2249 data sets used for developing the LSSVM model. temperature for four different natural gas mixtures (see Table 5)
These cross-plots show the degree of agreement between experi- are presented in Fig. 8. Real gases may deviate negatively or posi-
mentally measured data and the predicted values. As can be seen tively from ideality, depending on the effect of the intermolecular
from Figs. 1 and 3e7 the predictions of the Z-factor made by forces of the gas. As can be seen from Fig. 8, the model has suc-
developed LSSVM model yield the closest agreement with the cessfully captured the physical trend of changing the gas
experimental data among the selected correlations. compressibility factor versus pseudo-reduced pressure at constant
Furthermore, statistical errors of the mentioned correlations as temperature.
well as our proposed model are reported in Tables 3 and 4. It is clear
that the developed compositional LSSVM model presented in this
4.3. Case study

Table 3 The ability of the new method for calculating the gas
Statistical parameters for each Z-factor correlation versus experimental data.
compressibility factor as a function of changing pressure has been
Correlation ARE % AARE % RMSE R2 investigated for a gas sample (Zhou et al., 2006) that was not
Beggs and Brill (1973) 1.02 3.61 0.055 0.970 employed during the process of model development. The compo-
Shell oil company (Kumar, 2004) 0.52 2.67 0.036 0.988 sition of this sample is reported in Table 6.
Heidaryan et al. (2010) 0.85 3.03 0.038 0.987 Fig. 9 shows the comparison between the experimental and
Azizi et al. (2010) 1.04 3.07 0.040 0.987
predicted Z-factor (see Table 7) by all models considered in this
Sanjari and Lay (2012) 1.55 3.57 0.047 0.980
LSSVM (this study) 0.01 0.19 0.004 0.999 study for this gas sample. As shown in Fig. 9, the developed LSSVM
model is much more accurate than other empirical methods for

Table 4
Average absolute relative error of the developed LSSVM model compared with other predictive correlations.

Ref. Data points No. of gas P, MPa T, K MW AARE %


mixtures
BB S HMR ABI SN LSSVM
(This study)

(Buxton and Campbell, 1967) 165 5 7.07e48.44 310.93e344.26 18.17e23.68 2.14 2.00 2.41 2.09 2.98 0.37
(Satter and Campbell, 1963) 105 5 7.07e48.44 311.54e344.87 18.11e20.86 2.60 2.60 2.04 4.02 3.64 0.08
(Li and Guo, 1991) 47 5 0.66e7.53 310.20e359.40 16.37e24.42 0.96 0.77 0.80 0.82 0.98 0.13
(Liu et al., 2013) 92 2 35.00e95.04 347.70e419.20 17.04e17.07 3.00 1.72 1.78 1.50 2.55 0.05
(Yan et al., 2013) 234 2 10.00e116.50 313.20e441.80 16.51e19.43 3.83 1.99 1.35 1.96 1.78 0.04
(Sun et al., 2012) 535 4 22.03e118.89 303.20e418.60 17.05e20.51 4.04 1.71 1.54 2.13 2.18 0.02
(McLeod, 1968) 597 25 3.45e48.44 266.48e366.48 17.12e26.72 3.22 2.70 3.99 3.58 5.36 0.4
(May et al., 2001) 87 5 0.94e10.18 278.30e313.16 17.92e21.85 5.43 3.80 5.20 5.03 5.92 0.18

(Capla et al., 2002) 84 3 0.99e15.02 253.15e323.15 16.31e17.84 2.44 1.57 2.22 2.18 3.44 0.35
(Chamorro et al., 2006) 242 2 0.90e20.07 240.00e400.07 17.24e18.43 5.48 6.31 5.64 5.63 3.77 0.12
(McElroy et al., 2001) 61 6 0.67e8.61 283.14e333.17 29.93e31.37 3.28 4.59 4.63 4.73 4.30 0.22
Total 2249 64 3.62 2.67 3.03 3.07 3.57 0.19
A. Fayazi et al. / Journal of Natural Gas Science and Engineering 16 (2014) 8e17 15

(a) (b)
0.95

1.15

0.9 1.1

1.05

0.85 1
Z-factor

Z-factor
0.95

0.8 0.9

Experimental 0.85 Experimental


Beggs and Brill Beggs and Brill
Shell oil company 0.8 Shell oil company
0.75
Heidaryan et al. Heidaryan et al.
Azizi et al. Azizi et al.
0.75
Sanjari and Lay Sanjari and Lay
LSSVM (This study) LSSVM (This study)
0.7 0.7
0 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 9 10 11
Ppr Ppr

(c) (d) 1
1.2

1.15 0.95

1.1 0.9

1.05 0.85

1 0.8
Z-factor
Z-factor

0.95 0.75

0.9 0.7

0.85 Experimental 0.65 Experimental


Beggs and Brill Beggs and Brill
0.8 Shell oil company Shell oil company
0.6
Heidaryan et al. Heidaryan et al.
Azizi et al. Azizi et al.
0.75 0.55
Sanjari and Lay Sanjari and Lay
LSSVM (This study) LSSVM (This study)
0.7 0.5
1 2 3 4 5 6 7 8 9 10 11 0 1 2 3 4 5 6 7 8
Ppr
Ppr

Fig. 8. Trend plot of Z-factor vs. Ppr. (a): gas mixture 1 at Tpr ¼ 1.52; (b): gas mixture 2 at Tpr ¼ 1.59; (c): gas mixture 3 at Tpr ¼ 1.45; (d): gas mixture 4 at Tpr ¼ 1.28.

prediction of a natural gas stream containing non-hydrocarbon


components. 0.96
Experimental
Beggs and Brill
5. Conclusion 0.94 Shell oil company
Heidaryan et al.
0.92 Azizi et al.
In this study, least square support vector machine technique as a Sanjari and Lay
supervised learning method has been applied to predict Z-factor of LSSVM (This study)
0.9
natural gases. Coupled simulated annealing (CSA) optimization was
used for determination of LSSVM hyper-parameters. To achieve the
Z-factor

0.88

Table 6 0.86
Composition of the case studied gas sample.

Component Mole (%) 0.84

N2 2.031
0.82
CO2 0.403
C1 90.991
C2 2.949 0.8
C3 1.513
i-C4 0.755 0.78
2 4 6 8 10 12 14 16 18 20
n-C4 0.755
P(MPa)
i-C5 0.299
n-C5 0.304
Fig. 9. Experimental and predicted compressibility factor for the gas sample.
16 A. Fayazi et al. / Journal of Natural Gas Science and Engineering 16 (2014) 8e17

Table 7
Experimental data and results of LSSVM model and other studied correlations for the gas sample.

T, K P, MPa Experimental Z-factor Predicted Z-factor

BB S HMR ABI SN LSSVM (this study)

305.15 18.88 0.7937 0.7986 0.7903 0.8172 0.8131 0.8357 0.7952


15.94 0.7884 0.8017 0.7910 0.8086 0.8117 0.8235 0.7921
13.03 0.7979 0.8173 0.8049 0.8218 0.8230 0.8380 0.8035
10.79 0.8169 0.8379 0.8249 0.8431 0.8409 0.8551 0.8221
7.02 0.8680 0.8877 0.8754 0.8902 0.8864 0.8973 0.8681
3.72 0.9272 0.9413 0.9323 0.9380 0.9351 0.9436 0.9203

research objectives, 2249 data sets covering wide range of experi- Ppr Pseudo-reduced pressure
mental conditions were gathered from open literature to construct Pr reduced pressure
and test the model. The average absolute relative error (AARE) and pred predicted
coefficient of determination (R2) between the model predictions Tc critical temperature
and the relevant experimental data were found to be 0.19% and Tpr Pseudo-reduced temperature
0.999, respectively. Moreover, a comparison between predictions of Tr reduced temperature
developed LSSVM model and other empirical correlations shows w weight vector
that developed model is more reliable than other conventional ai Lagrange multipliers
methods for predicting natural gas Z-factor. In addition, the validity F map from input space into feature space
of the model was examined and the results indicate that the model g relative weight of the summation of the regression errors
is capable of simulating the actual physical trend of the Z-factor as a s2 squared bandwidth
function of pseudo-reduced pressure and temperature. Results U Kernel matrix
from present study show that the proposed compositional LSSVM z slack variable
model can be easily implemented in any reservoir simulation
software and provides superior accuracy and performance for gas
reservoir engineering calculations.
References

Appendix A. Statistical formulas Ahmed, T., 2001. Reservoir Engineering Handbook, second ed. Gulf Professional
Publishing Company, Houston, Texas, USA.
Ahmed, T.H., 1989. Hydrocarbon Phase Behavior. Gulf Publishing Company, Hous-
ton, TX.
Coefficient of determination Amendolia, S.R., et al., 2003. A comparative study of K-nearest neighbour, support
PN  pred 2 vector machine and multi-layer perceptron for Thalassemia screening. Che-
i¼1 Zi  Ziexp mometr. Intell. Lab. Syst. 69 (1e2), 13e20.
2
R ¼ 1 Arabloo, M., Shokrollahi, A., Gharagheizi, F., Mohammadi, A.H., 2013. Toward a
PN  pred 
exp
2 predictive model for estimating dew point pressure in gas condensate systems.
i¼1 Zi  average Zi Fuel Process. Technol. 116 (0), 317e324.
Azizi, N., Behbahani, R., Isazadeh, M.A., 2010. An efficient correlation for calculating
! compressibility factor of natural gases. J. Nat. Gas Chem. 19 (6), 642e645.
100XN Zipred  Ziexp Baylar, A., Hanbay, D., Batan, M., 2009. Application of least square support vector
Average relative error ARE% ¼ machines in the prediction of aeration performance of plunging overfall jets
N i¼1 Ziexp from weirs. Expert Syst. Appl. 36 (4), 8368e8374.
Bazzani, A., et al., 2001. An SVM classifier to separate false signals from micro-
calcifications in digital mammograms. Phys. Med. Biol. 46 (6), 1651.
Average absolute relative error Beggs, D.H., Brill, J.P., 1973. A study of two-phase flow in inclined pipes. J. Petrol.
 pred ! Technol. 25 (5), 607e617.
100XN Z  Zi 
exp Buxton, T.S., Campbell, J.M., 1967. Compressibility factors for lean natural gase
 i
AARE% ¼ i¼1 
  carbon dioxide mixtures at high pressure. SPE J. 7 (1), 80e86.
N Z
exp  Calhoun, J.C., 1951. Reservoir Fluids. University of Oklahoma Press, Norman, OK.
i

Capla, L., Buryan, P., Jedelský, J., Rottner, M., Linek, J., 2002. Isothermal pVT mea-
surements on gas hydrocarbon mixtures using a vibrating-tube apparatus.
Root mean square error ðRMSEÞ J. Chem. Thermodyn. 34 (5), 657e667.
0P   11 Chamkalani, A., Arabloo, M., Chamkalani, R., Zargari, M.H., Dehestani-Ardakani, M.R.,
N pred exp 2 2 Farzam, M., 2013. Soft computing method for prediction of CO2 corrosion in flow
B i¼1 Z i
 Z i C lines based on neural network approach. Chem. Eng. Commun. 200, 731e747.
RMSE ¼ @ A Chamorro, C.R., et al., 2006. Measurement of the (pressure, density, temperature)
N relation of two (methane þ nitrogen) gas mixtures at temperatures between
240 and 400 K and pressures up to 20 MPa using an accurate single-sinker
densimeter. J. Chem. Thermodyn. 38 (7), 916e922.
Chen, T.-S., et al., 2011. A novel knowledge protection technique base on support
Nomenclature vector machine model for anti-classification. In: Zhu, M. (Ed.), Electrical Engi-
neering and Control. Lecture Notes in Electrical Engineering. Springer, Berlin
Heidelberg, pp. 517e524.
AT transpose of matrix A Cortes, C., Vapnik, V., 1995. Support-vector networks. Mach. Learn. 20 (3), 273e297.
b bias term Dranchuk, P.M., Abou-Kassem, J.H., 1975. Calculation of z factors for natural gases
d the polynomial degree using equations of state. J. Can. Petrol. Technol. 14 (3), 34e36.
Elsharkawy, A.M., 2004. Efficient methods for calculations of compressibility, den-
exp experimental
sity and viscosity of natural gases. Fluid Phase Equilibr. 218 (1), 1e13.
IN N  N identity matrix Farasat, A., Shokrollahi, A., Arabloo, M., Gharagheizi, F., Mohammadi, A.H., 2013.
Kðxi ; xj Þ Kernel function Toward an intelligent approach for determination of saturation pressure of
L Lagrangian crude oil. Fuel Process. Technol. 115, 201e214.
Gunn, S.R., 1998. Support Vector Machines for Classification and Regression. Uni-
MW C7þ molecular weight of heptane-plus fraction versity of Southampton, Faculty of Engineering, Science and Mathematics
Pc critical pressure School of Electronics and Computer Science.
A. Fayazi et al. / Journal of Natural Gas Science and Engineering 16 (2014) 8e17 17

Hall, K.R., Iglesias-Silva, G.A., 2007. Improved equations for the StandingeKatz ta- Satter, A., Campbell, J.M., 1963. Non-ideal behavior of gases and their mixtures. SPE
bles. Hydrocarbon Process 86 (4), 107e110. J. 3 (4), 333e347.
Heidaryan, E., Moghadasi, J., Rahimi, M., 2010. New correlations to predict natural Shokrollahi, A., Arabloo, M., Gharagheizi, F., Mohammadi, A.H., 2013. Intelligent
gas viscosity and compressibility factor. J. Petrol. Sci. Eng. 73 (1e2), 67e72. model for prediction of CO2 e reservoir oil minimum miscibility pressure. Fuel
Hemmati-Sarapardeh, A., et al., 2014. Reservoir oil viscosity determination using a 112, 375e384.
rigorous approach. Fuel 116, 39e48. Soave, G., 1972. Equilibrium constants from a modified RedlicheKwong equation of
Katz, D.L., et al., 1959. Handbook of Natural Gas Engineering. McGraw-Hill Book state. Chem. Eng. Sci. 27 (6), 1197e1203.
Company, New York City. Standing, M.B., Katz, D.L., 1942. Density of natural gases. Trans. AIME 146, 140e149.
Kay, W., 1936. Gases and vapors at high temperature and pressure e density of Stewart, W.F., Burkhardt, S.F., Voo, D., 1959. Prediction of Pseudo Critical Parameters
hydrocarbon. Indust. Eng. Chem. 28 (9), 1014e1019. for Mixtures, AIChE Meeting, Kansas City, MO.
Kumar, N., 2004. Compressibility Factor for Natural and Sour Reservoir Gases by Sun, C.-Y., et al., 2012. Experiments and modeling of volumetric properties and
Correlations and Cubic Equations of State. MS thesis. Texas Tech University, phase behavior for condensate gas under ultra-high-pressure conditions.
Lubbock, Tex, USA. Indust. Eng. Chem. Res. 51 (19), 6916e6925.
Li, Q., Guo, T.-M., 1991. A study on the supercompressibility and compressibility Sutton, R.P., 1985. Compressibility Factors for High-molecular-weight Reservoir
factors of natural gas mixtures. J. Petrol. Sci. Eng. 6 (3), 235e247. Gases, SPE Annual Technical Conference and Exhibition. Society of Petroleum
Liu, H., et al., 2013. Phase behavior and compressibility factor of two China gas Engineers, Las Vegas, NV.
condensate samples at pressures up to 95 MPa. Fluid Phase Equilibr. 337, 363e369. Suykens, J.A.K., Gestel, T.V., Brabanter, J.D., Moor, B.D., Vandewalle, J., 2002. Least
Londono, F.E., Archer, R.A., Blasingame, T.A., 2005. Correlations for hydrocarbon-gas Squares Support Vector Machines. World Scientific Pub. Co., Singapore.
viscosity and gas density-validation and correlation of behavior using a large- Suykens, J.A.K., Vandewalle, J., 1999. Least squares support vector machine classi-
scale database. SPE Reservoir Eval. Eng. 8 (6), 561e572. fiers. Neural Process. Lett. 9 (3), 293e300.
May, E.F., Miller, R.C., Shan, Z., 2001. Densities and dew points of vapor mixtures of Übeyli, E.D., 2010. Least squares support vector machine employing model-based
methane þ propane and methane þ propane þ hexane using a dual-sinker methods coefficients for analysis of EEG signals. Expert Syst. Appl. 37 (1),
densimeter. J. Chem. Eng. Data 46 (5), 1160e1166. 233e239.
McElroy, P.J., Fang, J., Williamson, C.J., 2001. Second and third virial coefficients for van der Waals, J.D., 1873. Continuity of the Gaseous and Liquid State of Matter. Ph.D.
(methane þ ethane þ carbon dioxide). J. Chem. Thermodyn. 33 (2), 155e163. dissertation thesis. University of Leiden.
McLeod, W.R., 1968. Application of Molecular Refraction to the Principle of Corre- Vapnik, V., 2000. The Nature of Statistical Learning Theory. Springer.
sponding States. Ph.D. thesis. University of Oklahoma. Wang, X., Economides, M., 2009. Advanced Natural Gas Engineering. Gulf Pub-
Minoux, M., 1986. Mathematical Programming: Theory and Algorithms. John Wiley lishing Company, Houston, Texas, p. 400.
and Sons. Xavier-de-Souza, S., Suykens, J.A.K., Vandewalle, J., Bolle, D., 2010. Coupled
Mohammadi, A.H., et al., 2011. Gas hydrate phase equilibrium in porous media: simulated annealing. IEEE Trans. Syst. Man Cybernet. B: Cybernet. 40 (2),
mathematical modeling and correlation. Indust. Eng. Chem. Res. 51 (2),1062e1072. 320e335.
Muller, K.-R., Mika, S., Ratsch, G., Tsuda, K., Scholkopf, B., 2001. An introduction to Yan, K.-L., et al., 2013. Measurement and calculation of gas compressibility factor for
kernel-based learning algorithms. IEEE Trans. Neural Networks 12 (2), 181e201. condensate gas and natural gas under pressure up to 116 MPa. J. Chem. Ther-
Peng, D.-Y., Robinson, D.B., 1976. A new two-constant equation of state. Indust. Eng. modyn. 63, 38e43.
Chem. Fundament. 15 (1), 59e64. Zhou, J., et al., 2006. (p, Vm, T) and phase equilibrium measurements for a natural
Rafiee-Taghanaki, S., et al., 2013. Implementation of SVM framework to estimate gas-like mixture using an automated isochoric apparatus. J. Chem. Thermodyn.
PVT properties of reservoir oil. Fluid Phase Equilibr. 346 (0), 25e32. 38 (11), 1489e1494.
Sanjari, E., Lay, E.N., 2012. An accurate empirical correlation for predicting natural
gas compressibility factors. J. Nat. Gas Chem. 21 (2), 184e188.

You might also like