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

This article was downloaded by: [University of Haifa Library]

On: 31 July 2013, At: 15:22


Publisher: Taylor & Francis
Informa Ltd Registered in England and Wales Registered Number: 1072954 Registered
office: Mortimer House, 37-41 Mortimer Street, London W1T 3JH, UK

Petroleum Science and Technology


Publication details, including instructions for authors and
subscription information:
http://www.tandfonline.com/loi/lpet20

The Prediction of the Compressibility


Factor of Sour and Natural Gas by an
Artificial Neural Network System
a b c
B. Duraya Al-Anazi , G. R. Pazuki , M. Nikookar & A. Fannoush
d
Al-Anazi
a
King Abdulaziz City for Science and Technology, Oil and Gas Center,
Riyadh, Saudi Arabia
b
Department of Biochemical Engineering, Malek Ashtar University of
Technology, Tehran, Iran
c
IOR Research Institute, NIOC R&D, Tehran, Iran
d
Saudi Aramco, Dhahran, Saudi Arabia
Published online: 07 Feb 2012.

To cite this article: B. Duraya Al-Anazi , G. R. Pazuki , M. Nikookar & A. Fannoush Al-Anazi (2011)
The Prediction of the Compressibility Factor of Sour and Natural Gas by an Artificial Neural Network
System, Petroleum Science and Technology, 29:4, 325-336, DOI: 10.1080/10916460903330080

To link to this article: http://dx.doi.org/10.1080/10916460903330080

PLEASE SCROLL DOWN FOR ARTICLE

Taylor & Francis makes every effort to ensure the accuracy of all the information (the
“Content”) contained in the publications on our platform. However, Taylor & Francis,
our agents, and our licensors make no representations or warranties whatsoever as to
the accuracy, completeness, or suitability for any purpose of the Content. Any opinions
and views expressed in this publication are the opinions and views of the authors,
and are not the views of or endorsed by Taylor & Francis. The accuracy of the Content
should not be relied upon and should be independently verified with primary sources
of information. Taylor and Francis shall not be liable for any losses, actions, claims,
proceedings, demands, costs, expenses, damages, and other liabilities whatsoever or
howsoever caused arising directly or indirectly in connection with, in relation to or arising
out of the use of the Content.

This article may be used for research, teaching, and private study purposes. Any
substantial or systematic reproduction, redistribution, reselling, loan, sub-licensing,
systematic supply, or distribution in any form to anyone is expressly forbidden. Terms &
Conditions of access and use can be found at http://www.tandfonline.com/page/terms-
and-conditions
Downloaded by [University of Haifa Library] at 15:22 31 July 2013
Petroleum Science and Technology, 29:325–336, 2011
Copyright © Taylor & Francis Group, LLC
ISSN: 1091-6466 print/1532-2459 online
DOI: 10.1080/10916460903330080

The Prediction of the Compressibility Factor of


Sour and Natural Gas by an Artificial Neural
Network System

B. DURAYA AL-ANAZI,1 G. R. PAZUKI,2 M. NIKOOKAR,3


AND A. FANNOUSH AL-ANAZI4
1
King Abdulaziz City for Science and Technology, Oil and Gas Center,
Downloaded by [University of Haifa Library] at 15:22 31 July 2013

Riyadh, Saudi Arabia


2
Department of Biochemical Engineering, Malek Ashtar University of
Technology, Tehran, Iran
3
IOR Research Institute, NIOC R&D, Tehran, Iran
4
Saudi Aramco, Dhahran, Saudi Arabia

Abstract In this study, a multilayer normal feed-forward artificial neural network


with three layers has been developed for prediction of compressibility factors of gases
with different compositions. This model was developed using 977 experimental data
of compressibility factors obtained from the literature. In this model, some statistical
criteria such as R2 , root mean square error (RMSE), and average absolute deviation
(AAD) are obtained 0.991, 0.024, and 0.965, respectively. Model validity was obtained
by comparison between the experimental results and the results of various equations
of state, such as van der Waals (1910), Redlich-Kwong (1949), Lawal-Lake-Silberberg
(Lawal, 1999), Peng-Robinson (1976), and pseudo-experimental correlations such as
Dranchuk-Abu-Kassem (1975), Dranchuk-Purvis-Robinson (1974), Hall-Yarborough
(1973), Brill-Beggs (1974), Shell Oil Company (2003), Gopal (1977) obtained result
of this model. It can be inferred that the results of this model are compatible with the
experimental data and the obtained result of this model is more accurate than other
correlations.

