Next Article in Journal
A Non-Destructive Deep Learning–Based Method for Shrimp Freshness Assessment in Food Processing
Previous Article in Journal
Pathway Evolution Modeling of Provincial Power Systems Under Multi-Scenario Carbon Constraints: An Empirical Analysis of Guangdong, China
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Dynamic Fitting Method for Wellbore Multiphase Flow with Exponentially Weighted Parameter Updating

1
CNOOC Research Institute, Beijing 100028, China
2
College of Petroleum Engineering, China University of Petroleum-Beijing, Beijing 102249, China
*
Author to whom correspondence should be addressed.
Processes 2025, 13(9), 2894; https://doi.org/10.3390/pr13092894
Submission received: 30 July 2025 / Revised: 3 September 2025 / Accepted: 4 September 2025 / Published: 10 September 2025
(This article belongs to the Section Energy Systems)

Abstract

Accurate dynamic characterization of wellbore multiphase flow is fundamental for production optimization and real-time control in oil and gas wells. Addressing technical constraints of existing dynamic fitting methods, this study proposes a novel dynamic fitting methodology integrating physical mechanisms with exponentially weighted parameter updating. The approach leverages multiphase flow theory to target the liquid holdup factor and friction factor as correction parameters for dynamic fitting. It incorporates Particle Swarm Optimization to achieve rapid and accurate fitting and introduces an Exponentially Weighted Moving Average mechanism to dynamically update parameters. By fusing historical data with real-time data, the Exponentially Weighted Moving Average method balances instantaneous responsiveness with long-term stability. Empirical validation using a dataset from Block XX of a Southern China oilfield demonstrates the superior accuracy of the fitting method under low-to-medium frequency data conditions. During data interruptions or anomalous disturbances, the method maintains high accuracy while exhibiting a low mean relative change percentage; it effectively suppressed the non-physical jumps of the fitting coefficients and maintained stable and accurate fitting.

1. Introduction

In petroleum and natural gas engineering, the wellbore serves as the critical flow conduit connecting subsurface reservoirs to surface production systems. The flow behavior of fluids within the wellbore fundamentally governs key production dynamics (e.g., production rates, pressure profiles, and water cut) of oil and gas wells. The production characteristics of the well, the efficacy of production strategies, and the overall production potential of the well system are directly controlled by the multiphase flow behavior in the wellbore.
Engineers rely on in-depth understanding of multiphase flow physics to establish mathematical models for simulation, aiming to elucidate inherent flow mechanisms and guide optimal production parameter adjustments and scientifically sound production strategies. Consequently, the accurate characterization and profound comprehension of multiphase flow behavior in wellbores constitute the essential scientific foundation and decisive factors for the effectiveness of production optimization and real-time control strategies in oil and gas wells.
Currently, conventional wellbore flow simulation methods in the petroleum industry are predominantly based on traditional multiphase flow theoretical models. While these approaches can achieve reasonable accuracy within specific scenarios, their reliance on static empirical correlations or correction coefficients inherently limits their applicability. Static parameter systems inherently fail to capture dynamic nonlinearities. Consequently, when production conditions exceed their applicable ranges (e.g., as the abrupt gas–liquid ratio increases during late-stage gas production, fluid composition shifts due to intermittent sand production in offshore wells or flow rate step-changes induced by intelligent completion devices), significant deviations arise between calculated results and actual production processes. This severely compromises the reliability of critical decisions including liquid loading warnings and artificial lift optimization.
Digital twin technology offers a promising solution to these challenges. By integrating downhole sensor networks with real-time data assimilation, it creates a dynamic model of wellbore flow conditions. This approach continuously adjusts the simulation results based on measured data from downhole monitoring points during production.
The core of this technology lies in establishing a closed-loop “measurement-calibration-optimization” feedback system. A fitting model with advanced algorithms continuously ingests real-time pressure, temperature, and flow rate data streams from downhole sensors, then dynamically calibrates and updates key model parameters, enhancing computational accuracy.
This dynamic fitting process represents an evolutionary advancement over static multiphase flow models, transcending limitations of fixed empirical formulas or single correction coefficients [1,2]. It enables real-time adaptation to complex, time-varying downhole conditions, ensuring a closer alignment between simulations and actual behavior. The concept of dynamic model fitting and optimization based on real-time data has been extensively researched and validated in petroleum engineering.
In 2010, Zheng and Xu investigated anomalous bottomhole pressure increases during pressure transient tests in high water-cut oilfields. After excluding the production rate and interference effects, they focused on multiphase flow impacts, deriving a new equation from Darcy’s law to improve fitting accuracy [3]. In 2011, Torres-Verdín et al. applied three dimensional (3D) multiphase flow methods to field data, evaluating uncertainties in the permeability estimation caused by wellbore deviation, oil-based mud (OBM) filtrate viscosity, and invasion radius [4].
In 2012 Wang analyzed the accuracy of different computational models in PIPEPHASE software and used a nonlinear solver to fit the Beggs & Brill-Moody (BBM) model, significantly reducing errors compared to measured data [5]. In 2014, Solvang et al. use history-matched actual cleanout data from a long horizontal well in the Oseberg Field, revealing that conventional modeling often underestimates cleanout time due to overly conservative pressure estimating [6]. Liu and Chen developed correction formulas for gas wells in the Daniudi Field by fitting flowing models in PIPESIM software [7].
In 2017, Trzeciak et al. compared power-law, logarithmic, and Prony series methods for fitting shale creep data, demonstrating Prony’s superior accuracy [8]. In 2019, Gao et al. proposed a fluid–solid interaction method with unified shape matching [9]. In 2022, Wang et al. introduced the two dimensional general purpose simulator-powered network model (GPSNet-2D) surrogate model for rapid steam flood optimization [10].
In 2024, Ren et al. applied a novel physics-based, data-driven surrogate model to manage waterflooding in a 1000+ well field [11]. Johansson et al. improved multiphase models using real condensate data from Norwegian fields [12]. Lin et al. developed Random Sampling Consensus–Maximum Projection (RANSAC-MP) for robust fracture plane fitting in noisy microseismical data [13].
However, existing dynamic fitting methods continue to face technical bottlenecks, primarily characterized by high-frequency data dependency and coarse parameter updating strategies. Traditional static fitting methods inherently lack timeliness [6,14,15]. Data-driven dynamic fitting models typically require hourly or even minute-/second-level update frequencies. Yet, in practical oilfield operations, constrained by testing costs and data transmission bandwidth, key parameters are typically collected at intervals ranging from several hours to days [16]. Most current physics-based dynamic fitting approaches employ a full-parameter update strategy. This method struggles to achieve effective fitting when data frequency is insufficient to meet requirements or when recent measured data is absent due to interruptions. Furthermore, under conditions of data anomalies, the strategy’s failure to account for the continuity of historical states leads to overfitting and prediction oscillations.
Against this backdrop, there is an urgent need to develop a dynamic fitting method that integrates physical mechanisms with adaptability to low-frequency, real-time data. This study proposes an approach that incorporates an exponentially weighted dynamic parameter updating mechanism to address the imbalance issue between stability and accuracy that arises when traditional, commonly used fitting models are applied to data with noise. By dynamically integrating historical information with the most recent data, the method achieves fitting results that balance high accuracy with strong stability.

