Sie sind auf Seite 1von 9

SPE 128878

New Correlation for Z-Factor Using Genetic Programming Technique


B.D. Al-Anazi and A.A. AlQuraishi, SPE, King Abdulaziz City for Science and Technology
Copyright 2010, Society of Petroleum Engineers

This paper was prepared for presentation at the SPE Oil and Gas India Conference and Exhibition held in Mumbai, India, 2022 January 2010.

This paper was selected for presentation by an SPE program committee following review of information contained in an abstract submitted by the author(s). Contents of the paper have not been
reviewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The material does not necessarily reflect any position of the Society of Petroleum Engineers, its
officers, or members. Electronic reproduction, distribution, or storage of any part of this paper without the written consent of the Society of Petroleum Engineers is prohibited. Permission to
reproduce in print is restricted to an abstract of not more than 300 words; illustrations may not be copied. The abstract must contain conspicuous acknowledgment of SPE copyright.


Abstract
Compressibility factor is a measure of the deviation of a real gas from ideal behavior. Accurate information of z-factor values is
necessary in engineering applications such as gas metering, pipeline design, reserves estimation, gas flow rate, and material
balance calculations. In addition, z-factor is important in calculating gas properties such as gas formation volume factor, gas
isothermal compressibility, viscosity, and density. The most common sources of z-factor values are experimental
measurement, but if unavailable, equations of state and empirical correlations are utilized for the gas composition, and
pressure and temperature conditions.
This paper presents a new model that allow accurate determination of z-factor values both for pure components and gas
mixtures including significant amounts of non-hydrocarbon components and rich gas condensates at wide ranges of pressures
and temperatures. Large database of experimental z-factor measurement are used. It includes more than 977 samples of
worldwide sour and sweet gases. The database consists of gas composition, and z-factor experimental measurements at
different pseudo-reduced properties of pressures and temperatures. The new model was developed and tested using linear
genetic programming (GP) technique. The proposed model efficiency was compared to four commonly used equations of state
(Van der-Walls, Redlech kwong, Peng-Robinson and Lawel-Lake-silberberg) in addition to six empirical correlations
(Dranchuk-Purvis-Robinson, Dranchuk-Abu-Kassem, Hall-Yarborough, and Beggs and Brill). Several criteria are used to
evaluate the proposed model including the average relative error (ARE), average absolute relative error (AARE), standard
deviation (SD), and cross plots. The output of this work indicates the strength of the linear genetic programming technique and
the good accuracy and simplicity of the developed model in comparison to the tested commonly utilized models.


