Fast Calculation Method of Two-Phase Flow in Horizontal Gas Wells Based on PI-DeepONet
Abstract
1. Introduction
2. Gas–Liquid Two-Phase Flow Model for Horizontal Gas Wells
3. Fast Solution Method Based on PI-DeepONet
3.1. PI-DeepONet Network Basic Principles
3.2. Drift-Flux Model Based on PI-DeepONet
4. Case Analysis
4.1. Building a Dataset
4.2. Network Hyperparameter Selection and Loss Function Construction
4.3. Results Analysis
5. Conclusions
- By embedding the physical laws of the drift-flux model directly into the deep operator network, this study presents a novel approach that effectively overcomes the reliance on large-scale data, a common limitation of purely data-driven methods. This physics-informed strategy enables high prediction accuracy even with sparse training data. The model demonstrated excellent performance, with an average relative error controlled to within 1% across multiple test cases, which is a significant improvement over traditional deep learning models in data-scarce scenarios.
- The practical engineering value of this method is highlighted by its remarkable computational efficiency. When benchmarked against the industry-standard simulator (OLGA), the trained PI-DeepONet model completes a full-field prediction in under 0.1 s, representing a computational speed-up of nearly 50,000 times. This transformative performance makes the model highly suitable for real-world applications that demand immediate feedback.
- The experimental results also provide clear guidance for the model’s implementation. An optimal setup was identified using an FCN + FCN network structure with 3 layers, a network width of 64, and a learning rate of 0.001, offering a solid baseline for researchers aiming to replicate this work. Furthermore, the model’s robustness was demonstrated by its ability to perform well even when a significant portion of the training data was hidden, underscoring the power of integrating physical constraints into the learning process.
- Even when hiding up to 80% of the real data, the model still has relatively good expressiveness, with a relative average error of less than 5% on the test set, and can be used in situations where some data is missing in actual working conditions.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Omotoye, G.B.; Bello, B.G.; Tula, S.T.; Kess-Momoh, A.J.; Daraojimba, A.I.; Adefemi, A. Navigating global energy markets: A review of economic and policy impacts. Int. J. Sci. Res. Arch. 2024, 11, 195–203. [Google Scholar] [CrossRef]
- Wang, J.; Guo, Q.; Zhao, C.; Wang, Y.; Yu, J.; Liu, Z.; Chen, N. Potentials and prospects of shale oil-gas resources in major basins of China. Acta Pet. Sin. 2023, 44, 2033–2044. [Google Scholar] [CrossRef]
- Lei, Q.; Xu, Y.; Cai, B.; Guan, B.; Wang, X.; Bi, G.; Li, H.; Li, S.; Ding, B.; Fu, H.; et al. Progress and prospects of horizontal well fracturing technology for shale oil and gas reservoirs. Pet. Explor. Dev. 2022, 49, 191–199. [Google Scholar] [CrossRef]
- Duan, Y.; Zhu, Z.; He, H.; Xuan, G.; Yu, X. Simulation of Two-Phase Flowback Phenomena in Shale Gas Wells. Fluid Dyn. Mater. Process. 2024, 20, 349–364. [Google Scholar] [CrossRef]
- Obi, C.; Hasan, A.; Rahman, M.; Banerjee, D. Multiphase flow challenges in drilling, completions, and injection: Part 1. Petroleum 2024, 10, 557–569. [Google Scholar] [CrossRef]
- Su, Y.; Ma, H.; Guo, J.; Shen, X.; Yang, Z.; Wu, J. The behaviors of gas-liquid two-phase flow under gas kick during horizontal drilling with oil-based muds. Petroleum 2024, 10, 49–67. [Google Scholar] [CrossRef]
- Zhou, X.; Zhang, L.; Qi, J.; Wang, Y.; Zhang, K.; Zhang, R.; Sun, Y. Integrated wellbore-surface pressure control production optimization for shale gas wells. Nat. Gas Ind. B 2025, 12, 123–134. [Google Scholar] [CrossRef]
- Talebi, S.; Kazeminejad, H.; Davilu, H. A numerical technique for analysis of transient two-phase flow in a vertical tube using the drift flux model. Nucl. Eng. Des. 2012, 242, 316–322. [Google Scholar] [CrossRef]
- Wei, N.; Xu, C.; Meng, Y.; Li, G.; Ma, X.; Liu, A. Numerical simulation of gas-liquid two-phase flow in wellbore based on drift flux model. Appl. Math. Comput. 2018, 338, 175–191. [Google Scholar] [CrossRef]
- Hajizadeh, A.; Kazeminejad, H.; Talebi, S. Formulation of a fully implicit numerical scheme for simulation of two-phase flow in a vertical channel using the Drift-Flux Model. Prog. Nucl. Energy 2018, 103, 91–105. [Google Scholar] [CrossRef]
- Liu, C.; Zhou, G.; Shyy, W.; Xu, K. Limitation principle for computational fluid dynamics. Shock Waves 2019, 29, 1083–1102. [Google Scholar] [CrossRef]
- Xu, B.; Zhang, X.; Wang, Y.; Liu, W.; Meng, Z. Self-adaptive physical information neural network model for prediction of two-phase flow annulus pressure. Acta Pet. Sin. 2023, 44, 545. [Google Scholar] [CrossRef]
- Taye, M.M. Understanding of machine learning with deep learning: Architectures workflow, applications and future directions. Computers 2023, 12, 91. [Google Scholar] [CrossRef]
- Song, Z.; Zou, S.; Zhou, W.; Huang, Y.; Shao, L.; Yuan, J.; Gou, X.; Jin, W.; Wang, Z.; Chen, X.; et al. Clinically applicable histopathological diagnosis system for gastric cancer detection using deep learning. Nat. Commun. 2020, 11, 4294. [Google Scholar] [CrossRef]
- Kabir, H.; Wu, J.; Dahal, S.; Joo, T.; Garg, N. Automated estimation of cementitious sorptivity via computer vision. Nat. Commun. 2024, 15, 9935. [Google Scholar] [CrossRef]
- Raissi, M.; Perdikaris, P.; Karniadakis, G.E. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J. Comput. Phys. 2019, 378, 686–707. [Google Scholar] [CrossRef]
- Lu, L.; Jin, P.; Pang, G.; Zhang, Z.; Karniadakis, G.E. Learning nonlinear operators via DeepONet based on the universal approximation theorem of operators. Nat. Mach. Intell. 2021, 3, 218–229. [Google Scholar] [CrossRef]
- Koric, S.; Abueidda, D.W. Data-driven and physics-informed deep learning operators for solution of heat conduction equation with parametric heat source. Int. J. Heat Mass Transf. 2023, 203, 123809. [Google Scholar] [CrossRef]
- Mao, Z.; Lu, L.; Marxen, O.; Zaki, T.A.; Karniadakis, G.E. DeepM&Mnet for hypersonics: Predicting the coupled flow and finite-rate chemistry behind a normal shock using neural-network approximation of operators. J. Comput. Phys. 2021, 447, 110698. [Google Scholar] [CrossRef]
- Wang, S.; Wang, H.; Perdikaris, P. Learning the solution operator of parametric partial differential equations with physics-informed DeepONets. Sci. Adv. 2021, 7, eabi8605. [Google Scholar] [CrossRef]
- Zuber, N.; Findlay, J.A. Average volumetric concentration in two-phase flow systems. J. Heat Transf. 1965, 87, 453–468. [Google Scholar] [CrossRef]
- Wallis, G.B. One-Dimensional Two-Phase Flow; Courier Dover Publications: New York, NY, USA, 2020. [Google Scholar]
- Ishii, M. One-Dimensional Drift-Flux Model and Constitutive Equations for Relative Motion Between Phases in Various Two-Phase Flow Regimes (No. ANL-77-47); Argonne National Lab.: Lemont, IL, USA, 1977. [CrossRef]
- Shi, H.; Holmes, J.A.; Diaz, L.R.; Durlofsky, L.J.; Aziz, K. Drift-flux parameters for three-phase steady-state flow in wellbores. SPE J. 2005, 10, 130–137. [Google Scholar] [CrossRef]
- Bhagwat, S.M.; Ghajar, A.J. A flow pattern independent drift flux model based void fraction correlation for a wide range of gas–liquid two phase flow. Int. J. Multiph. Flow 2014, 59, 186–205. [Google Scholar] [CrossRef]
- Chen, T.; Chen, H. Universal approximation to nonlinear operators by neural networks with arbitrary activation functions and its application to dynamical systems. IEEE Trans. Neural Netw. 1995, 6, 911–917. [Google Scholar] [CrossRef] [PubMed]
- He, J.; Koric, S.; Abueidda, D.; Najafi, A.; Jasiuk, I. Geom-deeponet: A point-cloud-based deep operator network for field predictions on 3d parameterized geometries. Comput. Methods Appl. Mech. Eng. 2024, 429, 117130. [Google Scholar] [CrossRef]
- Xu, C.; Cao, B.T.; Yuan, Y.; Meschke, G. A multi-fidelity deep operator network (DeepONet) for fusing simulation and monitoring data: Application to real-time settlement prediction during tunnel construction. Eng. Appl. Artif. Intell. 2024, 133, 108156. [Google Scholar] [CrossRef]
- Lim, D.G.; Lee, G.Y.; Park, Y.H. Application of DeepONet to predict transient drop motion of the control rod in real-time. Nucl. Eng. Technol. 2025, 57, 103620. [Google Scholar] [CrossRef]
- Yang, Y. Deeponet for solving PDEs: Generalization analysis in Sobolev training. arXiv 2024, arXiv:2410.04344. [Google Scholar] [CrossRef]
- Kopaničáková, A.; Karniadakis, G.E. Deeponet based preconditioning strategies for solving parametric linear systems of equations. SIAM J. Sci. Comput. 2025, 47, C151–C181. [Google Scholar] [CrossRef]
- Xu, W.; Lu, Y.; Wang, L. Transfer learning enhanced deeponet for long-time prediction of evolution equations. In Proceedings of the AAAI Conference on Artificial Intelligence, Washington DC, USA, 7–14 February 2023; Volume 37, pp. 10629–10636. [Google Scholar] [CrossRef]