Keywords artificial neural network, compressibility factor, natural gas, sour gas

Introduction
The compressibility factor (Z-factor) is a dimensionless quantity and is defined as the
ratio of the volume actually occupied by a gas at a given pressure and temperature to
the volume it would occupy if it behaved ideally (Neeraj, 2004). It is a measure of the
deviation of a real gas from ideal behavior. The compressibility factor depends on the
conditions of temperature (T), pressure (P), and the composition of the gas. Accurate
information on compressibility factor values is necessary in engineering applications like
gas metering, pipeline design, estimating reserves, gas flow rate, and material balance
calculations. Compressibility factor is also important for calculating gas properties such
as gas formation volume factor, gas isothermal compressibility, gas viscosity, and gas

Address correspondence to G. R. Pazuki, Department of Chemical Engineering, Amirkabir


University of Technology, Tehran, Iran. E-mail: ghpazuki@yahoo.com

325
326 B. Duraya Al-Anazi et al.

density. The most common sources of Z-factor values are experimental measurement,
equations of state, and empirical correlations. The necessity for the calculation of this
parameter arises when there is no available experimental data for the required composi-
tion, pressure, and temperature conditions.
The kinetic theory of gases (the basis for the ideal gas law) assumes that there are
neither attractive forces nor repulsive forces between the gas molecules. In nature, ideal
gases do not exist; instead, real gases exist.
Under normal conditions, the molecules are quite far apart and the attractive forces
are negligible and this is true also at high temperatures because of the greater kinetic
motion. Under these conditions, the gas tends to approach ideal behavior. At high
pressures, the molecules come very close to each other, resulting in significant attractive
forces. These theories qualitatively explain the behavior of nonideal (real) gases and a
general representation of the gas law is as follows:
Downloaded by [University of Haifa Library] at 15:22 31 July 2013

Ideal gas law: PV D nRT (1)

Real gas law: PV D ZnRT (2)

In general, real gases exhibit negative deviations from ideality at lower pressures
and positive deviations at higher pressures. As the temperature increases, real gases tend
to behave more ideally and the compressibility factor remains closer to 1 over a wider
range of pressures (Neeraj, 2004).
Several different correlations are available for this important parameter. The basic
correlations use the corresponding states concept. The theory of corresponding states
dictates that the Z-factor can be uniquely defined as a function of two dimensionless
properties (Ahmed, 2000), pseudo-reduced pressure and pseudo-reduced temperature.
These dimensionless terms are defined by the following expressions (Ahmed, 2000):

P
Ppr D (3)
Ppc

T
Tpr D (4)
Tpc

where Ppc and Tpc are defined by Kay’s rule:


n
X
Ppc D yi Pci (5)
i D1

n
X
Tpc D yi Pci (6)
i D1

Based on the concept of pseudo-reduced properties, Standing and Katz (1942) pre-
sented a generalized gas compressibility factor chart as a function of Ppr and Tpr . This
chart is generally reliable for natural gas with a minor value of non-hydrocarbons. It
is one of the most widely accepted correlations in the oil and gas industry (Ahmed,
2000). Several mathematical expressions fitting the Standing and Katz chart have been
proposed to calculate the gas compressibility factor (Hankinson et al., 1969; Hall and
Yarborough, 1973; Brill and Beggs, 1974; Dranchuk et al., 1974; Dranchuk and Abou-
Prediction of Compressibility Factors 327

Kassem, 1975; Gopal, 1977; Shell Oil Company, 2003). Evaluation of these methods by
Takacs (1976) and Elsharkawy et al. (2000) concluded that Dranchuk and Abou-Kassem’s
(1975) correlation is the most accurate representation of the Standing and Katz chart.
Using an equation of state (EOS) is another method for predicting gas compositions.
van der Waals (1910) modified the ideal gas EOS by considering intermolecular forces and
moleculare volume and calculated compressibility factors. Determining compressibility
factors using the van der Waals (1910) EOS is an improvement over using generalized
compressibility charts. However, there are modified versions of the van der Waals EOS
that provide even more improvement. Perhaps the most commonly used equations of
state by engineers working in petroleum refining, petrochemical production, natural gas
processing, cryogenic distillation, and related industries are the Redlich-Kwong equation
developed in 1949 (Redlich and Kwong, 1949), the Soave-Redlich-Kwong equation
developed in 1972 (Soave, 1972), and the Peng-Robinson equation developed in 1976
(Peng and Robinson, 1976). Those three equations are essentially modified versions of
Downloaded by [University of Haifa Library] at 15:22 31 July 2013