Introduction
Compressibility factor is a dimensionless quantity more commonly called as the gas deviation factor, represented as z-factor. It
indicates the deviation of a real gas from the ideal behavior and it is a function of temperature (T), pressure (P) , and gas
composition. It is generally 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 (Kumar , 2004). A z-factor value of would represent an ideal gas condition.
At normal conditions, gas molecules are quite far apart and the attractive forces are negligible and similarly is the condition at
high temperatures because of the greater kinetic motion. Under these conditions, the gas tends to approach ideal behavior. On
the other hand, at high pressure, the gas molecules come very close to each other resulting in significant attractive forces,
hence behave as real gases exhibiting negative deviations from ideality at lower pressures and positive deviations at higher
pressures.
Gas compressibility factor is involved in calculating gas properties such as formation volume factor, density, compressibility,
and viscosity. All these properties are necessary in the oil and gas industry for evaluating newly discovered gas reservoirs,
calculating gas reserves, predicting future gas production, and designing production tubing and pipelines. laboratory PVT
measurements using reservoir samples is the industry standard in measuring gas properties (Standing, 1981). These Laboratory
analyses are sometimes expensive and time consuming, therefore, estimation of gas properties at different conditions of
pressures and temperatures are made using different empirical correlations and equations of state (Ahmed, 2000). Z-factor
correlations are easier and faster with adequate accuracy compared to equations of state models (Ahmed, 2000).
As more and more, sour environment reservoirs are discovered, it becomes necessary to have a simple and accurate technique
for z-factor determination. The existing methods of calculating z-factor values incur high deviations from the actual values
2 SPE 128878
when significant amounts of acid gases like carbon dioxide and hydrogen sulfide are present in the natural gas mixtures.
Several attempts have been made to predict compressibility factor for sweet gases (Kay, 1936; Stewart et al., 1959; Sutton,
1985). Wichert and Aziz (1972) came up with corrections for the presence of hydrogen sulfide and carbon dioxide for
determining compressibility factor of sour gases.
Studies of the gas compressibility factors for natural gases of various compositions have shown that compressibility factors
can be generalized with reasonable accuracy when they are expressed as a function of pseudo-reduced pressure and pseudo-
reduced temperature (Ahmed, 2000). Based on this concept, Standing and Katz (1942) presented a generalized gas
compressibility factor chart function of pseudo-reduced properties of pressure and temperature. This chart is generally
acceptable for natural gas with minor amount of non-hydrocarbon components and it is one of the widely accepted correlations
in the oil and gas industry (Ahmed, 2000).
Several attempts were made to fit the Standing Katz chart mathematically (Papy, 1968; Hall and Yarborough, 1973;
Yarborough and Hall, 1974; Dranchuk and Abou Kassem, 1975; Dranchk et al., 1974; Hankinson et al., 1969; Brill and Beggs,
1974). Hall and Yarborough (1973) presented an equation-of-state that accurately represents the Standing and Katz z-factor
chart. The proposed expression is based on the Starling-Carnahan equation of state and the coefficients of the correlation were
determined by fitting them to data taken from the Standing and Katz z-factor chart. They pointed out that their model is not
recommended if the pseudo-reduced temperature is less than one.
Dranchuk-Purvis-Robinson (1974) developed a correlation based on the Benedict-Webb-Rubin equation of state. It consists of
eight coefficients obtained based on a best-fit of 1500 data points from Standing and Katz z-factor chart. Beggs and Brill
(1974) proposed a best-fit equation for the Standing and Katz Z-factor chart. However, the model is not recommended for
reduced temperature values below 0.92. Later, Dranchuk and Abu-Kassem (1975) derived an analytical expression for
calculating the reduced gas density that can be used to estimate the gas compressibility factor. This method is applicable over
pseudo reduced temperature range of 0 .1 to 0.3 and pseudo reduced pressure range of 2.0 to 30 reporting an average absolute
error of 0.585%.

Gopals developed a correlation for z-factor estimation by dividing isobarically the Standing and Katz chart into two parts at
reduced pressure value of 5.4. His objective was to come up with two non iterative equations, one for reduced pressure less
than or equal to 5.4, and the other for reduced pressure greater than 5.4. To describe the chart accurately, it was further divided
into 12 parts by Schmidt (1980). Harmonic equations are suggested to be a good fit for reduced pressure values greater than
5.4. Evaluation of several methods present in the literature concluded that DranchukAbou-Kassem (DK) correlation is the
most accurate representation of Standing and Katz chart. (Takacs, 1976 and Elsharkawy , 2000)

Some phase behavior applications require the use of equation of state (EOS) to predict reservoir fluids properties. Since the
introduction of the Van der Waals (1910) EOS, many cubic equations of state have been proposed (Redlich-Kwong, 1949;
Peng-Robinson, 1976; Lawal-Lake-Silberberg, 1999). Several difficulties face the current EOSs. The first is the difficulty
in identifying the hundreds and thousands of components found in reservoir fluids with the existing chemical separation
techniques. The other is the difficulty in predicting the properties of components heavier than C
20
. Kumar (2004)
thoroughly examined eight equations of state based on their ability to predict z-factor both for pure substances and gas
mixtures including natural gases and sour natural gases with significant amounts of C
7
+
. He observed that the prediction of z-
factor is significantly dependent on the accuracy of the critical properties provided and/or predicted. Based on this observation,
Lawal-lake-Silberberg (1990) EOS was observed to be the most accurate in predicting z-factor for wide ranges of pressures,
temperatures and gas composition. Hence, it can be adopted as a universal method for z-factor determination.