| Parameters | Conditions | |
|---|---|---|
| General | Length | 1000 m |
| Diameter | 0.1 m | |
| Endtime | 10,000 s | |
| Maxdt | 5 s | |
| Mindt | 0.001 s | |
| Sections | 1000 | |
| Boundary | Inlet | Water mass flow: 7.854 kg/s |
| Inlet | Methane mass flow: 0.55 kg/s | |
| Outlet | Pressure outlet: 0.5 MPa–2.5 MPa | |
| Wall | Roughness: 0.00005 m |
| Feature | CNN (Branch) | FCN (Trunk) |
|---|---|---|
| Input Dimension | 4 channels × 101 points | 2D coordinates |
| Network Depth | 4 layers | 4 layers |
| Hidden Units | 32 channels | 64 units |
| Output Dimension | 256 units | 64 units |
| Activation Function | ReLU | ReLU |
| Network Width | Mean Relative Error (%) | Training Time (h) |
|---|---|---|
| 16 | 2.25 | 4 |
| 32 | 0.45 | 4.6 |
| 64 | 0.38 | 5 |
| 128 | 0.25 | 7.5 |
| Experiment | OLGA (s) | PI-DeepONet (s) |
|---|---|---|
| Case1–5 | 5200 | 0.1 |
| Hidden Data Ratio (%) | Mean Relative Error on Hidden Data (%) | Mean Relative Error on the Test Set (%) |
|---|---|---|
| 20 | 0.88 | 1.05 |
| 30 | 0.65 | 0.78 |
| 40 | 1.18 | 1.23 |
| 50 | 0.98 | 1.00 |
| 60 | 1.53 | 1.53 |
| 70 | 1.68 | 1.98 |
| 80 | 4.30 | 4.65 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Yang, J.; Chen, M.; Wang, H.; Zheng, R.; Li, Z.; Zhou, H.; Zhu, J. Fast Calculation Method of Two-Phase Flow in Horizontal Gas Wells Based on PI-DeepONet. Processes 2025, 13, 3363. https://doi.org/10.3390/pr13103363
Yang J, Chen M, Wang H, Zheng R, Li Z, Zhou H, Zhu J. Fast Calculation Method of Two-Phase Flow in Horizontal Gas Wells Based on PI-DeepONet. Processes. 2025; 13(10):3363. https://doi.org/10.3390/pr13103363
Chicago/Turabian StyleYang, Jingjia, Mai Chen, Haoyu Wang, Rui Zheng, Zhongkang Li, Hang Zhou, and Jianjun Zhu. 2025. "Fast Calculation Method of Two-Phase Flow in Horizontal Gas Wells Based on PI-DeepONet" Processes 13, no. 10: 3363. https://doi.org/10.3390/pr13103363
APA StyleYang, J., Chen, M., Wang, H., Zheng, R., Li, Z., Zhou, H., & Zhu, J. (2025). Fast Calculation Method of Two-Phase Flow in Horizontal Gas Wells Based on PI-DeepONet. Processes, 13(10), 3363. https://doi.org/10.3390/pr13103363