the van der Waals equation, such as Lawal-Lake-Silberberg (Lawal, 1999).


The objective of this work is to prove the ability of an artificial neural network
(ANN) to predict the gas compressibility factor. Among different ANNs reported in the
literature, a multilayer normal feed-forward method (back-propagation) with batch back-
propagation (BBP) was considered for accurate determination of this parameter. This
method was developed by the experimental data in the literature (Simon and Briggs,
1964; Robinson and Jacoby, 1965; Buxton and Campbell, 1967; McLeod, 1968; Wichert
and Aziz, 1972; Whitson, 1972; Elsharkawy and Foda, 1988). In order to study the
accuracy of the above method, the results obtained by the above model were compared
to the experimental data that were not used for training. Also, the results of various
semiempirical correlations such as Dranchuk and Abu-Kassem (1975), Dranchuk, et al.
(1974), Hall and Yarborough (1973), Brill and Beggs (1974), Shell Oil Company (2003),
Gopal (1977) and various equations of state such as van der Waals (1910), Redlich and
Kwong (1949), Lawal-Lake-Silberberg (Lawal, 1999), and Peng and Robinson (1976)
indicates the accuracy of the above model and the ability of an ANN to predict the
compressibility factor.

Theory of the Artificial Neural Network


A neural network consists of many calculating units called nodes, which are connected
parallel to each other and mathematical or physical explicit correlations are not required
for modeling (Wilamowski et al., 2001; Chouai et al., 2002; Piazza et al., 2006). These
nodes are inside the layers: input data enter the first layer and output data exit the last
layer. The layers between input and output layers are called hidden layers.
However, different artificial neural networks have been designed in which some
networks such as multilayer perceptrons (MLPs) and radial basis are used extensively.

Multilayer Perception Network


This network consists of one input layer, one output layer, and one or several hidden
layers. The term of bias in any layer is analogous to the constant term of a polynomial.
The number of neurons in input and output layers depends on the number of input
and output parameters and the number of neurons in a hidden layer may be equal to zero
or something. All layers are connected together and the strength of this interconnection
328 B. Duraya Al-Anazi et al.

depends on their weight. The output form of a neuron in a hidden layer is a transformation
of the sum output weights of input layers as below:
d
!
X
Zj D g Wji Pi (7)
i D1

The output form of a neuron in an output layer is a transformation of the sum output
weights of hidden layers as below:
0 1
m
X
qk D yQ @ WQ ki Zi A (8)
j D1

where Pi is the ith output from the input layer, Zj is the jth output from the hidden layer,
Downloaded by [University of Haifa Library] at 15:22 31 July 2013

Wij is the weight in the first layer connecting neuron i in the input layer to neuron j in
the hidden layer, WQ kj is the weight in the second layer connecting neuron j in the hidden
layer to the neuron k in the output layer, and g, yQ are the transformation functions.
The transformation function is usually a function as follows:
exp.a/ exp. a/
g.a/ D tanh a D (9)
exp.a/ C exp. a/
or
1
g.a/ D (10)
1 C exp. a/
In order to design an artificial neural network, the related experimental data should be
used. So, experimental data are divided into three groups: training, validating, and testing.
Training data are used to determine optimum values of the model (above correlations),
testing data are used for checking training data, and validating data are used to study
a model’s accuracy. The parameters of the above correlations are obtained by training
the ANN. A trained network can enter input parameters into the input layer and any
layer implements the calculation by the above correlations and the network output
is obtained by the last layer operation. Some criteria such as maximum number of
epochs, training time, root mean square error (RMSE), absolute fraction of variance
(R2 ), coefficient of variation, Pearson’s product moment correlation coefficient, and mean
absolute error (MAE) are considered to stop training. The above parameters are defined
as follows:
ˇ 1=2
2 3
L ˇ
1 X ˇˇ Oj tj ˇˇ2
RMSE D 4 5 (11)
P j D1
ˇ L ˇ