2. Wellbore Multiphase Flow Theoretical Model

Wellbore multiphase flow dynamics form the computational foundation governing oil and gas production systems. The mathematical model integrates mass–momentum–energy conservation equations to characterize gas–liquid multiphase behavior in wells. Current industry-standard design methodologies predominantly employ semi-empirical approaches. These derive theoretical frameworks from laboratory-calibrated correlations of critical parameters, establishing experimentally grounded models engineered for production design applications. These methods calculate the flow profile of the wellbore by means of discretization.
As Figure 1, the computational process involves calculating the pressure gradient for each segment. Iterative computations yield the pressure at the opposite endpoint and the complete pressure profile along the wellbore.

2.1. Multiphase Flow Theoretical Framework

Conventional multiphase flow models consider the oil–gas–water three-phase flow in inclined pipes. The fundamental governing equations are expressed as follows:
Continuity equation:
t ( ρ k α k ) + ( ρ k α k v k ) = S k ( k = gas ,   oil ,   water )
Momentum equation:
t ( ρ k α k v k ) + ( ρ k α k v k v k ) = α k p + ρ k α k g + F k , visc + F k , int
where ρ k , α k , v k are the density, volume fraction (holdup), and velocity vector of phase k (oil, gas, and water), respectively; S k is the interphase mass exchange source term; and F k , visc , F k , int are viscous drag and interphase force terms.
In industrial applications, transient terms ( / t ) and acceleration terms ( ( v k v k ) ) are often neglected, simplifying the system to a steady-state pressure gradient equation. The total pressure gradient is formulated as follows:
d p d z = ρ m g sin θ Gravity + f m ρ m v m 2 2 D Friction + ρ m v m d v m d z Acceleration
In the calculation of pressure drop, temperature influences fluid properties. A theoretical model for the temperature gradient calculation is synchronously constructed. For a steady-state flow, the energy balance can be expressed as follows [17,18]:
d T d z = K L ( T s T i ) C p G m g sin θ C p
where K L is total heat transfer coefficient per unit length of wellbore, W/(m·°C), K L = 13.654 W/(m·K), and the thermal conductivity of the mixture is 0.19 W/(m·K); T s is ambient temperature, °C; T i is the temperature of fluid in the wellbore, °C; C p is the specific heat capacity of fluid at constant pressure, J/(kg·K), C p = 2300 J/(kg·K); G m is the mixed fluid mass flow rate, kg/s; and θ is the angle between the wellbore and the horizontal direction, °.
This gradient decomposes into three components: gravitational, frictional, and acceleration terms. These elements directly determine segmental pressure calculations and consequently govern the wellbore pressure profile. Most multiphase flow models build upon this foundational framework.
Widely adopted models include the Beggs & Brill Model [19], Duns & Ros Model [20], Hagedorn & Brown Model [21], Orkiszewski Model [22], Aziz–Govier–Fogarasi Model [23], Ansari Model [24], and so on.

2.2. Foundation Theoretical Model Construction