Genetic Programming
Genetic algorithms, evolution strategies and genetic programming belong to the class of probabilistic search procedures known
as Evolutionary Algorithms that use computational models of natural evolutionary processes to develop computer-based
problem solving systems. Solutions are obtained using operations that simulate the evolution of individual structures through
mechanism of reproductive variation and fitness based selection. Due to their reported robustness in practical applications,
these techniques are gaining popularity and have been used in a wide range of problem domain. The main difference between
genetic programming and genetic algorithm is the representation of the solution. Genetic programming creates computer
programs as solution whereas genetic algorithm creates a string of numbers to represent the solution.
Genetic programming (GP) is based on the Darwinian principle of reproduction and survival of the fittest and analogs of
naturally occurring genetic operations such as crossover and mutation (Koza, 1997). Genetic programming uses four steps to
solve a problem: (Koza, 1992)
1) Generate an initial population of random compositions of the functions and terminals (input) of the problem
2) Execute each program in the population and assign a fitness value.
SPE 128878 3
3) Create a new offspring population of computer programs by copying the best programs and creating new ones by
mutation and crossover.
4) Designation of the best computer program in the generation.

The programs evolved are made of series of linked nodes (Poli, 1995). taking a number of arguments and giving a single
return value. The nodes are either functions (operators) or terminals (variables and constants) Functions may include simple
ones such as addition, subtraction, multiplication and division. It may also include other mathematical functions such as
trigonometric, Boolean and conditional operators. On the other hand, the terminal set contains the independent variables and
parameters used as argument for the function. The linked nodes are presented as a tree where operators and terminals are the
leaves of that tree. Figure 1 is an example representing a simple function (A / (A+B))
1/2
. In this case the function set is (/, +,)
and the terminals set is (A, B).


Results and Discussion
A data base of 977 experimental z-factor measurement were collected for different sour and natural gas composition, at
different conditions of pressures and temperatures. The database covers measurements at wide ranges of pressure, temperature
and molecular weight. Table 1 lists the complete description of the gases constituting the database utilized for this study. New
model was develop and tested for compressibility factor prediction using linear genetic programming technique. The database
was first divided into three sets namely training, testing, and validation sets. The training and validation data sets composed of
300 measurements each were used to develop the model. The rest of the data was used to blind test the model developed.
The GP software utilized was run for 1000 generations with a maximum population size of 500. Several values of cross over
and mutation rates were investigated and the optimum setting found was 50 % and 90 % for cross over and mutation
frequencies respectively. The function set used for this work was (+, -, *, / ) and the terminal set was the input parameters of
pseudo reduced pressure, pseudo reduced temperature, the experimentally measured compressibility factor, in addition to
machine randomly generated constants. The model generation was terminated when the project history showed no
improvement .
Figure 2 presents the C
++
code of the best evolved genetic program. The f [0], f [1] and so forth are temporary computation
variables used in the program evolved. The output of the program is the value of f [0] after the program execution. The
variable labels V [0], V [1] and so forth are the names assigned to input data where in our case V [0] represents the pseudo
reduced pressure and V [1] represents the pseudo reduced temperature. Writing up the equation representing the evolved
program, we obtain the following:



Where ,








The model evolved was tested blindly to estimate the compressibility factor for the rest of the data (377 data points) not used
in the training and validation process and its efficiency was compared to four known equations of state (Van der-Walls,
4 SPE 128878
Redlech-kwong, Peng-Robinson and Lawel-Lake-silberberg) in addition to six empirical correlations (Dranchuk-Purvis-
Robinson, Dranchuk-Abu-Kassem, Hall-Yarborough , Beggs and Brill, Shell Oil Company, and Gopal). Table 2 lists the error
analysis of the proposed GP model in comparison with the investigated commonly used models indicating the good
performance and high accuracy of the genetic programming model developed. Figure 3 is a cross plot of the best six models
including the proposed model. The proposed model shows the lowest ARE (4.015184%). On the the other hand, it was in the
third place (2.906437%) term of AARE after Lawal-lake-Silberberg EOS and Van der-Waals EOS.The GP model has the
lowest standard deviation (SD) among the all those investigated .
Sensitivity analysis was conducted for the proposed model using MontCarlo simulation software (@ risk). This was done to
investigate the impact of the independent parameters implemented in this model. Figure 4 is a tornado plot indicating the high
positive impact of pseudo-reduced properties of pressures and temperatures with higher impact noticed for of pseudo-reduced
temperature

