- 1Petróleo Brasileiro S.A. - PETROBRAS, Santos, Brazil
- 2School of Mechanical Engineering, Universidade Estadual de Campinas - UNICAMP, Campinas, Brazil
- 3Centro de Estudos de Energia e Petróleo - CEPETRO, Universidade Estadual de Campinas - UNICAMP, Campinas, Brazil
Accurately modeling steady-state two-phase flow is critical for the design and operation of systems in the oil and gas industry; however, traditional models often struggle to adapt to specific field conditions. This study introduces a novel, end-to-end differentiable framework that integrates physics-informed neural networks with a Neural Ordinary Differential Equation (Neural ODE) formulation to predict pressure and temperature profiles. By leveraging automatic differentiation, the entire simulation functions as a trainable model, allowing for the simultaneous optimization of data-driven components and the automated tuning of physical parameters directly from field data. Our results demonstrate that this approach achieves superior accuracy in pressure prediction compared to tuned industry-standard correlations. We found that a transfer learning strategy, pretraining on a large experimental dataset to establish a robust physical foundation, followed by fine-tuning on sparse field data, significantly outperforms models trained on field data alone. Furthermore, the differentiable nature of the framework enabled seamless application to inverse problems, demonstrated via Randomized Maximum Likelihood (RML) for uncertainty quantification. These findings illustrate the effectiveness of bridging the domain gap between experimental and real-world conditions, presenting a powerful new paradigm for creating self-calibrating, data-driven simulation tools with significant potential for digital twin applications.
1 Introduction
The simultaneous flow of gas and liquid inside a pipeline, known as “two-phase flow,” is a fundamental phenomenon across several industries, including oil and gas production, chemical processing, and nuclear power generation (Ishii and Hibiki, 2006). The effective design, optimization, and safe operation of these systems are critically dependent on a thorough understanding of their complex hydrodynamic behavior. Key to this understanding is the characterization of void fraction, pressure, and temperature profiles. The pressure and temperature gradients are influenced by a complex interplay of interfacial and wall friction, gravitational effects, acceleration, fluids properties, pipe characteristics as diameter, roughness, and inclination, and the spatial distribution of the phases—known as the flow pattern (Shoham, 2006). Concurrently, the void fraction (the cross-sectional area ratio occupied by the gas phase) is a determining factor for the flow pattern, which in turn governs the system’s pressure drop and heat transfer characteristics. Accurately predicting these parameters is therefore essential for tasks such as equipment sizing, production optimization, and the prevention of operational hazards. Although many industrial flows are transient, steady-state analysis where flow parameters are constant over time is indispensable for modeling these complex systems.
The development of accurate multiphase flow models has evolved significantly. As classified by Brill and Arirachakaran (1992) and reviewed by Shippen and Bailey (2012), the development can be broadly categorized into three eras. The “Empirical Period” (c. 1950–1975) was characterized by correlations derived from experimental data, with seminal works like Lockhart and Martinelli (1949) providing the initial framework. These models, while foundational, were inherently limited to the conditions under which they were developed. The subsequent “Awakening Years” (c. 1975–1985) marked a shift toward incorporating more fundamental physics and behaviors, with models such as the influential correlation by Beggs and Brill (1973), which first systematically accounted for pipe inclination and flow pattern. This evolution culminated in the “Mechanistic Modeling Era” (post-1985), where models were constructed from first principles using the conservation of mass, momentum, and energy, although experimental data for the closure models base on experimental data are still required. Pioneering models from Taitel and Dukler (1976) for flow pattern prediction and later comprehensive models from research groups at The University of Tulsa and Tel Aviv University provided more robust and generalizable tools by grounding their predictions in the underlying physical phenomena. This research culminated in the unified mechanistic model by Gomez et al. (2000), which integrated and extended previous specialized models for different flow patterns—such as Taitel and Barnea (1990) on slug flow, Alves et al. (1991) on upward annular flow, and Taitel and Dukler (1976) on stratified flow in horizontal and near-horizontal pipes—into a single comprehensive framework applicable to the entire range of pipe inclinations.
In recent years, the proliferation of computational power and data has catalyzed the application of machine learning (ML) to address the persistent challenges in multiphase flow modeling (Zhu et al., 2022; Brunton et al., 2020). AI-based methodologies have been successfully employed to predict critical parameters such as flow patterns, pressure drop, and void fraction with a high degree of accuracy, consistently outperforming traditional empirical correlations when sufficient training data are available (Attia et al., 2015; Alakbari et al., 2025). For instance, in pressure drop prediction, an adaptive neuro-fuzzy inference system (ANFIS) model achieved an average absolute percentage error (AAPE) as low as 0.39% (Attia et al., 2015), while Alakbari et al. (2025) demonstrated a coefficient of determination
A diverse array of supervised learning algorithms has been deployed. Artificial neural networks (ANNs) are the most prevalent, valued for their flexibility in modeling non-linear relationships for void fraction prediction (achieving an
The input features for these models typically include superficial velocities, pipe geometry, and fluid properties similar to the above models. However, purely data-driven models often struggle to generalize beyond their training domain and lack physical interpretability. This has led to the emergence of hybrid approaches that integrate physics-based knowledge with data-driven learning, aiming to create models that are both accurate and robust (Raissi et al., 2019). A central enabler of this integration is differentiable modeling, where the entire model is constructed such that its outputs are differentiable with respect to its inputs (Baydin et al., 2018). This property not only facilitates the efficient training of complex neural networks via gradient-based optimization but also establishes novel pathways for solving inverse problems and performing uncertainty quantification. This represents the next frontier in the evolution of multiphase flow simulation.
The physical problem of predicting steady-state pressure and temperature profiles along a pipeline can be described as a system of ordinary differential equations (ODEs) where the independent variable is the spatial coordinate (see Section 2.2). The neural ordinary differential equation (Neural ODE) framework, introduced by Chen et al. (2018), is designed to learn the continuous dynamics of such systems. Therefore, we adopt this paradigm because it provides a mathematically congruent and powerful method for modeling the continuous spatial evolution of the fluid’s properties throughout the pipeline in a fully differentiable manner. Lai et al. (2021) proposed the use of physics-informed Neural ODEs for structural identification, employing a similar approach, although within a different application.
Our proposed methodology, which is the subject of a pending patent application (Castro et al., 2025b) and software registration (Castro et al., 2025a), is designed to self-calibrate using field measurements, thus enabling the automated tuning of both physical and data-driven model components. The remainder of this article is organized as follows: Section 2 details the core components of our framework, including the implementation of automatic differentiation, the Neural ODE structure, the specific physics-informed model architecture, and the datasets employed. Section 3 presents the results, evaluating the model’s performance, analyzing the effects of different training strategies, and demonstrating its application to Bayesian inference. Finally, Section 4 discusses the key findings, and Section 5 concludes by summarizing contributions and outlining avenues for future research.
2 Methods
2.1 Automatic differentiation
Training complex models, such as proposed in this work, relies on gradient-based optimization methods to minimize a loss function. Automatic differentiation (AD) is a set of computational techniques for efficiently and accurately calculating the derivatives of functions specified by a computer program. Unlike symbolic differentiation, which can lead to inefficiently large expressions, or numerical differentiation, which is prone to round-off and truncation errors, AD computes exact derivatives by systematically applying the chain rule at the level of an elementary operations computational graph (Baydin et al., 2018).
AD operates in two primary modes: forward and reverse. Reverse mode AD, also known as “backpropagation,” is particularly well-suited for machine learning applications. It computes the gradient of a scalar output (such as the loss function
In this work, the entire model, from the fluid property look-ups and the evaluation of physical equations to the neural network components and the ordinary differential equation (ODE) solver, is implemented within PyTorch (Paszke et al., 2019), a framework that supports AD. This creates an end-to-end differentiable pipeline. Consequently, we can compute the gradients of the final loss function
2.2 Neural ODEs
Traditional deep learning models, such as residual networks (ResNets; He et al., 2016), can be interpreted as discrete approximations of a continuous transformation, being similar to a first order approximation scheme, for example. Each layer applies a discrete step transformation
The final state is then computed by integrating this derivative function using a numerical ODE solver while allowing gradient propagation through the solution. This framework offers several advantages, including memory-efficient training through the adjoint sensitivity method.
The determination of thermohydraulic profiles for one-dimensional, two-phase flow within a wellbore is fundamentally rooted in the conservation laws of mass, momentum, and energy. Mathematically, these laws are formulated as a system of coupled partial differential equations (PDEs). When conditions such as pressure and temperature are specified at two distinct boundary locations along the pipeline, such as at the bottomhole and wellhead, the problem is posed as a classical boundary value problem (BVP) with a Dirichlet boundary condition (Ishii and Hibiki, 2006). For steady-state analysis, a classical and robust numerical technique for solving such BVPs is the shooting method (Kong et al., 2021). This method effectively transforms the BVP into an initial value problem (IVP) by assuming initial conditions at one boundary and integrating forward or backward to satisfy the conditions at the second boundary iteratively. Consequently, the steady-state system can be modeled as a system of ODEs where the spatial coordinate along the pipe serves as the independent variable (Shoham, 2006).
Within steady-state multiphase flow applications, the pressure and temperature profiles in a pipeline are traditionally calculated using a specialized method called a “marching algorithm” (Shoham, 2006), where the pipeline is discretized in small segments, and the fluid properties are calculated iteratively based on the average pressure and temperature in each segment until the pressure drop converges. The calculation then “marches” to the next segment, until the last one, similar to a predictor corrector method. In this context, the Neural ODE paradigm is exceptionally well-suited. The evolution of the fluid’s pressure
It is critical to note that, when applying the Neural ODE framework, the integration variable in our formulation is the pipeline length
2.3 Model development
Following the Neural ODE paradigm, the problem is mathematically formulated by modeling the evolution of the fluid’s pressure and temperature, represented by the state vector
The system’s geometry and environmental conditions vary along the flow. Therefore, the function is variant with respect to the integration variable. Considering this compact formulation for
Although it is possible to use models like multi-layer perceptrons (MLPs) (Werbos, 1974) directly for pressure drop calculation, we introduced a physical structure to the models to increase their generalization capacity. The model implemented calculates the void fraction
where
For the calculation of the total pressure drop
where
Finally, the thermal calculation derives directly from the energy balance and has an explicit model (Shoham, 2006):
where the acceleration term
The model also relies on a mixture of experts (MoE) framework with the ability to learn models dependent on the flow pattern (Section 2.5). In addition to the trainable parameters of the
The implementation also allows the pretraining of specific parts of the model, such as the
All the model’s implementations and modules allow for gradient propagation in addition to batch inference and training, as well as the use of a GPU for acceleration.
2.4 Learnable dimensionless numbers
The Buckingham Pi theorem is a robust technique for extracting insights and finding symmetries in physical systems when governing equations are absent. It provides a method for finding a set of dimensionless groups (
BuckiNet is a deep learning algorithm proposed by Bakarji et al. (2022) that incorporates the Buckingham Pi theorem as a constraint. It aims to automatically discover the dimensionless groups that best collapse measurement data to a lower-dimensional space according to an optimal fit.
The input dimensional parameters
To explicitly ensure that the groups discovered are dimensionless, a null space loss

A
The dimensional
Figure 3. Dimensional and learned dimensionless features combined using a trainable normalizer to generate the model’s inputs.
Batch normalization (BatchNorm) is a technique that stabilizes and accelerates neural network training by standardizing the inputs for each layer on a per-mini-batch basis. During training, it calculates the mean and variance of the activations within a mini-batch, normalizes them to have a mean of zero and unit variance, and then applies a learnable scale
Therefore, the input features of the neural networks are the normalized concatenated inputs (Equation 12):
2.5 Mixture of experts
To improve the model’s physical interpretability, we designed it to first predict the flow pattern, since the governing physics are pattern-dependent. This classification is then used to select specialized sub-models for predicting
Depending on the characteristics of the available dataset and how the flow pattern is labeled, a classifier with
For the two-phase multiplier used in Equation 4, the model must output
In addition,
This architecture combines a classification model with specialized sub-models, enabling a flexible, accurate, and physics-informed representation of multiphase flow across various patterns. This approach improves generalization and adaptability in a wide range of operating conditions.
In our work, we narrowed the entire range of possible flow patterns into four classes
2.6 Experimental dataset
We used an experimental database from TUFFP (Tulsa University Fluid Flows Project) containing the results of several two-phase flow studies performed since 1966 comprising a wide range of pipe inclinations, diameters, fluid velocities, and fluid characteristics. A subset of this dataset was used in the methodology proposed in Pereyra et al. (2012). The dataset used is composed of the data many studies (Abduvayt et al., 2003; Akpan, 1980; Al-Ruhaimani et al., 2017; Almabrok, 2013; Alsaadi, 2013; Andritsos, 1986; Ansari and Azadi, 2016; Barnea et al., 1982, 1985, Beggs, 1972, Chen et al., 1997; Brito, 2012; Brito et al., 2014; Caetano, 1985; Cheremisinoff, 1977; Crowley et al., 1986; Eaton, 1966; Fan, 2005; Felizola, 1992; Gawas, 2005; Gokcal, 2005, 2008, Guner, 2012, Hanafizadeh et al., 2011; Johnson, 2009; Karami, 2015; Khaledi et al., 2014; Kokal, 1987; Kokal and Stanislav, 1989a; Kokal and Stanislav, 1989b; Kouba, 1986; Kristiansen, 2004; Magrini, 2009; Marcano, 1996; Meng, 1999; Minami, 1983; Mukherjee, 1979; Ohnuki and Akimoto, 2000; Roumazeilles, 1994; Schmidt, 1976; Schmidt, 1977; Shmueli et al., 2015; Usui and Sato, 1989; Viana, 2017; Vongvuthipornchai, 1982; Vuong, 2016; Yamaguchi and Yamazaki, 1984; Yang, 1996; Yuan, 2011; Zheng, 1989). The physical quantities used as inputs and outputs in our study are shown in Table 2.
After data processing, removal of entries with missing data, uniformization of the flow patterns to fit in the given definition, and removing a few studies that were not relevant to our field application in oil and gas field data (e.g. microchannel experiments), we were left with 16055 data points, which were split as follows: 60% for model training, 20% for model validation, and 20% for testing (metrics calculation). These splits were stratified based on the flow pattern and inclination range distributions.
2.7 Field dataset
The field dataset is a collection of production tests measurements performed while the well is aligned through a test separator. The multiphase flow rates are assessed from 19 wells connected to three different floating production units in ultra-deep waters. Their geometries and notable points (pressure and temperature sensors and gas-lift valves) are shown in Figure 5. To perform pressure and temperature profiles calculations, we also characterize its diameter, roughness, ambient temperature, and heat transfer coefficient for each pipe section.
The dataset comprises a wide range of liquid (oil + water) flow rates, pressures, and temperatures in each sensor (downhole, Xmas tree, and upstream production choke) shown in Figure 6.
We considered 402 production tests over 4 years which were also split as follows: 60% for model training, 20% for model validation, and 20% for testing (metrics calculation). The splits were stratified by well, so that each set had the same distribution of wells. Additionally, as there is an intermediate sensor (the Xmas tree) along the flow, each production test was used as two distinct data points, considering the flow between the downhole gauge and the Xmas tree (well) and between the Xmas tree and the production choke (pipeline). The relevant measured data contained in each production test is described in Table 3.
It is important to emphasize that the calculations can be performed in two different ways: given the upstream pressures and temperatures, we can calculate the downstream pressures and temperatures, or vice versa, as the numerical integration can be done both ways. In this study, we considered the following: given
Finally, each well has an associated fluid description in the form of a tabular TAB file in the same format adopted by commercial simulators such as OLGA, LedaFlow, and Pipesim. These tables are used by the model to calculate the fluids’ velocities and properties along the flow as a function of the pressure and temperature in each point. The use of black-oil correlations would also be a possibility, as long as their implementations are fully differentiable, and further adding the capability of adjusting correlation coefficients with field data. The dataset is found attached to this paper.
2.8 Training pipeline
To systematically identify the optimal model configuration and training strategy, a series of experiments was conducted. The investigation involved comparing two primary architectures for the physics-informed closure relations: a standard single multi-layer perceptron (MLP) and a more complex MoE model. For each architecture, we further assessed the influence of feature engineering by evaluating three input configurations: using exclusively dimensional inputs, using only learnable dimensionless numbers, and using a concatenation of both. A central objective was determining the efficacy of transfer learning; thus, we contrasted a training recipe involving pretraining on an experimental dataset against a direct approach using only field data. The performance of each combination was evaluated via the mean absolute error (MAE) for pressure and temperature predictions after each sequential step initialization, pretraining, training, and a final parameter tuning phase and benchmarked against a tuned Beggs and Brill correlation to provide an industry-relevant comparison baseline. A description of each step of the full experiment designed to evaluate the proposed methodology is presented in the following subsections.
2.8.1 Model initialization
The model can be initialized with hyperparameters that determine the specifics of its architecture, such as the
A hyperparameter optimization process led to the modeling described in Section 2.3, which also providing a range of best performing MLP shapes and number of dimensionless numbers (
The best model configurations found and their calculated number of trainable parameters are shown in Table 4. Note that the number of parameters for the
2.8.2 Pretraining with experimental dataset
This section details the pretraining phase, the first major step in our experimental pipeline, designed to establish the model’s fundamental predictive capabilities on a comprehensive experimental dataset. The objective here is twofold: first, to confirm that in the proposed physics-informed architectures, both the single MLP and the MoE variants, can effectively learn the underlying closure relations for pressure gradient, void fraction, and flow pattern classification from controlled, data-rich conditions. Second, this phase generates the pretrained models that serve as the starting point for the subsequent transfer learning experiments on field data.
This step is optional because, due to the model’s differentiable implementation, it is able to learn directly from field data and does not require pretraining. However, if so set, the initialized model undergoes pretraining using the experimental dataset described in Section 2.6. This step involves training the
The loss function is composed of cross-entropy loss
Thus, the training loss function becomes
where the weighting factors of the loss function in Equation 19 (
Other hyperparameters found via Optuna, such as learning rate
Due to the complex landscape of the loss function, the training process can frequently get stuck in local minima, requiring perturbations and some noise during training. Finding suitable learning rates and loss ponderation factors can be challenging. The use of a learning rate scheduler that employs cosine annealing with warm restarts (Loshchilov and Hutter, 2016), in composition with a decaying exponential (Equation 20), stabilizes the loss function in the last epochs, brings optimal fitting for all the training objectives.
Training the
2.8.3 Training with field data
The goal is to represent the observed field data, matching the model’s predictions with the measured pressures and temperatures. As described in Section 2.7, each production test represents two data points in the dataset: besides the other parameters from the test, given
The training loss is the sum of the pressure and temperature
When training directly on field data, without pretraining, the flow pattern classification model
For the training process, a cosine annealing with warm restarts (Loshchilov and Hutter, 2016) learning rate (Equation 22) yields the best results. Large batches (
Due to the complexity of the model, which encompasses a set of different sub-models (
The model quality is assessed using the pressure and temperature MAEs.
2.8.4 Parameter tuning
The previous step (model training) is responsible for adjusting the model’s weights, assuming the correctness of the given data, such as pipe diameter, roughness, heat transfer coefficient, and ambient temperature. Our approach, on the other hand, which relies on automatic differentiation, allows optimization of an objective function adjusting any parameter from the model, including the inputs, leading to a parameter estimation framework.
For example: a pipeline’s global heat transfer coefficient can be tuned to fit all the historic values of measured temperatures; the equivalent roughness from the flexible pipelines can be tuned to match the measured pressures, where one can share this parameter across all the pipelines from each supplier that have the same diameter, or across all the well tubings; a pipe’s equivalent diameter can be calculated as a function of time to estimate the possibility of wax deposition; if properly modeled, coefficients from a black-oil correlation can be tuned to account for the field data, given uncertainties in the fluid composition.
In our study, we tuned several key parameters to account for uncertainties in the physical system and fluid representation. These parameters included the roughness
The loss function is the same as that used in the model training (Equation 21).
2.8.5 Baseline comparison
For comparison, we established a baseline model which implements the Beggs and Brill (1973) correlation, widely used in the oil and gas industry. To simulate the engineering process of tuning the model, we added correction factors for the calculated friction
2.9 Bayesian inference - RML
The differentiable nature of our model’s implementation enables the application of the randomized maximum likelihood (RML) algorithm (Oliver et al., 1996; Bardsley et al., 2014) to efficiently sample the posterior probability distribution of uncertain parameters, given a set of observations and the simulated values.
Consider the model
For a specific realization of
and the prior probability distribution
The posterior distribution of the model parameters
where
Finally, the maximum a posteriori (MAP) estimate is defined as the model parameters
The RML method is characterized by approximating the posterior distribution by drawing samples from the prior and finding
1. Sample
2. Sample
3. Compute
where the objective function is
which can be noted as two separate objectives (Equation 30):
where
The samples do not need to be retrieved sequentially, allowing computation of the entire posterior distribution in parallel—another feature enabled by our modeling. Minimizing
The choice of which model parameters to allocate under
3 Results
This section sequentially presents the experimental results designed to validate and analyze the proposed differentiable framework. We first conduct a comprehensive comparison of different model architectures (single MLP vs. mixture of experts (MoE) for the multipliers
In Subsection 3.1, we compare all the training strategies and expose and explain all the metrics obtained in the process. In the subsequent subsections, we visualize the training results and explain them qualitatively.
3.1 Training strategy comparison
Along the training pipeline—initialization, pretraining on experimental data and training on field data (with further parameter tuning on field data)—we evaluated the metrics for both experimental (
We initialized and trained models following the architecture proposed in Sections 2.3, 2.5: we implemented trainable neural networks as the multipliers
Table 7 compiles the results for the experimental dataset (test set)
The models that employ multipliers
After pretraining, the use of dimensionless numbers (only or concatenated) systematically improved both MAE and
After training with field data (last column on Table 7), a degradation on the experimental
The experimental
The other objective of pretraining is the flow pattern classification only when using a MoE framework
When the model is pretrained, the
We now analyze how these models behave by evaluating the field metrics: the prediction error (MAE) of the pressures
The initialized models naturally performed worse than the Beggs and Brill correlation baseline. However, it is noticeable that the use of multipliers
The best performance was achieved by the physics-based Single MLP framework with only dimensionless inputs (
Finally, Table 11 shows the evolution of temperature prediction errors through the training pipeline. The pressure and temperature profiles are strongly coupled by the Joule–Thomson coefficient
Ultimately, the balance between these metrics can be controlled by adjusting the weighting factor
In contrast, the tuned Beggs and Brill benchmark performed well for both pressure and temperature. This is because its setup allowed for the application of a direct multiplicative correction factor to the calculated
To evaluate the trade-offs between each proposed architecture when evaluating both experimental and field data, we plotted Figure 7 showing both the experimental
The models based on the
As shown in Figure 7, the training paths including pretraining consistently achieved superior metrics on the field dataset. This demonstrates that initializing the model with a foundational understanding of flow physics from the experimental data allowed for more effective fine-tuning and resulted in a more accurate final model. We can also see that based on the specific engineering objective, we are subject to a trade-off between the two domains. The choice of architecture and underlying complexity is dependent on the model’s application. Furthermore, the MoE framework offers significant qualitative advantages that make it more suitable for engineering applications. The tangible benefit of this configuration is the interpretability of having a flow pattern prediction, thus enabling engineering analysis for design purposes (e.g. avoiding instabilities for better process control) and also troubleshooting capabilities, as the
3.2 Pretraining with the experimental dataset
Following the quantitative results from the previous section, we will now qualitatively assess the model’s prediction capabilities when pretrained on experimental data. Figure 8 displays the predicted values (upper row) for
In the single MLP model, the scatter plots illustrate a dense concentration of data points around the identity line, which is indicative of a strong model fit. The residuals distributions (bottom row) show that the modes are close to zero and the tails are mostly symmetrical, which means that the model’s predictions are unbiased. For the MoE model, although the scatter plots indicate good fitness and the metrics are superior to the single MLPs’ metrics, the
The MoE framework without the multipliers (no physics) showed similar fitness and metrics in the
The
For both
Considering the model with the MoE architecture, the flow pattern predictions for the test dataset can be compared with the model of Barnea (1987) in the confusion matrix in Table 12. Our model resulted in a
For a specific configuration of fluid characteristics in a horizontal pipeline of the field data test cases, the model’s predicted flow pattern map (considering the highest
Figure 10. Example of a predicted flow pattern map compared to the result obtained using Barnea’s method, grouping the flow patterns in the four classes described in Section 2.5.
While the overall topology of the predicted flow pattern map shows a strong resemblance to the Barnea baseline, its deviations highlight limitations inherent in a purely data-driven classification approach, especially when dealing with data scarcity. The model successfully captures the main physical transitions from the large, stratified region to intermittent flow with increasing liquid velocity and to annular flow with increasing gas velocity. However, a significant limitation appears at high gas and liquid velocities, a region corresponding to churn flow (part of our intermittent class), where the model erroneously predicts bubble flow. This misclassification is directly attributed to the underrepresentation of data points for the churn regime in our experimental dataset.
3.3 Effect of learnable dimensionless numbers
While exploring good combinations of hyperparameters for the models, the effect of the number of dimensionless numbers was also investigated. Across multiple neural network configurations (widths and depths), the use of learnable dimensionless numbers consistently improved the metrics, lowering the average mean absolute errors (MAE) for the validation
Figure 11. Effect of the number of learned dimensionless features on the predicted
This finding is of considerable importance as it provides strong empirical validation for the use of learnable dimensionless numbers as a superior feature engineering strategy. Instead of relying on predefined, universal dimensionless groups, the BuckiNet framework allows the model to autonomously discover the most relevant physical relationships directly from the data. This data-driven approach enables the identification of parameter groupings that are optimally tuned for the specific fluid properties and flow conditions of the dataset, enhancing the model’s physical consistency and predictive power. The clear trend in Figure 11, where performance improves and then saturates, indicates that the model finds an optimal basis of dimensionless features, effectively capturing the essential physics while avoiding unnecessary complexity. This automated discovery of a physically meaningful feature space represents a key contribution of our framework, offering a more robust and generalizable alternative to manual feature engineering.
To illustrate the learned soft dimensionless features, we took the ten features with the smallest residuals (null space loss) after pretraining the MoE model with experimental data, and related their exponents (which are the elements of the matrix
The soft dimensionless features were analyzed to identify known dimensionless from the literature, aggregating the velocities
where
Although further exploration can be performed to identify and catalog known dimensionless numbers from the literature which eventually emerge from our model, it was shown that, besides the benefits in the model quality as measured by the metrics, meaningful physical information can be extracted from these features.
3.4 Training with field data
As established in the training strategy comparison (Section 3.1), pretraining the model with experimental data enhances its performance on field data. Although a significant domain gap exists between experimental and field conditions, as will be discussed in Section 4, our transfer learning approach successfully bridges this gap.
Considering the best performing model during pretraining, using the MoE approach with concatenated dimensionless numbers and training with field data without parameter tuning (as the tuning affected the temperature prediction metrics), we obtained a MAE of
Figure 12. Pressure and temperature predictions from the pretrained and trained model (MoE framework, without tuning) in the test dataset.
The dash–dotted lines comprehend an interquartile range of 95% of the prediction errors (residuals). Good fitness is observed in the downhole pressures
Evaluating the baseline Beggs and Brill model, after tuning the correction factors we obtained a MAE of
Figure 13. Pressure and temperature predictions from the Beggs and Brill correlation (tuned with field data) in the test dataset.
The overall pressure prediction errors from the Beggs and Brill correlation are similar to our model’s errors. The temperatures were better predicted, mainly due to the correction factors applied directly on the calculated
Figure 14 visualizes the complete pressure and temperature profiles for a particular production test from the test dataset. The discontinuities shown at the Xmas tree occur because the well and pipeline segments are simulated separately. Providing the complete geometry to the model at once would produce contiguous profiles but also lead to the accumulation of prediction errors.
Figure 14. Predicted pressure and temperature profiles for an instance of the test dataset. Comparison between the tuned Beggs and Brill correlation and the MoE framework model trained and tuned with field data, without pretraining.
This particular result does not indicate that the MoE framework yields better simulations than Beggs and Brill; the metrics do. Figure 14 demonstrates the capability of calculating entire profiles from a model trained only on sparse field data, without using any previously programmed correlation. The simulated profiles have a wide range of applications in industry, from design to production monitoring and flow assurance.
3.5 Parameter tuning
The parameter tuning step, performed after model training, was set to adjust three key sets of parameters: the roughness of all pipes, their global heat transfer coefficients, and the linear transformations applied to the Joule–Thomson coefficient.
Figure 15 (left) represents the relative change in the absolute roughness
Figure 15. Roughness
The global heat exchange coefficient
Furthermore, Figure 16 shows the tuning of the Joule–Thomson linear transformation coefficients
Figure 16. Transformation coefficients
As seen in both
Tuning physical parameters can improve specific metrics, such as the pressure MAE (Table 10), but this requires careful balancing. As shown in Table 11, these adjustments can simultaneously degrade other metrics like temperature, revealing a trade-off between competing objectives. Furthermore, since the influence of different parameters can vary by orders of magnitude, the employment of individual learning rates for each type of parameter is required to manage these sensitivities more effectively.
3.6 Bayesian inference - RML
The following scenario was created to test the RML algorithm capabilities and its coupling with the differentiable model: given a production test, we want to simulate the sub-sea and downhole pressures and temperatures
The data observed
The prior distributions for
The optimization process converges smoothly (Figure 17). The reduction on the data mismatch
Figure 17. Convergence from the RML objective function and its components (model mismatch and data mismatch).
The RML process updates the model parameters
This distribution shift in the
The resulting pressure and temperature profiles with incorporated uncertainties can also be visualized (Figure 20), based on the simulations using the posterior distribution for
Figure 20. Pressure and temperature profile uncertainties
By accounting for uncertainty, the simulated pressure and temperature profiles enable more reliable operational diagnosis and informed system design in flow assurance. More robust analysis can be done regarding the probability of hydrate formation or wax deposition in steady-state production. In the example shown in Figure 21, the mean
Figure 21. Thermohydraulic profile with uncertainties
There is a wide range of applications for the use of Bayesian inference with the randomized maximum likelihood (RML) method using steady-state simulations for multiphase flow: nodal analysis with uncertainties, calculating the probability of blowout, virtual sensing, robust flowrate estimation, and anomaly detection, to name a few. This section demonstrated the method’s capability and simple usage, enabled by the differentiable framework developed.
4 Discussion
As initially hypothesized, pretraining the model proved to be a highly effective strategy for improving its performance on field data. Our results confirm that establishing a baseline understanding of flow physics on a broad experimental dataset allows for more robust and accurate fine-tuning on sparser, application-specific field measurements. The use of trainable dimensionless features and a physics-informed structure were key enablers of this successful knowledge transfer.
In order to analyze the differences between the experimental dataset and the in situ conditions observed in the field, the entire field dataset was simulated, then all the input features were compared to the experimental dataset in a t-SNE plot (van der Maaten and Hinton, 2008) (Figure 22). In the (a) plot, only the dimensional features were considered, which is why the field data display this “snake” pattern. There is no overlap between the field and the experimental data. The (b), (c), and (d) plots represent the data after normalization, with dimensionless numbers. There is practically no overlap between the sets in those cases, except for a few small regions, possibly representing some generalization provided by the dimensionless numbers; however, this cannot be asserted purely based on this evidence.
Figure 22. t-SNE plot from the model’s input features when evaluating both experimental and field datasets, considering: (a) dimensional features only; (b) normalized concatenated dimensional and dimensionless features in a pretrained model (only with experimental data); (c) normalized concatenated dimensional and dimensionless features in a pretrained (with experimental data) and trained (with field data) model; (d) normalized concatenated dimensional and dimensionless features in a model trained only with field data (not pretrained).
The gap between the experimental and field data was known and, in fact, was a major motivation to developing models that are trainable with field data. The operating conditions in deep water are more extreme (higher pressures and temperatures) and the fluid compositions are quite different, containing contaminants such as CO2 and high gas densities—conditions unseen on the experimental benches—which leads to a lack of data needed to properly model the closure relations in these scenarios. While the t-SNE analysis in Figure 22 clearly visualizes this domain gap, our results demonstrate that a transfer-learning approach can successfully bridge this gap. The model’s ability to generalize suggests that pretraining, combined with its physics-informed architecture, allowed it to learn the underlying physical principles of two-phase flow rather than simply memorizing the conditions present in the experimental data.
On the other hand, there is room for improvement in the physical structure introduced in the modeling. Virtually any correlation or mechanistic model can be programmed using the automatic differentiation framework, allowing the training process to adjust any parameter of interest. It is expected that, with better physics-informed models, the residuals to be modeled by neural networks will be smaller. Ultimately, only a few coefficients from closure relations should be adjusted.
The implementation of more complex and implicit models, which require iterative root finding, poses challenges for three main reasons: the model needs to process batches, which will degrade the solver’s performance; the need to propagate gradients based on the solution; mechanistic models show discontinuities (Shippen and Bailey, 2012), making it difficult for an optimizer to navigate the landscape and find convergence.
The process of developing a training procedure and the challenge of simultaneously matching pressure and temperature field measurements reveal another major issue: the high sensitivity of the fluid representation. Most engineers who perform production analysis and history matching rely on choosing a suitable flow correlation and then proceed to manually adjust tuning factors. The fluid model, although tuned to match the laboratory analysis in reservoir conditions, relies on equations of state (EoS) to extrapolate entire range of field operating conditions, and in most cases no adjustment is made on the fluid model during the well life cycle. This presents an opportunity to extend our differentiable framework to also update fluid parameters during training with field data.
5 Conclusion and future work
This study successfully developed and validated a novel end-to-end differentiable framework for modeling steady-state two-phase flows. By integrating a neural ODE formulation with physics-informed neural networks, the proposed model accurately predicts pressure and temperature profiles along complex deepwater well and pipeline geometries. The results demonstrate that our approach, when trained and tuned directly with field data, achieves better accuracy in pressure prediction than the proposed tuned Beggs and Brill (1973) correlation benchmark. The model’s differentiability proves to be a powerful feature, enabling not only the optimization of neural network components but also the automated tuning of physical parameters like pipe roughness, effectively creating a self-calibrating simulation tool.
One of the most significant findings of this study is the successful application of a transfer learning approach for modeling real-world field conditions. We demonstrated that pretraining a model on a large experimental dataset and subsequently fine-tuning it with field data is a superior strategy to training solely on sparse field data. Our framework effectively bridges the domain gap between laboratory and field conditions, leveraging physics-informed structures and learnable dimensionless numbers to achieve high accuracy.
Furthermore, the utility of the differentiable framework extends beyond forward calculations. We demonstrated its seamless integration with advanced algorithms for inverse problems, using randomized maximum likelihood (RML) to efficiently perform uncertainty quantification. This capability highlights the model’s potential as a cornerstone for digital twin applications, enabling robust history matching, virtual sensing, and what-if scenario analysis with quantifiable confidence intervals.
Despite these promising results, this study also identifies paths for future research. The results of the simulations are highly sensitive to the fluid’s model quality. A key future direction is the development of a fully differentiable PVT module, which would allow the model to learn and adjust fluid thermodynamic properties or the coefficients from equations of state directly from field measurements. Additionally, the current framework is limited to steady-state conditions. Extending the model to handle transient multiphase flow is a natural and necessary next step to broaden its applicability to dynamic operational scenarios like startup and shutdown. Finally, further investigation into the physical interpretability of the learned dimensionless groups from the BuckiNet component could yield new insights into the dominant forces governing specific flow regimes encountered in the field.
Data availability statement
The original contributions presented in the study are included in the article/Supplementary Material; further inquiries can be directed to the corresponding author.
Author contributions
AF: Writing – review and editing, Investigation, Writing – original draft, Software, Formal analysis, Data curation, Conceptualization, Methodology. SV: Investigation, Conceptualization, Supervision, Writing – review and editing, Formal analysis, Writing – original draft, Methodology, Validation, Data curation, Software. MC: Resources, Visualization, Funding acquisition, Project administration, Formal analysis, Methodology, Writing – review and editing, Supervision, Conceptualization.
Funding
The authors declare that financial support was received for the research and/or publication of this article. The authors acknowledge the technical support of Petrobras and the financial support of the company and ANP (Brazil’s agency for national oil, natural gas, and biofuels) through the R&D levy regulation (Process 2017/00778-2). The authors declared that this work received funding from Petrobras. The funder was not involved in the study design, collection, analysis, interpretation of data, the writing of this article, or the decision to submit it for publication.
Acknowledgements
Acknowledgments are also extended to Petrobras colleague Alexandre Anozé Emerick for insights on Bayesian inference and to the Center for Energy and Petroleum Studies (CEPETRO), School of Mechanical Engineering (FEM), and Artificial Lift and Flow Assurance (ALFA) Research Group at UNICAMP. This project is the subject of a pending patent application (Castro et al., 2025b) and software registration (Castro et al., 2025a).
Conflict of interest
Authors AF and SV were employed by Petróleo Brasileiro S.A. - Petrobras.
The remaining author declares that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The authors declare that no Generative AI was used in the creation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Supplementary material
The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fceng.2025.1687048/full#supplementary-material
References
Abduvayt, P., Arihara, N., Manabe, R., and Ikeda, K. (2003). Experimental and modeling studies for gas-liquid two-phase flow at high pressure conditions. J. Jpn. Petroleum Inst. 46, 111–125. doi:10.1627/jpi.46.111
Akiba, T., Sano, S., Yanase, T., Ohta, T., and Koyama, M. (2019). “Optuna: a next-generation hyperparameter optimization framework,” in The 25th ACM SIGKDD international conference on knowledge discovery & data mining, 2623–2631.
Al-Ruhaimani, F., Pereyra, E., Sarica, C., Al-Safran, E., and Torres, C. (2017). Experimental analysis and model evaluation of high-liquid-viscosity two-phase upward vertical pipe flow. SPE J. 22, 712–735. doi:10.2118/184401-PA
Alakbari, F. S., Ayoub, M. A., Awad, M. A., Ganat, T., Mohyaldinn, M. E., and Mahmood, S. M. (2025). A robust pressure drop prediction model in vertical multiphase flow: a machine learning approach. Sci. Rep. 15, 13420. doi:10.1038/s41598-025-96371-2
Alhashem, M. (2019). “Supervised machine learning in predicting multiphase flow regimes in horizontal pipes,” in Abu Dhabi international petroleum exhibition & conference (Richardson, TX: Society of Petroleum Engineers).
Almabrok, A. A. (2013). Investigation of the effects of high viscosity oil on flow patterns and pressure gradient in horizontal two-phase flow. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Alsaadi, Y. (2013). Liquid loading in highly deviated Wells. (master’s thesis). The University of Tulsa, Tulsa, OK, United States.
Alves, I. N., Caetano, E. F., Minami, K., and Shoham, O. (1991). Modeling annular flow behavior for gas wells. SPE Prod. Eng. 6, 435–440. doi:10.2118/20384-PA
Andritsos, N. (1986). Effect of pipe diameter and liquid viscosity on horizontal stratified two-phase flow. (Ph.D. thesis). University of Illinois at Urbana-Champaign, Urbana, IL, United States.
Ansari, M. R., and Azadi, R. (2016). Effect of diameter and axial location on upward gas–liquid two-phase flow patterns in intermediate-scale vertical tubes. Ann. Nucl. Energy 94, 530–540. doi:10.1016/j.anucene.2016.04.020
Armand, A. A. (1946). The resistance during the movement of a two-phase system in horizontal pipes. Izv. VTI 1, 16–23.
Attia, M., Abdulraheem, A., and Mahmoud, M. A. (2015). “Pressure drop due to multiphase flow using four artificial intelligence methods,” in SPE North Africa technical conference and exhibition (Richardson, TX: Society of Petroleum Engineers).
Ba, J. L., Kiros, J. R., and Hinton, G. E. (2016). Layer normalization. arXiv Preprint. [Preprint]. doi:10.48550/arXiv.1607.06450
Bakarji, J., Callaham, J., Brunton, S. L., and Kutz, J. N. (2022). Dimensionally consistent learning with buckingham pi. Nat. Comput. Sci. 2, 834–844. doi:10.1038/s43588-022-00355-5
Bardsley, J. M., Solonen, A., Haario, H., and Laine, M. (2014). Randomize-then-optimize: a method for sampling from posterior distributions in nonlinear inverse problems. SIAM J. Sci. Comput. 36, A1895–A1910. doi:10.1137/140964023
Barnea, D. (1987). A unified model for predicting flow-pattern transitions for the whole range of pipe inclinations. Int. J. Multiph. Flow 13, 1–12. doi:10.1016/0301-9322(87)90002-4
Barnea, D., Shoham, O., and Taitel, Y. (1982). Flow pattern transition for vertical downward two phase flow. Chem. Eng. Sci. 37, 5, 741–744. doi:10.1016/0009-2509(82)85034-3
Barnea, D., Shoham, O., Taitel, Y., and Dukler, A. E. (1985). Gas-liquid flow in inclined tubes: flow pattern transitions for upward flow. Chem. Eng. Sci. 40 (1), 131–136. doi:10.1016/0009-2509(85)85053-3
Baydin, A. G., Pearlmutter, B. A., Radul, A. A., and Siskind, J. M. (2018). Automatic differentiation in machine learning: a survey. J. Mach. Learn. Res. 18, 1–43. [Preprint]. doi:10.48550/arXiv.1502.05767
Beggs, H. D. (1972). An experimental study of two-phase flow in inclined pipes. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Beggs, D., and Brill, J. (1973). A study of two-phase flow in inclined pipes. J. Petroleum Technol. 25, 607–617. doi:10.2118/4007-PA
Brill, J., and Arirachakaran, S. (1992). State of the art in multiphase flow. J. Petroleum Technol. 44, 538–541. doi:10.2118/23835-PA
Brito, R. (2012). Effect of medium oil viscosity on two-phase oil-gas flow behavior in horizontal pipes. (Ph.D. thesis). University of Tulsa, Tulsa, OK, United States.
Brito, R., Pereyra, E., and Sarica, C. (2014). “Experimental study to characterize slug flow for medium oil viscosities in horizontal pipes,” in North American conference on multiphase technology of North American conference on multiphase production technology, BHR–2014–G4, 9.
Brunton, S. L., Noack, B. R., and Koumoutsakos, P. (2020). Machine learning for fluid mechanics. Annu. Rev. Fluid Mech. 52, 477–508. doi:10.1146/annurev-fluid-010719-060214
Caetano, E. F. (1985). Upward vertical two-phase flow through an annulus. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
[Dataset] Castro, M. S., Faller, A. C., and Vieira, S. C. (2025a). “Neural hydra. Certificate of registration for computer program no. BR512025002969-1, Brazilian national institute of industrial property (INPI),” in Certificate issued on 2025-07-15. Valid for 50 years from 2025-01-01. Programming language: python.
[Dataset] Castro, M. S., Vieira, S. C., and Faller, A. C. (2025b). “Método para simulação de escoamento multifásico por diferenciação automática e mídia de armazenamento legível por computador,” in Patent application no. BR102025012887-0, Brazilian national institute of industrial property (INPI).
Chen, R. T. Q., Rubanova, Y., Bettencourt, J., and Duvenaud, D. K. (2018). “Neural ordinary differential equations,”. Advances in neural information processing systems. Editors S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (Red Hook, NY: Curran Associates, Inc.), 31.
Chen, X. T., Cal, X. D., and Brill, J. P. (1997). Gas-liquid stratified-wavy flow in horizontal pipelines. J. Energy Resour. Technol. 119(4), 209–216. doi:10.1115/1.2794992
Cheremisinoff, N. P. (1977). An experimental and theoretical investigation of horizontal stratified and annular two-phase flow with heat transfer. Potsdam, NY: Clarkson University.
Churchill, S. W. (1977). Friction-factor equation spans all fluid-flow regimes. Chem. Eng. 84, 91–92.
Colebrook, C. F. (1939). Turbulent flow in pipes, with particular reference to the transition region between the smooth and rough pipe laws. J. Institution Civ. Eng. 11, 133–156. doi:10.1680/ijoti.1939.13150
Crowley, C. J., Sam, R. G., and Rothe, P. H. (1986). Investigation of two-phase flow in horizontal and inclined pipes at large pipe size and high gas density (creare incorporated).
Duchi, J., Hazan, E., and Singer, Y. (2011). Adaptive subgradient methods for online learning and stochastic optimization. J. Mach. Learn. Res. 12, 2121–2159. http://jmlr.org/papers/v12/duchi11a.html.
Eaton, B. A. (1966). The prediction of flow patterns, liquid holdup and pressure losses occurring during continuous two-phase flow in horizontal pipelines. (Ph.D. thesis). University of Texas at Austin, Austin, TX, United States.
Ezzatabadipour, M., Singh, P., Robinson, M., Guillen, P., and Torres, C. (2017). “Deep learning as a tool to predict flow patterns in two-phase flow,” in Proceedings of the workshop on data mining for oil and gas.
Fan, Y. (2005). An investigation of low liquid loading GasLiquid stratified flow in near-horizontal pipes. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Fedus, W., Zoph, B., and Shazeer, N. (2022). Switch transformers: scaling to trillion parameter models with simple and efficient sparsity. J. Mach. Learn. Res. 23, 1–39. [Preprint]. doi:10.48550/arXiv.2101.03961
Felizola, H. (1992). Slug flow in extended reach directional wells. (master’s thesis). The University of Tulsa, Tulsa, OK, United States.
Fox, R., McDonald, A., and Pritchard, P. (1985). Introduction to fluid mechanics, 7. New York: John Wiley & Sons.
Gawas, K. (2005). Studies in low-liquid loading in gas/oil/water three phase flow in horizontal and near-horizontal pipes. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Gokcal, B. (2005). Effects of high oil viscosity on two-phase oil-gas flow behavior in horizontal pipes. (master’s thesis). The University of Tulsa, Tulsa, OK, United States.
Gokcal, B. (2008). An experimental and theoretical investigation of slug flow for high oil viscosity in horizontal pipes. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Gomez, L. E., Shoham, O., Schmidt, Z., Chokshi, R. N., and Northug, T. (2000). Unified mechanistic model for steady-state two-phase flow: horizontal to vertical upward flow. SPE J. 5, 339–350. doi:10.2118/65705-PA
Guillen-Rondon, P., Robinson, M. D., Torres, C., and Pereya, E. (2018). Support vector machine application for multiphase flow pattern prediction. arXiv Preprint arXiv:1806.05054. doi:10.48550/arXiv.1806.05054
Guner, M. (2012). Liquid loading of gas Wells with deviations from 0° to 45°. (master’s thesis). The University of Tulsa, Tulsa, OK, United States.
Hanafizadeh, P., Saidi, M. H., Nouri Gheimasi, A., and Ghanbarzadeh, S. (2011). Experimental investigation of air–water, two-phase flow regimes in vertical mini pipe. Sci. Iran. 18 (4), 923–929. doi:10.1016/j.scient.2011.07.003
He, K., Zhang, X., Ren, S., and Sun, J. (2016). “Deep residual learning for image recognition,” in 2016 IEEE conference on computer vision and pattern recognition (CVPR), 770–778. doi:10.1109/CVPR.2016.90
Ioffe, S., and Szegedy, C. (2015). “Batch normalization: accelerating deep network training by reducing internal covariate shift,” in International conference on machine learning (PMLR), 448–456.
Johnson, N. J. B. A. G. W., Bertelsen, A. F., and Nossen, J. (2009). An experimental investigation of roll waves in high pressure two-phase inclined pipe flow. Int. Journal Multiphase Flow 35, 924–932. doi:10.1016/j.ijmultiphaseflow.2009.06.003
Kanin, E., Osiptsov, A., Vainshtein, A., and Burnaev, E. (2019). A predictive model for steady-state multiphase pipe flow: machine learning on lab data. J. Petroleum Sci. Eng. 180, 727–746. doi:10.1016/j.petrol.2019.05.055
Karami, H. (2015). Three-phase low liquid loading flow and effects of MEG on flow behavior. Ph.D. thesis.
Khaledi, H. A., Smith, I. E., Unander, T. E., and Nossen, J. (2014). Investigation of two-phase flow pattern, liquid holdup and pressure drop in viscous oil–gas flow. Int. J. Multiph. Flow 67, 37–51. doi:10.1016/j.ijmultiphaseflow.2014.07.006
Khan, M. S., Barooah, A., Lal, B., and Rahman, M. (2023). in Multiphase flow systems and potential of machine learning approaches in cutting transport and liquid loading scenarios, 27–57. doi:10.1007/978-3-031-24231-1_3
Kokal, S. L. (1987). An experimental study of two phase flow in inclined pipes. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Kokal, S., and Stanislav, J. (1989a). An experimental study of two-phase flow in slightly inclined pipes—i. flow patterns. Chem. Eng. Sci. 44, 665–679. doi:10.1016/0009-2509(89)85042-0
Kokal, S., and Stanislav, J. (1989b). An experimental study of two-phase flow in slightly inclined pipes—ii. liquid holdup and pressure drop. Chem. Eng. Sci. 44, 681–693. doi:10.1016/0009-2509(89)85043-2
Kong, Q., Siauw, T., and Bayen, A. M. (2021). “Chapter 23 - boundary-value problems for ordinary differential equations (odes),” in Python programming and numerical methods. Editors Q. Kong, T. Siauw, and A. M. Bayen (Academic Press), 399–414. doi:10.1016/B978-0-12-819549-9.00033-6
Kristiansen, O. (2004). Experiments on the transition from stratified to slug flow in multiphase pipe flow.
Lai, Z., Mylonas, C., Nagarajaiah, S., and Chatzi, E. (2021). Structural identification with physics-informed neural ordinary differential equations. J. Sound Vib. 508, 116196. doi:10.1016/j.jsv.2021.116196
Lockhart, R. W., and Martinelli, R. C. (1949). Proposed correlation of data for isothermal two-phase, two-component flow in pipes. Chem. Eng. Prog. 45, 39–48.
Loshchilov, I., and Hutter, F. (2016). Sgdr: stochastic gradient descent with warm restarts. doi:10.48550/arXiv.1608.03983
Loshchilov, I., and Hutter, F. (2019). “Decoupled weight decay regularization,” in International conference on learning representations.
Lu, L., Meng, X., Mao, Z., and Karniadakis, G. E. (2021). Deepxde: a deep learning library for solving differential equations. SIAM Rev. 63, 208–228. doi:10.1137/19m1274067
Magrini, K. L. (2009). Liquid entrainment in annular gas-liquid flow in inclined pipes. (master’s thesis). The University of Tulsa, Tulsa, OK, United States.
Marcano, R. (1996). Slug characteritics for two-phase horizontal flow. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Meng, W. (1999). Low liquid loading gas-liquid two-phase flow in near-horizontal pipes. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Minami, K. (1983). Liquid holdup in wet-gas pipelines. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Mukherjee, H. (1979). An experimental study of inclined two-phase flow. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Nowlan, S., and Hinton, G. E. (1991). “Evaluation of adaptive mixtures of competing experts,”. Advances in neural information processing systems. Editors R. Lippmann, J. Moody, and D. Touretzky (San Mateo, CA: Morgan-Kaufmann), 3.
Ohnuki, A., and Akimoto, H. (2000). Experimental study on transition of flow pattern and phase distribution in upward air–water two-phase flow along a large vertical pipe. Int. Journal Multiphase Flow 26, 367–386. doi:10.1016/s0301-9322(99)00024-5
Oliver, D., He, N., and Reynolds, A. (1996). in Conditioning permeability fields to pressure data. doi:10.3997/2214-4609.201406884
Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., et al. (2019). “Pytorch: an imperative style, high-performance deep learning library,”. Advances in neural information processing systems. Editors H. Wallach, H. Larochelle, A. Beygelzimer, F. d’ Alché-Buc, E. Fox, and R. Garnett (Red Hook, NY: Curran Associates, Inc.), 32.
Pereyra, E., Torres, C., Mohan, R., Gomez, L., Kouba, G., and Shoham, O. (2012). A methodology and database to quantify the confidence level of methods for gas–liquid two-phase flow pattern prediction. Chem. Eng. Res. Des. 90, 507–513. doi:10.1016/j.cherd.2011.08.009
Pietrzak, M., and Płaczek, M. (2019). Void fraction predictive methods in two-phase flow across a small diameter channel. Int. J. Multiph. Flow 121, 103115. doi:10.1016/j.ijmultiphaseflow.2019.103115
Raissi, M., Perdikaris, P., and Karniadakis, G. (2019). Physics-informed neural networks: a deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J. Comput. Phys. 378, 686–707. doi:10.1016/j.jcp.2018.10.045
Roumazeilles, P. (1994). An experimental study of downward slug flow in inclined pipes. (master’s thesis). The University of Tulsa, Tulsa, OK, United States.
Ruiz-Diaz, C. M., Hernández-Cely, M. M., and Estrada, O. A. G. (2021). A predictive model for the identification of the volume fraction in two-phase flow. Cienc. Desarro. 12, 49–55. doi:10.19053/01217488.v12.n2.2021.13417
Schmidt, Z. (1976). Experimental study of gas-liquid flow in a pipeline-rise pipe system. (master’s thesis). The University of Tulsa, Tulsa, OK, United States.
Schmidt, Z. (1977). Experimental study of gas-liquid flow in a pipeline-rise pipe system. (master’s thesis). The University of Tulsa, Tulsa, OK, United States.
Shazeer, N., Mirhoseini, A., Maziarz, K., Davis, A., Le, Q., Hinton, G., et al. (2017). “Outrageously large neural networks: the sparsely-gated mixture-of-experts layer,” in International conference on learning representations.
Shippen, M., and Bailey, W. (2012). Steady-state multiphase flow - past, present, and future, with a perspective on flow assurance. Energy & Fuels 26, 4145–4157. doi:10.1021/ef300301s
Shmueli, A., Unander, T., and Nydal, O. (2015). “Characteristics of gas/water/viscous oil in stratified-annular horizontal pipe flows,” in Offshore technology conference Brasil (OTC).D021S024R004
Shoham, O. (2006). Mechanistic modeling of gas-liquid two-phase flow in pipes. Richardson, TX: Society of Petroleum Engineers. doi:10.2118/9781555631079
Swamee, P. K., and Jain, A. K. (1976). Explicit equations for pipe-flow problems. J. Hydraulics Div. 102, 657–664. doi:10.1061/jyceaj.0004542
Taitel, Y., and Barnea, D. (1990). Two-phase slug flow (Elsevier). Of Adv. in Heat Transf. 20, 83–132. doi:10.1016/S0065-2717(08)70026-1
Taitel, Y., and Dukler, A. E. (1976). A model for predicting flow regime transitions in horizontal and near horizontal gas-liquid flow. AIChE J. 22, 47–55. doi:10.1002/aic.690220105
Tarantola, A. (2005). Inverse problem theory and methods for model parameter estimation, xii. doi:10.1137/1.9780898717921
Usui, K., and Sato, K. (1989). Vertically downward two-phase flow, (i) void distribution and average void fraction. J. Nucl. Sci. Technol. 26, 670–680. doi:10.1080/18811248.1989.9734366
van der Maaten, L., and Hinton, G. (2008). Visualizing data using t-sne. J. Mach. Learn. Res. 9, 2579–2605. Available online at: http://jmlr.org/papers/v9/vandermaaten08a.html
Vongvuthipornchai, S. (1982). Experimental study of pressure wave propagation in two-phase mixtures. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Vuong, D. H. (2016). Pressure effects on two-phase oil-gas low-liquid-loading flow in horizontal pipes. Ph.D. thesis.
Werbos, P. (1974). Beyond regression: new tools for prediction and analysis in the behavioral sciences. Cambridge: Harvard University. Ph.d. thesis.
Yamaguchi, K., and Yamazaki, Y. (1984). Combinated flow pattern map for cocurrent and countercurrent air-water flows in vertical tube. J. Nucl. Sci. Technol. 21, 321–327. doi:10.1080/18811248.1984.9731053
Yang, J. S. (1996). A study of intermittent flow in downward inclined pipes. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Yuan, G. (2011). Liquid loading of gas wells. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Zheng, G. (1989). Two-phase slug flow in upward pipes. (Ph.D. thesis). The University of Tulsa, Tulsa, OK, United States.
Zhu, L.-T., Chen, X., Ouyang, B., Yan, W.-C., Lei, H., Chen, Z., et al. (2022). Review of machine learning for hydrodynamics, transport, and reactions in multiphase flows and reactors. Industrial & Eng. Chem. Res. 61, 9901–9949. doi:10.1021/acs.iecr.2c01036
Keywords: two-phase flows, simulation, automatic differentiation, machine learning, physics-informed, neural networks, oil and gas production
Citation: Faller AC, Vieira SC and Castro MSd (2026) Steady-state 1D two-phase flow differentiable modeling: learning from field data and inverse problem applications in oil wells. Front. Chem. Eng. 7:1687048. doi: 10.3389/fceng.2025.1687048
Received: 16 August 2025; Accepted: 18 November 2025;
Published: 14 January 2026.
Edited by:
Quinn Reynolds, Mintek, South AfricaReviewed by:
Dongheon Lee, FAMU-FSU Department of Chemical and Biomedical Engineering, United StatesYongfei Xue, Central South University of Forestry and Technology, China
Copyright © 2026 Faller, Vieira and Castro. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Anderson C. Faller, ZmFsbGVyQHBldHJvYnJhcy5jb20uYnI=