The dynamic fitting methodology proposed in this study is built upon theoretical models for wellbore multiphase flow calculations.
The theoretical model is established based on conventional general black-oil models. Black-oil models simplify complex hydrocarbon systems into three pseudo-components: oil, gas, and water, and assume a simple dissolution and exsolution relationship between the oil and gas phases while neglecting detailed compositional phase behavior changes.
In the calculation of the wellbore multiphase flow pressure drop, bottomhole pressure fluctuations will have significant impact in the computational process [25]; it is crucial to account for the impact. The wellbore multiphase flow model developed in this study is based on a steady-state approach, which assumes that bottomhole fluctuations stabilize around a fixed value. Compared to transient models, the steady-state model maintains sufficient accuracy while significantly reducing computational time, thereby providing a responsive foundation for the dynamic fitting framework.
Within this framework, taking the Beggs–Brill model as an example to establish the basic theoretical model, owing to its well-established maturity and broad acceptance in calculating pressure gradients in wellbores. The Beggs–Brill model is capable of effectively adapting to various well types discussed in this paper, including both flowing wells and artificial lift wells such as those equipped with electrical submersible pumps.
In the Beggs–Brill model, the wellbore flow is divided into four different flow patterns (Table 1).
Where boundary parameters L 1 , L 2 , L 3 , L 4 are determined empirically:
L 1 = 316 λ l 0.302
L 2 = 0.0009252 λ l 2.4684
L 3 = 0.10 λ l 1.4516
L 4 = 0.50 λ l 6.738
The no-slip liquid holdup λ l is defined as follows:
λ l = v s l v m
v m = v s l + v s g
The Froude number N F r is given by
N F r = v m 2 g D
where g is the gravitational acceleration, 9.8 m/s2; D is the pipe diameter, m; and v m , v s l , v s g denote mixture, liquid, and gas velocities, m/s. The mixed-flow velocity values for each well are different. In the study, the range of v m is between 0.194 and 0.633 m/s.
The steady-state pressure gradient calculation is
d P d L total = d P d L g + d P d L f + d P d L v
where P is the pressure, Pa; L is the flow path length, m.
Gravitational pressure gradient:
d P d L g = ρ m g sin θ
With mixture density:
ρ m = ρ l H l + ρ g ( 1 H l )
With liquid density:
ρ l = ρ w f w + ρ o ( ρ o f w )
where H l is the dimensionless liquid holdup factor, determined by Table 2; f w is the water cut of liquid; and ρ m , ρ l , ρ g , ρ w are mixture, liquid, gas, and water densities, kg/m3. The density values differ for each well: The oil density falls within the range of 0.84 × 103 to 0.96 × 103 kg/m3, the water density is 1 × 103 to 1.02 × 103 kg/m3, the gas density is 0.64 × 103 to 0.95 × 103 kg/m3, and the viscosity range of the mixture is 12.5 to 205.3 mPa·s. The water cut varies from 0% to 40.74%.
Frictional pressure gradient:
d P d L f = f t p ρ m v m 2 2 D
where f t p is the two-phase friction factor (dimensionless).
Acceleration pressure gradient:
d P d L v = ρ m v m d v m d L
As this theoretical model serves solely as the fitting foundation, detailed derivations of internal components are omitted.

3. Dynamic Fitting Methodology

3.1. Determination of Fitting Target Parameters

The foundational theoretical model identifies target parameters for fitting to correct the total pressure gradient. The fitted pressure drop Δ P is expressed as follows:
Δ P = C f d P d L total             = C f 1 d P d L g + C f 2 d P d L f + C f 3 d P d L v
This iterative curve-fitting process is illustrated in Figure 2. During fitting, the pressure drops ( Δ P ) for the segment following the current pressure point P n are corrected. The corrected pressure drop enables the calculation of the subsequent pressure point P n + 1 .
Directly fitting the total pressure gradient exhibits inherent opacity and may lead to non-convergence when measurement points are sparse or erroneous [15]. To address this, we decompose the total pressure gradient into constituent terms. The fitted theoretical equation becomes
Δ P = C f 1 ( ρ m g sin θ ) + C f 2 ( f t p ρ m v m 2 2 D ) + C f 3 ( ρ m v m d v m d L )
The fitted theoretical equation uses x to represent any parameter in the original formula; x represents the parameter x with the fitted coefficient added:
x = C f x x
The formula can be further simplified as follows:
Δ P = [ ρ m g sin ( θ ) ] + [ f t p ρ m ( v m ) 2 2 D ] + [ ρ m v m ( d v m d L ) ]
based on inversion fitting using field production datasets from Block XX in a Southern China oilfield and employing Sobol global sensitivity analysis.
The Sobol method decomposes the variance of the model output into contributions from individual parameters and their interactions. The model output Y is defined as
Y = f ( X 1 , X 2 , , X k )
where Y is the model output; X i is the i-th input parameter. The first-order sensitivity index S i for parameter X i is defined as
S i = V [ E ( Y | X i ) ] V ( Y )
where V ( Y ) is the total variance of Y ; V [ E ( Y | X i ) ] is the variance of the conditional expectation of Y given X i , representing the independent contribution of X i . The total-order index S T i , which includes all interaction effects involving X i , is given by
S T i = E [ V ( Y | X ~ i ) ] V ( Y )
where E [ V ( Y | X ~ i ) ] is the expectation of the conditional variance of Y given X ~ i ; X ~ i denotes all parameters except X i .
The contribution rate of each parameter to the total pressure gradient was evaluated, considering both impact and modifiability. The result of the sensitivity analysis is shown in Figure 3.
Sensitivity analysis revealed that f t p (friction factor) and ρ m (mixture density) are significantly more suitable as fitting targets than other parameters. ρ m is determined by
ρ m = ρ l H l + ρ g ( 1 H l )
Therefore, H l and f t p are selected as the target parameters, establishing the fitting theoretical model:
P n + 1 = P n + Δ P               = P n + ρ l ( C f 1 H l ) + ρ g [ 1 ( C f 1 H l ) ] g sin θ + ( C f 2 f t p ) ρ m v m 2 2 D + ρ m v m d v m d L
Given that the acceleration term has a negligible impact on the overall pressure gradient calculation, it can be simplified as follows:
P n + 1 = P n + ρ l ( C f 1 H l ) + ρ g [ 1 ( C f 1 H l ) ] g sin θ + ( C f 2 f t p ) ρ m v m 2 2 D

3.2. Optimization Method of Fitting

