A method and system for predicting multiphase flow parameters in wellbore
Patent Information
- Application Number
- CN202610983057.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2046-07-03
AI Technical Summary
[0006]有鉴于此,本发明提供了一种井筒多相流动参数预测方法及系统,面向控压钻井节流阀开度变化工况,融合稀疏观测、物理约束和节流阀开度工况信息,对井筒多相流动参数进行预测,克服现有井筒多相流动参数预测方法存在计算效率低、对井筒内部完整观测数据依赖强、对节流阀开度变化工况泛化能力不足以及预测结果物理一致性较差等问题
1.本发明将节流阀动态开度曲线特征引入物理约束算子学习模型,用于表征不同节流阀调控方案下开度随时间变化的过程。通过该方式,模型能够学习节流阀开度变化路径与井筒多相流动参数瞬态响应之间的映射关系,从而提高对未参与训练节流阀调控工况下井筒压力、含气率、持液率、气体速度和液体速度的预测能力。
Smart Images

Figure CN122508524B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil and gas drilling engineering technology, and more specifically to a method and system for predicting multiphase flow parameters in wellbore. Background Technology
[0002] Controlled pressure drilling (CPD) is a drilling technique that maintains bottom hole pressure within a safe window between formation pore pressure and fracture pressure by precisely adjusting parameters such as wellhead back pressure, drilling fluid flow rate, and choke valve opening. Compared to conventional drilling, CPD can more effectively handle complex conditions such as narrow density windows, abnormally high pressure, gas intrusion, leakage, and wellbore instability, and has significant application value in drilling deep water, deep formations, ultra-deep formations, and formations with complex pressure systems.
[0003] In controlled pressure drilling, two-phase or multiphase flows often occur within the wellbore, formed by the interaction of drilling fluid, formation gas, and formation fluids. When formation gas intrudes into the wellbore, it travels upwards in the annulus with the drilling fluid, influenced by factors such as pressure, temperature, well depth, flow velocity, choke valve opening, and wellhead back pressure. This results in significant changes in the gas content, liquid holdup, gas velocity, liquid velocity, and pressure distribution within the wellbore. These multiphase flow parameters directly affect bottomhole pressure prediction, early gas intrusion identification, well control risk assessment, and choke valve control strategy formulation. Therefore, accurate and rapid prediction of wellbore multiphase flow parameters is a crucial foundation for achieving refined control and safe drilling in controlled pressure drilling.
[0004] In recent years, data-driven methods such as neural networks have been increasingly applied to wellbore flow parameter prediction. These methods can establish a mapping relationship between input conditions and output flow fields using historical or numerical simulation data, offering relatively fast prediction speeds. However, conventional data-driven models typically rely on a large number of high-quality training samples. When wellbore measurement data is sparse, operating condition coverage is insufficient, or throttle valve opening changes, the model is prone to insufficient generalization ability. Furthermore, some existing intelligent prediction methods are usually based on a single operating condition or fixed boundary conditions, failing to adequately characterize the variation patterns of multiphase flow parameters in the wellbore under different throttle valve opening conditions.
[0005] Therefore, in view of the shortcomings of the existing technology, how to provide a method and system for predicting multiphase flow parameters in wellbore, so as to achieve rapid prediction of parameters such as wellbore pressure, gas content, liquid holdup and gas-liquid velocity under different throttle valve opening conditions during controlled pressure drilling, and improve the stability, generalization ability and physical consistency of the prediction results, is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] In view of this, the present invention provides a method and system for predicting multiphase flow parameters in wellbore, which is designed for the condition of throttle valve opening variation in controlled pressure drilling. It integrates sparse observations, physical constraints and throttle valve opening condition information to predict multiphase flow parameters in wellbore, and overcomes the problems of existing multiphase flow parameter prediction methods in wellbore, such as low computational efficiency, strong dependence on complete observation data inside the wellbore, insufficient generalization ability for throttle valve opening variation conditions and poor physical consistency of prediction results.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: a method for predicting multiphase flow parameters in wellbore, comprising: Acquire multiphase flow data in the wellbore under different throttle valve opening control conditions during controlled pressure drilling; The wellbore multiphase flow data is preprocessed to form a two-dimensional data field of well depth-time under the corresponding wellbore opening control condition; Based on the well depth-time two-dimensional data field, a well depth-time solution domain is constructed, and a throttle valve opening control condition feature vector is generated; Based on the well depth-time solution domain and the characteristic vector of the throttle valve opening control condition, a physical constraint operator learning model based on the backbone network and branch network is constructed, and the physical constraint operator learning model is trained. Based on the trained physical constraint operator learning model, predict the wellbore multiphase flow parameters at the corresponding well depth and time, and output the prediction results of the wellbore multiphase flow parameters.
[0008] Preferably, the throttle valve opening control condition is characterized by a dynamic opening curve of the throttle valve opening changing over time; the dynamic opening curve is one or more of the following: a preset throttle valve control command, a throttle valve opening time series collected on-site, or numerical simulation operating condition data. The dynamic opening curve of the throttle valve is expressed as follows: ; in, This is the dynamic opening curve of the throttle valve. This is a time series of throttle valve opening. For the first Each sampling time, For the corresponding throttle valve opening, The number of sampling points for aperture. This indicates an interpolation or resampling operation.
[0009] Preferably, the expression for the well depth-time solution domain is as follows: ; in, This represents the well depth coordinates within the given wellbore solution domain. Indicates the calculation time during controlled pressure drilling; The feature vector of the throttle valve opening control condition is input into the branch network to characterize the current throttle valve opening control condition. Well depth coordinates and time coordinates The data is input to the backbone network to determine the spatiotemporal query location under the current throttle valve opening control condition.
[0010] Preferably, the backbone network is a trunk network and the branch network is a branch network; The Branch and Trunk networks output the corresponding modal coefficients and spatiotemporal basis functions, respectively, and the predicted values of the wellbore multiphase flow parameters are obtained by combining the modes.
[0011] Preferably, the expression for the physical constraint operator learning model is as follows: ; In the formula, For the first One predictor variable, For well depth coordinates, The time coordinate is denoted as U, and the operating condition characteristic input is denoted as U. The first output of the branch network Modal coefficients, The first output of the backbone network One spatiotemporal basis function, This represents the number of modes.
[0012] Preferably, when training the physical constraint operator learning model, multiple loss functions are constructed for joint optimization, including sparse internal observation loss, initial condition loss, boundary condition loss, boundary flux loss, and physical residual loss. The total loss function is constructed by weighting and combining the sparse internal observation loss, initial condition loss, boundary condition loss, boundary flux loss, and physical residual loss: ; In the formula, , , , , These represent the sparse internal observation loss, initial condition loss, boundary condition loss, boundary flux loss, and physical residual loss, respectively. , , , , These are the weighting coefficients for different loss terms; The parameters of the branch network and the backbone network are updated iteratively by optimizing the algorithm until the total loss function meets the convergence condition, and the trained physical constraint operator learning model is saved.
[0013] Preferably, the physical residual loss includes gas phase mass conservation residual, liquid phase mass conservation residual, mixing momentum equation residual, and drift flow closure relation residual, expressed as follows: ; In the formula, , , , These are respectively expressed as the residuals of gas phase mass conservation, liquid phase mass conservation, mixing momentum equation, and drift flow closure relation. , , , These are the weighting coefficients for each physical residual loss.
[0014] Preferably, a wellbore multiphase flow parameter prediction system includes: The data acquisition module is used to acquire multiphase flow data in the wellbore under different throttle valve opening control conditions during controlled pressure drilling. The preprocessing module is used to preprocess the multiphase flow data in the wellbore to form a two-dimensional data field of well depth-time under the corresponding opening change conditions. The feature vector generation module is used to construct a well depth-time solution domain based on the well depth-time two-dimensional data field and generate a feature vector for the throttle valve opening control condition. The model building and training module is used to construct a physical constraint operator learning model based on the trunk network and branch network according to the well depth-time solution domain and the characteristic vector of the throttle valve opening control condition, and to train the physical constraint operator learning model. The prediction result output module is used to predict the wellbore multiphase flow parameters at the corresponding well depth and time based on the trained physical constraint operator learning model, and output the prediction results of the wellbore multiphase flow parameters.
[0015] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method and system for predicting multiphase flow parameters in wellbore, which has the following beneficial effects: 1. This invention incorporates the dynamic opening curve characteristics of a throttle valve into a physical constraint operator learning model to characterize the time-varying process of the opening under different throttle valve control schemes. In this way, the model can learn the mapping relationship between the throttle valve opening change path and the transient response of wellbore multiphase flow parameters, thereby improving the predictive ability for wellbore pressure, gas content, liquid holdup, gas velocity, and liquid velocity under throttle valve control conditions not involved in training.
[0016] 2. This invention integrates a small amount of observation data inside the wellbore, initial conditions, wellhead boundary conditions, bottom boundary conditions, and residuals of the multiphase flow control equations, reducing the dependence on complete flow field data inside the wellbore. It is suitable for situations where measurable data inside the wellbore is limited during actual controlled pressure drilling.
[0017] 3. This invention introduces the conservation of gas phase mass, the conservation of liquid phase mass, the mixed momentum equation, and the drift flow closure relationship as physical constraints, which improves the physical consistency of the prediction results and reduces the generation of non-physical prediction results.
[0018] 4. This invention constrains the mass flow rates of the gas and liquid phases at both ends of the wellbore by limiting the boundary flux loss, thereby maintaining coordination between the pressure, phase content and phase velocity at the boundary and improving the consistency of mass conservation of the predicted results at the wellbore inlet and outlet.
[0019] 5. After training, this invention can quickly output parameters such as wellbore pressure, gas content, liquid holdup, gas velocity, and liquid velocity under a given well depth, time, and throttle valve opening control scheme, which helps to improve the efficiency of wellbore state prediction and throttle valve control scheme evaluation during pressure controlled drilling. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of a wellbore multiphase flow parameter prediction method provided in an embodiment of the present invention.
[0022] Figure 2 A schematic diagram of the DeepONet network structure for throttle valve control conditionalization provided in an embodiment of the present invention.
[0023] Figure 3 This is a schematic diagram of training and leave-one-out verification for multi-throttle valve control conditions provided in an embodiment of the present invention.
[0024] Figure 4 This is a schematic diagram of the wellhead pressure changing over time, provided for an embodiment of the present invention.
[0025] Figure 5 This is a schematic diagram of the bottom hole pressure versus time curve provided in an embodiment of the present invention. Detailed Implementation
[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] This invention discloses a method for predicting multiphase flow parameters in wellbores, such as... Figure 1 As shown, it includes: Acquire multiphase flow data in the wellbore under different throttle valve opening control conditions during controlled pressure drilling; The wellbore multiphase flow data is preprocessed to form a two-dimensional data field of well depth-time under the corresponding wellbore opening control condition; Based on the well depth-time two-dimensional data field, a well depth-time solution domain is constructed, and a throttle valve opening control condition feature vector is generated; Based on the well depth-time solution domain and the characteristic vector of the throttle valve opening control condition, a physical constraint operator learning model based on the backbone network and branch network is constructed, and the physical constraint operator learning model is trained. Based on the trained physical constraint operator learning model, predict the wellbore multiphase flow parameters at the corresponding well depth and time, and output the prediction results of the wellbore multiphase flow parameters.
[0028] This invention provides a method for transient prediction of gas-liquid two-phase flow parameters in wellbore during controlled pressure drilling.
[0029] Specifically, acquiring multiphase flow data in controlled-pressure drilling wellbore includes: Acquire multiphase flow data in the wellbore under different throttle valve opening control conditions. The data includes one or more of the following: well depth coordinates, time coordinates, throttle valve opening time series, wellhead pressure, bottom hole pressure, gas flow rate, liquid flow rate, gas content, liquid holdup, gas velocity, liquid velocity, wellbore pressure, and temperature.
[0030] Specifically, the throttle valve opening control condition is characterized by a dynamic opening curve showing the change of the throttle valve opening over time; the dynamic opening curve is one or more of the following: a preset throttle valve control command, a throttle valve opening time series collected on-site, or numerical simulation operating condition data; the dynamic opening curve can be obtained from a preset throttle valve control command, a throttle valve opening record collected on-site, or numerical simulation operating condition data. Let the throttle valve opening time series be:
[0031] in, For the first Each sampling time, This represents the throttle valve opening at the corresponding moment. This represents the number of sampling points for the aperture. The value at any given time can be obtained through interpolation or resampling methods. The throttle valve opening degree, the dynamic opening curve of the throttle valve is expressed as: ; in, This is the dynamic opening curve of the throttle valve. This is a time series of throttle valve opening. For the first Each sampling time, For the corresponding throttle valve opening, The number of sampling points for aperture. This indicates an interpolation or resampling operation.
[0032] Wellhead boundary conditions can be obtained from wellhead pressure gauges, gas flow meters, and liquid flow meters; bottomhole boundary conditions can be determined from bottomhole pressure, formation pressure interpretation results, bottomhole inflow models, measurement-while-drilling (MWD) data, or logging interpretation data; sparse observation data inside the wellbore can be provided by MWD tools, wellbore sensors, or numerical simulation data. The wellbore multiphase flow data, after processing, forms a depth-time two-dimensional data field corresponding to varying operating conditions, which is used to subsequently construct initial conditions, boundary conditions, sparse internal observation points, and physical residual points.
[0033] Specifically, based on the wellbore spatial range and the calculation time range, a two-dimensional solution domain of well depth-time is established, and the expression of the well depth-time solution domain is as follows: ; in, This represents the well depth coordinates within the given wellbore solution domain. The calculation time indicates the time during controlled pressure drilling; the well depth coordinates are used to describe the multiphase flow state at different spatial locations within the same wellbore depth range, and do not mean that the model can be directly generalized to wellbores of any different total depth.
[0034] Based on establishing the well depth-time solution domain, a characteristic vector of the throttle valve opening control condition is constructed. It is used to characterize the change path of different throttle valve openings and the physical parameters of the wellbore.
[0035] Let the time series of the throttle valve opening be: ; in, For the first Each aperture sampling time, This represents the throttle valve opening at the corresponding moment. This represents the number of sampling points for the throttle valve opening. The throttle valve opening time series is interpolated, resampled, and normalized to obtain a fixed-length opening curve sampling vector: ; In the formula, The standardized time point after resampling. This represents the number of sampling points for the opening curve.
[0036] Furthermore, the feature parameters of the opening curve can be extracted based on the sampling vector of the dynamic opening curve: ; The curve characteristic parameters are used to characterize one or more of the following: initial level, final level, amplitude of change, direction of change, timing of change, and degree of fluctuation of the throttle valve's dynamic opening curve. Based on this, a characteristic vector for the throttle valve's dynamic opening control condition is constructed: ; In the formula, The input branch network is the throttle valve opening control condition feature vector. For sampling of the opening curve, These are the characteristic parameters of the opening curve.
[0037] When inputting the model, the feature vector of the throttle valve opening control condition is used. The input is sent to the branch network to characterize the current throttle valve opening control condition; Well depth coordinates and time coordinates The data is input to the backbone network to determine the spatiotemporal query location under this operating condition. Through this method, the model can distinguish between different throttle valve opening control schemes and predict the multiphase flow parameters of the wellbore at the corresponding well depth and time.
[0038] Specifically, such as Figure 2 As shown, the backbone network adopts a trunk network, and the branch network adopts a branch network; The Branch and Trunk networks output the corresponding modal coefficients and spatiotemporal basis functions, respectively, and the predicted values of the wellbore multiphase flow parameters are obtained by combining the modes.
[0039] Specifically, the expression for the physical constraint operator learning model is as follows: ; In the formula, For the first One predictor variable, For well depth coordinates, Using time as the coordinate, This is the input for the operating condition characteristics, specifically the characteristic vector of the throttle valve opening control operating condition. The first output of the branch network Modal coefficients, The first output of the backbone network One spatiotemporal basis function, This represents the number of modes.
[0040] Specifically, the output variable constraint relationship is constructed, including: constraining the model output variables to ensure that the prediction results satisfy the basic physical relationship.
[0041] The gas holdup is restricted to between 0 and 1 through a nonlinear mapping, and the liquid holdup is obtained by closing the gas holdup: ; In the formula, For gas content, This refers to the liquid holdup.
[0042] Gas velocity, liquid velocity, and pressure are limited to reasonable physical ranges through range mapping to reduce the occurrence of non-physical values in the prediction results.
[0043] Specifically, when training the physical constraint operator learning model, multiple loss functions are constructed for joint optimization. The loss functions include sparse internal observation loss, initial condition loss, boundary condition loss, boundary flux loss, and physical residual loss.
[0044] Specifically, constructing a sparse internal observation loss includes: A sparse internal observation dataset is established by selecting a small number of observation points within the wellbore solution domain. These sparse internal observation points include one or more of the following at different well depths and time points: gas content, liquid holdup, gas velocity, liquid velocity, and pressure.
[0045] Sparse internal observation points were selected using a depth-time stratified sampling method, and supplemented by sampling in areas with active gas content and areas with large pressure gradient changes, in order to improve the ability of a small number of internal observation points to characterize the main flow characteristics of the wellbore.
[0046] Based on the error between the model predictions and the sparse internal observations, a sparse internal observation loss is constructed: ; In the formula, variables marked with "^" represent model predictions, while variables without "^" represent observed or labeled values.
[0047] Specifically, the initial condition loss and boundary condition loss are constructed, including: Based on the initial flow state in the wellbore, initial condition losses are constructed. The initial conditions include one or more of the following: initial pressure distribution, initial gas content distribution, initial liquid holdup distribution, initial gas velocity, and initial liquid velocity. The initial conditional loss can be expressed as: .
[0048] Boundary condition losses are constructed based on the boundary data at the bottom and top of the well. The bottom boundary conditions include one or more of the following: bottom hole pressure, formation inflow rate, gas inflow velocity, or bottom hole phase velocity; the wellhead boundary conditions include one or more of the following: wellhead pressure, wellhead gas flow rate, wellhead liquid flow rate, gas velocity, and liquid velocity.
[0049] The boundary condition loss can be expressed as: ; In the formula, Indicates the loss at the bottom boundary of the well. This indicates the loss at the wellhead boundary.
[0050] Specifically, the boundary flux loss is constructed, including: To enhance the mass conservation constraint of the gas and liquid phases at the two ends of the wellbore, the gas phase mass flux and liquid phase mass flux are calculated based on the pressure, phase content, phase velocity, and annular flow cross-sectional area at the boundary.
[0051] The gas phase mass flux is expressed as: ; The liquid phase mass flux is expressed as: ; In the formula, For gas density, For the density of the liquid, For gas velocity, For liquid velocity; It represents the cross-sectional area of the annular flow channel.
[0052] Based on the error between the predicted flux and the measured or converted flux at the boundary, the boundary flux loss is constructed: ; By constraining the flow rate at the bottom and top of the well using the boundary flux loss model, the quality conservation properties of the prediction results are enhanced.
[0053] Specifically, the residual loss of the wellbore gas-liquid two-phase flow control equations is constructed, including: Based on the gas-liquid two-phase flow mechanism in the wellbore, physical residual losses are constructed. These physical residual losses include gas phase mass conservation residuals, liquid phase mass conservation residuals, mixing momentum equation residuals, and drift flow closure relation residuals. The physical residual points do not require actual flow field labels. Instead, the gas holdup, liquid velocity, gas velocity, liquid velocity, and pressure predicted by the model are substituted into the governing equations, and their partial derivatives with respect to well depth and time are calculated using automatic differentiation, bringing the residuals of each governing equation close to zero.
[0054] The gas phase mass conservation residual is: ; The liquid phase mass conservation residual is: ; The residual of the mixed momentum equation is: ; In the formula, For mixed density, This is the friction term.
[0055] The residual of the drift flow closure relation is: ; In the formula, The distribution coefficient, This represents the gas slip velocity.
[0056] Specifically, the physical residual loss includes the gas phase mass conservation residual, the liquid phase mass conservation residual, the mixing momentum equation residual, and the drift flow closure relation residual, expressed as follows: ; In the formula, , , , These are respectively expressed as the residuals of gas phase mass conservation, liquid phase mass conservation, mixing momentum equation, and drift flow closure relation. , , , These are the weighting coefficients for each physical residual loss.
[0057] Specifically, physical residual points are sampled within the continuous throttle valve opening space, including: Continuous throttle valve opening values are randomly generated within the training throttle valve opening range, and physical residual points are sampled within the well depth-time-throttle valve opening space.
[0058] The physical residual points do not need to correspond to actual internal observation labels. Instead, the partial derivatives with respect to well depth and time are output by the automatic differential calculation model and substituted into the gas phase mass conservation equation, liquid phase mass conservation equation, mixed momentum equation and drift flow closure relation to calculate the residuals.
[0059] By sampling physical residual points within the continuous throttle valve opening space, the model not only learns the flow patterns under existing discrete throttle valve opening conditions, but also improves its generalization prediction ability for throttle valve opening conditions not involved in the training.
[0060] Specifically, such as Figure 3As shown, the total loss function is constructed by weighting and combining the sparse internal observation loss, initial condition loss, boundary condition loss, boundary flux loss, and physical residual loss: ; In the formula, , , , , These represent the sparse internal observation loss, initial condition loss, boundary condition loss, boundary flux loss, and physical residual loss, respectively. , , , , These are the weighting coefficients for different loss terms; The parameters of the branch network and the backbone network are updated iteratively by optimizing the algorithm until the total loss function meets the convergence condition, and the trained physical constraint operator learning model is saved.
[0061] In one specific embodiment of the present invention, the Adam optimization algorithm is used to train the Branch network and the Trunk network. During training, a cosine learning rate decay strategy is employed to gradually reduce the learning rate, and gradient pruning is used to limit the gradient norm, preventing gradient explosion during training. Simultaneously, in the initial training phase, sparse observation data loss is prioritized, followed by a gradual increase in the weights of the gas phase mass conservation residual, liquid phase mass conservation residual, mixed momentum equation residual, and drift flow closure residual, enabling the model to gradually satisfy physical constraints while maintaining data fitting capability. After training, the Branch network, Trunk network, and their normalized parameters are saved for subsequent prediction model calls.
[0062] Specifically, predicting the opening condition of an untrained throttle valve includes: After the model training is completed, the feature vector of the target throttle valve opening control condition will be... The input is fed into the trained Branch network to determine the target well depth location. and target time The input is fed into the trained Trunk network, and after modal combination, the output is the prediction results of the wellbore multiphase flow parameters under the corresponding wellbore opening change control conditions, including gas content, liquid holdup, gas velocity, liquid velocity and pressure.
[0063] The prediction process can be represented as follows: ; The target wellbore opening control condition can be either a condition used in training or a condition not used in supervised training. To verify the model's predictive ability for wellbore opening control conditions not used in training, a leave-one-out verification method can be adopted. That is, one condition is selected from multiple conditions as the verification condition, and the remaining conditions are used as training conditions. After training, the multiphase flow parameters of the verification wellbore are directly predicted.
[0064] In one specific embodiment of the present invention, a wellbore multiphase flow parameter prediction system includes: The data acquisition module is used to acquire multiphase flow data in the wellbore under different throttle valve opening control conditions during controlled pressure drilling. The preprocessing module is used to preprocess the multiphase flow data in the wellbore to form a two-dimensional data field of well depth-time under the corresponding opening change conditions. The feature vector generation module is used to construct a well depth-time solution domain based on the well depth-time two-dimensional data field and generate a feature vector for the throttle valve opening control condition. The model building and training module is used to construct a physical constraint operator learning model based on the trunk network and branch network according to the well depth-time solution domain and the characteristic vector of the throttle valve opening control condition, and to train the physical constraint operator learning model. The prediction result output module is used to predict the wellbore multiphase flow parameters at the corresponding well depth and time based on the trained physical constraint operator learning model, and output the prediction results of the wellbore multiphase flow parameters.
[0065] This invention, through acquiring initial conditions, wellhead boundary conditions, bottom hole boundary conditions, and a small amount of wellbore internal observation data under different choke valve opening variations during controlled pressure drilling, combines the wellbore gas-liquid two-phase flow mass conservation equation, mixing momentum equation, and drift flow closure relationship to construct a physical constraint operator learning model for choke valve opening variation conditions. The bottom hole boundary conditions can be determined from bottom hole pressure, formation pressure interpretation results, bottom hole inflow models, or measurement-while-drilling (MWD) data; the wellhead boundary conditions can be obtained from wellhead pressure gauges, gas flow meters, and liquid flow meters; and the sparse observation points inside the wellbore can be provided by MWD tools, wellbore sensors, or numerical simulation data.
[0066] This invention uses the dynamic opening curve of the throttle valve and its opening trajectory characteristic parameters as operating condition inputs to characterize the path of opening change over time under different throttle valve control schemes. Wellbore structural parameters, fluid property parameters, and drift flow parameters are used as physical constraints and model calculation parameters. Well depth and time are used as spatiotemporal query inputs to output multiphase flow parameters such as wellbore gas content, liquid holdup, gas velocity, liquid velocity, and pressure. The dynamic opening curve of the throttle valve can be obtained from preset throttle valve control commands, field-collected throttle valve opening records, or numerical simulation operating condition data. The opening trajectory characteristic parameters describe one or more of the following: initial state, termination state, change amplitude, change direction, change rate, and fluctuation degree of the dynamic opening curve of the throttle valve. By jointly optimizing sparse observation loss, initial condition loss, boundary state loss, boundary flux loss, and the residual of the multiphase flow control equation, rapid prediction and spatiotemporal reconstruction of wellbore multiphase flow parameters under dynamic throttle valve control conditions are achieved.
[0067] This embodiment corresponds to a DeepONet program implementation with one verification step for throttle valve control conditions. Its focus is on explaining the specific operational steps of the present invention in the actual data reading, sample construction, model training and verification prediction process.
[0068] This embodiment selects gas-liquid two-phase flow data from a controlled-pressure drilling well as the training and verification object. The data includes 46 sets of throttle valve opening control conditions. Each set of conditions includes data such as well depth, time, gas density, gas cut, liquid holdup, gas velocity, liquid velocity, pressure, and temperature, as shown in Table 1.
[0069] Table 1. Throttling Valve Opening Adjustment Data
[0070] In this embodiment, the throttle valve variation condition of 60%→90% for 30 minutes is used as the validation condition by default, and the remaining conditions are used as training conditions. The validation condition is only used for prediction evaluation after training and does not participate in the internal supervision loss, initial condition loss, boundary condition loss, and boundary flux loss. In actual implementation, any other condition can be designated as a leave-one-out validation object by specifying a validation condition number.
[0071] 1. Data Reading and Preprocessing
[0072] First, 46 sets of training wellbore opening conditions and 1 set of verification wellbore multiphase flow data under varying opening conditions were read. Each set of data included: well depth coordinates, time coordinates, gas cut, liquid holdup, gas velocity, liquid velocity, wellbore pressure, and temperature. After reading the data, all physical field variables were uniformly organized into a two-dimensional well depth-time matrix form. ; ; ; ; ; Determine the global well depth range, time range, velocity range, and pressure range based on all training condition data: ; ; ; Simultaneously, the temperature of the gas state equation is determined based on the average value of the temperature field under training conditions. It is used for gas density calculation.
[0073] 2. Physical parameter settings
[0074] In this embodiment, the parameters for gas-liquid two-phase flow in the wellbore are set as follows: The wellbore geometry parameters are set as follows: .
[0075] In this embodiment, the Fanning friction coefficient The gas density is calculated using the ideal gas law: ; in, , , .
[0076] 3. Construct a DeepONet model for conditionalizing the throttle valve opening.
[0077] Construct a DeepONet model for throttle valve opening conditionalization, consisting of a Branch network and a Trunk network. The Branch network is used to input operating condition features. Trunk networks are used to input query variables: ; In the formula, For well depth coordinates, For time coordinates.
[0078] The branch network inputs the dynamic opening curve encoding features of the throttle valve, and its input dimension is determined by the number of sampling points N of the opening curve. q Number of opening trajectory characteristic parameters N f Determined jointly. In this embodiment, N is taken as N. q =121、N f=19, therefore the Branch input dimension is 140. The Trunk network inputs well depth coordinates and time coordinates X=[x,t], with an input dimension of 2. The model outputs five wellbore multiphase flow parameters: gas content, liquid holdup, gas velocity, liquid velocity, and pressure, with a mode number M=48.
[0079] The Branch network contains 3 hidden layers, each with 128 neurons; the Trunk network contains 6 hidden layers, each with 128 neurons. The activation function used is the hyperbolic tangent function. .
[0080] The model outputs wellbore multiphase flow parameters through a modal combination of Branch and Trunk networks: ; in, To predict gas content, To predict liquid holdup, To predict gas velocity, To predict liquid velocity, To predict stress.
[0081] Its modal combination form is: ; In the formula, For modal number, The first output of the Branch network Modal coefficients, The first output of the Trunk network One spatiotemporal basis function.
[0082] 4. Output variable constraints
[0083] The original model output is transformed nonlinearly to obtain physical variables. The gas content Eg is constrained to between 0 and 1 by the Sigmoid function, and the liquid holdup El is forced to be obtained by El = 1 - Eg. Gas velocity, liquid velocity, and pressure are mapped to reasonable physical ranges based on the range in the training data to reduce non-physical predictions.
[0084] 5. Construct training samples
[0085] For each training scenario, construct the following training samples: (1) Internal monitoring points: Layered sampling is performed in the well depth-time two-dimensional field, and points are added in combination with the active gas content area and the area with significant pressure gradient change; in this embodiment, the total number of internal monitoring points for the training conditions is 30,000.
[0086] (2) Initial condition points: Extract Eg, El, vg, vl and P at the full well depth at time t=t0.
[0087] (3) Boundary state points: Extract Eg, El, vg, vl and P at each time point from the first end x1 and the second end xN of the wellbore.
[0088] (4) PDE virtual residual points: The residual points are evenly distributed according to the training conditions, and random sampling is performed within the well depth-time range. At the same time, the corresponding conditions U are copied. In this embodiment, the total number of PDE residual points for multiple training conditions is 60,000.
[0089] 6. Construct the loss function
[0090] During training, the following losses are calculated simultaneously: internal supervision loss, initial condition loss, end boundary state loss, end boundary flux loss, gas phase mass conservation loss, liquid phase mass conservation loss, mixed momentum equation loss, and drift flow closure loss.
[0091] In the boundary flux loss, the gas phase mass flow rate and the liquid phase mass flow rate are respectively determined by... and Calculate and construct the loss using the normalized mean square error between the predicted flux and the target flux.
[0092] PDE virtual residuals have no real labels. The training objective is not to fit a real pressure or phase content value, but to make the gas phase mass conservation residual, liquid phase mass conservation residual, mixing momentum equation residual, and drift flow closure residual approach zero.
[0093] 7. Model Training
[0094] In this embodiment, the Adam optimization algorithm is used to train the Branch and Trunk networks, with a maximum of 12,000 iterations and an initial learning rate of 2 × 10⁻⁶. -3 The terminal learning rate is 1×10 -5 The learning rate is adjusted using cosine decay. Gradient clipping is employed during training, with a maximum gradient norm of 10.0.
[0095] During the training process, a phased weight scheduling method was adopted. Initially, the data supervision term was the main focus, and then the weights of gas phase mass conservation, liquid phase mass conservation, mixed momentum equation and drift flow closure residual were gradually increased to improve training stability and physical consistency of prediction results. The weight values of each loss term are shown in Table 2.
[0096] Table 2 Weight values for each loss item
[0097] 8. Verify operating condition predictions and result output
[0098] After the model training is complete, the validation control condition will be used as the target prediction condition. The throttle valve control parameters corresponding to this validation condition are: opening degree before control. After adjustment, the opening degree Change in opening Amplitude of opening change Adjustment time The above operating parameters, together with the wellbore physical parameters, constitute the target operating condition feature vector. The trained Branch network is then input into the Trunk network; simultaneously, the well depth-time coordinates (x, t) for the full well depth and full time range of the validation conditions are input into the Trunk network.
[0099] After combining the modes of the Branch and Trunk networks, the predicted results of the multiphase flow parameters in the wellbore across the entire depth and time range under this verification condition were obtained: , , , , .
[0100] Compare the above prediction results with the true values or measured data corresponding to the verification conditions, such as... Figure 4 and Figure 5 As shown, the mean absolute error is calculated. Root mean square error Maximum absolute error and mean absolute percentage error Evaluation indicators, such as pressure, can be used. Taking pressure as an example, its root mean square error and mean absolute percentage error can be expressed as:
[0101] In the formula, For the first Predicted pressure values for each sample point This corresponds to the true or measured pressure value. To verify the number of sample points.
[0102] Similarly, the gas content, liquid holdup, gas velocity, and liquid velocity can be calculated separately. , , and Indicators. The loss function change records, training condition prediction results, validation condition prediction results, error statistics, and parameters of the trained Branch and Trunk networks can all be saved during the training process. These can be used for subsequent wellbore multiphase flow state prediction, throttle valve control scheme comparison, and model performance evaluation.
[0103] 9. Implementation Results
[0104] In this embodiment, the model is trained using 46 sets of internal monitoring points, initial conditions, boundary conditions, boundary flux conditions, and PDE virtual residual points for throttle valve control conditions, which can then predict the 60%→90% and 30min control conditions that were not included in the training.
[0105] This embodiment demonstrates that, even with sparse observational data within the wellbore, this invention can rapidly predict multiphase flow parameters under throttle valve control conditions using a DeepONet model conditionally defined for throttle valve control and physical constraints on gas-liquid two-phase flow in the wellbore. Compared to models trained only for a single condition, this invention improves the model's generalization prediction ability for control conditions not included in the training; and compared to purely data-driven models, this invention enhances the physical consistency of prediction results through mass conservation, momentum conservation, boundary flux, and drift flow closure constraints.
[0106] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0107] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for predicting multiphase flow parameters in wellbore, characterized in that, include: Acquire multiphase flow data in the wellbore under different throttle valve opening control conditions during controlled pressure drilling; The wellbore multiphase flow data is preprocessed to form a two-dimensional data field of well depth-time under the corresponding wellbore opening control condition; Based on the well depth-time two-dimensional data field, a well depth-time solution domain is constructed, and a throttle valve opening control condition feature vector is generated; Based on the well depth-time solution domain and the characteristic vector of the throttle valve opening control condition, a physical constraint operator learning model based on the backbone network and branch network is constructed, and the physical constraint operator learning model is trained. Based on the trained physical constraint operator learning model, predict the multiphase flow parameters of the wellbore at the target well depth and time, and output the prediction results of the multiphase flow parameters of the wellbore. The expression for the depth-time solution domain is as follows: ; in, This represents the well depth coordinates within the given wellbore solution domain. Indicates the calculation time during controlled pressure drilling; The feature vector of the throttle valve opening control condition is input into the branch network to characterize the current throttle valve opening control condition. Well depth coordinates and time coordinates Input to the backbone network is used to determine the spatiotemporal query location under the current throttle valve opening control condition; The backbone network adopts a trunk network, and the branch network adopts a branch network. The Branch network and Trunk network output the corresponding modal coefficients and spatiotemporal basis functions, respectively, and the predicted values of the wellbore multiphase flow parameters are obtained by combining the modes. The expression for the physical constraint operator learning model is as follows: ; In the formula, For the first One predictor variable, For well depth coordinates, Using time as the coordinate, Input the operating condition feature vector. The first output of the branch network Modal coefficients, The first output of the backbone network One spatiotemporal basis function, The number of modes; When training the physical constraint operator learning model, multiple loss functions are constructed for joint optimization. The loss functions include sparse internal observation loss, initial condition loss, boundary condition loss, boundary flow loss, and physical residual loss. The total loss function is constructed by weighting and combining the sparse internal observation loss, initial condition loss, boundary condition loss, boundary flow loss, and physical residual loss: ; In the formula, , , , , These represent the sparse internal observation loss, initial condition loss, boundary condition loss, boundary flow loss, and physical residual loss, respectively. , , , , These are the weighting coefficients for different loss terms; The parameters of the branch network and the backbone network are updated iteratively by optimizing the algorithm until the total loss function meets the convergence condition, and the trained physical constraint operator learning model is saved. The physical residual loss includes the gas phase mass conservation residual, the liquid phase mass conservation residual, the mixing momentum equation residual, and the drift flow closure relation residual, expressed as follows: ; In the formula, , , , These are respectively expressed as the residuals of gas phase mass conservation, liquid phase mass conservation, mixing momentum equation, and drift flow closure relation. , , , These are the weighting coefficients for each physical residual loss; Constructing boundary traffic loss includes: To enhance the mass conservation constraint of the gas and liquid phases at the two-phase boundaries of the wellbore, the gas phase mass flow rate and liquid phase mass flow rate are calculated based on the pressure, phase content, phase velocity, and annular flow cross-sectional area at the boundary. The gas phase mass flow rate is expressed as: ; The liquid phase mass flow rate is expressed as: ; In the formula, For gas density, For the density of the liquid, For gas velocity, For liquid velocity; For the cross-sectional area of the annular flow, For gas content, Liquid holdup; Based on the error between the predicted flow and the measured or converted flow at the boundary, the boundary flow loss is constructed: ; By constraining the flow rate at the bottom and top of the well using a boundary flow loss model, the quality conservation properties of the prediction results are enhanced.
2. The method for predicting multiphase flow parameters in a wellbore according to claim 1, characterized in that, The throttle valve opening control condition is characterized by a dynamic opening curve of the throttle valve opening over time; the dynamic opening curve is one or more of the following: a preset throttle valve control command, a throttle valve opening time series collected on site, or numerical simulation data. The dynamic opening curve of the throttle valve is expressed as follows: ; in, This is the dynamic opening curve of the throttle valve. This is a time series of throttle valve opening. For the first Each sampling time, For the corresponding throttle valve opening, The number of sampling points for aperture. This indicates an interpolation or resampling operation.
3. A wellbore multiphase flow parameter prediction system, employing the wellbore multiphase flow parameter prediction method according to any one of claims 1-2, characterized in that, include: The data acquisition module is used to acquire multiphase flow data in the wellbore under different throttle valve opening control conditions during controlled pressure drilling. The preprocessing module is used to preprocess the multiphase flow data in the wellbore to form a two-dimensional data field of well depth-time under the corresponding opening change conditions. The feature vector generation module is used to construct a well depth-time solution domain based on the well depth-time two-dimensional data field and generate a feature vector for the throttle valve opening control condition. The model building and training module is used to construct a physical constraint operator learning model based on the trunk network and branch network according to the well depth-time solution domain and the characteristic vector of the throttle valve opening control condition, and to train the physical constraint operator learning model. The prediction result output module is used to predict the wellbore multiphase flow parameters at the corresponding well depth and time based on the trained physical constraint operator learning model, and output the prediction results of the wellbore multiphase flow parameters.
Citation Information
Patent Citations
Shaft multiphase flow model solving method and system based on physical information neural network
CN117669430A
River network hydrodynamic force multi-scene intelligent prediction method
CN121936724A