0X 1
.tj Oj /2
B j
C
R2 D 1 (12)
B C
B X C
@ .Oj /2 A
j

RMS
COV D  100 (13)
Omean
Prediction of Compressibility Factors 329

where t is objective, O is output, P is pattern, and Omean is average output. In the next
section, the model in this study will be discussed.

Results and Discussion


A neural network model has been developed for prediction of compressibility factors of
gases based on experimental data reported in the literature (Simon and Briggs, 1964;
Robinson and Jacoby, 1965; Buxton and Campbell, 1967; McLeod, 1968; Wichert and
Aziz, 1972; Whitson, 1972; Elsharkawy and Foda, 1988) at different temperatures and
pressures. Data are summarize in Table 1. This model is a multilayer normal feed-forward
network in which input parameters are reduced temperature and pressure, and the output
parameter is the compressibility factor.
This model, as shown in Figure 1, consists of an input layer, an output layer, and a
Downloaded by [University of Haifa Library] at 15:22 31 July 2013

hidden layer. The transformation function in this study is a sigmoid function according
to Eq. (3). A batch back-propagation algorithm has been used for training the network
and optimization of weights. During training, the error between experimental data for the
compressibility factor and calculated values of the model is reduced by optimization of
weights. Numerical values of weights for hidden and output layers are in Table 2. After
training and testing, the validity of the model will be studied.
The obtained results of this model were compared to the experimental results that
were not used in training and testing sections. R2 , RMSE, and average absolute devia-
tion (AAD) for this network are 0.98241, 0.024, and 0.96513, respectively. The model

Table 1
Properties of sour and natural gas data used in the study

Min Max Ave SD

Pressure, psi 154 7,026 2,820.434 1,714.193


Reservoir temperature, F 40 300 147.5603 54.42047
Methane 17.27 97.48 71.18086 15.31121
Ethane 0 28.67 3.868753 5.330848
Propane 0 13.16 1.442699 2.61906
Iso-butane 0 2.23 0.213282 0.306827
n-Butane 0 3.1 0.362751 0.535215
Iso-pentane 0 2.85 0.18681 0.336651
n-Pentane 0 0.79 0.103978 0.204583
Hexane 0 2.68 0.209847 0.37126
Heptane plus 0 8.17 0.646472 1.470838
MwC7C 0 150 50.69121 61.35013
SgC7C 0 0.905 0.310535 0.374229
Z-factor 0.402 1.241 0.867736 0.121662
Hydrogen sulfide 0 73.85 13.92025 15.91637
Carbon dioxide 0 54.46 6.006063 6.891975
Nitrogen 0 25.15 1.830481 3.088136
Tpr 0.974119 1.966492 1.466078 0.184076
Ppr 0.173562 10.19531 3.757962 2.37887
330 B. Duraya Al-Anazi et al.
Downloaded by [University of Haifa Library] at 15:22 31 July 2013

Figure 1. Schematic diagram of the 2-3-1 artificial neural network used in obtaining the
compressibility factor for natural gas.

Table 2
Weights and biases of the artificial
neural network

Connections Weights

N1L1-N1L2 2.1496
N1L1-N2L2 1.4062
N1L1-N3L2 4.1760
N2L1-N1L2 3.4794
N2L1-N2L2 3.4880
N2L1-N3L2 3.9624
B1-N1L2 0.1798
B1-N2L2 1.1129
B1-N3L2 0.0027
N1L2-N1L3 0.5980
N2L2-N1L3 1.2705
N3L2-N1L3 0.4864
B2-N1L3 0.4729
Prediction of Compressibility Factors 331

Table 3
Pseudo-experimental correlations

Name of correlation Correlation


 
0:06125Ppr t
Hall and Yarborough (1973) ZD ExpŒ 1:2.1 t/2 
Y
0:27Ppr
Dranchuk et al. (1974) ZD
r Tpr
0:27Ppr
Dranchuk and Abu-Kassem (1975) ZD
r Tpr
1 A
C CPD
Downloaded by [University of Haifa Library] at 15:22 31 July 2013