The multiphase flow fitting is fundamentally a nonlinear optimization problem, aiming to minimize the discrepancy between model-calculated values and measured pressure data:
J ( f t p , H l ) = 1 N i = 1 N P meassure , i P calculate , i ( f t p , H l ) 2
where N is the number of measurement points; P meassure , i and P calculate , i are the measured and calculated pressures at the i-th measurement point, respectively.
This study employs Particle Swarm Optimization (PSO) as the optimization algorithm within the fitting process. Particle Swarm Optimization is a global optimization technique based on swarm intelligence, efficiently searching for optimal solutions within the parameter space by simulating the information-sharing mechanism observed in bird flock foraging behavior. For the wellbore multiphase flow parameter fitting problem, the PSO algorithm achieves the precise fitting of key parameters H l and f t p through swarm intelligence mechanisms:
v i t + 1 = ω v i t + c 1 r 1 ( p i x i t ) + c 2 r 2 ( g x i t ) x i t + 1 = x i t + v i t + 1
where x i t , v i t are the position and velocity of particle i at iteration t ; p i is the historical best position of particle i ; g is the global best position found by the swarm; ω is the inertia weight; c 1 , c 2 are learning factors (cognitive and social coefficients); and r 1 , r 2 are random numbers.
The PSO-based fitting approach demonstrates a better adaptive adjustment of search strategies during the dynamic fitting of the wellbore multiphase flow, enabling the timely capture of parameter evolution trends. The implementation flowchart of the PSO algorithm is shown in Figure 4:
Comparative analysis of the PSO algorithm against traditional fitting optimization algorithms using field production datasets from Block XX in a Southern China oilfield, with evaluation metrics including Time per Fit, Mean Absolute Percentage Error (MAPE), and Root Mean Square Error (RMSE) yielded the results shown in Table 3.
Among the compared methods, the PSO algorithm demonstrated superior performance in both fitting speed and accuracy. Compared to other optimization methods, its swarm intelligence optimization mechanism effectively overcomes the limitations of traditional methods in dynamic scenarios, exhibiting a higher computational efficiency and stronger global search capability. This enables it to find the global optimum solution with fewer iterations.
Applying the established fitting model to the data of two flowing well and two electrical submersible pump (ESP) wells in the production dataset of the XX Block in a southern oilfield in China were fitted. The measured depths of these wells vary from 2995.18 m to 3336.1 m, and the maximum inclination angles range from 0 rad to 1.153 rad—a range that covers most measured depths and maximum inclination angles found in wells throughout the XX Block. The fitting results for the flow profiles in flowing wells are shown in Figure 5, Figure 6, Figure 7 and Figure 8.
The fitting results for the flow profiles in ESP wells are shown in Figure 7 and Figure 8.
Figure 7. Fitting result of pressure profile for ESP well XX25-6.
Figure 7. Fitting result of pressure profile for ESP well XX25-6.
Processes 13 02894 g007
Figure 8. Fitting result of pressure profile for ESP well XX23-5.
Figure 8. Fitting result of pressure profile for ESP well XX23-5.
Processes 13 02894 g008
The fitted curves exhibit good agreement with the measurement points; the fitting method based on the PSO algorithm demonstrates good fitting capabilities in the fitting process of a single time step.
Moreover, the proposed methodology demonstrates strong generalizability across various well types and flow modeling frameworks. This broad applicability arises because the fitting process is essentially based on matching the computed wellbore pressure profile against measured data through the dynamic adjustment of target parameters, namely liquid holdup and the friction factor. As a result, the core fitting mechanism functions independently of the specific well type or flow modeling frameworks, maintaining robustness and universal applicability across diverse modeling conditions.

3.3. Dynamic Fitting Strategy

To cope with the challenges such as discontinuous data acquisition and the robustness of parameter updating in the dynamic fitting of wellbore multiphase flow, the dynamic fitting method employs an adaptive parameter updating mechanism based on the Exponentially Weighted Moving Average (EWMA).
The core objective of this strategy is to enhance model stability under typical disturbance scenarios while maintaining fitting accuracy, achieved by leveraging the historical state memory to weight incoming measurements. When data acquisition is interrupted due to transmission delays or extended testing intervals, traditional fitting methods fail to maintain a stable fitting performance, thus disrupting output continuity. During sensor noise interference or step-change transients, anomalous measurements induce non-physical parameter jumps that amplify prediction errors through the magnitude amplification of the fitted coefficient’s error. The EWMA-based dynamic fitting mechanism systematically mitigates these response lag and instability issues by integrating historical profiles with current measurements via exponential smoothing.
Define the dynamic fitting parameter set C f ( t ) as follows:
C f ( t ) = C f 1 ( t ) C f 2 ( t )
The parameter C f ( t ) update formula is
C f ˜ ( t ) = α C f n e w ( t ) + ( 1 α ) C f ˜ ( t 1 )
In the equation, C f 1 ( t ) , C f 2 ( t ) denote the functional values of parameters C f 1 , C f 2 at time t , respectively; C f n e w ( t ) denotes the current parameter value obtained through real-time fitting; and C f ˜ ( t 1 ) is the smoothed value from the previous iteration. The coefficient α is the smoothing factor.
The smoothing factor α governs the weighting distribution between newly acquired data and historical data. As α 0 , the model operation exhibits increasing reliance on historical data dependency. Conversely, as α 1 , the smoothing process degenerates into a Full-Parameter Update strategy where historical states are disregarded. In the absence of new data arrivals, the model maintains operation using the persistent value C f ˜ ( t 1 ) .

3.4. Evaluation Metrics for Fitting Performance

To comprehensively evaluate the performance of the multiphase flow dynamics fitting method for wellbores, a dual evaluation system that takes into account both accuracy and robustness needs to be established. This paper defines the following two types of indicators: fitting accuracy evaluation metrics (MAPE, RMSE) and the fitting stability evaluation metric (MRCP of the fitting coefficients at the previous and subsequent time points).
Mean Absolute Percentage Error (MAPE):
MAPE = 1 N i = 1 N p measure , i p fit , i p measure , i × 100 %
Root Mean Square Error (RMSE):
RMSE = 1 N i = 1 N p measure , i p fit , i 2
Mean Relative Change Percentage of Fit Coefficient (MRCP-FC):
MRCP-FC = 1 2 C f 1 , t C f 1 , t 1 C f 1 , t 1 + C f 2 , t C f 2 , t 1 C f 2 , t 1 × 100 %
The MRCP-FC is used to calculate the average relative change in the fitted coefficients during dynamic fitting, aiming to evaluate the ability of different methods to remain stable during jumps induced by data interruptions or noise.