Conclusions
A model based on linear genetic programming approach has been developed to estimate gas compressibility factor. Input
variables used consist of pseudo-reduced pressures and pseudo-reduced temperatures of 977 points wide spectrum of gas
composition at wide ranges of pressure and temperature. The efficiency of the model was tested against several commonly
used models for gas compressibility factor estimation (four equations of state EOS and six empirical correlations). Based on
the findings of this work, The the proposed GP model shows a good performance in term of accuracy. Its simplicity compared
to the existing equations of state indicate the capability of the proposed model to predict the z-factor of sour and natural gas at
wide ranges of pressure, temperature and gas composition.

Nomenclature
ARE = average relative error

AARE= average absolute relative error

Zpred.= Predicted compressibility factor
Zmeas. = Measured compressibility factor

References
1. Ahmed, T.H., Reservoir Engineering Hand Book, Second edition, Butterworth-Heinemann, (2000).
2. Neeraj, K.M. Compressibility Factors for Natural and Sour Reservoir Gases by Correlations & Cubic Equations of State
Texas Tech University December, 2004
3. Wichert, E., and Aziz, K., Calculate Zs for Sour Gases, Hydro. Proc.,(1972).
4. Kesler, M. G., and Lee, B. I., Improve Predictions of Enthalpy of Fractions,Hydro. Proc., (1976).
5. Standing, M. B., and Katz, D. L., Density of Natural Gases, Trans., AIME, 146, 140 (1942).
6. Yarborough, L., and Hall, K. R., A New EOS for Z-Factor Calculations, Oil &Gas J., (1973).
7. Yarborough, L. and Hall, K.R. 1974. How to Solve Equation-of-State for Z-Factors. Oil and Gas Journal, Feb. 18, 8688.
8. Ikoku, C. U., Natural Gas Enginerring, Penn Well, (1980).
9. Dranchuk, P. M., and Abou-Kassem, J. H., Calculation of Z-Factors for Natural Gases Using Equations of State, J. Cdn.
Pet. Tech.,(1975).
10. Dranchk, 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, 113.
11. Bruce E. Poling, John M. Prausnitz, and John P. OConnell, The Properties of Gases and Liquids, Fifth Edition, McGraw-
Hill, (2004).
12. Hankinson, R.W., Thomas, L.K. and Philips, K.A. 1969. Predict Natural Gas Properties. Hydrocarbon Processing, April,
106108.
13. Van der Waals, J. D., The Equation of State for Gases and Liquids, in Nobel Lectures in Physics, December 12, (1910).
SPE 128878 5
14. Redlich, O., and Kwong, J., On the Thermodynamics of Solutions. An Equation of State. Fugacities of Gaseous
Solutions, Chemical Reviews, 44, 233 (1949).
15. Peng, D. Y., and Robinson, D. B., A New Two Constants Equation of State, Ind. Eng. Chem. Fund., 15, 59 (1976).
16. Lawal, A. S., Application of the Lawal-Lake-Silberberg Equation-of-State to Thermodynamic and Transport Properties of
Fluid and Fluid Mixtures, Technical Report TR-4-99, Department of Petroleum Engineering, Texas Tech University,
Lubbock, Texas, (1999).
16. Gopal. V . N, Gas Z-Factor equation developed for computer The Oil and Gas Journal ,August 8.1977,pp.58-60
17. Koza, John R., 1997. Genetic Programming. Encyclopedia of Computer Science and Technology. August, 18.
18. Koza, John R., 1992. Genetic Programming; On the Programming of Computers by Means of natural Selection. The MIT
Press. Cambridge, MA.
19. Elsharkawy, A. M., and Elkamel, A., The Accuracy of Predicting Compressibility Factors for Sour Natural Gases, J.
Petrol. Sci & Tech., 19 (5-6), 711-731 (2001).
20.Schmidt, G., and Wenzel, H., A Modified van der Waals Type Equation of State, Chem. Eng. Sci., 135, 1503 (1980).
21. Elsharkawy, A. M., Predicting the Properties of Sour Gases and Condensates: Equations of State and Empirical
Correlations Paper SPE 74369 presented at the Society of Petroleum Engineer International Petroleum Conferences and
Exhibition, Villahermosa, February 10-12, (2002).
22. Robinson, R. L., Jr., and Jacoby, R. H., Better Compressibility Factors, Hydro. Proc., 44 (4), April, 141-145 (1965).
23. Papay, J. 1968. ATermelestechnologiai Parameterek Valtozasa a Gazlelepk Muvelese Soran, OGIL MUSZ, Tud, Kuzl.,
Budapest 267273.

