Final Project PDF
Final Project PDF
Final Project PDF
SUBMITTED BY
1. NOAMAN SAID ABDULLAH NAJI AL-HUTHAIFY
2. ESAM QAID MUSAED AL-SAFRI
3. HELMI KHALED AHMED MOHAMMED AL-ABRAT
4. GAMIL MOHAMMED NAJI HAMADI SILAN
5. KHALED AHMED MOHAMMED GHAWY
6. HASAN AMEEN QASEM HASAN
7. MUNYA RABEA SAEED BALKHAIR
SUPERVISOR
DR. ABDELRIGEEB ALI AL-GATHE
ALMUKALLA, YEMEN
SEPTEMBER 2071
جامعة حضرموت
كلية الهندسة والبترول
قسم الهندسة البترولية
إعداد
إشراف
د /عبدالرقيب علي القاضي
المكال-اليمن
سبتمبر 7102
I
SUPERVISOR CERTIFICATE
Signature: …………………………
II
“We hereby declare that we have read this thesis and in our opinion this thesis is
sufficient in terms of scope and quality for the award of the degree of Bachelor of
engineering in petroleum engineering”
Signature: ………………………..
Signature: ………………………..
Signature: ………………………..
III
DEDICATION
To our parents and our family who made this accomplishment possible.
IV
ACKNOWLEDGEMENTS
We bow our head before Allah almighty, the most beneficent and merciful, who
blessed us with health, loving parents, sincere teachers and caring friends.
TABLE OF CONTENTS
LIST OF TABLE
Table 1.1 Show Constant a,b and c for each flow pattern ..……………………..……….8
Table 1.2 Show Constant d,e,f and g for each flow pattern …...…...……..……………. 8
Table 5.1 Statistical Error Analysis for DAK correlation and ANFIS model …......……26
Table 5.2 Range of input data for BHFP prediction….…..……………….…....……….30
Table 5.3 Statistical Analysis Results of DAK correlation and ANFIS for BHFP..........31
Table 5.4 Results of BHFP predicted by using both integrated techniques (ANFIS &
DAK)…...........................................................................................................................35
VIII
LIST OF FIGURES
LIST OF ABBREVIATIONS
LIST OF SYMBOLS
μw Viscosity Of Water 𝑐𝑝
μg Viscosity Of Gas 𝑐𝑝
𝑇̅ Average Temperature 𝑓
𝜇𝐿 Liquid Viscosity 𝑐𝑝
𝜇𝑚 Mixture Viscosity 𝑐𝑝
𝑇 Temperature 𝑅
𝑇𝐶 Critical Temperature 𝑅
XIII
ABSTRACT
One of significant parameters affecting Bottom Hole Flowing Pressure (BHFP) is gas
compressibility (Z-factor). The BHFP calculation in incline multiphase flow is very
complicated due to the variation in gas and liquid flow rate that is function of pressure
and temperature variation. As pressure and temperature change a unquestionably Z-factor
changing. So that the project was divided into two parts.
In the first part, developed Adaptive Neuro Fuzzy inference system (ANFIS)
model to estimate gas compressibility factor in more accurate as well as Dranchuk-Abu-
Kassem (DAK) correlation by used total data point 7118 from Middle East. The results
show that the ANFIS model achieved the best one with correlation factor almost equal
one and Average Absolute Relative Error (AARE) around 0.26.
In the second part, the Beggs and Brill correlation was developed and integrated
with both previous model (ANFIS and DAK) to estimate BHFP for 194 data point from
Egypt fields.
Finally, can concluded that the performance of ANFIS model with Beggs and
Brill correlation is better than DAK correlation and more accurate.
XV
ملخص
عند حساب ضغط قاع البئر فأن معامل انضغاطية الغاز هو إحدى المتغيرات الهامه التي تؤثر عليه ،وإن الصعوبات
المصاحبة لحساب ضغط قاع البئر في التدفق متعدد االطوار تعود إلى اختالف التدفق بين الموائع والغازات وتزداد
تلك التعقيدات في االبار المائلة كما أن اختالف درجة الحرارة والضغط لها دور كبير في ذلك وأيضا لها دور وبال
شك في التأثير على حسابات انضغاطية الغاز .ولذلك ستنقسم هذه الدراسه إلى جزئين ،في الجزء األول تم تطوير
نموذج للذكاء الصناعي لحساب انضغاطية الغاز بدقه أفضل مقارنة بمعادلة درانك أبو القاسم باستخدام 2077نقطه.
ومن خالل التحليل االحصائي للنتائج فإن نموذج الذكاء الصناعي هو األفضل وذلك بمعامل إنحراف معياري مقداره
واحد ومتوسط نسبة الخطأ المطلقة مقدارها . 1.70وفي الجزء الثاني قمنا بتطوير معادلة بيج وبريل وربطها مع
النموذجين السابقين (نموذج الذكاء الصناعي وعالقة درانك أبو القاسم) لحساب ضغط قاع البئر ل 091بئر .ومن
خالل ماسبق نستنتج أن عالقة بيج وبريل تكون أفضل أداء وأعلى دقه مع نموذج الذكاء الصناعي منها مع عالقة
درانك أبو القاسم.
1
CHAPTER I
INTRODUCTION
1.1 INTRODUCTION
Beggs and Brill correlation depended on accurate estimation of it's input variables,
The gas compressibility [Z factor] is one variable that have effect in Beggs and Brill
correlation, so that the fuzzy logic, which is one of the famous Artificial Intelligence
technique used to obtain result that is more accurate with save time and effort.
2
CHAPTER II
2.1 INTRODUCTION
As we know the measuring of BHFP with a gage or another instrument is the most
accurate method comparing with calculation methods but it cost largely and take a lot of
time, so that the correlations and modeling methods is desirable, especially it is closer to
the correct values , and save a lot of cost and time.
There are many correlations to determine the BHFP in vertical, horizontal, inclined and
directional :
For multiphase flow, many of the published correlations are applicable for "vertical flow"
only, while others apply for "horizontal flow" only. Few correlations apply to the whole
spectrum of flow situations that may be encountered in oil and gas operations, namely
uphill, downhill, horizontal, inclined and vertical flow. The Beggs and Brill (1973)
correlation, is one of the few published correlations capable of handling all these flow
directions. It was developed using 1" and 1-1/2" sections of pipe that could be inclined at
any angle from the horizontal. The Beggs and Brill multiphase correlation deals with both
the friction pressure loss and the hydrostatic pressure difference. First the appropriate
flow regime for the particular combination of gas and liquid rates (Segregated,
Intermittent or Distributed) is determined. The liquid holdup, and hence, the in-situ
density of the gas-liquid mixture is then calculated according to the appropriate flow
regime, to obtain the hydrostatic pressure difference. A two-phase friction factor is
calculated based on the “input” gas-liquid ratio and the Fanning friction factor. From this
the friction pressure loss is calculated using “input” gas-liquid mixture properties.
5
The Beggs and Brill correlation is developed for tubing strings in inclined wells
and pipelines for hilly terrain. This correlation resulted from experiments using air and
water as test fluids over a wide range of parameters. The performance of the correlation
is given below:
1. Tubing Size. For the range in which the experimental investigation was conducted (i.e.,
tubing sizes between 1 and 1.5 in.), the pressure losses are accurately estimated. Any
further increase in tubing size tends to result in an over prediction in the pressure loss.
2. Oil Gravity. A reasonably good performance is obtained over a broad spectrum of oil
gravities.
3. Gas-Liquid Ratio (GLR). In general, an over predicted pressure drop is obtained with
increasing GLR. The errors become especially large for GLR above 5000.
4. Water-Cut. The accuracy of the pressure profile predictions is generally good up to
about 10% water-cut.
1. The inclination angles of a pipe in which two phase flow is occurring definitely affects
liquid holdup and pressure drop for most flow conditions.
2. In inclination two phase flow, liquid holdup reaches a maximum at an angle of
approximately equal +50o and a minimum at approximately -50o from horizontal. The
fact that holdup is approximately equal at angles of +90o and +20o explains why vertical
holdup correlations can be used with some degree of success for horizontal flow.
3. Pressure recovery in the downhill section of a two phase pipeline in hilly terrain can
definitely exist and should be considered in pipeline design.
4. The accuracy of a liquid holdup correlations for horizontal two-phase flow can be
improved by consideration of flow pattern .
6
𝑔 𝑓𝑡𝑝 𝐺𝑚 𝑉𝑚
∆𝑧 ( 𝜌 sin 𝜃+ )
𝑔𝑐 𝑡𝑝 2𝑔𝑑
∆𝑃 = 𝜌𝑡𝑝 𝑉𝑚 𝑉𝑠𝑔 (2.1)
1−
𝑔𝑐 𝑃
Where:
𝜌𝑡𝑝 = 𝜌𝐿 𝐻𝐿 + 𝜌𝑔 (1 − 𝐻𝐿 )
since liquid hold up HL is function of inclination angle , profile of pipeline must be
available. The traverse is thus calculated in sections, a section cosisting of the length line
where the angle is constant.
1. Beginning with the know pressure P1, estimate a value for pressure drop (or pressure
gain, if flow is downhill), ∆p.
2. Calculate the average pressure in the interval:
∆𝑃
𝑃̅ =𝑃1 + (2.2)
2
If P1 is downstream pressure;
∆𝑃
𝑃̅ =𝑃1 − (2.3)
2
If P1 is upstream pressure;
3. From PVT analysis or appropriate correlation, calculate :Rs, Bo, Bw, μo, μw, μg, σo, σw,
and Zg at 𝑇̅ and 𝑃̅.
4. Calculate the specific gravity of the oil 𝛾𝑜
141.5
𝛾𝑜 = 131.5+𝐴𝑃𝐼 (2.4)
5. Calculate the liquid and gas densities at average conditions of pressure and
temperature:
1 𝑊𝑂𝑅
𝜌𝐿 = 𝜌𝑜 (1+𝑊𝑂𝑅) + 𝜌𝑤 (1+𝑊𝑂𝑅) = 𝜌𝑜 𝑓𝑜 + 𝜌𝑤 𝑓𝑤 (2.5)
(350 𝛾𝑜 +0.0764 𝑅𝑠 𝛾𝑔 )
𝜌𝑜 = (2.6)
5.615 𝐵𝑜
350 𝛾
𝜌𝑤 = 5.615 𝐵𝑤 (2.7)
𝑤
0.0764 𝛾𝑔 𝑃̅ (520)
𝜌𝑔 = (2.8)
(14.7)(𝑇̅ +460)𝑍𝑔
7
̅̅̅̅̅̅̅̅̅̅̅
3.27×10−7 𝑍𝑔 𝑞𝑜 (𝑅−𝑅𝑠 )(𝑇+460)
𝑞𝑔 = ̅
(2.9)
𝑃
10. Calculate the Froud number, NFR, the liquid viscosity, the mixture viscosity, μm and
the liquid surface tension, σL
𝑚 𝑉2
𝑁𝐹𝑅 = 𝑔𝑑 (2.18)
𝜇𝐿 = 𝜇𝑜 𝑓𝑜 + 𝜇𝑤 𝑓𝑤 (2.19)
𝜇𝑚 = ((𝜇𝐿 ƛ + 𝜇𝑔 (1 − ƛ ))(6.72 × 10−4 ) (2.20)
𝜎𝐿 = 𝜎𝑜 𝑓𝑜 + 𝜎𝑤 𝑓𝑤 (2.21)
11. Calculate the no slip Reynolds number and the liquid velocity number.
𝐺
𝑁𝑅𝑒𝑛𝑠 = 𝜇𝑚 (2.22)
𝑚
𝜌 0.25
𝑁𝐿𝑉 = 1.938 𝑉𝑠𝐿 (𝜎𝐿 ) (2.23)
𝐿
12. To determine the flow pattern which would exist if flow were horizontal, calculate
the correlation parameters, L1 ,L2, L3, and L4.
𝐿1 = 316 ƛ0.302 (2.24)
𝐿2 = 0.0009252 ƛ−2.4684 (2.25)
𝐿3 = 0.10 ƛ−1.4516 (2.26)
8
Where a, b and c are determined for each flow pattern from Table 1.1
Table 1.1 show constant a, b and c for each flow pattern
Flow pattern a b c
Segregated 0.98 0.4846 0.0868
Intermittent 0.845 0.5351 0.0173
Distributed 1.065 0.5824 0.0609
Where d,e,f and g are determined for each flow condition from Table 1.2
Flow pattern d e f g
𝜌𝑡𝑝 = 𝜌𝐿 𝐻𝐿 + 𝜌𝑔 (1 − 𝐻𝐿 ) (2.32)
Where
𝑆 = [ln(𝑦)]⁄{−0.0523 + 3.182 ln(𝑦) − 0.8725 [ln(𝑦)]2 + 0.01853 [ln(𝑦)]4 } (2.34)
and
ƛ
𝑦 = [𝐻 (2.35)
𝐿 (𝜃) ]2
S become unbounded at a point in interval 1< y <1.2 ; and for y in this interval, function
S is calculated from:
𝑆 = ln(2.2𝑦 − 1.2) (2.36)
19. Calculate the no slip friction factor
𝑓𝑛𝑠 = 1⁄[2 log(𝑁𝑅𝑒𝑛𝑠 ⁄(4.5223 log 𝑁𝑅𝑒𝑛𝑠 − 3.8215))]2 (2.37)
22. If the pressure drop (or gain) estimated in step 1 and that calculated in step 21 are not
sufficiently close, use the value calculated in step 21 as the the new estimated ∆𝑃 and go
back to step 2. This procedure is repeated until the estimated and calculated values of ∆𝑃
agree. The pressure at z ± ∆z is then 𝑃1 ± ∆𝑃.If flow is downhill, the pressure can either
increase or decrease in the direction of flow, depending on the relative magnitude of the
hydrostatic and friction pressure gradients. If a negative a pressure gain in the flow
direction[3].
11
Prediction of pressure drop is quite difficult and complicated due to the complex
relationships between the various parameters involved. This parameters include pipe
diameter, compressibility of gas (Z-factor), fluid properties and the flow rate of each
phase. Another parameter, which adds to the difficulty is the flow patterns and their
transition boundaries inside the wellbore along with changing temperature and pressure
condition. Therefore, an accurate analytical solution for this problem is difficult or
impossible to achieve. The compressibility of gas (Z-factor) effect of pressure drop
prediction, so we will interest about it.
11
CHAPTER III
3.1 INTRODUCTION
The gas compressibility factor (Z-factor) and also known as the compression factor or the
gas deviation factor is a correction factor which describes the deviation of a real gas from
ideal gas behavior. It is an important reservoir fluid property used in reservoir engineering
computations either directly or indirectly, so it comes into play for various engineering
purposes, which include calculating BHFP, gas in place, well flow rates, simulating the
gas volume, change analyzing reservoir pressure behavior and design of hydrocarbon-
handling systems[5]. In this chapter, will focus on the most correlation used to determine
Z-factor.
Many authors consider DAK correlation as the best correlation to calculate gas
compressibility factor. Therefore, our study try to use this model.
pMa p
ρ [ ] [ ]
ZRT ZT
ρr = ρ = pc Ma = pc (3.1)
c [ ] [ ]
Zc RTc Zc Tc
The critical gas compressibility factor Zc is approximately 0.27, which leads to the
following simplified expression for the reduced gas density as expressed in terms of the
reduced temperature Tr and reduced pressure pr:
0.27Ppr
ρpr = (3.2)
ZTpr
The authors proposed the following 11-constant equation of state for calculating the
reduced gas density:
𝑅
𝑓(𝜌𝑟 ) = (𝑅1 )𝜌𝑟 − 𝜌2 + (𝑅3 )𝜌𝑟2 − (𝑅4 )𝜌𝑟2 + (𝑅5 )(1 + 𝐴11 𝜌𝑟2 )𝜌𝑟2 exp[−𝐴11 𝜌𝑟2 ] + 1 = 0
𝑟
(3.3)
with the coefficients R1through R5 as defined by the following relations:
A2 A3 Ar At
R1 = A1 + + 3 + 4 + 5
Tpr Tpr Tpr Tpr
0.27𝑃𝑝𝑟
𝑅2 =
𝑇𝑝𝑟
𝐴7 𝐴8
𝑅3 = 𝐴6 + + 2
𝑇𝑝𝑟 𝑇𝑝𝑟
𝐴7 𝐴8
𝑅4 = 𝐴9 [ + 2]
𝑇𝑝𝑟 𝑇𝑝𝑟
A10
R5 = [ 3 ]
Tpr
13
The constants A1 through A11 were determined by fitting the equation, using nonlinear
regression models, to 1500 data points from the Standing and Katz Z-factor chart. The
coefficients have the following values:
0.2≤Ppr<30
1.0<Tpr≤3.0
Dranchuk-Abu-Kassem is almost the best correlation used in oil and gas calculations to
estimate Z-factor. In the next chapter, discuss the new Artificial Intelligent technique to
determine Z-factor in more accurate.
14
CHAPTER IV
4.1 INTRODUCTION
The first category of tools is made up of functions that can call from the command
line or from own applications. Many of these functions are MATLAB M-files, series of
MATLAB statements that implement specialized fuzzy logic algorithms.
Secondly, the toolbox provides a number of interactive tools that let us access
many of the functions through ( GUI).
The third category of tools is a set of blocks for use with Simulink. The most of
human reasoning and concept formation is linked to the use of fuzzy rules. By providing
a systematic framework for computing with fuzzy rules, the toolbox greatly amplifies the
power of human reasoning.
4.2 DEFINITION
Fuzzy logic has two different meanings. In a narrow sense, fuzzy logic (FL) is a logical
system, which is an extension of multivalued logic. A theory which relates to classes of
objects with unsharp boundaries in which membership is a matter of degree. Even in its
more narrow definition, fuzzy logic differs both in concept and substance from traditional
multivalued logical systems. In Fuzzy Logic Toolbox software, fuzzy logic should be
15
interpreted as FL, that is, Fuzzy Logic in its wide sense. Another basic concept in FL,
which plays a central role in most of its applications, is fuzzy rule. Although rule-based
systems have a long history of use in Artificial Intelligence (AI),a mechanism for dealing
with fuzzy consequents and fuzzy antecedents is provided by the calculus of fuzzy rules.
The calculus of fuzzy rules serves as a basis for what might be called the Fuzzy
Dependency and Command Language (FDCL). Although FDCL is not used explicitly in
the toolbox, it is effectively one of its principal constituents. In most of the applications
of fuzzy logic solution in reality, a translation of a human solution into FDCL.
can use Fuzzy Logic Toolbox software with MATLAB technical computing
software as a tool for solving problems with fuzzy logic. Fuzzy logic is a fascinating area
of research because it does a good job of trading off between significance and precision
something that humans have been managing for a very long time.
The toolbox includes 11 built-in membership function types. These 11 functions are built
from basic functions:
(TRAPMF) has a flat top and really is just a truncated triangle curve. These straight line
membership functions have the advantage of simplicity.
Fuzzy inference is the process of formulating the mapping from a given input to an output
using fuzzy logic. The mapping then provides a basis from which decisions can be made,
or patterns discerned. Can implement two types of fuzzy inference systems in the toolbox:
fuzzy set. This type of output is sometimes known as a singleton output membership
function, and it can be thought of as a predefuzzified fuzzy set. It enhances the efficiency
of the defuzzification process because it greatly simplifies the computation required by
the more general Mamdani method, which finds the centroid of a two-dimensional
function.Rather than integrating across the two-dimensional function to find the centroid,
use the weighted average of a few data points.
Advantages of the Mamdani Method:
It is intuitive.
It has widespread acceptance.
It is well suited to human input.
Fuzzy Logic Toolbox GUI Tools. In this section, the Fuzzy Logic Toolbox GUI tools
used to build a Fuzzy Inference System (FIS) Although We can build a FIS by working
strictly from the command line, it is much easier to build a system graphically. The Fuzzy
Logic Toolbox GUI does not support building FIS using data. If We want to use data for
building a FIS, use one of the following techniques:
1- Genfis1, genfis2, or genfis3 commands to generate a Sugeno-type FIS. Can then select
File > Import in the FIS Editor to import the FIS and perform fuzzy inference.
2- Neuro-adaptive learning techniques to model the FIS. Can use five primary GUI tools
for fuzzy inference systems:
Fuzzy Inference System Editor.
Membership Function Editor.
Rule Editor.
Rule Viewer.
Surface Viewer.
These GUIS are dynamically linked, in that changes we make to the FIS using one
of them, can affect what We see on any of the other open GUIS. Can have any or all of
them open for any given system. In addition to these five primary GUIS, the toolbox
includes the graphical ANFIS Editor GUI, which is used for building and analyzing
Sugeno-type Adaptive Neuro-Fuzzy Inference Systems ANFIS.
21
FIS Editor
Membership
Rule Editor Function Editor
Fuzzy
Inference
System
Read-only
tools
The FIS Editor handles the high-level issues for the system. How many input and
output variables? What are their names? Fuzzy Logic Toolbox software does not limit
the number of inputs. However, the number of inputs may be limited by the available
memory of us machine. If the number of inputs is too large, or the number of membership
functions is too big, then it may also be difficult to analyze the FIS using the other GUI
tools.
The Membership Function Editor is used to define the shapes of all the
membership functions associated with each variable. The Rule Editor is for editing the
list of rules that defines the behavior of the system. The FIS Editor displays information
about a fuzzy inference system. To open the FIS Editor, type the following command at
the MATLAB prompt fuzzy.
Double-click an input variable
Menu commands for Saving, icon to open the Membership 22
opening, or editing a fuzzy Function editor.
system.
The acronym ANFIS derives its name from adaptive neuro-fuzzy inference system. Using
a given input/output data set, the toolbox function ANFIS constructs FIS whose
membership function parameters are tuned (adjusted) using either a back propagation
algorithm alone or in combination with a least squares type of method. This adjustment
allows our fuzzy systems to learn from the data they are modeling.
23
Clustering of numerical data forms the basis of many classification and system modeling
algorithms. The purpose of clustering is to identify natural groupings of data from a large
data set to produce a concise representation of a system’s behavior. Fuzzy Logic Toolbox
tools allow you to find clusters in input-output training data. Can use the cluster
information to generate a Sugeno-type fuzzy inference system that best models the data
behavior using a minimum number of rules. The rules partition themselves according to
the fuzzy qualities associated with each of the data clusters. Use the command-line
function, genfis2 to automatically accomplish this type of FIS generation.
If we do not have a clear idea how many clusters there should be for a given set of data,
Subtractive clustering is a fast one-pass algorithm for estimating the number of clusters
and the cluster centers in a set of data. The cluster estimates, which are obtained from the
subclust function, can be used to initialize iterative optimization-based clustering
methods (FCM) and model identification methods (like ANFIS). The subclust function
24
finds the clusters by using the subtractive clustering method. The genfis2 function builds
upon the subclust function to provide a fast, one-pass method to take input-output training
data and generate a Sugeno-type fuzzy inference system that models the data behavior.[9]
25
CHAPTER V
In this chapter. First, estimate gas compressibility by using ANFIS model and DAK
correlation. Second calculate BHFP by Beggs and Brill correlation with previous two
model.
First part, generate ANFIS model to calculate gas compressibility factor (Z-factor).
Table 5.1 Statistical Error Analysis for DAK correlation and ANFIS model
R 0.9741 1.0000
As it shown from Table 5.1 the ANFIS model achieved the highest correlation
factor (1.00) where DAK correlation (0.9741), and average absolute relative percent error
for ANFIS model (0.2636) and for DAK correlation (6.7902). From the last analysis it
can be concluded that ANFIS model is the best estimation of Z-factor.
2- Graphical Analysis
Graphical cross plots comparison between two method is given in Figure 5.1 and 5.2
which show cross plots between the estimated versus the actual (measured).
2.00
1.80
Estimated Z factor
1.60
1.40
1.20
1.00
0.80
0.60
0.40
0.20
0.00
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Measured Z factor
Figure 5.1 Cross plot of Observed vs. Calculated Z for ANFIS model
27
1.80
1.60
1.40
Estimated Z factor
1.20
1.00
0.80
0.60
0.40
0.20
0.00
0 0.5 1 1.5 2
Measured Z factor
Figure 5.2 Cross plot of Observed vs. Calculated Z for DAK correlation
As show in Figure 5.1 and 5.2 Confirm that ANFIS model is better than DAK
correlation.
20.00
18.00
16.00 14.5779
14.00
12.00
10.00
8.00
6.00
4.00
2.00 0.7559
0.00
RMS
ANFIS DAK
14.00 12.9053
12.00
10.00
8.00
6.00
4.00
2.00 0.7087
0.00
STD
ANFIS DAK
6.7902
6.00
5.00
4.00
3.00
2.00
1.00
0.2636
0.00
ANFIS AARE DAK
As shown in Figure 5.3 through 5.6 the ANFIS model give us the highest correlation
factor (1.00) and the lowest average absolute relative percent error (0.2636) that's mean
ANFIS model is more accurate.
In second part of our project, developing Beggs and Brill correlation in MATLAB
program and integrated with ANFIS model and DAK correlation to calculate BHFP and
study the effect of Z-factor in BHFP calculation.
A total of 194 data point were collected from Egypt fields and used for calculated BHFP
with (ANFIS) model and (DAK) Correlation. After running data in Beggs and Brill
model by both method, the ANFIS model successful to give the result for all 194 data
point whereas the DAK correlation just give result for 164 data point and fail to give
result for 30 data point.
31
Table 5.3 Statistical Analysis Results of DAK correlation and ANFIS for BHFP
DAK ANFIS
R 0.86 0.87
As it shown from table 5.3 the ANFIS model achieved the highest correlation factor (0.87)
where DAK correlation (0.86), and average absolute relative percent error for ANFIS
model (16.9) and for DAK correlation (17.3). From the last analysis, it can be concluded
that Beggs and Brill model is the best accuracy and performance when integrate with
ANFIS model.
2- Graphical Analysis
Graphical cross plots of Beggs and Brill model when integrated with ANFIS model and
DAK correlation to predict BHFP. Figure 5.7 and 5.8 which show cross plots between
the predicted versus the actual (measured) BHFP.
32
Figure 5.7 Cross plot of Observed vs. Calculated BHFP with DAK correlation
Predicted bottom hole flowing pressure
7000
6000
5000
4000
3000
2000
1000
0
0 2000 4000 6000 8000
Measured BHFP
Figure 5.8 Cross plot of Observed vs. Calculated BHFP with ANFIS model
Graphical comparison between models is given in Figure 5.9 through 5.12 which show
the correlation Factor R, average absolute relative error AARE, root mean square relative
error RMS and standard deviation STD of all models.
33
1.00
0.87 0.86
0.90
0.80
0.70
0.60
0.50
0.40
0.30
0.20
0.10
0.00
R
ANFIS DAK
19.8 20.2
20.00
18.00
16.00
14.00
12.00
10.00
8.00
6.00
4.00
2.00
0.00
RMS
ANFIS DAK
39.34
39.32
39.32
39.30
39.28
39.26 39.25
39.24
39.22
39.20
STD
ANFIS DAK
16.9 17.3
16.00
11.00
6.00
1.00
AARE
ANFIS DAK
As shown in Figure 5.9 through 5.12 the Beggs and Brill model when integrated with
ANFIS model give us the highest correlation factor (0.87) and the lowest average absolute
relative percent error (16.9) than when integrated with DAK correlation, that's mean the
Beggs and Brill model is more accurate when integrate with ANFIS model.
35
Table 5.4 illustrate the results of BHFP values for 30 data points generated by integrated
BHFP correlation with ANFIS model whereas the other integrated model with DAK is
failed. This result show also the ability of the first integrated model to predict the BHFP
values successfully.
Table 5.4 Results of BHFP predicted by using both integrated techniques (ANFIS and
DAK).
BHFP BHFP & BHFP &
No
(measure) (ANFIS) (DAK)
1 4703 3767 -
2 4437 3760 -
3 5253 3539 -
4 5535 3538 -
5 2558 4071 -
6 2704 4211 -
7 2423 3254 -
8 2195 3279 -
9 2282 3162 -
10 2453 3250 -
11 2616 3101 -
12 2192 3146 -
13 1950 2786 -
14 2131 3346 -
15 1946 2761 -
16 2129 3184 -
17 2354 3461 -
18 2218 3203 -
19 2029 3027 -
20 2488 3374 -
21 2308 3393 -
22 2246 3349 -
23 2326 3121 -
24 2477 3001 -
25 2378 3116 -
26 2200 3408 -
27 4554 4585 -
28 3850 4558 -
29 3556 4220 -
30 3956 4548 -
As show in Table 5.4 Beggs and Brill model is more performance when integrated with
ANFIS model.
36
CHAPTER VI
6.1 CONCLUSIONS
6.2 RECOMMENDATIONS
The recommendations are made as a possible extension of the present study as follows:
Use the Artificial Intelligence Technique to estimate all PVT properties in Beggs
and Brill correlation to obtain more accurate BHFP.
Developed Beggs and Brill correlation in MATLAP program to calculate
wellhead pressure (Pwh).
Use Artificial Intelligence Technique to predicted flow pattern of Beggs and Brill
correlation to obtain more accurate BHFP.
37
REFERENCES
APPENDIX
(𝑍)𝑚𝑒𝑎𝑠 −(𝑍)𝑒𝑠𝑡
𝐸𝑖 = [ (𝑍)𝑚𝑒𝑎𝑠
] × 100 , 𝑖 = 1,2,3, … , 𝑛 (5.2)
(This will be considered as the main criterion in statistical error analysis throughout this
study).
𝑛
𝐸𝑚𝑖𝑛 = 𝑚𝑖𝑛𝑖+1 |𝐸𝑖 | (5.3)
d) Standard Deviation
1 (𝑍𝑎𝑐𝑡 −𝑍𝑒𝑠𝑡 ) 2
STD =√[(𝑚−𝑛−1)] ∑𝑚
𝑖=1 [{ } 100] (5.5)
𝑍𝑎𝑐𝑡
Where;
(m-n-1) represents the degree of freedom in multiple-regression. A lower value of
standard deviation indicates a smaller degree of scatter.
39
∑𝑛
𝐼=1[(𝑍)𝑎𝑐𝑡 −(𝑍)𝑒𝑠𝑡 ]
R = √1 − ∑𝑛 ̅
(5.6)
𝐼=1(𝑍)𝑎𝑐𝑡 −𝑍
Where:
1 𝑛
𝑍̅ = ∑ [(∆𝑍)𝑎𝑐𝑡 ]𝐼
𝑛 𝐼=𝑛
Correlation Factor value range between 0 and 1. The closer value to 1 represents perfect
correlation whereas 0 indicates no correlation at all among the independent.
a) Cross Plots
In this graphical based technique, all estimated values are plotted against the measured
values and thus a cross plot is formed. A 45° straight line between the estimated versus
actual data points is drawn on the cross plot, which denotes a perfect correlation line. The
tighter the cluster about the unity slope line, the better the agreement between the
experimental and the predicted results. Figures 5.1 and 5.2 present cross plots of the
natural gas compressibility factor versus the actual one for DAK correlation and the
developed ANFIS model. Investigation of these figures clearly shows that the developed
ANFIS model outperforms all correlations.