3.5. Parameter Settings for the Dynamic Fitting Model

The parameter configuration of the Particle Swarm Optimization (PSO) algorithm and the Exponentially Weighted Moving Average (EWMA) mechanism needs to strike a balance between algorithmic efficiency and engineering robustness. This section presents recommended parameter combinations through fitting based on the production dataset. Through cross-validation and historical data back testing, the recommended parameter combination is presented in Table 4.
The smoothing factor is the core parameter of the EWMA mechanism. Its value needs to respond to data frequency and stability. The sampling interval in the dataset used in this study is 24 h, a frequency achievable by most oilfields in routine production operations. At this sampling frequency, leveraging the complete 180-Day dataset, an analysis was performed to evaluate the impact of different smoothing factors on both fitting accuracy and stability, with the results illustrated in Figure 9.
As the smoothing factor α increases, the model’s MAPE and RMSE decrease, indicating a general improvement in fitting accuracy. Conversely, the MRCP-FC increases, reflecting a gradual reduction in stability due to a greater sensitivity to recent data fluctuations. The results demonstrate that a smoothing factor within the range of 0.3–0.5 strikes a balance between accuracy and stability for regular test data, with an optimal compromise achieved at α = 0.4 for the current dataset. Therefore, a value of α = 0.4 is adopted in the present study.
For high-quality and high-frequency (e.g., sampling interval < 1 h) data scenarios with a high signal-to-noise ratio, it is recommended to suitably increase the value of the smoothing factor (within the range of 0.6–0.8) to enhance the model’s sensitivity and confidence in the most recent data and improve fitting accuracy while maintaining stability. Conversely, for low-quality and high-noise data scenarios with a low signal-to-noise ratio, reducing the value of the smoothing factor (within the range of 0.1–0.2) can decrease sensitivity to recent anomalous data, thereby enhancing stability.
Table 5 proposes a scenario-based parameter adjustment strategy. The specific value of the smoothing factor should be tailored to the actual data characteristics to maintain an optimal balance between accuracy and stability.

4. Fitting Results and Evaluation

4.1. Comparative Analysis of Fitting Results

To rigorously benchmark the proposed exponentially weighted dynamic fitting method (Method C), we conducted systematic comparisons against two conventional strategies:
Static Single Fitting (Method A): Parameters were calibrated once via PSO using the initial measurement averages of the first 90 Days’ data, then fixed throughout subsequent computations. This emulates traditional static models dependent on historical correlations without online updating capacity.
Full-Parameter Update Fitting (Method B): Parameters were globally refitted with PSO upon acquiring new measurements; this strategy represents dynamic methods that pursue instantaneous optimal fitting but ignore historical state continuity.
The experimental dataset comprised historical production data from Block XX in an oilfield in Southern China, covering diverse artificial lift methods and production scenarios. A representative flowing well (XX23-5) was selected to analyze the temporal evolution of the fitting performance.
Figure 10, Figure 11, Figure 12 and Figure 13 compares the fitting results of the three methods at Days 45, 90, 135, and 180 under stable production data.
In the early stage (Day 45, Figure 10), Method A exhibited minor deviations due to stable conditions near the initial fitting period. Method B achieved the highest instantaneous accuracy by using the current measurement point. Method C demonstrated comparable accuracy to Method B. As time went by, production moved on to the next stage (Day 90, Figure 11); Method A showed systematic deviations, and the inflexibility of fixed parameters begins to become apparent. Method B maintained optimal instantaneous fitting. Method C also maintains a high level of accuracy. After a period of production that lasted for a long time (Days 135–180, Figure 12 and Figure 13), Method A’s deviations intensified significantly. Method B continued to deliver optimal instantaneous fits. Method C slightly lagged in pointwise accuracy but effectively tracked overall trends while preserving smoothness and continuity.
To comprehensively assess the performance of the three fitting methods when confronted with missing measured data, the fitting results under simulated data interruption conditions are examined.
Figure 14 illustrates the fitting performance of the three strategies at a time point lacking measured data. Fitted Curve B, reliant on the latest data point as input for its update, cannot perform a parameter update due to the absence of current data, resulting in no valid fitting output at this time point. In contrast, Fitted Curves A and C are less affected. Method A maintains its historical parameter set and outputs a fitting curve unaffected by the current data gap. Method C’s EWMA mechanism continues operation using its existing smoothed parameters when no new data is available.
Figure 15 includes measured data from a subsequent time point. The results demonstrate that the predictions from Method C during the data interruption period align more closely with the subsequent actual measurement point compared to Method A. This indicates that Method C, leveraging its historical memory, maintained a relatively higher predictive accuracy during the data gap.
Abnormal data is used to investigate the fitting performance of the three methods when they encounter obvious abnormal data points caused by sensor noise, transient interference or recording errors.
Figure 16 shows results under abnormal data conditions; the fitting curve generated by Method B displays a pronounced error result due to its susceptibility to the outlier data. Conversely, the other two strategies, by incorporating historical data, effectively mitigated the influence of the abnormal points.

4.2. Evaluation of Fitting Results