Brill and Beggs (1974) Z D AC pr


Exp.B/
 4
Ppr
Shell Oil Company (2003) Z D A C BPpr C .1 A/Exp. C / D
10

results have also been compared to the results of pseudo-experimental correlations such
as Dranchuk and Abu-Kassem (1975), Dranchuk, et al. (1974), Hall and Yarborough
(1973), Brill and Beggs (1974), Shell Oil Company (2003), and Gopal (1977; pseudo-
experimental correlations are in Table 3) and various equations of state such as van der
Waals (1910), Redlich and Kwong (1949), Lawal-Lake-Silberberg (Lawal, 1999), and
Peng and Robinson (1976).
In Table 4, error values of average absolute deviation error (AADE), average absolute
relative error (AARE), and R2 calculated by the ANN, equations of state, and pseudo-
experimental correlations are reported. As indicated in Table 4 and Figures 2–12, the
accuracy of the neural network model is better than other methods and the value of the
compressibility factor was predicted more accurately.

Table 4
Error analysis of the proposed and investigated compressibility factor models

Method used Error, % Abs. Error, % R2

Hall and Yarborough (1973) 2.182 4.239 0.892


Dranchuk et al. (1974) 0.347 2.616 0.906
Dranchuk and Abu-Kassem (1975) 0.298 2.592 0.907
Brill and Beggs (1974) 0.756 2.728 0.904
Shell Oil Company (2003) 0.960 2.701 0.908
Gopal (1977) 6.13 6.26 0.737
van der Waals (1910) EOS 0.311 6.429 0.771
Redlich and Kwong (1949) EOS 2.253 2.794 0.9112
Peng and Robinson (1976) EOS 0.805 2.986 0.8916
Lawal-Lake-Silberberg EOS (Lawal, 1999) 2.090 4.180 0.894
Artificial neural network 4.27 2.23 0.828
332 B. Duraya Al-Anazi et al.

Figure 2. Relationship between Z measured and Z predicted by the ANN.


Downloaded by [University of Haifa Library] at 15:22 31 July 2013

Figure 3. Relationship between Z measured and Z predicted by van der Waals’ (1910) equation.

Figure 4. Relationship between Z measured and Z predicted by Redlich and Kwong’s (1949)
equation.
Prediction of Compressibility Factors 333

Figure 5. Relationship between Z measured and Z predicted by Peng and Robinson’s (1976)
Downloaded by [University of Haifa Library] at 15:22 31 July 2013

equation.

Figure 6. Relationship between Z measured and Z predicted by the Lawal-Lake-Silberberg


equation (Lawal, 1999).

Figure 7. Relationship between Z measured and Z predicted by Dranchuk and Abu Kassem’s
(1975) correlation.
334 B. Duraya Al-Anazi et al.

Figure 8. Relationship between Z measured and Z predicted by Dranchuk et al.’s (1974)


Downloaded by [University of Haifa Library] at 15:22 31 July 2013

correlation.

Figure 9. Relationship between Z measured and Z predicted by Hall and Yarborough’s (1973)
correlation.

Figure 10. Relationship between Z measured and Z predicted by Brill and Beggs’ (1974)
correlation.
Prediction of Compressibility Factors 335

Figure 11. Relationship between Z measured and Z predicted by Shell Oil Company’s (2003)
correlation.
Downloaded by [University of Haifa Library] at 15:22 31 July 2013

Figure 12. Relationship between Z measured and Z predicted by Gopal’s (1977) correlation.

Conclusions
In this study, the value of the compressibility factor has been predicted by a model
developed based on an ANN and the obtained results were compared to the results
of mental data, the results predicted by some equations of state, and general pseudo-
experimental correlations. This comparison indicates the accuracy and strength of an
artificial neural network to predict the compressibility factor.