Table 1: Properties of Sour and Natural Gas Data Used in the Study

Min. Max. Avg. SD

Pressure ,psi
154 7026 2820.434 1714.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
MwC7+ 0
150 50.69121 61.35013
Sgc7+
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




6 SPE 128878





Table 2: Error Analysis of The Proposed and Investigated Compressibility Factor Models.

Model
ARE, % AARE, %
SD
Hall-Yarborough 4.714415 3.644368
0.132
Dranchuk-Purvis-Robinson 6.809009 6.781382
0.130
Dranchuk-Abu-Kassem 6.71363 6.68976
0.129
Brill and Beggs 7.036707 7.003067
0.126
Shell Oil Company 7.398086 7.372194
0.128
Gopal 8.597525 8.581804
0.157
Van der-Waals EOS 6.806217 2.513261
0.164
Redlch-Kwong EOS 4.585312 4.25168
0.122
Peng-Robinson EOS 6.109168 4.66789
0.889
Lawal-lake-Silberberg EOS 4.405429 2.12459
0.106
GP Model 4.015184 2.906437
0.118




Figure 1: Tree representation of the equation (A*(A+B))
1/2
.
SPE 128878 7






















Figure 3: Evolved Z-Factor Code in C
++
Language.

























Figure 2: Evolved Z-Factor Code in C
++
Language.
#define TRUNC(x)(((x)>=0) ? floor(x) : ceil(x))
#define C_FPREM (_finite(f[0]/f[1]) ? f[0]-(TRUNC(f[0]/f[1])*f[1]) : f[0]/f[1])
#define C_F2XM1 (((fabs(f[0])<=1) && (!_isnan(f[0]))) ? (pow(2,f[0])-1) :
((!_finite(f[0]) && !_isnan(f[0]) && (f[0]<0)) ? -1 : f[0]))
float DiscipulusCFunction(float v[])
{
long double f[8];
long double tmp = 0;
int cflag = 0;
f[0]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=0;
L0: f[0]+=0.03275442123413086f;
L1: f[0]/=-0.9765300750732422f;
L2: f[0]+=f[0];
L3: f[0]*=v[1];
L4: f[0]-=-0.2360081672668457f;
L5: f[2]-=f[0];
L6: f[2]-=f[0];
L7: f[0]-=f[2];
L8: f[0]*=f[0];
L9: f[0]+=-1.427085638046265f;
L10: f[0]/=v[0];
L11: f[0]+=0.9177978038787842f;
L12: f[2]*=f[0];
L13: f[0]-=f[2];
L14: f[2]*=f[0];
L15: f[0]+=f[2];
L16: f[0]/=v[0];
L17: f[0]/=1.047447681427002f;
L18: f[0]+=0.9177978038787842f;
L19: f[2]/=f[0];
L20: f[2]/=f[0];
L21: f[2]-=f[0];
L22: f[0]+=f[0];
L23: f[0]/=1.048232078552246f;
L24: f[0]+=f[2];
L25:
if (!_finite(f[0])) f[0]=0;
return f[0];
}
8 SPE 128878



(a) (b)

















(c) (d)

















(e) (f)

Figure 3: Cross plot of Predicted versus Measured values of Compressibility factors for (a) Prosed GP Model , (b) Van
der-Walls EOS, (c) Lawal- lake-Silberberg EOS, (d) Dranchuk-Abu-Kassem,(e) Hall-Yarborough and (f)
Redlch-Kwong EOS
Z
-
M
e
a
s
u
r
e
d

Z-Predicted
Z
-
M
e
a
s
u
r
e
d

Z-Predicted
Z-Predicted Z-Predicted
Z
-
M
e
a
s
u
r
e
d

Z
-
M
e
a
s
u
r
e
d

Z
-
M
e
a
s
u
r
e
d

Z
-
M
e
a
s
u
r
e
d

Z-Predicted Z-Predicted
SPE 128878 9





Figure 4: sensitivity analysis of the proposed GP model.

Das könnte Ihnen auch gefallen