Application of Machine Learning Classification Algorithms for Two-Phase Gas-Liquid Flow Regime Identification
Authors: Manikonda Kaushik , Hasan Abu Rashid , Obi Chinemerem Edmond , Islam Raka , Sleiti Ahmad Khalaf , Abdelrazeq Motasem Wadi , Rahman Mohammad Azizur 
Published: December 2021

Abstract
This research aims to identify the best machine learning (ML) classification techniques for classifying the flow regimes in vertical gas-liquid two-phase flow. Two-phase flow regime identification is crucial for many operations in the oil and gas industry. Processes such as flow assurance, well control, and production rely heavily on accurate identification of flow regimes for their respective systems' smooth functioning. The primary motivation for the proposed ML classification algorithm selection processes was drilling and well control applications in Deepwater wells.
The process started with vertical two-phase flow data collection from literature and two different flow loops. One, a 140 ft. tall vertical flow loop with a centralized inner metal pipe and a larger outer acrylic pipe. Second, an 18-ft long flow loop, also with a centralized, inner metal drill pipe. After extensive experimental and historical data collection, supervised and unsupervised ML classification models such as Multi-class Support vector machine (MCSVM), K-Nearest Neighbor Classifier (KNN), K-means clustering, and hierarchical clustering were fit on the datasets to separate the different flow regions. The next step was fine-tuning the models' parameters and kernels. The last step was to compare the different combinations of models and refining techniques for the best prediction accuracy and the least variance.
Among the different models and combinations with refining techniques, the 5- fold cross-validated KNN algorithm, with 37 neighbors, gave the optimal solution with a 98% classification accuracy on the test data. The KNN model distinguished five major, distinct flow regions for the dataset and a few minor regions. These five regions were bubbly flow, slug flow, churn flow, annular flow, and intermittent flow. The KNN-generated flow regime maps matched well with those presented by Hasan and Kabir (2018).
The MCSVM model produced visually similar flow maps to KNN but significantly underperformed them in prediction accuracy. The MCSVM training errors ranged between 50% - 60% at normal parameter values and costs but went up to 99% at abnormally high values. However, their prediction accuracy was below 50% even at these highly overfitted conditions. In unsupervised models, both clustering techniques pointed to an optimal cluster number between 10 and 15, consistent with the 14 we have in the dataset.
Within the context of gas kicks and well control, a well-trained, reliable two-phase flow region classification algorithm offers many advantages. When trained with well-specific data, it can act as a black box for flow regime identification and subsequent well-control measure decisions for the well. Further advancements with more robust statistical training techniques can render these algorithms as a basis for well-control measures in drilling automation software. On a broader scale, these classification techniques have many applications in flow assurance, production, and any other area with gas-liquid two-phase flow.