Based on the evaluation metrics, this study conducted a quantitative analysis of the performance of the three fitting methods. Figure 17 and Table 6 present the temporal evolution trends of accuracy (MAPE, RMSE) and stability (MRCP-FC) for each strategy.
Table 6 further presents the detailed numerical results comparing the evaluation of accuracy and stability of the three fitting methods.
Regarding accuracy, the exponentially weighted dynamic fitting method (Method C) achieved an average MAPE of 1.32% and RMSE of 0.16 MPa. While slightly higher than Method B, these values are significantly lower than Method A and remain stable throughout the evaluation period. This validates the effectiveness of the EWMA mechanism under low-frequency, real-time data conditions. Regarding stability, Method C exhibited an average MRCP-FC of 26%, representing a substantial reduction compared to the 62% average of Method B (Full-Parameter Update).
The wellbore multiphase flow dynamic fitting method based on exponentially weighted parameter updating achieves a significant enhancement in robustness under discontinuous data conditions at the cost of a controlled and acceptable loss in accuracy. This strategy demonstrates balanced parameter responsiveness and historical memory retention, outperforming the two traditional approaches in typical oilfield scenarios characterized by medium-to-low frequency data acquisition.

5. Conclusions

This study addresses two critical technical bottlenecks in the dynamic fitting of a wellbore multiphase flow—high-frequency data dependency and unstable parameter updating—by proposing an adaptive dynamic fitting method integrating physical mechanisms. Key conclusions are as follows:
  • The article proposes a dynamic fitting method, which is based on the multiphase flow theory model. It uses Particle Swarm Optimization (PSO) as the fitting optimization algorithm and the Exponentially Weighted Moving Average (EWMA) as the update mechanism. After evaluation, this method demonstrates good performance in terms of fitting accuracy and responsiveness.
  • Deployed with low-to-medium frequency field data from Block XX (Southern China oilfield), the method achieves a Mean Absolute Percentage Error (MAPE) of 1.32% and Root Mean Square Error (RMSE) of 0.16 MPa, outperforming static fitting models. Its stability is evidenced by a 26% Mean Relative Change Percentage of Fit Coefficient (MRCP-FC), superior to Full-Parameter Update dynamic fitting approaches.
  • The EWMA mechanism in the dynamic fitting method balances real-time response and long-term stability. In the case of data interruption, it can ensure the normal progress of fitting. In the case of abnormal data, it can better suppress non-physical parameter oscillations and reduce the impact of abnormal data on the fitting.

Author Contributions

Conceptualization, Y.J. and G.H.; Methodology, Y.J., M.W., Y.L. and G.H.; Software, Y.L. and Z.X.; Validation, X.Z.; Formal analysis, X.Z. and X.X.; Investigation, M.W. and T.W.; Resources, M.W., Y.L., T.W. and Z.X.; Data curation, Y.L., T.W., Z.X. and X.X.; Writing—original draft, Y.J. and X.Z.; Writing—review and editing, X.Z. and M.W.; Visualization, X.X.; Supervision, Y.J. and G.H.; Project administration, G.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

Authors Yuchen Ji, Xinrui Zhang, Mingchun Wang, Yupei Liu, Tianhao Wang and Zixiao Xing were employed by CNOOC Research Institute. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
3DThree Dimensional
OBMOil-Based Mud
BBMBeggs & Brill-Moody
GPSNet-2DTwo-Dimensional General-Purpose Simulator-Powered Network Model
RANSAC-MPRandom Sampling Consensus-Maximum Projection
ESPElectrical Submersible Pump
PSOParticle Swarm Optimization
EWMAExponentially Weighted Moving Average
MAPEMean Absolute Percentage Error
RMSERoot Mean Square Error
MRCP-FCMean Relative Change Percentage of Fit Coefficient

