Journal of Natural Gas Science and Engineering 18 (2014) 155e163
Contents lists available at ScienceDirect
Journal of Natural Gas Science and Engineering journal homepage: www.elsevier.com/locate/jngse
Prediction of natural gas flow through chokes using support vector machine algorithm Ibrahim Nejatian a, Mojtaba Kanani a, Milad Arabloo b, Alireza Bahadori c, *, Sohrab Zendehboudi d a
Department of Petroleum Engineering, Petroleum University of Technology, Ahwaz, Iran Department of Chemical and Petroleum Engineering, Sharif University of Technology, Tehran, Iran School of Environment, Science & Engineering, Southern Cross University, Lismore, NSW, Australia d Department of Chemical Engineering, Massachusetts Institute of Technology (MIT), Cambridge, MA 02139, USA b c
a r t i c l e i n f o
a b s t r a c t
Article history: Received 31 October 2013 Received in revised form 30 January 2014 Accepted 16 February 2014 Available online
In oil and gas fields, it is a common practice to flow liquid and gas mixtures through choke valves. In general, different types of primary valves are employed to control pressure and flow rate when the producing well directs the natural gas to the processing equipment. In this case, the valve normally is affected by elevated levels of flow (or velocity) as well as solid materials suspended in the gas phase (e.g., fine sand and other debris). Both surface and subsurface chokes may be installed to regulate flow rates and to protect the porous medium and surface facilities from unusual pressure instabilities. In this study a reliable, novel, computer based predictive model using Least-Squares Support Vector Machine (LSSVM) algorithm is applied to predict choke flow coefficient in both nozzle and orifice type chokes in subsonic natural gas flow conditions. The average absolute relative deviation of the proposed model from reported data for nozzle-type and orifice-type choke are nearly 0.25% and 0.15% and the squared correlation coefficient is around 0.9961 and 0.9982 respectively. 2014 Elsevier B.V. All rights reserved.
Keywords: Choke flow coefficient Support vector machine Nozzle-type choke Orifice-type choke Natural gas
1. Introduction Wellhead chokes are typically utilized to control oil and gas flow rates from producing wells in the petroleum industry, so chokes ensure stable pressure downstream, offer the required backpressure to a reservoir and prevent formation damage from overmuch drawdown (Guo et al., 2007). Both surface and subsurface chokes have been installed in flow lines to control flow rates and to provide protection the formation and surface appliances from abnormal fluctuations in pressure. Furthermore, some atypical choke-like constrictions may shrinkage and limit the flow rate from a blown-out well (Clark and Perkins, 1981). The compressible fluid flow pipeline system designers should presuppose the phenomenon of choked flow toward the mass flow rate eventuate a maximum value (Sachdeva et al., 1986; Morris, 1996). Changing of flow area may consequences the choked flow, For instance, in a process element (e.g., a safety or/and control valve) and at a pipeline extension.
* Corresponding author. Tel.: þ61 (0)422789572; fax: þ61 266269857. E-mail address:
[email protected] (A. Bahadori). http://dx.doi.org/10.1016/j.jngse.2014.02.008 1875-5100/ 2014 Elsevier B.V. All rights reserved.
Those chokes are nozzles, fixed or adjustable orifices (Morris, 1996). Diversification of factors such as comprehending well potential, prevention of water/gas coning or sand production, controlling reservoir depletion, pressure drop imposed by surface equipment and other parameters may make it advantageous to limit the production rate from a flowing well (Rodriguez et al., 2013). As a choke must be very qualified to tolerate a wide range of flow rates, therefore its design requires careful selection of flow path profiles, valve configuration and ease of maintenance (Keith and Crowl, 2005). Flow regime in the choke: The Flow regimes are classified into two main groups; namely critical and sub-critical while the fluid going through a surface choke. 1.1. Critical flow The critical flow occurs when the fluid velocity of attains the sonic velocity for the two-phase flow condition and the flow rate is not affected by the downstream pressure which is called downstream pressure independency (Al-Attar, 2008). At critical flow condition, the choke experiences a discontinuity in pressure,
156
I. Nejatian et al. / Journal of Natural Gas Science and Engineering 18 (2014) 155e163
implying that the upstream pressure is not dependent on the downstream pressure. Literature (Guo and Ghalambor, 2005) mentioned that stabilization of well production rate and separation operation condition have been obtained by applying critical flow rate through choke. Even though critical flow regime results constant and independent to upstream pressure velocity, but because of dependency of gas density to pressure, mass flux should be altered by changing in upstream pressure (Ling, 2012). 1.2. Subcritical flow On the other hand, in the sub-critical flow regime, the flow rate pertain to the pressure difference and the effect of changing in downstream pressure on upstream pressure (Al-Attar, 2008). Because of difficulty with estimation gas and sound velocities in the field, practically the ratio of downstream to upstream pressure is typically applied to characterize critical flow regime from subcritical. The subsonic (subcritical) flow is maintained, if this pressure ratio has a value higher than or the same as the critical pressure ratio (Perry, 1984; Ashford, 1974). The critical pressure ratio is defined in terms of the gas specific heat ratio, as given below,
Poutlet Pup
¼ c
k k1 2 kþ1
(1)
in which, Poutlet represents the outlet pressure (or downstream) of the choke, Pup introduces the gas inlet pressure (or upstream) of the choke, and k refers to the specific heat ratio of gas (Cp/Cv). The typical values of k are 1.4 and 1.28 for air and natural gas (NG), respectively. Hence, the critical pressure ratio of air is determined to be 0.528, while natural gas holds a value of 0.549 for this ratio (Ashford, 1974). 1.3. Pressure equation for choke: sonic and subsonic Prognostication of pressure drop across the chokes has not a general equation for different kinds of production fluids. To choose a choke flow model, the necessity of consideration of some factors like gas fraction in the fluid and flow conditions or regimes (It means sonic or subsonic) have been accentuated in literature (Nøkleberg and Søntvedt, 1995). The time limitation for heat transfer (referring to adiabatic condition) and minority of friction loss at chokes (implying process reversibility) direct to isentropic-based pressure equations that should be applied to fluid flow across chokes (Guo and Ghalambor, 2005). Pressure drop across chokes results gas temperature reduction. So if the gas has considerable water content and gas temperature is below hydrate formation temperature, gas hydrate formation will observe (Stewart and Arnold, 2011). 1.4. Subsonic flow equation Gas flux through a choke at subsonic condition is shown by following equation:
Qsc
vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi " u 2 kþ1 # u k Pdn k Pdn k ¼ 1248CAPup t ðk 1Þgg Tup Pup Pup
(2)
In Eq. (2), Qsc(Mscf/d) is the flow rate of gas, Pup (psia) stands for the upstream pressure at choke, A (in2) represents the choke crosssectional area, Tup ( R) is the upstream temperature, g (32.2 ft/s2) is
Table 1 Statistical description of applied data base for developing nuzzle-type choke predictive model. Parameter
Min
Max
Average
Reynolds number d/D (ratio of choke diameter to pipe diameter) Choke flow coefficient
4000 0.4
2,000,000 0.725
346,689 0.587043
0.9425
1.2
1.056067
the symbol for the gravitational acceleration, gg refers to the specific gravity of gas with respect to air, and C introduces the choke flow coefficient. Sound velocity in the gas is greater than gas velocity at the in situ conditions when the flow regime is subsonic. The velocity is written as follows (Guo and Ghalambor, 2005):
vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 2 u !k1 3 u k z u 2 p up down 5 v ¼ tvup þ 2gc Cp Tup 41 zdn pup
(3)
where Cp is the gas specific heat at a constant pressure. This parameter for air equals 187.7 lbf-ft/lbm-R. 1.5. Sonic flow equation Maximum gas rate through choke is observed during sonic flow condition. For an ideal gas, passaging rate would be expressed as following equation:
Qsc
vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi ! u kþ1 u k1 k 2 ¼ 879CAPup t gg Tup k þ 1
(4)
Sensitivity of the choke flow coefficient “C” to Reynolds number is negligible when the Reynolds number is higher than 106. For this reason, the “C” value corresponding to the Reynolds number of 106 is utilized for “C” parameter at greater values of the Reynolds numbers. It has been perceived that most of wells in the field operate at subcritical condition (Fortunati, 1972). 2. Data collection and statistics The sufficiency and accuracy of each collected data set play an important role to propose any acceptable model. 171 data point are related to orifice type choke and 164 data point are relevant to nozzle type choke that all were collected from Guo and Ghalambor (2005). Recent researches (Bahadori, 2012a,b; Guo and Ghalambor, 2005) proposed that choke flow coefficient for two mentioned type of chokes is depended to Reynolds number and the ratio of choke diameter to pipe diameter. A statistical analysis of the datasets for nozzle and orifice type choke is shown in Tables 1 and 2 respectively. As it can be seen, the data points cover applicable range of independent variables.
Table 2 Statistical description of applied data base for developing orifice-type choke predictive model. Parameter
Min
Max
Average
Reynolds number d/D Choke flow coefficient
4000 0.2 0.585
3,000,000 0.75 0.792
402,070.2 0.5262 0.6598
I. Nejatian et al. / Journal of Natural Gas Science and Engineering 18 (2014) 155e163
Guo and Ghalambor (2005) suggested that, the choke flow coefficient is not a function of the Reynolds number when this dimensionless number exceeds 106. On the other hand, literature showed (Bahadori, 2012a,b, Guo and Ghalambor, 2005) for Reynolds number values less than 104 choke flow coefficient have remarkable changes. Thus utilizing logarithmic scale for Reynolds number in LSSVM prediction tends to more accurate result in comparison with linear scale. 3. Background of SVM The SVM model appears to be a supervised learning algorithm that was introduced by Vapnik (1995). Both classification and regression utilizations of the SVM have been systematically investigated by a number of researchers (Arabloo et al., 2013; Baylar et al., 2009; Chen et al., 2011; Cortes and Vapnik, 1995; Shmilovici, 2005; Übeyli, 2010; Vapnik, 1995; Yao et al., 2006). SVMs use the spirit of the structural risk minimization (SRM) theory (Cortes and Vapnik, 1995). The SVM technique builds the input prototypes in a space with greater dimensions by employing a nonlinear mapping method. A linear pattern is then decided in this multi-dimensional feature space (Cortes and Vapnik, 1995; Pelckmans et al., 2002; Suykens and Vandewalle, 1999; Übeyli, 2010). Knowing the approximation issue, the provided dataset of {(x1,y1),(x2,y2),...(xN,yN)} through a nonlinear function is expressed as follows:
f ðxÞ ¼ hw; FðxÞi þ b
(5)
In Eq. (5), h.,.i represent dot product; F(x) represents the nonlinear function that maps x into n-dimensional feature space and carries out the linear regression; w and b represent the weight vector and bias terms. In order to find w and b, the optimization problem is given by (Suykens et al., 2002; Suykens and Vandewalle, 1999; Wang and Hu, 2005): N X 1 xk þ x*k min kwk2 ¼ C 2
(6)
k¼1
8 > < yk hw; Fðxk Þi b 3 þ xk * s:t: hw; Fðxk Þi þ b yk 3 þ xk > : * xk ; xk 0
(7)
With the 3 -insensitive loss function (Suykens et al., 2002; Wang and Hu, 2005):
jy f ðx; wÞj3 ¼
0 if jy f ðx; wÞj 3 jy f ðx; wÞj 3 otherwise
(8)
The solution to the optimization problem of Eq. (6) under the constraints of Eq. (7) is provided by the saddle point of the Lagrangian (Suykens et al., 2002; Wang and Hu, 2005):
1 LSVM ¼ kwk2 þ C 2
N X
xk þ x*k
k¼1
þ hw; Fðxk Þi þ bÞ
N X
k¼1
a*k
3
*
þ xk þ yk
E
k¼1
ak, a*k ,
hk, h*k
(10)
The conditions for optimally yield the following dual problem (Suykens et al., 2002; Wang and Hu, 2005):
max Q ¼ a;a
*
N 1 X ak a*k al a*l hFðxk Þ; Fðxl Þi 2 k;l ¼ 1
3
N X
ak þ
k¼1
a*k
N X
þ
yk ak
k¼1
8 N > < P a a* ¼ 0 k k s:t: k ¼ 1 > : a ; a* ˛½0; C k k
a*k
(11)
(12)
After applying the kernel trick with K(xk,xl) ¼ F(xk)TF(xl), the resulting SVM takes the following form (Suykens et al., 2002; Wang and Hu, 2005):
f ðxÞ ¼
N X k¼1
ak a*k Kðx; xk Þ þ b
(13)
However, the main shortcoming of the SVM technique is its privileged computational load as the constrained optimization programming is needed in this model. In order to lower the model complication of SVM and also to improve the speed of SVM, the model was modified by Suykens and Vandewalle to develop a better technique which is known as the least-square SVM (e.g., LSSVM) model (Suykens and Vandewalle, 1999). In LS-SVM algorithm, the solution is obtained through solving a linear series of equations, instead of inequality constraints (Suykens and Vandewalle, 1999). In order to estimate the function, the optimization problem is expressed throughout the LSSVM modeling as follows (Suykens et al., 2002; Wang and Hu, 2005):
min Jðw; eÞ ¼ w;b;e
N 1 1 X kwk2 þ g e2k 2 2
(14)
k¼1
s:t: yk ¼ hw; Fðxk Þi þ b þ ek
k ¼ 1; .; N
(15)
(9)
N X hk xk þ h*k x*k w; Fðxk Þ b
D
N X 8 vLSVM ¼ 0/w ¼ ðak a*k ÞFðxk Þ > vw > > k ¼ 1 > > > > > N > X > vLSVM > > ak a*k ¼ 0 ¼ 0/ < vb k¼1 > > > vLSVM > > > ¼ 0/C ak hk ¼ 0 > > vxk > > > > : vL SVM ¼ 0/C a*k h*k ¼ 0 * vxk
in which, ek˛R stand for the error variables; g 0 represents a regularization constant. The Lagrangian is given by Suykens et al. (2002) and Wang and Hu (2005):
ak ð3 þ xk yk
k¼1 N X
157
where represent Lagrange multipliers. The optimal conditions are obtained by differentiating Eq. (9) with respect to x, b, w, and x*, and then equating the resultant relationships to zero.
LLSSVM ¼
N N X 1 1 X ak fhw; Fðxk Þi þ b þ ek yk g e2k kwk2 þ g 2 2 k¼1
k¼1
(16) Given Lagrange multipliers ak ˛ R, the optimum conditions are determined as the following (Suykens et al., 2002; Wang and Hu, 2005):
158
I. Nejatian et al. / Journal of Natural Gas Science and Engineering 18 (2014) 155e163 1
Train data Test data
Predicted Choke Flow Coefficient
0.8
Relative Deviation %
0.6
0.4
0.2
0
−0.2
−0.4
−0.6
1.2
1.15
R² =0.9961
1.1
1.05
1
Train Test
0.95 0.95
0.95
1
1.05
1.1
1.15
1
1.2
1.05
1.1
1.15
1.2
Reported Choke Flow Coefficient
Reported Choke Flow Coefficient
Fig. 2. Comparison between the predicted and reported flow coefficient of nozzle-type choke.
Fig. 1. Relative deviation of predicted nozzle-type choke flow coefficient.
4. Results and discussion
8 vLLSSVM > vw > > > > > > > > vLLSSVM > > < vb > > > > vLLSSVM > > > > vek > > > : vLLSSVM vak
¼ 0/w ¼
N X
ak Fðxk Þ
k¼1
¼ 0/
N X
ak ¼ 0
(17)
k¼1
¼ 0/ak ¼ gek
Nozzle-Type choke: s2 ¼ 4.360818744g ¼ 2.67967947Eþ11 Orifice-Type choke: s2 ¼ 0.29304875710g ¼ 2.599677788Eþ6
¼ 0/hw; Fðxk Þi þ b þ ek yk ¼ 0
By defining Y ¼ [y1;...;yN], 1v ¼ [1;...1], a ¼ [a1;...;aN] and removing e and w, the linear equations are attained as follows (Suykens et al., 2002):
0 1N
1TN U þ g1 IN
b
a
¼
0 Y
(18)
where IN refers to an identity matrix with the size of N N, and U ˛ RNN represents the kernel matrix, given by the following expression:
Ukl ¼ Fðxk ÞFðxl Þ ¼ Kðxk ; xl Þ;
k; l ¼ 1; .N
(19)
For LS-SVM, there are many kernel functions such as linear, spline, radial basis function (RBF), sigmoid, and polynomial (Gunn, 1998; Muller et al., 2001). However, most widely used kernel functions are RBF (Eq. (20)) and polynomial (Eq. (21)).
Kðxk ; xl Þ ¼ exp kxk xl k2 =s2
Kðxk ; xl Þ ¼
1 þ xTk xl =c
d
The optimal values of the LSSVM parameters (Suykens and Vandewalle, 1999) namely s2 and g have been assessed, using the Coupled Simulated Annealing (CSA) optimization method (Xavierde-Souza et al., 2010). Optimized values have been determined as follow:
(20)
(21)
where s2 is the squared variance of the Gaussian function and d is the polynomial degree.
In order to comprehensively examine the precision and applicability of new developed intelligent model, both reported data (Guo and Ghalambor, 2005) and other models that calculated or predicted choke flow coefficient have been compared with our novel model results. To represent results in a more understandable form, discussion part is divided into two subsection including Nozzle-Type and Orifice-Type choke flow coefficient prediction. 4.1. Nozzle-type choke In this section results are classified to two subdivisions: at first, developed model direct results have been matched with experimental data by use of both statistical tabled parameters and graphical means, therefore model validity could be thoroughly recognized. Second, performance and accuracy of this new model are reported in comparison with other empirical models such as (Bahadori, 2012a,b; Guo and Ghalambor, 2005).
Table 3 Statistical parameter for training, testing and total data of LLSVM model to determine choke flow coefficient for nuzzle type choke. Statistical parameter
Training set
Testing set
Total
R2 Average absolute relative deviation Standard deviation error Root mean square error N
0.9961 0.257 0.0595 0.0037 131
0.9955 0.2529 0.0561 0.0038 33
0.9961 0.2562 0.0592 0.0037 164
I. Nejatian et al. / Journal of Natural Gas Science and Engineering 18 (2014) 155e163
159
Calculated Choke Flow Coefficient
1.25
1.2
1.15 R² =0.9066
1.1
1.05
1
0.95
0.9 0.9
0.95
1
1.05
1.1
1.15
1.2
1.25
Reported Choke Flow Coefficient Fig. 3. LSSVM predicted choke flow coefficient vs. Reynolds number for nozzle-type choke.
Relative deviations of results of the developed model from literature data (Guo and Ghalambor, 2005) are shown in Fig. 1. In addition A comparison between the predicted choke flow coefficient and reported choke flow coefficient (Guo and Ghalambor, 2005) is illustrated in Fig. 2. Statistical criteria of the developed model such as coefficient of determination (R2), standard deviation errors (STD), average absolute relative deviation (AARD %), and root mean square errors (RMSE) are reported in Table 3. For a range of the ratio of choke diameter to pipe diameter, Fig. 3 represents choke flow coefficient versus Reynolds number in a semi-logarithmic scale. It compares proposed LSSVM model results with reported data (Guo and Ghalambor, 2005). It is interesting to compare the results of developed model against other empirical correlations. For this purpose, whole dataset (Guo and Ghalambor, 2005) which were utilized to 1.25
Calculated Choke Flow Coefficient
1.2
Fig. 5. Comparison between the predicted results of the Gue and Ghalambour correlation and applied data of choke flow coefficient for nozzle-type choke.
construct the LSSVM system were applied to assess the performance and accurateness of the model versus two empirical correlations namely Bahadori (2012a) and Guo and Ghalambor (2005). Bahadori (2012a):
b c d þ þ NRe ðNReÞ2 ðNReÞ3
(22)
a ¼ A1 þ B1
2 3 d d d þ C1 þ D1 D D D
(23)
b ¼ A2 þ B2
2 3 d d d þ C2 þ D2 D D D
(24)
2 3 d d d þ C3 þ D3 D D D
(25)
2 3 d d d þ C4 þ D4 D D D
(26)
lnðCÞ ¼ a þ where,
c ¼ A3 þ B3
1.15
d ¼ A4 þ B4
R² =0.9797
1.1
A1 ¼ 0.375183241, A2 ¼ 335997167 103, A3 ¼ 1,277, 497,258 107, A4 ¼ 2.25682 1011, B1 ¼ 2.172920104, B2 ¼ 1,8 58,044,197 104, B3 ¼ 4,098,554,033 107, B4 ¼ 8.67488 1011, C1 ¼ 4.424605521, C2 ¼ 2.93864359 104, C3 ¼ 2.027390231 106, C4 ¼ 5.86912 1011, D1 ¼ 3.360379148, D2 ¼ 1.767609281 104, D3 ¼ 9.973476851 107, D4 ¼ 5.4948 1011
1.05
1
0.95
Table 4 Comparison of the obtained results through using studied predictive models. 0.9 0.9
0.95
1
1.05
1.1
1.15
1.2
1.25
Reported Choke Flow Coefficient Fig. 4. Comparison between the predicted results of the Bahadori correlation and applied data of choke flow coefficient for nozzle type choke.
Author
APRE (%)
AARD (%)
RMSE
Guo and Ghalambor Bahadori LSSVM (this study)
0.3707 0.2365 0.0097
1.0971 0.3916 0.2562
0.0176 0.0102 0.0037
160
I. Nejatian et al. / Journal of Natural Gas Science and Engineering 18 (2014) 155e163 4
1 LSSVM (this study) Bahadori Gue and Ghalambour
3.5
Train data Test data
0.8 0.6
Relative Deviation %
3
AARD %
2.5
2
1.5
0.4 0.2 0 −0.2 −0.4
1
−0.6 −0.8
0.5
−1 0.55
0
0.4
0.45
0.5
0.55
0.575
0.6
0.625
0.65
0.675
0.7
0.6
0.725
Ratio of choke diameter to pipe diameter Fig. 6. Comparison of the AARD% for studied predictive models for nozzle type choke.
Guo and Ghalambor (2005):
C ¼
d 0:3167 þ 0:6 þ 0:025½logðNRe 4Þ D d
(27)
D
According to the Guo and Ghalambor this equation is valid for the Reynolds number between 104 and 106 (Guo and Ghalambor, 2005). Figs. 4 and 5 clarify the predicted results exerting the Bahadori (2012a) and Guo and Ghalambor (2005) predictive correlation versus applied dataset (Guo and Ghalambor, 2005) of choke flow coefficient for nozzle-type choke, respectively. Validation of the developed model against reported data could be attained from Fig. 2 and by comparison between this figure and Figs. 4 and 5, clear superiority of proposed model over other models could be recognized as the degree of match between the real data (Guo and
0.65
0.7
0.75
0.8
0.85
Reported Choke Flow Coefficient Fig. 8. Deviations of determined choke flow coefficient in orifice type choke values by LSSVM model from applied data.
Ghalambor, 2005) and estimated values is well demonstrated in the cross-plots included in Figs. 4 and 5. Additionally, some statistical quality measures of the developed intelligent model, Bahadori (2012a) and Guo and Ghalambor (2005) are shown in Table 4. This table reports values of APRE, AARD, and RMSE for all predictive models. These error parameters demonstrate that this study eventuates more accurate results and less deviation than other models in comparison with reported data. To represent the difference between developed model (LSSVM) and the two other predictive models, AARD and RMSE for the whole range of the ratio of choke diameter to pipe diameter are computed and illustrated in Figs. 6 and 7, respectively. Useful information could be obtained from these figures about choke flow coefficient prediction models, for example if the ratio of choke diameter to pipe diameter is 0.55 utilizing Bahadori’s correlation (Bahadori, 2012a) does not create sensitive errors, But if the ratio of choke 0.8
0.05 0.045
Predicted Choke Flow Coefficient
LSSVM Bahadori Gue and Ghalambour
0.04
RMSE
0.035 0.03 0.025 0.02 0.015 0.01
0.75
R² =0.9995
0.7
0.65
0.6
Train data Test data
0.005 0
0.6 0.4
0.45
0.5
0.55
0.575
0.6
0.625
0.65
0.675
0.7
0.725
0.65
0.7
0.75
0.8
Reported Choke Flow Coefficient
Ratio of choke diameter to pipe diameter Fig. 7. Comparison of the RMSE for studied predictive models for nozzle type choke.
Fig. 9. Comparison between the predicted results of the developed model and applied data for orifice type choke.
I. Nejatian et al. / Journal of Natural Gas Science and Engineering 18 (2014) 155e163 Table 5 Statistical parameter for training, testing and total data of LLSVM model to determine choke flow coefficient for orifice type choke. Training set
Testing set
Total
R2 Average absolute relative deviation Standard deviation error Root mean square error N
0.9996 0.1372 0.0586 0.0012 137
0.9993 0.1881 0.0585 0.0016 34
0.9995 0.1473 0.0586 0.0013 171
diameter to pipe diameter is 0.725 applying Guo and Ghalambour correlation (Guo and Ghalambor, 2005) or Bahadori’s correlation (Bahadori, 2012a) produce remarkable error, so in such cases using LSSVM model is the most efficient. As a consequence from Fig. 3, it could be observed the accuracy of each model depend on choke diameter to pipe diameter and not related to Reynolds number or gas velocity which can be altered during production. Thus choke flow coefficient predictive models are independent to gas flow rate and fluid properties. In contrast, Since Guo and Ghalambour correlation (Guo and Ghalambor, 2005) is valid between Re ¼ 104 and Re ¼ 106, thus gas velocity affect this correlation validity. 4.2. Orifice-type choke
Choke Flow Coefficient
The main body of this section resembles to Nozzle-type choke, so initially matching or validation between developed model with reported data (Guo and Ghalambor, 2005) and in the next step collation between this study with other correlations will be discussed. Fig. 8 shows relative deviations of results of the developed model and Fig. 9 obviously illustrates endorsement and matching between proposed model and reported data (Guo and Ghalambor, 2005). Other statistical parameter like coefficient of determination (R2), standard deviation errors (STD), average absolute relative deviation (AARD), and root mean square errors (RMSE) are tabled in Table 5 to emphasize the agreement between suggested LSSVM model and reported data. Fig. 10 shows excellent matching between developed model and reported data for orifice-type choke including a range of the ratio of choke diameter to pipe diameter.
0.8
Calculated Choke Flow Coefficient
Statistical parameter
0.75
R² =0.9987
0.7
0.65
0.6
0.6
0.55
4
10
5
10
106
7
10
Reynolds Number Fig. 10. LSSVM predicted choke flow coefficient vs. Reynolds number for orifice type choke.
0.8
b c d þ þ Re Re2 Re3
(28)
a ¼ A1 þ B1
2 3 d d d þ C1 þ D1 D D D
(29)
b ¼ A2 þ B2
2 3 d d d þ C2 þ D2 D D D
(30)
2 3 d d d þ C3 þ D3 D D D
(31)
2 3 d d d þ C4 þ D4 D D D
(32)
LnðcÞ ¼ a þ where
d ¼ A4 þ B4
0.6
0.75
Correlation for choke flow coefficient in this case (orifice-type choke) was represented by Bahadori (2012b) that showing as follow:
0.75
0.65
0.7
Fig. 11. Comparison between the predicted results of the Bahadori correlation and applied data of choke flow coefficient for orifice type choke.
c ¼ A3 þ B3
0.7
0.65
Reported Choke Flow Coefficient
0.8
d/D=0.2 LSSVM d/D=0.3 LSSVM d/D=0.4 LSSVM d/D=0.45 LSSVM d/D=0.5 LSSVM d/D=0.6 LSSVM d/D=0.65 LSSVM d/D=0.7 LSSVM d/D=0.725 LSSVM d/D=0.75 LSSVM
161
A1 ¼ 0.634496879, A2 ¼ 1.365475211 103, A3 ¼ 2.0709889 38 107, A4 ¼ 6.182219610417 1010, B1 ¼ 0.8.2826527, B2 ¼ 8.9 92804696 103, B3 ¼ 1.303719092 108, B4 ¼ 3.90027 1011, C1 ¼ 2.109752033, C2 ¼ 1.87268391 104, C3 ¼ 2.720697962 108, C4 ¼ 8.12103 1011, D1 ¼ 2.1.3737965, D2 ¼ 1.42435 9206 104, D3 ¼ 1.913671363 108, D4 ¼ 5.6155 1011. Graphical and statistical parameters have been used to highlight the differences between proposed LSSVM model with Bahadori’s correlation (Bahadori, 2012b). Fig. 11 shows prediction Bahadori’s
Table 6 Comparison of the obtained results through using the proposed model for orifice type choke and Bahadori correlation. Author
APRE (%)
AARD (%)
RMSE
Bahadori LSSVM (this study)
0.0094 0.0015
0.238 0.1473
0.0021 0.0013
162
I. Nejatian et al. / Journal of Natural Gas Science and Engineering 18 (2014) 155e163
LSSVM Bahadori
0.45 0.4 0.35
AARD %
0.3 0.25 0.2 0.15 0.1 0.05 0
0.2
0.3
0.4
0.45
0.5
0.6
0.65
0.7
0.725
0.75
Ratio of choke diameter to pipe diameter Fig. 12. Comparison of the AARD% for studied predictive models for orifice-type choke.
model (Bahadori, 2012b) results versus reported data in which R2 ¼ 0.9797, but this parameter for our model (this study) is 0.9995 according to Fig. 9. Other factors compare statistical parameters with each other are listed in Table 6 to show prominence of this study. Figs. 12 and 13 are two comparative diagrams that compare LSSVM model with Bahadori’s model (Bahadori, 2012b) in detail. 5. Conclusions The powerful numerical tool of Least-Squares Support Vector Machine (LSSVM) has been utilized to develop calculating choke flow coefficient for nozzle-type and orifice-type choke in terms of two important parameters including the ratio of choke diameter to pipe diameter and Reynolds number. For this purpose 164 datasets for nozzle-type and 171 datasets for −3
x 10
LSSVM Bahadori
3.5
Nomenclature A cross sectional area of choke, in2 AARD average absolute relative deviation APRE average percent relative error STD standard deviation error RMSE root mean square error LSSVM Least-Squares Supported Vector Machine R2 squared correlation coefficients C choke flow coefficient d choke diameter, in D pipe diameter, in g acceleration of gravity, ft/s2 k Cp/Cv (specific heat ratio) Poutlet pressure at choke outlet, psia Pup upstream pressure at choke, psia Qsc gas flow rate, Mscf/d Re Reynolds number Tup upstream temperature at choke, R MSCF million standard cubic feet g acceleration of gravity, ft/s2 (0.3048 m/s2) m gas viscosity, cp gg gas specific gravity Unit conversion 1 inch 0.0254 m 1 psi 6.896 kPa 1 F 1.8 C þ 32
3
2.5
RMSE
orifice-type choke have been applied. The average absolute relative deviation of the proposed model from reported data for nozzle-type and orifice-type choke are nearly 0.25% and 0.15% and the squared correlation coefficient is around 0.9961 and 0.9982 respectively. Based on the comparison of LSSVM predicted data and the outputs from other available empirical equations, it was also found that the proposed intelligent model yields superior efficiency of available correlations in the literature for prediction of choke flow coefficient in nozzle-type and orifice-type chokes. At the end, to get the investigation deeper average absolute relative deviation and root mean square error of proposed model compared with other existing correlation for a variety of ratio of choke diameter to pipe diameter. This computer based developed model is user friendly, consequently, researchers in this area are able to straightforwardly employ the software to regenerate all of our outputs and forecast the choke flow coefficient for Nozzle-type and orifice-type choke. To exemplify our suggestion a typical example has been presented for each type of choke.
Appendix
2
1.5
R2 ¼ 1 PN
1
i¼1
0.5
0
PN
AARD% ¼ 0.2
0.3
0.4
0.45
0.5
0.6
0.65
0.7
0.725
0.75
Ratio of choke diameter to pipe diameter Fig. 13. Comparison of the RMSE for studied predictive models for orifice-type choke.
STD ¼
i¼1
ðEst:ðiÞ Exp:ðiÞÞ2
ðEst:ðiÞ averagðExp:ðiÞÞÞ2
N 100 X jEst:ðiÞ Exp:ðiÞj N i¼1 Exp:ðiÞ
N X ðEst:ðiÞ averageðEst:ðiÞÞÞ2 i¼1
N
!1=2
I. Nejatian et al. / Journal of Natural Gas Science and Engineering 18 (2014) 155e163
0
11=2
BPN ðEst:ðiÞ Exp:ðiÞÞ2 C C B RMSE ¼ B i ¼ 1 C A @ N
APRE% ¼
N 100 X ðEst:ðiÞ Exp:ðiÞÞ N i¼1 Exp:ðiÞ
References Al-Attar, H., 2008. Performance of wellhead chokes during sub-critical flow of gas condensates. J. Petrol. Sci. Eng. 60 (3e4), 205e212. Arabloo, M., Shokrollahi, A., Gharagheizi, F., Mohammadi, A.H., 2013. Toward a predictive model for estimating dew point pressure in gas condensate systems. Fuel Process. Technol. 116, 317e324. Ashford, F.E., 1974. An evaluation of critical multiphase flow performance through wellhead chokes. J. Petrol. Technol. 26 (8), 843e850. Bahadori, A., 2012a. A simple predictive tool to estimate flow coefficient for subsonic natural gas flow through nozzle-type chokes. J. Nat. Gas Sci. Eng. 7, 1e6. Bahadori, A., 2012b. Estimation of flow coefficient for subsonic natural gas flow through orifice-type chokes using a simple method. J. Nat. Gas Sci. Eng. 9, 39e44. Baylar, A., Hanbay, D., Batan, M., 2009. Application of least-square support vector machines in the prediction of aeration performance of plunging overfall jets from weirs. Exp. Syst. Appl. 36 (4), 8368e8374. Chen, T.-S., et al., 2011. A novel knowledge protection technique base on support vector machine model for anti-classification. In: Zhu, M. (Ed.), Electrical Engineering and Control. Lecture Notes in Electrical Engineering. Springer, Berlin Heidelberg, pp. 517e524. Clark, A.R., Perkins, T.K., 1981. Wellbore and near-surface hydraulics of a blown-out oil well. J. Petrol. Technol. 33 (11), 2181e2188. Cortes, C., Vapnik, V., 1995. Support-vector networks. Mach. Learn. 20 (3), 273e297. Fortunati, F., 1972. Two-phase flow through wellhead chokes. In: SPE European Spring Meeting. American Institute of Mining, Metallurgical, and Petroleum Engineers, Inc., Amsterdam, Netherlands, 1972 Copyright. Gunn, S.R., 1998. Support Vector Machines for Classification and Regression. University of Southampton, Faculty of Engineering, Science and Mathematics School of Electronics and Computer Science. Guo, B., Al-Bemani, A.S., Ghalambor, A., 2007. Improvement in Sachdeva’s multiphase choke flow model using field data. J. Can. Petrol. Technol. 46 (5).
163
Guo, B., Ghalambor, A., 2005. Natural Gas Engineering Handbook. Gulf Publishing, Houston, TX, USA. Keith, J.M., Crowl, D.A., 2005. Estimating sonic gas flow rates in pipelines. J. Loss Prev. Process Indust. 18 (2), 55e62. Ling, K., 2012. Modifications to equations of Gas flow through choke. In: SPE Latin America and Caribbean Petroleum Engineering Conference. Society of Petroleum Engineers, Mexico City, Mexico. Morris, S.D., 1996. Choke pressure in pipeline restrictions. J. Hazard. Mater. 50 (1), 65e69. Muller, K.-R., Mika, S., Ratsch, G., Tsuda, K., Scholkopf, B., 2001. An introduction to kernel-based learning algorithms. IEEE Trans. Neural Networks 12 (2), 181e 201. Nøkleberg, L., Søntvedt, T., 1995. Erosion in choke valves-oil and gas industry applications. Wear 186e187 (part 2), 401e412. Pelckmans, K., et al., 2002. LS-SVMlab: A matlab/c Toolbox for Least Squares Support Vector Machines. Tutorial. KULeuven-ESAT, Leuven, Belgium. Perry, R.H.A.G.D., 1984. Perry’s Chemical Engineer’s Handbook, sixth ed. McGraw Hill. Rodriguez, R., et al., 2013. A new analytical model to predict gas rate volume measurement through well head chokes. 6th International Petroleum Technology Conference. 2013, International Petroleum Technology Conference, Beijing, China. Sachdeva, R., Schmidt, Z., Brill, J.P., Blais, R.M., 1986. Two-phase flow through chokes. In: SPE Annual Technical Conference and Exhibition. Society of Petroleum Engineers, New Orleans, Louisiana, 1986 Copyright. Shmilovici, A., 2005. Support vector machines. In: Maimon, O., Rokach, L. (Eds.), Data Mining and Knowledge Discovery Handbook. Springer, US, pp. 257e276. Stewart, M., Arnold, K., 2011. Gas Dehydration Field Manual. Suykens, J.A.K., Gestel, T.V., Brabanter, J.D., Moor, B.D., Vandewalle, J., 2002. Least Squares Support Vector Machines. World Scientific Pub. Co., Singapor. Suykens, J.A.K., Vandewalle, J., 1999. Least squares support vector machine classifiers. Neural Process. Lett. 9 (3), 293e300. Übeyli, E.D., 2010. Least squares support vector machine employing model-based methods coefficients for analysis of EEG signals. Expert Syst. Appl. 37 (1), 233e239. Vapnik, V., 1995. The Nature of Statistical Learning Theory. Springer-Verlag, New York. Wang, H., Hu, D., 2005. Comparison of SVM and LS-SVM for regression. In: International Conference on Neural Networks and Brain. IEEE, Beijing, China, pp. 279e283. Xavier-de-Souza, S., Suykens, J.A.K., Vandewalle, J., Bolle, D., 2010. Coupled simulated annealing. Syst. Man Cybern. Part B: Cybern. IEEE Trans. 40 (2), 320e335. Yao, J., Zhao, S., Fan, L., 2006. An enhanced support vector machine model for intrusion detection. In: Wang, G.-Y., Peters, J., Skowron, A., Yao, Y. (Eds.), Rough Sets and Knowledge Technology. Lecture Notes in Computer Science. Springer, Berlin Heidelberg, pp. 538e543.