Development of an expert system for selection of multiphase flow correlations Vol.:(0123456789)1 3 Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 https://doi.org/10.1007/s13202-018-0442-7 O R I G I N A L PA P E R - P R O D U C T I O N E N G I N E E R I N G Development of an expert system for selection of multiphase flow correlations Mohamed A. Abd El‑Moniem1 · Ahmed H. El‑Banbi2 Received: 17 September 2017 / Accepted: 6 February 2018 / Published online: 15 February 2018 © The Author(s) 2018. This article is an open access publication Abstract Our target was to develop an expert system to help petroleum engineers in selecting the most suitable multiphase flow cor- relation in the absence of measured flowing pressure. A large database of pressure points was collected and analyzed using many multiphase flow correlations. The expert system was developed with a set of rules to identify the best correlation for variety of well, flow, and PVT conditions. The expert system is based on the idea of clustering the data and finding the best multiphase flow correlation(s) for each cluster. The error associated with the selected correlation is also quantified for every correlation in each data sub-cluster so the engineer would expect the accuracy of pressure drop prediction when utilizing this approach. Over the entire database, if one multiphase flow correlation is selected, the overall mean absolute percent error ranges between 12.7 and 57.5%, while the range of errors for best correlation(s) in different data sub-clusters range from 0.01 to 3% for most cases with accurate PVT. The expert system was validated by a new set of data. It succeeded in identify- ing the best correlation(s) 70% of the times, and the calculated pressure was more accurate than using one correlation by a factor of 2. Use of the expert system in the validation database gave a mean absolute percent error of 8.8%. This represents approximately one-third of the error value when any single correlation is used over the entire validation dataset. (Error for using single correlation ranges from more than 21 to 29%.) Keywords Multiphase flow · Out flow performance · Multiphase correlations · Production engineering · Nodal analysis List of symbols API American Petroleum Institute (density measurement) At Actual flowing pressure data bbl Barrel Begg Beggs and Brill correlation BHT Bottom-hole temperature d Diameter D Day DRM Duns and Ros modified correlation DRO Duns and Ros original correlation ESP Electrical submersible pump FB Fancher and Brown correlation FT Foot Ft Forecasted flowing pressure data from different 14 correlations °F Degree Fahrenheit GOR Gas/oil ratio GRE GRE correlation HB Hagedorn and Brown correlation HYDRO HYDRO correlation in Inch ID Inner diameter MAPE Mean absolute percent error MPE Mean percent error MB Mukherjee and Brill correlation n Number of data points OD Outer diameter ORK Orkiszewski correlation PET Petroleum experts correlation PET 2 Petroleum experts 2 correlation PET 3 Petroleum experts 3 correlation PET 4 Petroleum experts 4 correlation PET 5 Petroleum experts 5 correlation qL Liquid flow rate Electronic supplementary material The online version of this article (https ://doi.org/10.1007/s1320 2-018-0442-7) contains supplementary material, which is available to authorized users. * Mohamed A. Abd El-Moniem eng_mohamedali1986@yahoo.com 1 Amal Petroleum Company, Cairo, Egypt 2 Cairo University, Giza, Egypt http://crossmark.crossref.org/dialog/?doi=10.1007/s13202-018-0442-7&domain=pdf https://doi.org/10.1007/s13202-018-0442-7 1474 Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 1 3 qo Oil flow rate scf Standard cubic feet T.S. Tubing size W.C. Water cut Ɣg Gas specific gravity ε Pipe roughness % Percentage Introduction Multiphase flow correlations are routinely used to calculate pressure (and temperature) drop in the tubing and flow lines for production and injection wells. The pressure drop cal- culations have many applications in artificial lift design and optimization, well deliverability forecasting, and flow assur- ance applications. Over several decades, many investigators developed multiphase flow correlations to calculate pressure drop in tubing at variety of conditions. Each correlation was derived for certain conditions. Several comparison studies between different correlations for specific sets of data are also available in the literature. Predicting multiphase flow pressure drop can sometimes present a challenge for practic- ing engineers. Multiphase flow occurs due to the variations of phases that flow through one pipe. These phases may be oil, water, and gas. Due to the different properties of gas compared with oil and water for viscosities and other properties, the gas tends to flow faster than oil and past the liquid in the upward flow (gas slippage). The in situ liquid volume in the pipe is defined as the liquid holdup. The pressure drop calculations depend on the properties of the mixture of liquid including oil and water in addition to the gas. The total pressure drop is equal to the summation of the hydrostatic, friction, and acceleration pressure drops. The hydrostatic term depends on the mixture density, which is a function of the liquid holdup. The friction term depends on the friction factor for the mixture. The acceleration term appears due to the change in velocity resulting from the change in pressure. The friction calculations depend on the flow regime, which in turn depends on the superficial veloc- ity of liquid and gas phases. The most common flow regimes for vertical wells include single liquid flow, bubble, slug, churn, annular, and mist flow. The possible flow regimes for horizontal wells usually include dispersed bubble, annular, slug, stratified wavy, and stratified smooth. Over the years, both empirical correlations and mecha- nistic models were derived to calculate the pressure drop in pipes. Empirical correlations can be classified into three categories (Ansari et al. 1990): 1. Correlations that assume no slip and do not consider flow patterns. Examples include Poettmann and Carpen- ter (1952) and Fancher and Brown (1963). 2. Correlations that consider the slip but not the flow pat- terns. Examples include Gray (1978) and Hagedorn and Brown (1964 and 1965), etc. 3. Correlations that consider both the slip and the flow pat- terns. Examples include correlations by Duns and Ros (1963) and Beggs and Brill (1973). The mechanistic models, however, usually include some physical phenomena with analytical relations to predict the flow patterns. In these models, mostly analytical expressions are used to calculate the different parameters for each flow regime. Examples for mechanistic models include Aziz et al. (1972) and Ansari et al. (1990). Although many correlations to calculate the pressure drop in pipes are available, clear rules on how to select appropri- ate correlations do not exist in the absence of actual pressure measurements. In this work, an expert system is developed to select the best correlation(s) for specific well and flow conditions. Expert system development The first step in developing the expert system was to collect a large database of pressure drop points covering a wide variety of well and flow conditions. Abd El-Moniem (2016) and Abd El-Moniem and El- Banbi (2015) collected bottom-hole flowing pressure data points from both the literature from Ashiem (1986), Bax- endell and Thomas (1961), Chierici et al. (1974), Hill and Wood (1994), Peffer et al. (1988) and Reinicke et al. (1987) and actual oil wells covering different well and flow con- ditions. The current study used around 2730 oil well data points for developing the expert system and 144 different Table 1 Range of data used in developing and validating the expert system Data for development of the expert system (2730 points) Data for validation of the expert system (144 points) Property Range Property Range qo, bbl/D 5–36,800 qo, bbl/D 15–31,427 GOR, scf/bbl 0–40,000 GOR, scf/bbl 223–6081 W.C., % 0–98 W.C., % 0–76 BHT, °F 82–370 BHT, °F 121–264 API, ° 8–60 API, ° 13–46.5 ɣg 0.57–1.81 ɣg 0.57–0.93 Depth, ft. 250–14,358 Depth, ft. 650–12,862 1475Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 1 3 data points for its validation. The range of the data is listed in Table 1. To cover all the points in the database, more than 560 well models were developed using a commercial pipe mod- eling software. We performed around 1042 simulation runs and calculated the predicted bottom-hole flowing pressure using 14 different correlations for each point. We, then, cal- culated the error from each correlation for each point. Table 2 shows the average and mean absolute percent error for each correlation through the entire database. The minimum and maximum absolute percent errors are also shown. The mean absolute percent error ranges from 12.67 to 57.52 for the best and worst correlation over the entire dataset. More importantly, the table shows large range of error between minimum and maximum errors for all correlations. As shown in Figs. 1 and 2 as examples, we show the error for two selected correlations for all the data points in the database to show the correlation performance for different points. The large variations in the error (some points show very small error, while other points show very large error); we can conclude that no correlation is good for all the points within the database. However, each correlation has reason- able prediction capabilities for some range of well and flow Table 2 Average error and average absolute error of the different fourteen correlations for the entire database Correlation Prosper Software Help Manual, Petroleum Experts (2013) Database for development of the expert system (2730 points) Mean percent error % Mean absolute percent error % Minimum absolute error % Maximum absolute error % Duns and Ros modified 11.09 19.42 0.02 729.68 Hagedorn and Brown − 4.74 13.68 0.00 466.54 Fancher and Brown − 10.38 16.53 0.01 408.25 Mukherjee and Brill (1983) 3.85 14.54 0.02 481.03 Beggs and Brill 8.38 13.93 0.00 712.03 Petroleum experts − 1.61 13.31 0.01 605.45 Orkiszewski (1967) − 5.53 15.23 0.00 737.27 Petroleum experts 2 − 0.80 12.88 0.00 568.50 Duns and Ros original 2.82 12.81 0.00 321.14 Petroleum experts 3 − 4.82 13.46 0.00 511.42 GRE − 0.75 12.69 0.00 582.91 Petroleum experts 4 − 2.73 13.34 0.00 320.65 Hydro 3P 49.16 57.52 0.00 954.75 Petroleum experts 5 − 0.75 12.67 0.00 586.94 Fig. 1 Hagedorn and Brown correlation performance through the entire database 0.00 20.00 40.00 60.00 80.00 100.00 1 60 50 82 15 8 38 4 39 1 23 1 24 2 27 7 37 9 88 4 81 0 93 7 10 36 89 1 88 5 83 4 97 3 81 8 87 3 10 10 87 2 91 0 94 7 95 8 88 3 10 57 10 65 10 73 10 82 10 89 13 11 13 88 14 91 15 49 A bs E ro r, % Run # HB Correla�on Performance Fig. 2 Mukherjee and Brill cor- relation performance through the entire database 0.00 20.00 40.00 60.00 80.00 100.00 1 60 50 82 15 8 38 4 39 1 23 1 24 2 27 7 37 9 88 4 81 0 93 7 10 36 89 1 88 5 83 4 97 3 81 8 87 3 10 10 87 2 91 0 94 7 95 8 88 3 10 57 10 65 10 73 10 82 10 89 13 11 13 88 14 91 15 49 A bs E ro r, % Run # MB Correla�on Performance 1476 Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 1 3 conditions. Our objective was to divide the data into clusters (groups) and to identify the best correlation(s) within each data cluster. The database was divided into clusters according to well depth, well geometry and tubing size as shown in Fig. 3. Shallow depth is for points that are less than 2000  ft. TVD, deep is for pressure points that are more than 9000 ft. in depth, and the moderate depth is between. We, then, divided the data into sub-clusters according to production criteria. Table 3 shows the selected criteria based on oil rate, water cut, and GOR. Therefore, each cluster of the major ones in Fig. 3 was further divided into smaller segments (sub-cluster) representing the different production conditions given in Table 3. The selection of cluster and sub- cluster ranges was essentially arbitrary. However, we wanted to make sure enough data points were available for every cluster and sub-cluster. We also wanted to have the cluster and sub-clusters bounded by easy values to remember. These sub-clusters within the clusters were given differ- ent code numbers (reference numbers) as listed in Table 4. Each segment of data is then defined by which cluster it lies in and its reference number (sub-cluster number). Table 4 also contains the number of data points available for every sub-cluster. The number of data points is given in the green cells. The sub-clusters represented by the red cells did not contain data points. A Microsoft Access program was developed for the entire dataset to store the actual values of pressure, calcu- lated values from all 14 correlations, and the error for every point. The Access Database was then used to extract a total of 131 sub-clusters for tubular flow and identify the best correlation(s) in each sub-cluster. The clusters (13) are divided based on geometry (well depth, well deviation, and ID). The sub-clusters division is based on flow conditions (oil rate, WC, and GOR). Accord- ing to these divisions, we should theoretically have 13 × 36 sub-cluster. However, many sub-clusters did not contain data (e.g., it is not possible to have high oil rate wells with small ID, and it is not possible to have high GOR wells with high oil rate and high WC). The sub-clusters that contained enough data points to draw conclusions were 131. As listed in Table 4, some sub-cluster contained large number of data points, and others contained fewer data points. We further classified the sub-clusters according to how many points they had into three categories: 1. Strong sub-cluster containing more than 20 points. 2. Moderate sub-cluster containing between 5 and 20 points. 3. Weak sub-cluster containing less than 5 points. The identification of different levels of correlation strength was covered by defining a correlation “strength fac- tor” and covered in Abd El-Moniem and El-Banbi (2015). They also reported the error for every correlation in every sub-cluster. Results The detailed results of sub-clusters can be found in Abd El- Moniem (2016). A sample of the results is listed in Table 5. The tables given in the paper and the appendix are sufficient to fully utilize the expert system. Application of the expert system The use of the expert system is based on selecting the appro- priate cluster as shown in Fig. 3. The selection of the clus- ter is based on (1) well type (vertical, deviated, or horizon- tal), (2) tubing size, and (3) depth. The following step is to select the sub-cluster based on (4) oil production rate, (5) gas/oil ratio (GOR), and (6) water cut as listed in Table 4. The sub-cluster is determined from Fig. 3 and Table 4. The detailed sub-cluster tables to determine the best correlation, its strength, and expected error range are given in “Appendix Fig. 3 Clusters map Table 3 Sub-clusters production criteria for oil wells [after Abd El- Moniem and El-Banbi (2015)] qo, bbl/D W.C., % GOR, scf/bbl < 2500 < 5 < 1000 2500–10,000 5–30 1000–5000 > 10,000 30–70 > 5000 > 70 1477Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 1 3 A.” An example on how to use the expert system is also given in “Appendix B.” We also developed a VBA (Visual Basic code) for Micro- soft Excel to facilitate the selection of the appropriate cor- relation. The user can input the six inputs required by the expert system, and the VBA code will automatically find the following information: (1) the cluster and sub-cluster where the user data point is located, (2) the multiphase correlation(s) that should be used to predict the pressure drop for this particular data point, (3) the expected error of this best correlation(s) in the database, and (4) the strength factor for the selected correlation(s) within the sub-cluster. The authors can share the VBA code with interested readers. An example run of the VBA code is shown in Fig.  4. The expert system run for this example case came up with two best correlations (not one). The strength factor for the first correlation (MB) is 43%, and the strength factor for the second correlation (HYDRO) is 35%. It is the same for the mean absolute percent error (1.54% for MB and 2.22% for HYDRO). Validation of the expert system A new dataset with 144 points from 62 wells was used in validating the expert system. All these data points were not used in developing the expert system. The validation data- set was distributed among 48 sub-clusters of data. All 14 Table 4 Sub-clusters reference number and data points for oil wells Criteria Reference Number Cluster Number, Data Availability and Number of Points qo GOR W.C. “bbl/D” “scf/bbl” “%” A B C D E F G H I J K L M < 2,500 < 1,000 < 5 1 29 73 99 154 25 9 23 23 84 2 2 6 10 5-30 2 2 42 30 137 1 6 19 7 52 1 30-70 3 6 168 28 414 9 5 17 7 108 4 6 >70 4 13 9 60 3 8 4 6 25 1, 00 0- 5, 00 0 <5 5 7 17 16 19 4 1 69 4 5-30 6 2 1 10 2 14 1 7 30-70 7 2 24 1 84 2 18 2 14 >70 8 4 2 2 7 6 >5,000 < 5 9 1 2 2 7 5-30 10 1 1 4 2 30-70 11 1 2 6 >70 12 8 3 25 1 19 2, 50 0- 10 ,0 00 < 1,000 < 5 13 22 69 36 118 4 10 7 3 24 8 8 16 5-30 14 14 3 37 3 5 2 7 30-70 15 5 1 12 5 >70 16 1, 00 0- 5, 00 0 <5 17 1 2 4 2 3 1 16 5-30 18 2 30-70 19 1 >70 20 >5,000 < 5 21 1 5-30 22 30-70 23 >70 24 1478 Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 1 3 correlations were run for all 144 points, and the best correla- tion (and its error) was determined for each point. The expert system was also run for all 144 points, and the best correla- tion selected by the expert system was compared to the best correlation based on the error calculation. The expert system validation was done on two levels. First, Table 6 shows a summary for all 144 points, and it shows that the expert system was able to predict the best correlation in 70% of the cases. Secondly, the predicted correlation by the expert sys- tem was used to compute the pressure drop for every point in the 144 points. Equations (1) and (2) are used to calculate the mean absolute percent error and the mean percent error. Table 7 shows the error results for the expert system predic- tion over the 144 points (whether the predicted correlation from the expert system was the best one or not) in compari- son with each correlation error over the same data (144 data (1)MAPE = 100 n n∑ i=1 | | | | A t − F t A t | | | | (2)MPE = 100 n n∑ i=1 A t − F t A t Table 4 (continued) Criteria Reference Number Cluster Number and Data Availability qo GOR W.C. “bbl/D” “scf/bbl” “%” A B C D E F G H I J K L M >10,000 < 1,000 < 5 25 1 2 7 23 5 2 6 5-30 26 4 30-70 27 >70 28 1,000-5,000 <5 29 1 2 18 5-30 30 30-70 31 >70 32 >5,000 < 5 33 1 5-30 34 30-70 35 >70 36 Table 5 Sample of complete results for one sub-cluster [after Abd El-Moniem and El-Banbi (2015)] Correlation No. of Points Strength (%) Avg. Error (%) Avg. Abs. Error (%) DRO 15 65 0.17 1.24 ORK 12 52 0.39 1.80 PET2 10 43 -0.84 1.23 PET4 9 39 0.03 0.86 DRM 9 39 0.16 1.61 PET5 8 35 -0.20 0.77 HYDRO 8 35 -0.51 0.82 GRE 8 35 -0.13 0.88 PET 6 26 -0.10 0.75 HB 6 26 -0.10 0.75 PET3 6 26 -0.10 0.75 BEGG 6 26 -0.97 1.46 MB 4 17 -0.28 1.08 Total Points 23 1479Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 1 3 points). The mean absolute percent error is around 8.8% using the expert system compared to more than 21% for the best single correlation over the validation dataset. The vali- dation results also show that even in the cases where the best correlation was not selected by the expert system (30% of the cases), the selected correlation always produced reasonably good results compared with the actual values (i.e., when the expert system fails to select the absolute best correlation, it will select one of the second best correlations). Sensitivity of the expert system to uncertain input parameters In this section, we wanted to test the strength of the expert system and how it reacts to inaccurate input data. The meas- ured GOR is usually among the most uncertain parameters in oil well operations. Other parameters that may carry some uncertainty include API gravity of the oil, specific gravity of the gas, and tubing roughness. In each one of these four parameters, a random subset of the database was used to test the effect of the parameter sensitivity on the expert system accuracy. In the sensitivity analysis study, we used a ran- domly selected dataset out of the database. We made sure the selected dataset covered points from most sub-clusters. The sensitivity analysis work involves changing a parameter (e.g., GOR or API) and running all correlations again with the new value for GOR or API, then extracting the data, calculating errors, and comparing correlations with actual data. Enough points were tested to validate and generalize the conclusions regarding the effect of these parameters. For each point within the subset of the database, the parameter was perturbed by 10–20% and the expert system was run to predict the best correlation(s). The suggested correlation by the expert system was also used (with the perturbed input parameter) to predict the pressure drop and compared with the actual value of the pressure. The follow- ing paragraphs summarize our findings from the sensitivity study. GOR sensitivity GOR affects both the input to the expert system and the input to correlation calculations. Four groups of wells were selected: (1) low GOR and high oil rate wells, (2) high GOR Fig. 4 Expert system best correlation/strength factor/mean absolute percent error output window Table 6 Expert system validated points status Table 7 Performance results of the expert system versus all correla- tions for validation dataset Correlation Mean percent error % Mean absolute percent error % Expert system − 0.22 8.82 Duns and Ros modified 17.16 28.06 Hagedorn and Brown 5.81 24.14 Fancher and Brown − 2.04 29.18 Mukherjee and Brill 14.55 21.20 Beggs and Brill 17.53 22.16 Petroleum experts 8.55 23.16 Orkiszewski 2.83 25.79 Petroleum experts 2 9.47 23.30 Duns and Ros original 13.77 21.59 Petroleum experts 3 5.18 24.88 GRE 8.70 22.65 Petroleum experts 4 9.76 21.96 Hydro 3P 11.07 21.74 Petroleum experts 5 9.27 22.33 1480 Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 1 3 and high oil rate wells, (3) low GOR and low oil rate wells, and (4) high GOR and low oil rate wells. For low GOR and high rate wells, the expert system could predict the best correlation with a success rate of 56%, when the GOR input (one of the sensitive input parameters) was changed by ± 20%. This reflects that changing GOR for low GOR high rate wells has a moderate effect in changing the order of the best correlation. For high GOR and high rate wells, the expert system could predict the best correlation by 75%. It reflects that changing GOR for high GOR high rate wells by a percent- age of ± 20% has a slight effect in changing the order of the best correlation. For low GOR and low rate wells, the expert system could predict the best correlation by 37.5%. It reflects that changing GOR for low GOR low rate wells by a percentage of ± 20% has a significant effect in changing the order of the best correlation. For high GOR and low rate wells, the expert system could predict the best correlation 95% of the cases. We can safely conclude that a ± 20% error in GOR for those wells had minor effect in changing the order of the best correlation. GOR was found to have considerable effect on the calcu- lated pressure drop from all correlations, especially for low GOR wells (in both high oil rate and low oil rate wells). This is probably due to changing flow regimes in the calculation of pressure drop. Although GOR here is the producing GOR, solution gas/oil ratio (Rs) is responsible for part of the pro- ducing GOR, especially in low GOR wells. Therefore, for low GOR wells, flow regimes may change rapidly due to the release of gas with the decline of pressure and temperature in the tubing and consequently change the order of the best correlation as listed in Table 8. Other parameters sensitivity Other parameters were investigated to check their uncer- tainty on the expert system and the error of the calculated pressure by the selected correlation(s). These parameters include API, gas specific gravity and tubing roughness. Changing the API of the oil by ± 10% had slight effect on both the expert system selection and the calculated pressure drop by the selected correlation. In more than 90% of the cases, the expert system was successful in picking up the best correlation even with the ± 10% error in API. For gas specific gravity, changing gas specific gravity with ± 10% had minor effect on changing the order of the best correlation as the expert system predicted the best cor- relation with 90%. The exception was for low GOR low rate wells, as the expert system could obtain the best correlation with only 37.5%. For tubing roughness, the expert system could obtain the best correlations 95% of the time. The exception was for high GOR high rate wells, where the expert system could predict the best correlation with only 37.5%. The selection of the range of sensitivity analysis param- eters was mainly based on measurement errors in operations of oil fields. GOR measurement error may reach ± 20%, while API and specific gravity of gas are usually estimated with much more certainty. Table 8 summarizes the results of the sensitivity analysis of these parameters and their effect on changing the order of the best correlation and conse- quently the capability of the expert system to predict the best correlation even with some measurements errors. Conclusions We utilized a large dataset to test the accuracy of 14 cor- relations among the most widely used multiphase flow cor- relations. We also used an approach to take advantage of the fact that each correlation is strong under certain conditions of well geometry, flow conditions, and PVT properties. The approach is based on data clustering. The following conclu- sions can be made: Table 8 Effect of different sensitive parameters on correlation prediction Well flow condition GOR effect API effect Gas specific gravity effect Tubing roughness effect Low GOR and high production rate Medium Low Low Low Low GOR and low production rate High Low High Low High GOR and high production rate Low Low Medium Medium High GOR and low production rate Low Low Low Low 1481Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 1 3 1. The overall mean absolute percent error is around 12.7% for the best multiphase flow correlation in the entire dataset, while the range of errors for the best correlation(s) in different data sub-clusters is from 0.01 to 3% for most cases with accurate PVT. 2. In the validation dataset, the mean absolute percent error was 8.8% when the expert system was used. This repre- sents approximately one-third of the error value when any single correlation is used over the entire dataset. (Error for using single correlation ranges from more than 21 to 29%.) 3. From the sensitivity runs, we found that GOR, API, and gas specific gravity may have different degrees of effectiveness on the correlation selection. PVT data are probably one of the most important multiphase flow cor- relations input data affecting the accuracy of the correla- tion. 4. In practice, an accurate gas rate should be determined through production test separator especially for low rate oil wells as GOR has important effect on pressure drop results. GOR was found to have impact on changing the best correlations for different clusters of oil data in case of low GOR wells. However, GOR has minor effect on selection of best correlations for high GOR wells. 5. Tubing roughness was found to have small impact on changing the best correlations for different clusters of oil well data (except for high GOR and high oil rate wells). Open Access This article is distributed under the terms of the Crea- tive Commons Attribution 4.0 International License (http://creat iveco mmons .org/licen ses/by/4.0/), which permits unrestricted use, distribu- tion, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. Appendix (A) To use the expert system, the user needs to collect the well information and flow conditions. Required well information is: (1) well depth, (2) well type (vertical, deviated, or hori- zontal), and (3) tubing ID. Required flow conditions are: (4) oil rate, (5) water cut, and (6) producing GOR. The well information is used with the clusters map presented in Fig. 3 to define the data cluster. Then flow conditions are used to define the “sub-cluster” reference number from Table 4. The reference number is then used with the set of tables in this appendix (Tables 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, Table 9 Best correlations for cluster (A) Sub-cluster Total points Correlation Strength factor “%” Mean absolute percent error “%” A1 29 PET 5/GRE 31 1.9 MB 28 2.1 A2 2 ORK 100 1.0 A3 6 GRE/PET 5 33 0.9 PET 2 33 1.0 PET 4 33 1.4 HYDRO 33 2.4 BEGG 33 2.5 ORK 33 15.7 MB 33 25.9 A8 4 BEGG 75 3.2 A13 22 GRE 82 1.9 PET 5 82 2.3 Table 10 Best correlations for cluster (B) Sub-cluster Total points Correlation Strength factor “%”  Mean absolute percent error “%” B1 73 PET 5 37 0.9 PET 4 36 0.9 GRE 34 0.8 B2 42 ORK 31 2.5 B3 168 MB 42 2.9 GRE 39 2.7 PET 5 39 2.7 B4 13 DRM 38 1.9 PET 2 31 0.4 PET 5 31 0.6 B5 7 PET 3 57 1.8 PET 5 43 1.8 B6 2 DRO 100 2.3 B7 24 BEGG 75 27.2 DRO 67 29.9 B13 69 PET 5 64 1.2 GRE 62 1.1 B14 14 BEGG 50 1.9 PET 50 2.4 B15 5 GRE 40 1.2 PET 2 40 1.8 BEGG 40 2.0 http://creativecommons.org/licenses/by/4.0/ http://creativecommons.org/licenses/by/4.0/ 1482 Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 1 3 21) to define the best correlation, its strength factor, and its mean absolute percent error. An example for the use of the expert system is given in “Appendix B.” Tables through 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, and 21 show detailed results of the best correlation(s) for the different data clusters. Appendix (B) Example A vertical well is completed with a 2.375 in ID tubing, and gauge depth of 12,024 feet is flowing oil at a rate of 282 bbl/D with 0% water cut and 699 scf/bbl GOR. Use the expert system to find the best correlation and its expected accuracy. Using Fig. 3 in the paper, the well lies in data cluster E. With the flow conditions, we find from Table 4 the sub-clus- ter reference number to be 1. Therefore, the data given in this example lie in sub-cluster E1. We use Table 13 because it represents the data cluster for this point; then, we go to row 1, which represents the sub-cluster. We find from this table that the best correlation is MB with expected mean abso- lute percent error of 5.76%. Notice that this mean absolute percent error was the error for this best correlation over the Table 11 Best correlations for cluster (C) Sub-cluster Total points Correlation Strength factor “%” Mean absolute percent error “%” C1 99 PET 3 29 5.8 DRO 26 8.4 C2 30 FB 47 6.3 ORK 47 6.6 C3 28 BEGG 54 4.6 MB 54 14.3 C4 9 HYDRO 56 19.6 C5 17 MB 53 4.5 BEGG 47 5.7 C6 1 DRO 100 28.61 C8 2 DRM 50 1.0 PET 2 50 1.6 BEGG 50 2.0 ORK 50 18.9 C10 1 DRO 100 1.59 C11 1 GRE 100 0.05 PET 5 100 0.1 C12 8 PET 2 63 8.7 BEGG 63 11.3 C13 36 GRE 58 2.1 PET 5 58 2.5 C15 1 DRO 100 1.0 C25 1 DRM 100 1.3 Table 12 Best correlations for cluster (D) Sub-cluster Total points Correlation Strength factor “%” Mean absolute percent error “%” D1 154 GRE 34 1.7 PET 5 30 1.5 PET 4 29 1.4 D2 137 FB 30 3.1 HB 28 3.2 ORK 26 6.3 GRE 24 2.2 D3 414 BEGG 35 1.4 DRO 34 1.7 PET 4 33 1.3 GRE 32 1.3 D4 60 MB 63 5.1 HB 62 5.3 D5 16 PET 3 38 4.3 ORK 31 2.7 D6 10 DRO 60 6.2 D7 84 ORK 80 18.9 D10 1 ORK 100 8.4 HYDRO 100 8.7 D13 118 PET 31 0.9 PET 2 29 1.3 GRE 28 1.0 D14 37 BEGG 57 2.1 D15 12 DRO 50 0.7 BEGG 42 0.9 D17 1 FB 100 0.8 D25 2 ORK 100 2.2 1483Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 1 3 Table 13 Best correlations for cluster (E) Sub-cluster Total points Correlation Strength factor “%” Mean absolute percent error “%” E1 25 MB 72 5.8 BEGG 56 6.6 E2 1 DRM 100 1.53 PET 4 100 1.88 PET 5 100 1.95 E3 9 DRM 56 0.7 ORK 44 1.43 HYDRO 44 1.81 E5 19 DRM 42 2.0 E6 2 ORK 100 1.6 E9 2 HYDRO 100 2.4 E13 4 PET 4 100 4.5 FB 100 4.5 PET 3 100 4.5 E14 3 FB 100 46.08 ORK 100 47.41 E15 5 HB 100 131.75 E18 2 ORK 100 5.1 E25 7 HYDRO 100 143.03 E26 4 HB 100 122.64 E29 1 PET 3 100 14.4 PET 2 100 13.3 BEGG 100 11.3 Table 14 Best correlations for cluster (F) Sub-cluster Total points Correlation Strength factor “%” Mean absolute percent error “%” F1 9 FB 89 2.7 GRE 89 3.5 PET 4 89 3.6 F2 6 ORK 100 10.3 F3 5 FB 100 0.8 HB 100 1.3 F4 8 FB 100 0.1 BEGG 100 0.4 PET4 100 0.5 F5 4 PET 4 100 0.6 PET 3 100 0.6 F6 1 PET 4 100 0.2 PET 5 100 0.5 F6 14 ORK 71 15.6 F13 10 DRM 50 4.6 F17 2 DRM 100 1.1 F29 2 DRM 100 1.1 BEGG 100 2.0 Table 15 Best correlations for cluster (G) Sub-Cluster Total points Correlation Strength factor “%” Mean absolute percent error “%” G1 23 FB 65 1.4 G2 19 PET 58 1.5 HB 53 1.5 PET 3 53 1.6 G3 17 MB 53 1.5 G4 4 DRM 50 1.7 G7 2 FB 100 23.3 G8 2 DRO 100 5.0 G11 2 HB 100 47.0 FB 100 47.0 PET 3 100 47.3 G12 3 DRO 67 35.1 G13 7 HB 100 0.6 GRE 71 0.4 PET 5 71 0.5 G17 4 HB 100 1.2 PET 4 75 1.4 Table 16 Best correlations for cluster (H) Sub-cluster Total points Correlation Strength factor “%” Mean absolute percent error “%” H1 23 DRO 65 1.2 ORK 52 1.8 H2 7 DRO 57 1.3 DRM 57 3.9 H3 7 DRO 100 5.6 DRM 86 5.7 H4 6 DRM 50 1.4 DRO 50 2.3 GRE 33 1.4 PET 5 33 1.5 H5 1 MB/BEGG 100 1.94 H13 3 ORK 100 2.3 H17 2 BEGG 50 0.5 DRM 50 1.2 1484 Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 1 3 Table 17 Best correlations for cluster (I) Sub-cluster Total points Correlation Strength factor “%” Mean absolute percent error “%” I1 84 MB 43 1.5 HYDRO 35 2.2 I2 52 PET 3 48 1.1 FB 44 1.7 HB 42 1.6 I3 108 BEGG 35 2.4 DRM 34 5.2 I4 25 MB 64 6.4 GRE 60 6.5 I5 69 DRM 67 2.3 I6 1 FB 100 0.3 I7 18 FB 67 18.7 I8 7 DRM 43 2.1 I9 7 DRO 100 0.4 FB 71 0.8 PET 4 71 1.2 I10 4 GRE 100 3.5 PET 4 50 2.6 I11 6 FB 83 7.7 HB 83 7.7 PET 3 83 8.3 I12 25 PET 2 40 7.2 I13 24 FB 50 1.5 I14 5 MB 80 0.6 PET 4 80 0.9 PET 80 1.4 I17 3 PET 4 100 0.6 PET 5 67 0.7 I19 1 ORK 100 1.5 FB 100 2.3 I25 23 FB 74 1.7 HB 74 1.8 ORK 57 1.6 Table 18 Best correlations for cluster (J) Sub-cluster Total points Correlation Strength factor “%” Mean absolute percent error “%” J1 2 ORK/DRM 50 2.0 J5 4 PET 3 50 2.5 DRM 50 31.4 J7 2 PET 3 50 0.0 BEGG 50 3.1 J12 1 BEGG 100 24.0 J17 1 BEGG 100 3.4 DRM 100 3.5 Table 19 Best correlations for cluster (K) Sub-cluster Total points Correlation Strength factor “%” Mean absolute percent error “%” K1 2 ORK 100 8.4 K2 1 ORK 100 0.6 K6 7 PET 2 43 1.6 PET 3 29 0.4 K7 14 FB 57 11.9 K8 6 MB 50 2.3 BEGG 50 4.8 K10 2 GRE 100 0.7 PET 5 100 1.0 K12 19 BEGG 53 22.7 DRM 42 30.7 K13 8 ORK 88 14.3 HB 63 13.7 PET 3 63 14.4 K17 16 HB 67 2.2 PET 2 63 2.3 K21 1 PET 2 100 0.4 MB 100 0.9 K25 5 ORK 100 2.6 FB 100 2.7 HB 100 2.8 K29 18 PET 2 56 0.9 PET 3 56 1.1 K33 1 BEGG 100 0.2 ORK 100 0.6 Table 20 Best correlations for cluster (L) Sub-cluster Total points Correlation Strength factor “%” Mean absolute percent error “%” L1 6 DRM 50 2.5 FB 50 10.2 L3 4 BEGG 100 1.0 DRO 75 1.1 MB 75 1.2 L13 8 PET 3 75 0.3 HB 75 0.7 L14 2 HYDRO 100 1.0 BEGG 50 0.0 PET 2 50 0.6 L25 2 BEGG 100 2.4 DRO 50 3.1 1485Journal of Petroleum Exploration and Production Technology (2018) 8:1473–1485 1 3 available data points within this sub-cluster. The available data points are 25 (which are also given in Table 13). We used the suggested correlation by the expert system to calculate the bottom-hole flowing pressure for this well from the tubing head pressure and PVT data. The calculated pres- sure by the chosen correlation was 3066.57 psi with absolute percent error 2.7%. Table 22 gives the calculated pressure and absolute percent error by the expert system chosen cor- relation (MB) compared with the measured pressure and the calculated pressure by other correlations. References Abd El-Moniem MA (2016) Evaluation and proper selection of mul- tiphase flow correlations. MS Thesis, Cairo University, Egypt Abd El-Moniem MA, El-Banbi AH (2015) Proper selection of mul- tiphase flow correlations. In: SPE 175805 presented at North Africa technical conference and exhibition, Cairo, 14–16 Sept Ansari AM, Sylvester ND, Shoham O, Brill JP (1990) A comprehen- sive mechanistic model for upward two phase flow in wellbores. In: SPE 20630 presented at the 65th annual technical conference and exhibition, New Orleans, 23–26 Sept, pp 151–165 Ashiem H (1986) MONA, an accurate two phase well flow model based on phase slippage. In: SPE 12989, SPE production engineering, May, pp 221–230 Aziz K, Govier GW, Fogarasi M (1972) Pressure drop in wells produc- ing oil and gas. J Can Pet 11:38–48 Baxendell PB, Thomas R (1961) The calculation of pressure gradients in high rate flowing wells. J Pet Technol 13:1023–1028 Beggs HD, Brill JP (1973) A study of two phase flow in inclined pipes. J Pet Technol 25:607–617 Chierici GL, Ciucci GM, Sclocchi G (1974) Two phase vertical flow in oil wells prediction of pressure drop. J Pet Technol 26:927–938 Duns H Jr., Ros NCJ (1963) Vertical flow of gas and liquid mixtures in wells. In: Section II, Paper 22-PD 6, proceedings of the sixth world petroleum congress, Frankfurt, 19–26 June, pp 451–465 Fancher GH Jr, Brown KE (1963) Prediction of pressure gradients for multiphase flow in tubing. Soc Pet Eng J 3:59–69 Gray HE (1978) Vertical flow correlation in gas wells, user’s manual for API 14B surface controlled subsurface safety valve sizing computer program, 2nd edn. American Petroleum Institute, Dal- las (Appendix B) Hagedorn AR, Brown KE (1964) The effect of liquid viscosity in two phase vertical flow. J Pet Technol 16:203–210 Hagedorn AR, Brown KE (1965) Experimental study of pressure gradi- ents occurring during continuous two phase flow in small diameter vertical conduits. J Pet Technol 17:475–484 Hill TJ, Wood DG (1994) Slug flow: occurrence, consequences, and prediction. In: SPE 27960 presented at the University of Tulsa Petroleum Engineering symposium, OK, USA, 29–31 Aug, pp 53–62 Mukherjee H, Brill JP (1983) Liquid holdup correlations for inclined two phase flow. J Pet Technol 35:1003–1008 Orkiszewski J (1967) Predicting two phase pressure drops in vertical pipe. J Pet Technol 19:829–838 Peffer JW, Miller MA, Hill AD (1988) An improved method for cal- culating bottomhole pressures in flowing gas wells with liquid present. In: SPE production engineering, November, pp 643–655 Poettmann FH, Carpenter PJ (1952) The multiphase flow of gas, oil and water through vertical flow string with the application of the design of gas lift installation. Drilling and Production Practice. American Petroleum Institute, New York Prosper Software Help Manual, Petroleum Experts (2013) Reinicke KM, Remer RJ, Hueni G (1987) Comparison of measured and predicted pressure drops in tubing for high water cut gas wells. In: SPE production engineering, August, pp 165–177 Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Table 21 Best correlations for cluster (M) Sub-cluster Total points Correlation Strength factor “%” Mean absolute percent error “%” M1 10 ORK 60 21.8 M3 6 DRO 100 0.7 M13 16 PET 3 69 0.2 MB 69 0.7 M14 7 BEGG 100 0.2 HYDRO 100 0.3 DRO 86 0.9 M25 6 DRO 100 1.9 BEGG 100 2.7 Table 22 Calculated pressure and absolute percent error from differ- ent correlations compared to actual data Correlation Calculated pressure, psi Absolute percent error, % Measured (actual) 2985 – MB (predicted by expert system) 3066.57 2.7 DRM 3210.15 7.5 HB 2734.28 8.4 FB 2673.61 10.4 BEGG 3317.26 11.1 PET 2806.17 6.0 ORK 3256.22 9.1 PET 2 2897.19 2.9 DRO 3354.18 12.4 PET 3 2796.87 6.3 GRE 3297.77 10.5 PET 4 3313.33 11.0 HYDRO 3389.8 13.6 PET 5 3281 9.9 Development of an expert system for selection of multiphase flow correlations Abstract Introduction Expert system development Results Application of the expert system Validation of the expert system Sensitivity of the expert system to uncertain input parameters GOR sensitivity Other parameters sensitivity Conclusions References