References

  1. Landa, J.L.; Guyaguler, B. A Methodology for History Matching and the Assessment of Uncertainties Associated with Flow Prediction. In Proceedings of the SPE Annual Technical Conference and Exhibition, Denver, Colorado, 5–8 October 2003. [Google Scholar]
  2. Peña-Sanchez, Y.; Faedo, N.; Ringwood, J.V. Hydrodynamic Model Fitting for Wave Energy Applications Using Moment-Matching: A Case Study. In Proceedings of the The 28th International Ocean and Polar Engineering Conference, Sapporo, Japan, 10–15 June 2018. [Google Scholar]
  3. Zheng, S.; Xu, W. Calibration of Fluid Models Using Multiphase Well Test Data for Improved History Matching. J. Pet. Sci. Eng. 2010, 75, 168–177. [Google Scholar] [CrossRef]
  4. Torres-Verdín, C.; Angeles, R.; Sepehrnoori, K.; Elshahawi, H. History Matching of Multiphase-Flow Formation-Tester Measurements Acquired with Focused-Sampling Probes in Deviated Wells. Petrophysics—SPWLA J. 2011, 52, 14–31. [Google Scholar]
  5. Wang, D. Verification and Modification of PIPEPHASE Multiphase Flow Calculation Software. Master’s Thesis, China Northeast Petroleum University, Daqing, China, 2012. [Google Scholar]
  6. Solvang, B.; Krogstad, M.K.; Lysne, D.; Ashrafian, A.; Quale, E.A. History Matching the Clean-up of a Well at the Oselvar Field Using a Transient Multiphase Flow Simulator. In Proceedings of the International Petroleum Technology Conference, Doha, Qatar, 19–22 January 2014. [Google Scholar]
  7. Liu, H.; Chen, K. Establishment of PIPESIM Software Correction Formula—Analysis of Methanol Injection Formula for Gas Wells Based on the Daniudi Gas Field D66 Well Area. Chem. Enterp. Manag. 2014, 268, 270. [Google Scholar]
  8. Trzeciak, M.; Sone, H.; Dabrowski, M. Shale Creep Data Extrapolation: Comparing Different Data Fitting Methods and Its Uncertainties. In Proceedings of the 51st U.S. Rock Mechanics/Geomechanics Symposium, San Francisco, CA, USA, 25–28 June 2017. [Google Scholar]
  9. Gao, Y.; Li, S.; Qin, H.; Xu, Y.; Hao, A. An Efficient FLIP and Shape Matching Coupled Method for Fluid–Solid and Two-Phase Fluid Simulations. Vis. Comput. 2019, 35, 1741–1753. [Google Scholar] [CrossRef]
  10. Wang, Z.; Guan, X.; Milliken, W.; Wen, X.-H. Fast History Matching and Robust Optimization Using a Novel Physics-Based Data-Driven Flow Network Model: An Application to a Steamflood Sector Model. SPE J. 2022, 27, 2033–2051. [Google Scholar] [CrossRef]
  11. Ren, G.; Wang, Z.; Lin, Y.; Onishi, T.; Guan, X.; Wen, X.-H. A Fast History-Matching and Optimization Tool and Its Application to a Full Field with More than 1000 Wells. SPE J. 2024, 29, 5538–5558. [Google Scholar] [CrossRef]
  12. Johansson, P.S.; Kjeldby, T.K.; Johnson, G.W.; Valle, A.; Hu, B.; Xu, Z.G.; Wang, X. State of the Art Flow Loop Experiments with Real Fluids to Enable Simulator Matching with Field Conditions. In Proceedings of the ISAVFT 12th North American Conference on Multiphase Production Technology, Banff, Canada, 22–24 May 2024. [Google Scholar]
  13. Lin, E.Z.; Liu, Y.; Pei, X.; Xue, L. RANSAC-MP: A Robust Plane Fitting Algorithm for Noisy Microseismic Data During Hydraulic Fracturing. In Proceedings of the GOTECH, Dubai, UAE, 7–9 May 2024. [Google Scholar]
  14. Guan, X.; Wang, Z.; Ren, G.; Hui, M.; Kazanov, D.; Wen, X.-H. Fast History Matching with a Customized Physics-Based Data-Driven Flow Network Model GPSNet: Application to a Giant Deep-Water Gas Field. In Proceedings of the SPE Annual Technical Conference and Exhibition, New Orleans, LA, USA, 23–25 September 2024. [Google Scholar]
  15. Li, R.; Reynolds, A.C.; Oliver, D.S. History Matching of Three-Phase Flow Production Data. SPE J. 2003, 8, 328–340. [Google Scholar] [CrossRef]
  16. Reynolds, A.C.; Li, R.; Oliver, D.S. Simultaneous Estimation of Absolute and Relative Permeability by Automatic History Matching of Three-Phase Flow Production Data. J. Can. Pet. Technol. 2004, 43, PETSOC-2001-007. [Google Scholar] [CrossRef]
  17. Hasan, A.R.; Kabir, C.S. Wellbore heat-transfer modeling and applications. J. Pet. Sci. Eng. 2012, 86–87, 127–136. [Google Scholar] [CrossRef]
  18. Ramey, H.J. Wellbore Heat Transmission. J. Pet. Technol. 1962, 14, 427–435. [Google Scholar] [CrossRef]
  19. Beggs, D.H.; Brill, J.P. A Study of Two-Phase Flow in Inclined Pipes. J. Pet. Technol. 1973, 25, 607–617. [Google Scholar] [CrossRef]
  20. Duns, H.; Ros, N.C.J. Vertical Flow of Gas and Liquid Mixtures in Wells. In Proceedings of the 6th World Petroleum Congress, Frankfurt am Main, Germany, 19–26 June 1963. [Google Scholar]
  21. Hagedorn, A.R.; Brown, K.E. Experimental Study of Pressure Gradients Occurring During Continuous Two-Phase Flow in Small-Diameter Vertical Conduits. J. Pet. Technol. 1965, 17, 475–484. [Google Scholar] [CrossRef]
  22. Orkiszewski, J. Predicting Two-Phase Pressure Drops in Vertical Pipe. J. Pet. Technol. 1967, 19, 829–838. [Google Scholar] [CrossRef]
  23. Aziz, K.; Govier, G.W. Pressure Drop in Wells Producing Oil and Gas. J. Can. Pet. Technol. 1972, 11, PETSOC-72-03-04. [Google Scholar] [CrossRef]
  24. Ansari, A.M.; Sylvester, N.D.; Sarica, C.; Shoham, O.; Brill, J.P. A Comprehensive Mechanistic Model for Upward Two-Phase Flow in Wellbores. SPE Prod. Facil. 1994, 9, 143–151. [Google Scholar] [CrossRef]
  25. Zhao, K.; Song, W.; Deng, J.; Tan, Q.; Wang, X. Evolution Law of Wellbore Instability Risk under Fluctuating Pressure. Energies 2023, 16, 2948. [Google Scholar] [CrossRef]
