Abstract
Multiphase pipe flow, typically involving oil, gas, and water, is a common and complex challenge in oil and gas production systems. Although predicting flow characteristics (forward modeling) is well established, estimating flow rates from measurements (the inverse problem) for virtual flow metering is challenging. This estimation can be an ill-posed inverse problem because it may lack solution uniqueness, where multiple flow rate solutions map to the same observations. In this work, we heuristically investigated the possibility of multiple solutions in an inverse multiphase point model and developed a machine learning (ML) model based on deep ensemble neural networks to solve the inverse problem and quantify prediction uncertainty. Heuristic analysis using a large synthetic dataset showed that pressure gradient and holdups are insufficient to uniquely define the inverse case. However, including additional domain knowledge (such as pipe geometry and fluid properties) highly constrained the problem, resulting in a state where almost all solutions were unique. The deep ensembles model applied to the constrained problem demonstrated excellent in-domain prediction accuracy (R2 close to one for all superficial velocities) with low prediction uncertainty. When tested on an out-of-domain (extrapolation) test simulating increased gas production, performance decreased (R2 remained > 0.80). Crucially, in this extrapolation scenario, the model provided a higher predictive variance, correctly indicating reduced confidence, which is important for assessing the trustworthiness of the model and mitigating the risks associated with the "black box nature" of ML models.