Modeling Two-Phase Flow in Vertical and Deviated Wellbores Using Machine Learning Method
Authors: Elgaddafi R. M. , Ahmed R. , Salehi S. , Alsaba M. T. , Biltayib B. M. , Ikeokwu C. C. , Amadi K. W. 
Published: July 2023

Abstract
The worst-case discharge during a blowout is a major concern for the oil and gas industry. Various two-phase flow patterns are established in the wellbore during a blowout incident. One of the challenges for field engineers is accurately predicting the flow pattern and, subsequently, the pressure drop along the wellbore to successfully control the well. Existing machine learning models rely on instantaneous pressure drop and liquid hold-up measurements that are not readily available in the field. This study aims to develop a novel machine-learning model to predict two-phase flow patterns in the wellbore for a wide range of inclination angles (0 − 90 degrees) and superficial gas velocities. The model also helps identify the most crucial wellbore parameter that affects the flow pattern of a two-phase flow.
This study collected nearly 5000 data points with various flow pattern observations as a data bank for model formulation. The input data includes pipe diameter, gas velocity, liquid velocity, inclination angle, liquid viscosity and density, and visualized/observed flow patterns. As a first step, the observed flow patterns from different sources are displayed in well-established flow regime maps for vertical and horizontal pipes. The data set was graphically plotted in the form of a scatter matrix, followed by statistical analysis to eliminate outliers. A number of machine learning algorithms are considered to develop an accurate model. These include Support Vector Machine (SVM), Multi-layer Perceptron (MLP), Gradient Boosting algorithm, CatBoost, and Extra Tree algorithm, and the Random Forest algorithm. The predictive abilities of the models are cross compared. Because of their unique features, such as variable-importance plots, the CatBoost, Extra Tree, and Random Forest algorithms are selected and implemented in the model to determine the most crucial wellbore parameters affecting the two-phase flow pattern.
The Variable-importance plot feature makes CatBoost, Extra Tree, and Random Forest the best option for investigating two-phase flow characteristics using machine learning techniques. The result showed that the CatBoost model predictions demonstrate 98% accuracy compared to measurements. Furthermore, its forecast suggests that in-situ superficial gas velocity is the most influential variable affecting flow pattern, followed by superficial liquid velocity, inclination angle, pipe diameter, and liquid viscosity. These findings could not be possible with the commonly used empirical correlations. For instance, according to previous phenomenological models, the impact of the inclination angle on the flow pattern variation is negligible at high in-situ superficial gas velocities, which contradicts the current observation.
The new model requires readily available field operating parameters to predict flow patterns in the wellbore accurately. A precise forecast of flow patterns leads to accurate pressure loss calculations and worst-case discharge predictions.