Figure 1. Schematic of computational methodology for wellbore multiphase flow theoretical model.
Figure 1. Schematic of computational methodology for wellbore multiphase flow theoretical model.
Processes 13 02894 g001
Figure 2. Schematic of wellbore pressure profile curve fitting process.
Figure 2. Schematic of wellbore pressure profile curve fitting process.
Processes 13 02894 g002
Figure 3. Results of parameter sensitivity analysis based on the inversion and fitting of production data.
Figure 3. Results of parameter sensitivity analysis based on the inversion and fitting of production data.
Processes 13 02894 g003
Figure 4. Implementation flowchart of the PSO algorithm.
Figure 4. Implementation flowchart of the PSO algorithm.
Processes 13 02894 g004
Figure 5. Fitting result of pressure profile for flowing well XX34-4.
Figure 5. Fitting result of pressure profile for flowing well XX34-4.
Processes 13 02894 g005
Figure 6. Fitting result of pressure profile for flowing well XX28-1.
Figure 6. Fitting result of pressure profile for flowing well XX28-1.
Processes 13 02894 g006
Figure 9. Sensitivity of fitting performance under different smoothing factors.
Figure 9. Sensitivity of fitting performance under different smoothing factors.
Processes 13 02894 g009
Figure 10. Comparative fitting results of three strategies under stable production data at Day 45.
Figure 10. Comparative fitting results of three strategies under stable production data at Day 45.
Processes 13 02894 g010
Figure 11. Comparative fitting results of three strategies under stable production data at Day 90.
Figure 11. Comparative fitting results of three strategies under stable production data at Day 90.
Processes 13 02894 g011
Figure 12. Comparative fitting results of three strategies under stable production data at Day 135.
Figure 12. Comparative fitting results of three strategies under stable production data at Day 135.
Processes 13 02894 g012
Figure 13. Comparative fitting results of three strategies under stable production data at Day 180.
Figure 13. Comparative fitting results of three strategies under stable production data at Day 180.
Processes 13 02894 g013
Figure 14. Fitting results under data interruption conditions.
Figure 14. Fitting results under data interruption conditions.
Processes 13 02894 g014
Figure 15. Validation of predictions after data interruption.
Figure 15. Validation of predictions after data interruption.
Processes 13 02894 g015
Figure 16. Fitting results under abnormal data interference conditions.
Figure 16. Fitting results under abnormal data interference conditions.
Processes 13 02894 g016
Figure 17. Comparison curves of accuracy and stability metrics for the three fitting methods.
Figure 17. Comparison curves of accuracy and stability metrics for the three fitting methods.
Processes 13 02894 g017
Table 1. Flow pattern classification criteria in Beggs–Brill model.
Table 1. Flow pattern classification criteria in Beggs–Brill model.
Flow PatternClassification Criterion
Segregated flow λ l < 0.01 N F r < L 1 λ l 0.01 N F r < L 2
Transition flow λ l 0.01 L 2 N F r L 3
Intermittent flow 0.01 λ l < 0.4 L 3 < N F r L 1 λ l 0.4 L 3 < N F r L 4
Distributed flow λ l < 0.4 N F r L 1 λ l 0.4 N F r > L 4
Table 2. Liquid holdup calculation in Beggs–Brill model.
Table 2. Liquid holdup calculation in Beggs–Brill model.
Flow PatternHoldup Calculation Method
Segregated   flow   ( H l 1 ) 0.98 λ l 0.4846 / N F r 0.0868
Transition   flow   ( H l 2 ) H l = A H l 1 + ( 1 A ) H l 3 , A = L 3 N F r L 3 L 2
Intermittent   flow   ( H l 3 ) 0.845 λ l 0.5351 / N F r 0.0173
Distributed   flow   ( H l 4 ) 1.065 λ l 0.5824 / N F r 0.0609
Table 3. Comparative performance of different optimization methods in fitting.
Table 3. Comparative performance of different optimization methods in fitting.
Optimization MethodAvg.
Iterations
Time
Per Fit (s)
MAPE (%)RMSE (MPa)
Particle Swarm Optimization (PSO)824.31.320.16
Genetic Algorithm (GA)21012.72.180.21
Levenberg–Marquardt (LM)351.28.710.89
Simulated Annealing (SA)48019.51.980.24
Conjugate Gradient (CG)1203.15.430.45
Table 4. Key parameter settings for PSO algorithm.
Table 4. Key parameter settings for PSO algorithm.
Parameter ItemValue
Swarm size30
Maximum iterations200
Inertia weight0.9–0.4 (Linearly decreasing)
Cognitive coefficient1.8
Social coefficient1.8
Table 5. Parameter adjustment strategy for smoothing factor.
Table 5. Parameter adjustment strategy for smoothing factor.
Applicable ScenarioParameter Setting
High-quality and high-frequency data0.6–0.8
Regular test data0.3–0.5
Low-quality and high-noise data0.1–0.2
Table 6. Comparative data on accuracy and stability metrics for the three fitting methods.
Table 6. Comparative data on accuracy and stability metrics for the three fitting methods.
MAPE (%)RMSE (MPa)MRCP-FC (%)
TimeABCABCABC
Day 452.08%0.64%1.26%0.560.130.310.0%32.41%20.24%
Day 902.46%0.28%0.60%0.620.070.150.0%79.11%31.54%
Day 1359.33%0.47%1.87%2.020.100.380.0%65.02%21.39%
Day 18016.12%0.92%1.36%3.410.140.230.0%80.82%25.51%
Average
(180 Days)
8.67%0.51%1.32%2.180.100.160.0%62.46%26.17%
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.

Share and Cite

MDPI and ACS Style

Ji, Y.; Zhang, X.; Wang, M.; Liu, Y.; Wang, T.; Xing, Z.; Han, G.; Xiang, X. Dynamic Fitting Method for Wellbore Multiphase Flow with Exponentially Weighted Parameter Updating. Processes 2025, 13, 2894. https://doi.org/10.3390/pr13092894

AMA Style

Ji Y, Zhang X, Wang M, Liu Y, Wang T, Xing Z, Han G, Xiang X. Dynamic Fitting Method for Wellbore Multiphase Flow with Exponentially Weighted Parameter Updating. Processes. 2025; 13(9):2894. https://doi.org/10.3390/pr13092894

Chicago/Turabian Style

Ji, Yuchen, Xinrui Zhang, Mingchun Wang, Yupei Liu, Tianhao Wang, Zixiao Xing, Guoqing Han, and Xiaolong Xiang. 2025. "Dynamic Fitting Method for Wellbore Multiphase Flow with Exponentially Weighted Parameter Updating" Processes 13, no. 9: 2894. https://doi.org/10.3390/pr13092894

APA Style

Ji, Y., Zhang, X., Wang, M., Liu, Y., Wang, T., Xing, Z., Han, G., & Xiang, X. (2025). Dynamic Fitting Method for Wellbore Multiphase Flow with Exponentially Weighted Parameter Updating. Processes, 13(9), 2894. https://doi.org/10.3390/pr13092894

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop