AUTHOR=Quintero-Arias Leider , Ruiz-Diaz Carlos Mauricio , Gómez-Camperos July A. , Rodriguez Oscar M. H. , Pardo-Garcia Aldo TITLE=Application of Transformer neural networks for the classification of two-phase oil–water flow patterns in horizontal pipelines JOURNAL=Frontiers in Mechanical Engineering VOLUME=Volume 11 - 2025 YEAR=2026 URL=https://www.frontiersin.org/journals/mechanical-engineering/articles/10.3389/fmech.2025.1710934 DOI=10.3389/fmech.2025.1710934 ISSN=2297-3079 ABSTRACT=The identification of flow patterns in multiphase systems is crucial in hydrocarbon production engineering, as they determine the behavior of crude oil transport through pipelines and flowlines in oil fields. Proper classification of these patterns contributes to improved hydraulic design, optimal selection of separation equipment, and effective field operation strategies. This study proposes a model based on a Transformer neural network for identifying flow patterns in two-phase liquid–liquid (water–oil) systems in horizontal pipelines. A database containing 2,146 data points was used, including variables such as pipe diameter, mixture velocity, superficial velocities of each phase, and oil viscosity. The results show excellent model performance, with accuracies of 95.55% during training, 91.28% in validation, and 90% in the final test. These findings demonstrate the model’s ability to capture complex relationships between hydrodynamic variables and flow topologies, making it a promising alternative tool for the analysis, monitoring, and optimization of multiphase transport in the oil industry.