References
Ahmed, T. H. (2000). Reservoir Engineering Handbook, 2nd ed. Oxford: Butterworth-Heinemann.
Brill, J. P., and Beggs, H. D. (1974). Two-Phase Flow in Pipes. The Hague: INTERCOMP Course.
Buxton, T. S., and Campbell, J. M. (1967). Compressibility factors for lean natural gas–carbon
dioxide mixtures at high pressures. SPE J. 7:80–86.
Chouai, A., Laugier, S., and Richon, D. (2002). Modeling of thermodynamic properties using
neural networks: Application to refrigerant. Fluid Phase Equil. 199:53.
Dranchuk, P. M., and Abou-Kassem, J. H. (1975). Calculation of Z-factors for natural gases using
equations of state. J. Can. Petrol. Tech. 14:34.
Dranchuk, P. M., Purvis, R. A., and Robinson, D. B. (1974). Computer Calculation of Natural Gas
Compressibility Factors Using the Standing and Katz Correlations. Institute of Petroleum
Technical Series, No. IP74-008, pp. 1–13.
336 B. Duraya Al-Anazi et al.

Elsharkawy, A. M., and Foda, S. G. (1988). EOS simulation and GRNN modeling of the constant
volume depletion behavior of gas condensate reservoirs. Energ. Fuel. 12:353.
Elsharkawy, A. M., Hashem, Y. Kh., and Alikhan, A. A. (2000). Compressibility factor for gas
condensate reservoirs. Paper No. SPE 59702, SPE 2000 Permian Basin Oil and Gas Recover
Conference, Midland, TX, March 21–23.
Gopal, V. N. (1977). Gas Z-factor equation developed for computer. Oil Gas J. 8:58.
Hall, K. R., and Yarborough, L. (1973). A new equation of state for Z factor calculations. Oil Gas
J. 71:82.
Hankinson, R. W., Thomas, L. K., and Philips, K. A. (1969). Predict natural gas properties.
Hydrocarb. Process. 48:106–108.
Lawal, A. S. (1999). Application of the Lawal-Lake-Silberberg Equation-of-State to Thermodynamic
and Transport Properties of Fluid and Fluid Mixtures. Lubbock: Department of Petroleum
Engineering, Texas Tech University. Technical Report TR-4-99.
McLeod, W. R. (1968). Application of molecular refraction to the principle of corresponding states.
Ph.D. Thesis, University of Oklahoma, Norman, OK.
Downloaded by [University of Haifa Library] at 15:22 31 July 2013

Neeraj, K. M. (2004). Compressibility factors for natural and sour reservoir gases by correlations
and cubic equations of state. M.Sc. Thesis, Texas Tech University, Lubbock, TX.
Peng, D. Y., and Robinson, D. B. (1976). A new two constants equation of state. Ind. Eng. Chem.
Fund. 15:59.
Piazza, L., Scalabrin, G., Marchi, P., and Richon, D. (2006). Enhancement of the extended corre-
sponding states techniques for thermodynamic modeling. I. Pure fluids. International Journal
of Refrigeration 29:1182.
Redlich, O., and Kwong, J. (1949). On the thermodynamics of solutions. An equation of state.
Fugacities of gaseous solutions. Chem. Rev. 44:233.
Robinson, R. L., Jr., and Jacoby, R. H. (1965). Better compressibility factors. Hydrocarb. Process.
44:141.
Shell Oil Company. (2003). Fluid Properties Package.
Simon, R., and Briggs, J. E. (1964). Application of Benedict-Webb-Rubin equation of state to
hydrogen sulfide mixtures. AIChE J. 10:548.
Soave, G. (1972). Equilibrium constants from a modified Redlich-Kwong equation of state. Chem.
Eng. Sci. 27:1197.
Standing, M. B., and Katz, D. L. (1942). Density of natural gases. Trans. Am. Inst. Mech. Eng.
146:140.
Takacs, G. (1976). Comparison made for computer Z-factor calculation. Oil Gas J. 20:64.
van der Waals, J. D. (1910). The equation of state for gases and liquids. In Nobel Lectures in
Physics.
Whitson, C. H. (1972). Evaluating constant-volume depletion data. J. Petrol. Tech. 83:610.
Wichert, E., and Aziz, K. (1972). Calculation of Z’s for sour gases. Hydrocarb. Process. 51:119.
Wilamowski, B., Iplikci, S., Kayank, O., and Efe, M. O. (2001). An algorithm for fast convergence
in training neural networks. International Joint Conference on Neural Networks (IJCNN’01),
Washington, DC, July 15–19, p. 1778.

You might also like