Double-agent coupling accelerated calculation method for transient solution of multiphase flow in ultra-deep wellbore

CN122414073BActive Publication Date: 2026-08-28CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610900331.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-22
Publication Date
2026-08-28
Estimated Expiration
2046-06-22

AI Technical Summary

Technical Problem

然而,当实际钻井过程中遇到复杂工况或复杂地质条件时,已有PINN模型仍可能难以充分表征现场真实流动特征,导致预测精度下降

Benefits of technology

[0015]与现有技术相比,本发明的有益效果具体如下:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122414073B_ABST
    Figure CN122414073B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of wellbore pressure control for petroleum engineering, and particularly relates to a double-agent coupling accelerated calculation method for solving the transient state of multiphase flow in a super-deep wellbore. The method comprises the following steps: training a bottom hole pressure prediction model based on XGBoost gradient boosting by using overflow simulation results and field measurement data; constructing a physical constraint function based on the finite difference discrete form of the control equation, and training a wellbore node calculation agent model based on a physical information neural network; constructing a wellbore multiphase flow model calculation framework; predicting the initial assumed value of the bottom hole pressure at the next time by using the bottom hole pressure prediction model based on XGBoost gradient boosting, determining the bottom hole boundary condition, and reducing the iteration number of the multiphase flow model. The beneficial effects are that the wellbore node calculation agent model based on the physical information neural network is used to replace the traditional multiphase flow model wellbore node prediction, the calculation time is reduced, and the calculation efficiency and model robustness of the model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wellbore pressure control technology in petroleum engineering, and in particular to a dual-surrogate coupling accelerated calculation method for transient solution of multiphase flow in ultra-deep wellbores. Background Technology

[0002] With the expansion of my country's industrial scale and rapid economic development, the demand for oil and gas resources is increasing, and oil and gas exploration and development are continuously advancing into deeper and ultra-deep formations. These wells generally have complex operating conditions such as high temperature and pressure, narrow density safety pressure windows, and frequent tripping operations, making wellbore pressure control more challenging. To accurately control the wellbore pressure of such wells, it is necessary to use a multiphase flow model to predict wellbore flow parameters. Traditional multiphase flow models can be divided into steady-state methods and transient methods. The steady-state method is simple to calculate and relatively efficient, but it mainly relies on some simplified physical assumptions and does not consider the influence of the gas's upward movement in the wellbore during overflow on the wellbore flow parameters. It calculates wellbore pressure through simple empirical formulas and calculation steps, resulting in a relatively high calculation error. The transient method is based on the gas phase mass conservation equation, liquid phase mass conservation equation, and momentum conservation equation. It uses finite difference or other discretization schemes to make the governing equations satisfy the closed relationship, and combines auxiliary equations (such as drift flow model, friction calculation equation, etc.). The calculation process involves multiple iterative calculations and complex formula calculations. It has high accuracy in wellbore pressure calculation, but the calculation time is long and the efficiency is low.

[0003] Data-driven models can be trained using measured or simulated data from the drilling process, balancing computational accuracy and efficiency in wellbore pressure prediction to some extent. For example, the XGBoost gradient boosting model has strong nonlinear fitting capabilities and model stability, achieving high-accuracy bottom-hole pressure prediction under small to medium sample conditions. However, such models are typically heavily reliant on data from neighboring wells. When drilling operations enter new blocks or data-scarce areas, differences in operating conditions, geological conditions, and wellbore structure compared to the training samples often lead to insufficient generalization ability and difficulty in guaranteeing prediction accuracy. Furthermore, pure data-driven models lack explicit physical constraints, resulting in weak physical interpretability of their prediction process, which also limits their widespread application in field engineering. The Physical Information Neural Network (PINN) approach integrates governing equations, boundary conditions, and physical constraints into the model training process, enabling prediction results to meet wellbore flow laws to some extent, and requiring less training data compared to pure data-driven models. This method can also utilize simulated data for pre-training, thereby improving its applicability under data-scarce conditions. However, when encountering complex working conditions or complex geological conditions during actual drilling, the existing PINN model may still be unable to fully represent the actual flow characteristics on site, leading to a decrease in prediction accuracy.

[0004] In summary, how to fully leverage the advantages of surrogate models in terms of computational efficiency and prediction accuracy, while also taking into account the strong physical foundation and universality of traditional multiphase flow models, is a key issue that urgently needs to be addressed in the field of wellbore multiphase flow calculation. Summary of the Invention

[0005] The purpose of this invention is to address the aforementioned deficiencies in existing technologies by providing a dual-surrogate coupling accelerated computation method for transient solutions of multiphase flow in ultra-deep wells. This invention utilizes a bottom-hole pressure prediction model based on XGBoost gradient boosting to reduce the number of model iterations, and replaces the traditional multiphase flow model's well-hole node prediction with a well-hole node computation surrogate model based on a physical information neural network, thereby reducing computation time. While retaining the universality of the traditional model, this invention improves the computational efficiency and robustness of the model.

[0006] The present invention discloses a dual-surrogate coupling accelerated calculation method for transient solutions of multiphase flow in ultra-deep wells, the technical solution of which includes the following steps: S1. Using the overflow simulation results and field measurement data, train a bottom hole pressure prediction model based on XGBoost gradient boosting. S2. Construct the physical constraint function based on the finite difference discretization form of the control equation, and train the wellbore node computation proxy model based on the physical information neural network. S3. Construct a computational framework for a multiphase flow model in a wellbore; S4. Use the bottom hole pressure prediction model based on XGBoost gradient lifting to predict the initial assumed value of the bottom hole pressure at the next moment, determine the bottom hole boundary conditions, and reduce the number of iterations of the multiphase flow model. S5. Call the wellbore node calculation proxy model to calculate the wellbore flow parameters node by node along the wellbore node direction; S6. Compare the wellhead node calculation results with the wellhead boundary conditions for error. If the error does not meet the preset threshold, correct the bottom hole pressure and recalculate until the error meets the preset threshold.

[0007] Preferably, the specific implementation process of step S1 is as follows: S1-1. The training data is taken from the actual measured bottom hole pressure data and the flow parameters of the overflow simulation for 30 minutes under the condition of changing the bottom hole pressure difference, permeability and drilling fluid parameters. S1-2. Remove outliers from the field measured data. Use cubic spline interpolation to complete the time series of the field measured data so that it is consistent with the overflow simulation data at the same time nodes. Use the moving average filtering method to remove high-frequency random noise in the data and construct a unified training sample set. The moving average filtering method is expressed as: , Where x t These are measured data; m is the window length; These are the measured data values ​​after noise reduction processing; S1-3. Standardize the constructed training sample set using the following standardization formula. , Where x represents the original drilling parameter data; x min x represents the minimum value of the data. max Indicates the maximum value of the data; X std This represents the standardized data; S1-4. The Pearson correlation coefficient was used to analyze the correlation between bottom hole pressure and formation geological parameters, wellbore structural parameters, and fluid parameters. The formula is as follows: , Where r is the Pearson correlation coefficient, ranging from (-1, 1); x i y i This represents the observed values ​​of two variables in the i-th sample point, and the corresponding values ​​of formation geological condition parameters, well structure parameters, fluid parameters, and bottom hole pressure; , This represents the sample mean of x and y; n is the number of samples. The final selected input parameters for the model are: a) geological condition parameters: formation pressure P f a) Formation permeability K; b) Wellbore structural parameters: well depth H, annular equivalent diameter D; c) Fluid parameters: fluid density ρ in the wellbore. l Fluid viscosity μ l Fluid displacement Q l Bottom hole pressure P b d. Wellbore air intake: M q The model's output parameters are: predicted bottom hole pressure P. pred ; The model is represented by the following formula: ; S1-5. Use Bayesian optimization to find the optimal parameter combination for XGBoost.

[0008] Preferably, the specific implementation process of steps S1-5 is as follows: S1-5-1. Tried parameter combinations and verification errors; S1-5-2. Establish a Bayesian optimization surrogate model based on parameter combinations and verification errors; S1-5-3. Determine the next set of hyperparameter combinations to be evaluated based on the acquisition function; S1-5-4. Train the XGBoost model based on the hyperparameter combination to be evaluated and update the validation error; S1-5-5. Repeat the above steps until the preset number of iterations or the verification error convergence condition is met.

[0009] Preferably, step S2 is implemented as follows: S2-1. Collect wellbore monitoring data related to overflow evolution, including wellbore node pressure, wellhead pressure, riser pressure, casing pressure, inlet flow rate, outlet flow rate, fluid density, and fluid viscosity, to provide field measured samples for subsequent wellbore pressure prediction model training; S2-2. To address the issues of incomplete sampling of field monitoring data and difficulty in directly measuring node parameters inside the wellbore, a multiphase flow model of the wellbore is used to invert and fit the overflow process, obtaining node parameters of pressure, temperature, gas content, gas phase velocity, liquid phase velocity, and mixing density along the wellbore. The missing wellbore node data is then supplemented using the model fitting results to form multiphase flow data of the wellbore with complete spatial distribution characteristics. S2-3. Under different combinations of parameters such as wellbore structure, drilling fluid parameters, formation pressure, overflow, pump displacement, well depth, well diameter, and drill string assembly, the drilling overflow process is simulated using a wellbore multiphase flow model to obtain dynamic response data of wellbore pressure, gas content, and gas velocity under different operating conditions. Furthermore, the simulation data is fused with the field fitting and completion data in S2-2 to form a training dataset covering various wellbore structures and overflow conditions. S2-4. Using wellbore flow parameters as model input and multiphase flow state parameters such as wellbore friction pressure, gas content, and gas phase velocity as model output, a physical information neural network structure is established, including an input layer, multiple hidden layers, and an output layer. Each hidden layer has 256 neurons, and the activation function for the hidden layers is tanh to enhance the model's ability to fit continuous nonlinear wellbore multiphase flow state variables. S2-5. Establish the total loss function of the PINN model. The total loss function includes a data loss function and a physical constraint loss function. The data loss function is used to constrain the error between the model's predicted values ​​and the field-fitted data and simulation data. The physical constraint loss function is used to constrain the model output to satisfy the wellbore multiphase flow control equations and state equations. The total loss function is expressed as follows: , Among them, L data For data loss terms; w phy The weights of the physical loss function; L physics This is a physical loss item; S2-6. Input the wellbore flow parameters into the PINN model, calculate the finite difference scheme and physical residuals in the wellbore multiphase flow control equations, and iteratively update the network parameters with the goal of minimizing the total loss function. During training, an optimization strategy combining Adam and L-BFGS is adopted, where the Adam optimizer is used for model pre-training and fast convergence, and the L-BFGS optimizer is used for further fine optimization to improve the convergence accuracy of physical residuals. Finally, a wellbore node PINN surrogate model that simultaneously satisfies data fitting accuracy and physical constraint consistency is obtained. S2-7, The input parameters for the PINN wellbore node proxy model are: a. The wellbore flow calculation parameters U at the previous moment of the current wellbore node. h t-1 The parameters include: b) wellbore node pressure P, cross-sectional gas holdup Eg, actual gas velocity vg, gas density ρg, annular area Aa, and annular equivalent diameter Rt; and c) the wellbore flow calculation parameters U of the previous wellbore node at the current moment. h-1 t c. Node temperature Te; d. Drilling fluid flow parameters, including fluid displacement Q. l Fluid density ρ l Fluid viscosity μ l The output parameters are: wellbore flow parameters U at node (h, t). h t The PINN proxy model is represented as follows: .

[0010] Preferably, in steps S2-5, the physical constraint function is constructed based on the finite difference discretization form of the governing equations. The specific formulas of the physical constraint equations are as follows: Finite difference scheme for the mass conservation equation: , , Finite difference scheme for the momentum equation: , The auxiliary equation is: , Among them, M g The molecular weight of natural gas is kg / mol. , Where ε is the pipe wall roughness and Z is the gas compressibility factor, which can be calculated by the following equation; , , , , , .

[0011] Preferably, the specific calculation process of step S3 is as follows: S3-1. Set the wellhead boundary conditions for the multiphase flow model; S3-2. Calculate the initial conditions of the wellbore using a single-phase flow model, including initialization of wellbore pressure, gas content, and intrusion gas velocity. S3-3. Reserve a bottom hole boundary condition input interface. The bottom hole pressure is determined by the bottom hole pressure prediction model based on XGBoost gradient boosting in step S4. Assume the bottom hole pressure value at the next moment and calculate the bottom hole boundary conditions according to the gas inlet rate calculation formula. S3-4. Reserve a wellbore node flow parameter input interface. The wellbore flow parameters are determined by the PINN-based wellbore node proxy model in step S5. Traverse the wellbore nodes and calculate the wellbore flow parameters. S3-5. Based on the error between the set wellhead boundary conditions and the calculation results at the wellhead nodes, re-assume the bottom hole pressure value, and repeat S3-3 and S3-4 until the calculation error meets the requirements. S3-6. Start calculating the wellbore flow parameters for the next time step. Repeat the calculation steps S3-3, S3-4, and S3-5.

[0012] Preferably, the specific calculation process of step S4 is as follows: S4-1. Obtain geological parameters of the formation, including formation pressure P. f Based on the formation permeability K, obtain wellbore structural parameters, including well depth H and annular equivalent diameter D, and obtain fluid parameters, including fluid density ρ in the wellbore. l Fluid viscosity μ l Fluid displacement Q l Bottom hole pressure P b Obtain the wellbore air intake M q ; S4-2. Input the formation geological condition parameters, well structure parameters, and fluid parameters into the trained XGBoost gradient boosting-based bottom hole pressure prediction model, and set the initial assumption value of the bottom hole pressure at the next moment based on the output results. S4-3. Based on the pressure difference between the initial assumed bottom hole pressure and the formation pressure at the next moment, and combined with the formation permeability, bottom hole pressure difference, and fluid properties, calculate the bottom hole formation fluid intrusion rate or gas ingress rate. S4-4. The initial assumed value of the bottom pressure at the next moment and the bottom inflow conditions determined therefrom are used as the bottom boundary conditions for the transient calculation of multiphase flow in the wellbore.

[0013] Preferably, the specific calculation process of step S5 is as follows: S5-1. Use the bottom boundary conditions determined in step S4 as the starting conditions for the wellbore node calculation. S5-2. Following the order of discrete nodes along the well shaft axis, perform recursive calculations node by node from the bottom of the well towards the wellhead. S5-3. For any wellbore node, input the wellbore flow parameters of the previous time step of the current node, the wellbore flow parameters of the previous wellbore node at the current time step, the node temperature, and the drilling fluid flow parameters into the trained wellbore node calculation proxy model. S5-4. The wellbore flow parameters at the current moment are output by the proxy model of the wellbore node calculation. The wellbore flow parameters include one or more of the following: wellbore node pressure, cross-sectional gas holdup, gas phase velocity, gas density, and mixed fluid density. S5-5. Use the current wellbore flow parameters at the current node as the input condition for the calculation of the next wellbore node. Repeat S5-3 to S5-4 until the flow parameters of all wellbore nodes are calculated.

[0014] Preferably, the specific calculation process of step S6 is as follows: S6-1. Obtain the wellhead node flow parameters calculated in step S5. The wellhead node flow parameters include one or more of the following: wellhead pressure, wellhead flow rate, casing pressure, riser pressure, and outlet flow rate. S6-2. Compare the wellhead node flow parameters with the preset wellhead boundary conditions, and calculate the wellhead boundary error; S6-3. Determine whether the wellhead boundary error is less than or equal to a preset error threshold. S6-4. When the wellhead boundary error is less than or equal to the preset error threshold, determine the transient calculation result of the multiphase flow in the wellbore at the current moment; S6-5. When the wellhead boundary error is greater than the preset error threshold, the bottom hole pressure is corrected by using the bisection method and based on the wellhead boundary error to obtain the corrected assumed value of the bottom hole pressure. S6-6. Use the corrected bottom hole pressure assumption as the new bottom hole boundary condition, and recalculate the wellbore parameters until the wellhead boundary error meets the preset error threshold.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention combines a data-driven model with a physical information neural network, which significantly improves computational efficiency while ensuring the physical consistency of the wellbore multiphase flow model, and effectively solves the problem of long computation time for traditional transient multiphase flow models in calculating flow parameters in ultra-deep and extra-deep wellbores. This invention utilizes the XGBoost gradient boosting model to quickly predict bottom hole pressure, which can significantly reduce repeated assumptions and iterations of bottom hole pressure, thereby reducing computational costs. This invention uses the PINN surrogate model to replace the node calculation process in the traditional numerical solution method, which reduces computational complexity while maintaining high computational accuracy; This invention enhances the model's applicability under data-scarce and complex geological conditions and improves its generalization ability by training the model by integrating field measured data and simulation data. This invention improves the physical interpretability of prediction results by introducing physical constraints to ensure that the model prediction results satisfy the wellbore multiphase flow control equations. The coupled computational framework constructed in this invention combines the universality of traditional physical models with the efficiency of data-driven models, and can be widely applied in engineering fields such as wellbore pressure prediction, well control optimization, and drilling safety analysis. This invention enables high-precision and high-efficiency multiphase flow calculation in wellbore under complex well conditions, providing reliable technical support for safe drilling in deep and ultra-deep wells. Attached Figure Description

[0016] Figure 1 This is a schematic diagram illustrating the correlation analysis of bottom hole pressure changes based on the Pearson coefficient. Figure 2 A schematic diagram of gas content prediction for a cross-section of a wellbore multiphase flow model based on PINN acceleration; Figure 3 This is a schematic diagram of bottom hole pressure prediction using a PINN-accelerated multiphase flow model in a wellbore. Figure 4 A schematic diagram comparing the prediction errors of gas content at cross-sections in a multiphase flow model of a wellbore. Figure 5 A schematic diagram comparing the prediction errors of bottom hole pressure in a multiphase flow model for wellbore; Figure 6 This is a schematic diagram of the calculation process for a multiphase flow model in a wellbore. Figure 7 A schematic diagram of a dual-surrogate coupling accelerated computation method for solving transient multiphase flow in wellbore. Detailed Implementation

[0017] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0018] Example 1: The present invention provides a dual-surrogate coupling accelerated computation method for transient solution of multiphase flow in ultra-deep wells, comprising the following steps: S1. Using the overflow simulation results and field measurement data, train a bottom hole pressure prediction model based on XGBoost gradient boosting. S2. Construct the physical constraint function based on the finite difference discretization form of the control equation, and train the wellbore node computation proxy model based on the physical information neural network. S3. Construct a computational framework for a multiphase flow model in a wellbore; S4. Use the bottom hole pressure prediction model based on XGBoost gradient lifting to predict the initial assumed value of the bottom hole pressure at the next moment, determine the bottom hole boundary conditions, and reduce the number of iterations of the multiphase flow model. S5. Call the wellbore node calculation proxy model to calculate the wellbore flow parameters node by node along the wellbore node direction; S6. Compare the wellhead node calculation results with the wellhead boundary conditions for error. If the error does not meet the preset threshold, correct the bottom hole pressure and recalculate until the error meets the preset threshold.

[0019] The specific implementation process of step S1 of the present invention is as follows: S1-1. The training data is taken from the actual measured bottom hole pressure data and the flow parameters of the overflow simulation for 30 minutes under the condition of changing the bottom hole pressure difference, permeability and drilling fluid parameters. S1-2. Remove outliers from the field measured data. Use cubic spline interpolation to complete the time series of the field measured data so that it is consistent with the overflow simulation data at the same time nodes. Use the moving average filtering method to remove high-frequency random noise in the data and construct a unified training sample set. The moving average filtering method is expressed as: , Where x t These are measured data; m is the window length; These are the measured data values ​​after noise reduction processing; S1-3. Standardize the constructed training sample set using the following standardization formula. , Where x represents the original drilling parameter data; x min x represents the minimum value of the data. max Indicates the maximum value of the data; X std This represents the standardized data; S1-4. The Pearson correlation coefficient was used to analyze the correlation between bottom hole pressure and formation geological parameters, wellbore structural parameters, and fluid parameters. The formula is as follows: , Where r is the Pearson correlation coefficient, ranging from (-1, 1); x i y i This represents the observed values ​​of two variables in the i-th sample point, and the corresponding values ​​of formation geological condition parameters, well structure parameters, fluid parameters, and bottom hole pressure; , This represents the sample mean of x and y; n is the number of samples. The Pearson correlation coefficient was used to assess the strength of the linear correlation between multi-source parameters of the wellbore and changes in bottom hole pressure. The analysis results are as follows: Figure 1 As shown, parameters such as fluid flow rate, well depth, and formation permeability have a high linear correlation with the change in bottom hole pressure and should be given priority as input features for the model. Parameters such as annular equivalent diameter and fluid viscosity can be introduced as auxiliary features or interaction terms to further improve the model's characterization ability and prediction accuracy.

[0020] The final selected input parameters for the model are: a) geological condition parameters: formation pressure P f a) Formation permeability K; b) Wellbore structural parameters: well depth H, annular equivalent diameter D; c) Fluid parameters: fluid density ρ in the wellbore. l Fluid viscosity μ l Fluid displacement Q l Bottom hole pressure P b d. Wellbore air intake: M q The model's output parameters are: predicted bottom hole pressure P. pred ; The model is represented by the following formula: ; S1-5. Use Bayesian optimization to find the optimal parameter combination for XGBoost.

[0021] The specific implementation process of steps S1-5 is as follows: S1-5-1. Tried parameter combinations and verification errors; S1-5-2. Establish a Bayesian optimization surrogate model based on parameter combinations and verification errors; S1-5-3. Determine the next set of hyperparameter combinations to be evaluated based on the acquisition function; S1-5-4. Train the XGBoost model based on the hyperparameter combination to be evaluated and update the validation error; S1-5-5. Repeat the above steps until the preset number of iterations or the verification error convergence condition is met.

[0022] Furthermore, the specific implementation process of step S2 of the present invention is as follows: S2-1. Collect wellbore monitoring data related to overflow evolution, including wellbore node pressure, wellhead pressure, riser pressure, casing pressure, inlet flow rate, outlet flow rate, fluid density, and fluid viscosity, to provide field measured samples for subsequent wellbore pressure prediction model training; S2-2. To address the issues of incomplete sampling of field monitoring data and difficulty in directly measuring node parameters inside the wellbore, a multiphase flow model of the wellbore is used to invert and fit the overflow process, obtaining node parameters of pressure, temperature, gas content, gas phase velocity, liquid phase velocity, and mixing density along the wellbore. The missing wellbore node data is then supplemented using the model fitting results to form multiphase flow data of the wellbore with complete spatial distribution characteristics. S2-3. Under different combinations of parameters such as wellbore structure, drilling fluid parameters, formation pressure, overflow, pump displacement, well depth, well diameter, and drill string assembly, the drilling overflow process is simulated using a wellbore multiphase flow model to obtain dynamic response data of wellbore pressure, gas content, and gas velocity under different operating conditions. Furthermore, the simulation data is fused with the field fitting and completion data in S2-2 to form a training dataset covering various wellbore structures and overflow conditions. S2-4. Using wellbore flow parameters as model input and multiphase flow state parameters such as wellbore friction pressure, gas content, and gas phase velocity as model output, a physical information neural network structure is established, including an input layer, multiple hidden layers, and an output layer. Each hidden layer has 256 neurons, and the activation function for the hidden layers is tanh to enhance the model's ability to fit continuous nonlinear wellbore multiphase flow state variables. S2-5. Establish the total loss function of the PINN model. The total loss function includes a data loss function and a physical constraint loss function. The data loss function is used to constrain the error between the model's predicted values ​​and the field-fitted data and simulation data. The physical constraint loss function is used to constrain the model output to satisfy the wellbore multiphase flow control equations and state equations. The total loss function is expressed as follows: , Among them, L data For data loss terms; w phy The weights of the physical loss function; L physics This is the physical loss item; S2-6. Input the wellbore flow parameters into the PINN model, calculate the finite difference scheme and physical residuals in the wellbore multiphase flow control equations, and iteratively update the network parameters with the goal of minimizing the total loss function. During training, an optimization strategy combining Adam and L-BFGS is adopted, where the Adam optimizer is used for model pre-training and fast convergence, and the L-BFGS optimizer is used for further fine optimization to improve the convergence accuracy of physical residuals. Finally, a wellbore node PINN surrogate model that simultaneously satisfies data fitting accuracy and physical constraint consistency is obtained. S2-7, The input parameters for the PINN wellbore node proxy model are: a. The wellbore flow calculation parameters U at the previous moment of the current wellbore node. h t-1 The parameters include: b) wellbore node pressure P, cross-sectional gas holdup Eg, actual gas velocity vg, gas density ρg, annular area Aa, and annular equivalent diameter Rt; and c) the wellbore flow calculation parameters U of the previous wellbore node at the current moment. h-1 t c. Node temperature Te; d. Drilling fluid flow parameters, including fluid displacement Q. l Fluid density ρ l Fluid viscosity μ l The output parameters are: wellbore flow parameters U at node (h, t). h t The PINN proxy model is represented as follows: .

[0023] In step S2-5, the physical constraint function is constructed based on the finite difference discretization form of the governing equations. The specific formulas of the physical constraint equations are as follows: Finite difference scheme for the mass conservation equation: , , Finite difference scheme for the momentum equation: , The auxiliary equation is: , Among them, M g The molecular weight of natural gas is kg / mol. , Where ε is the pipe wall roughness and Z is the gas compressibility factor, which can be calculated by the following equation; , , , , , .

[0024] Furthermore, the specific calculation process of step S3 in this invention is as follows: S3-1. Set the wellhead boundary conditions for the multiphase flow model; S3-2. Calculate the initial conditions of the wellbore using a single-phase flow model, including initialization of wellbore pressure, gas content, and intrusion gas velocity. S3-3. Reserve a bottom hole boundary condition input interface. The bottom hole pressure is determined by the bottom hole pressure prediction model based on XGBoost gradient boosting in step S4. Assume the bottom hole pressure value at the next moment and calculate the bottom hole boundary conditions according to the gas inlet rate calculation formula. S3-4. Reserve a wellbore node flow parameter input interface. The wellbore flow parameters are determined by the PINN-based wellbore node proxy model in step S5. Traverse the wellbore nodes and calculate the wellbore flow parameters. S3-5. Based on the error between the set wellhead boundary conditions and the calculation results at the wellhead nodes, re-assume the bottom hole pressure value, and repeat S3-3 and S3-4 until the calculation error meets the requirements. S3-6. Start calculating the wellbore flow parameters for the next time step. Repeat the calculation steps S3-3, S3-4, and S3-5.

[0025] Furthermore, the specific calculation process of step S4 in this invention is as follows: S4-1. Obtain geological parameters of the formation, including formation pressure P. f Based on the formation permeability K, obtain wellbore structural parameters, including well depth H and annular equivalent diameter D, and obtain fluid parameters, including fluid density ρ in the wellbore. l Fluid viscosity μ l Fluid displacement Q l Bottom hole pressure P b Obtain the wellbore air intake M q ; S4-2. Input the formation geological condition parameters, well structure parameters, and fluid parameters into the trained XGBoost gradient boosting-based bottom hole pressure prediction model, and set the initial assumption value of the bottom hole pressure at the next moment based on the output results. S4-3. Based on the pressure difference between the initial assumed bottom hole pressure and the formation pressure at the next moment, and combined with the formation permeability, bottom hole pressure difference, and fluid properties, calculate the bottom hole formation fluid intrusion rate or gas ingress rate. S4-4. The initial assumed value of the bottom pressure at the next moment and the bottom inflow conditions determined therefrom are used as the bottom boundary conditions for the transient calculation of multiphase flow in the wellbore.

[0026] Furthermore, the specific calculation process of step S5 in this invention is as follows: S5-1. Use the bottom boundary conditions determined in step S4 as the starting conditions for the wellbore node calculation. S5-2. Following the order of discrete nodes along the well shaft axis, perform recursive calculations node by node from the bottom of the well towards the wellhead. S5-3. For any wellbore node, input the wellbore flow parameters of the previous time step of the current node, the wellbore flow parameters of the previous wellbore node at the current time step, the node temperature, and the drilling fluid flow parameters into the trained wellbore node calculation proxy model. S5-4. The wellbore flow parameters at the current moment are output by the proxy model of the wellbore node calculation. The wellbore flow parameters include one or more of the following: wellbore node pressure, cross-sectional gas holdup, gas phase velocity, gas density, and mixed fluid density. S5-5. Use the current wellbore flow parameters at the current node as the input condition for the calculation of the next wellbore node. Repeat S5-3 to S5-4 until the flow parameters of all wellbore nodes are calculated.

[0027] Preferably, the specific calculation process of step S6 is as follows: S6-1. Obtain the wellhead node flow parameters calculated in step S5. The wellhead node flow parameters include one or more of the following: wellhead pressure, wellhead flow rate, casing pressure, riser pressure, and outlet flow rate. S6-2. Compare the wellhead node flow parameters with the preset wellhead boundary conditions, and calculate the wellhead boundary error; S6-3. Determine whether the wellhead boundary error is less than or equal to a preset error threshold. S6-4. When the wellhead boundary error is less than or equal to the preset error threshold, determine the transient calculation result of the multiphase flow in the wellbore at the current moment; S6-5. When the wellhead boundary error is greater than the preset error threshold, the bottom hole pressure is corrected by using the bisection method and based on the wellhead boundary error to obtain the corrected assumed value of the bottom hole pressure. S6-6. Use the corrected bottom hole pressure assumption as the new bottom hole boundary condition, and recalculate the wellbore parameters until the wellhead boundary error meets the preset error threshold.

[0028] It should be noted that the terms mentioned in this invention are explained as follows: 1. XGBoost Gradient Boosting: XGBoost is an ensemble learning algorithm based on the gradient boosting concept. It constructs multiple decision trees and progressively corrects the prediction errors of the previous model to achieve high-precision fitting of nonlinear relationships. This method features fast training speed, high prediction accuracy, and strong generalization ability, making it suitable for regression prediction of continuous variables such as bottom hole pressure.

[0029] 2. Physical Information Neural Network (PINN): A PINN is a deep learning method that incorporates physical governing equations, boundary conditions, or initial conditions into the training process of a neural network. By adding physical constraints to the loss function, it ensures that the model's predictions not only conform to the patterns in the sample data but also, as far as possible, satisfy the conservation equations and state equations in the actual physical process, thereby improving the physical consistency and interpretability of the prediction results.

[0030] 3. Cubic Spline Interpolation: Cubic spline interpolation is a commonly used data completion method. It constructs a cubic polynomial function between adjacent data points, ensuring that each piecewise function has continuous first and second derivatives at the connection points, thus obtaining a smooth and continuous interpolation curve. This method can be used to complete missing time points in field measured data, making the data sequence more complete.

[0031] 4. Finite Difference Scheme: The finite difference scheme is a numerical computation method that discretizes continuous differential equations. It approximates the derivative or partial derivative by using the difference quotient of function values ​​at adjacent discrete nodes. This method can transform the control equations of multiphase flow in wellbore from continuous form to discrete computational form, facilitating nodal calculations and numerical solutions in a computer.

[0032] In addition, the present invention Figure 2 This demonstrates the relationship between cross-sectional gas holdup changes predicted by a wellbore multiphase flow model accelerated by a physical information neural network model. Figure 3 This paper demonstrates the wellbore pressure variation predicted by a wellbore multiphase flow model accelerated by a physical information neural network model. As the gas content of the wellbore cross-section increases, the pressure at the bottom of the wellbore decreases, while the predicted pressure in the portion where gas does not reach remains unchanged. This indicates that the trained wellbore node surrogate model conforms to the defined physical constraints. For comparison, Figure 4 The cross-sectional gas holdup error of the finite difference method wellbore multiphase flow model and the wellbore multiphase flow model accelerated by a physical information neural network model is shown. Figure 5 The wellbore pressure error of the finite difference method wellbore multiphase flow model and the wellbore multiphase flow model accelerated by the physical information neural network model is shown. It can be seen that the prediction of gas content and wellbore pressure in the wellbore section remains at a high accuracy.

[0033] Figure 6 This paper demonstrates the specific calculation process of multiphase flow in a wellbore. Wellhead boundary conditions are set, and parameters such as wellbore pressure, gas cut, and gas velocity are initialized using a single-phase flow model as initial conditions for the multiphase flow model calculation. Bottom-hole boundary conditions are determined by assuming a bottom-hole pressure and combining it with the gas inlet rate calculation formula. Flow parameters such as pressure, gas cut, and velocity are calculated step-by-step along the wellbore nodes. By comparing the error between the wellhead calculation results and the set boundary conditions, the bottom-hole pressure is re-assumed using the bisection method until the error requirement is met.

[0034] Figure 7 This paper presents a dual-surrogate coupling accelerated computation method for transient solutions of multiphase flow in ultra-deep wells. The bottom hole pressure predicted by the XGBoost gradient lifting model is used as the initial boundary condition for the wellbore multiphase flow model, reducing the number of iterations required in traditional wellbore multiphase flow models. During the wellbore node calculations, the PINN surrogate model replaces the traditional finite difference solution method, enabling rapid prediction of flow parameters at wellbore nodes and significantly reducing computation time. Errors are compared between the predicted wellhead node results and the set boundary conditions, and the bottom hole pressure is dynamically corrected based on the error magnitude. Through this coupling computation method of the XGBoost gradient lifting model and the PINN model, the number of model iterations is significantly reduced while maintaining computational accuracy, improving the overall computational efficiency of the wellbore multiphase flow model.

[0035] The above description is merely a partial preferred embodiment of the present invention. Any person skilled in the art can modify the above-described technical solutions or modify them into equivalent technical solutions. Therefore, any simple modifications or equivalent transformations made based on the technical solutions of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A dual-surrogate coupled accelerated computational method for transient solution of multiphase flow in ultra-deep wells, characterized by: Includes the following steps: S1. Using the overflow simulation results and field measurement data, train a bottom hole pressure prediction model based on XGBoost gradient boosting. The specific implementation process is as follows: S1-1. The training data is taken from the field measured bottom hole pressure data and the flow parameters of the overflow simulation for 30 minutes under the condition of changing the bottom hole pressure difference, permeability and drilling fluid parameters. S1-2. Remove outliers from the field measured data. Use cubic spline interpolation to complete the time series of the field measured data so that it is consistent with the overflow simulation data at the same time nodes. Use the moving average filtering method to remove high-frequency random noise in the data and construct a unified training sample set. The moving average filtering method is expressed as: , Where x t These are measured data; m is the window length; These are the measured data values ​​after noise reduction processing; S1-3. Standardize the constructed training sample set using the following standardization formula. , Where x represents the original drilling parameter data; x min x represents the minimum value of the data. max Indicates the maximum value of the data; X std This represents the standardized data; S1-4. The Pearson correlation coefficient was used to analyze the correlation between bottom hole pressure and formation geological parameters, wellbore structural parameters, and fluid parameters. The formula is as follows: , Where r is the Pearson correlation coefficient, ranging from (-1, 1); x i y i This represents the observed values ​​of two variables in the i-th sample point, and the corresponding values ​​of formation geological condition parameters, well structure parameters, fluid parameters, and bottom hole pressure; , This represents the sample mean of x and y; n is the number of samples. The final selected input parameters for the model are: a) geological parameters of the formation: formation pressure P f a) Formation permeability K; b) Wellbore structural parameters: well depth H, annular equivalent diameter D; c) Fluid parameters: fluid density ρ in the wellbore. l Fluid viscosity μ l Fluid displacement Q l Bottom hole pressure P b d. Wellbore air intake: M q The model's output parameters are: predicted bottom hole pressure P. pred ; The model is represented by the following formula: ; S1-5. Use Bayesian optimization to find the optimal parameter combination for XGBoost; S2. Construct the physical constraint function based on the finite difference discretization form of the control equation, and train the wellbore node computation proxy model based on the physical information neural network. The specific implementation process is as follows: S2-1. Collect wellbore monitoring data related to overflow evolution, including wellbore node pressure, wellhead pressure, riser pressure, casing pressure, inlet flow rate, outlet flow rate, fluid density, and fluid viscosity, to provide field measured samples for subsequent wellbore pressure prediction model training; S2-2. To address the issues of incomplete sampling of field monitoring data and difficulty in directly measuring node parameters inside the wellbore, a multiphase flow model of the wellbore is used to invert and fit the overflow process, obtaining node parameters of pressure, temperature, gas content, gas phase velocity, liquid phase velocity, and mixing density along the wellbore. The missing wellbore node data is then supplemented using the model fitting results to form multiphase flow data of the wellbore with complete spatial distribution characteristics. S2-3. Under different combinations of parameters such as wellbore structure, drilling fluid parameters, formation pressure, overflow, pump displacement, well depth, well diameter, and drill string assembly, the drilling overflow process is simulated using a wellbore multiphase flow model to obtain dynamic response data of wellbore pressure, gas content, and gas velocity under different operating conditions. Furthermore, the simulation data is fused with the field fitting and completion data in S2-2 to form a training dataset covering various wellbore structures and overflow conditions. S2-4. Using wellbore flow parameters as model input and multiphase flow state parameters such as wellbore friction pressure, gas content, and gas phase velocity as model output, a physical information neural network structure is established, including an input layer, multiple hidden layers, and an output layer. Each hidden layer has 256 neurons, and the activation function for the hidden layers is tanh to enhance the model's ability to fit continuous nonlinear wellbore multiphase flow state variables. S2-5. Establish the total loss function of the PINN model. The total loss function includes a data loss function and a physical constraint loss function. The data loss function is used to constrain the error between the model's predicted values ​​and the field-fitted data and simulation data. The physical constraint loss function is used to constrain the model output to satisfy the wellbore multiphase flow control equations and state equations. The total loss function is expressed as follows: , Among them, L data For data loss terms; w phy The weights of the physical loss function; L physics This is the physical loss item; S2-6. Input the wellbore flow parameters into the PINN model, calculate the finite difference scheme and physical residuals in the wellbore multiphase flow control equations, and iteratively update the network parameters with the goal of minimizing the total loss function. During training, an optimization strategy combining Adam and L-BFGS is adopted, where the Adam optimizer is used for model pre-training and fast convergence, and the L-BFGS optimizer is used for further fine optimization to improve the convergence accuracy of physical residuals. Finally, a wellbore node PINN surrogate model that simultaneously satisfies data fitting accuracy and physical constraint consistency is obtained. S2-7, The input parameters for the PINN wellbore node proxy model are: a. The wellbore flow calculation parameters U at the previous moment of the current wellbore node. h t-1 The parameters include: b) wellbore node pressure P, cross-sectional gas holdup Eg, actual gas velocity vg, gas density ρg, annular area Aa, and annular equivalent diameter Rt; and c) the wellbore flow calculation parameters U of the previous wellbore node at the current moment. h-1 t c. Node temperature Te; d. Drilling fluid flow parameters, including fluid displacement Q. l Fluid density ρ l Fluid viscosity μ l The output parameters are: wellbore flow parameters U at node (h, t). h t The PINN proxy model is represented as follows: ; S3. Construct a computational framework for a multiphase flow model in a wellbore; S4. Use the bottom hole pressure prediction model based on XGBoost gradient lifting to predict the initial assumed value of the bottom hole pressure at the next moment, determine the bottom hole boundary conditions, and reduce the number of iterations of the multiphase flow model. S5. Call the wellbore node calculation proxy model to calculate the wellbore flow parameters node by node along the wellbore node direction; S6. Compare the wellhead node calculation results with the wellhead boundary conditions for error. If the error does not meet the preset threshold, correct the bottom hole pressure and recalculate until the error meets the preset threshold.

2. The dual-surrogate coupling accelerated calculation method for transient solution of multiphase flow in ultra-deep wells according to claim 1, is characterized in that, The specific implementation process of steps S1-5 is as follows: S1-5-1. Tried parameter combinations and verification errors; S1-5-2. Establish a Bayesian optimization surrogate model based on parameter combination and verification error; S1-5-3. Determine the next set of hyperparameter combinations to be evaluated based on the acquisition function; S1-5-4. Train the XGBoost model based on the hyperparameter combination to be evaluated and update the validation error; S1-5-5. Repeat the above steps until the preset number of iterations or the verification error convergence condition is met.

3. The dual-surrogate coupling accelerated calculation method for transient solution of multiphase flow in ultra-deep wells according to claim 2, is characterized in that, In step S2-5, the physical constraint function is constructed based on the finite difference discretization form of the governing equations. The specific formulas of the physical constraint equations are as follows: Finite difference scheme for the mass conservation equation: , , Finite difference scheme for the momentum equation: , The auxiliary equation is: , Among them, M g The molecular weight of natural gas is kg / mol. , Where ε is the pipe wall roughness and Z is the gas compressibility factor, which can be calculated by the following equation; , , , , , 。 4. The dual-surrogate coupling accelerated calculation method for transient solution of multiphase flow in ultra-deep wells according to claim 3, is characterized in that, The specific calculation process for step S3 is as follows: S3-1. Set the wellhead boundary conditions for the multiphase flow model; S3-2. Calculate the initial conditions of the wellbore using a single-phase flow model, including initialization of wellbore pressure, gas content, and intrusion gas velocity. S3-3. Reserve a bottom hole boundary condition input interface. The bottom hole pressure is determined by the bottom hole pressure prediction model based on XGBoost gradient boosting in step S4. Assume the bottom hole pressure value at the next moment and calculate the bottom hole boundary conditions according to the gas inlet rate calculation formula. S3-4. Reserve a wellbore node flow parameter input interface. The wellbore flow parameters are determined by the PINN-based wellbore node proxy model in step S5. Traverse the wellbore nodes and calculate the wellbore flow parameters. S3-5. Based on the error between the set wellhead boundary conditions and the calculation results at the wellhead nodes, re-assume the bottom hole pressure value, and repeat S3-3 and S3-4 until the calculation error meets the requirements. S3-6. Start calculating the wellbore flow parameters for the next time step. Repeat the calculation steps S3-3, S3-4, and S3-5.

5. The dual-surrogate coupling accelerated calculation method for transient solution of multiphase flow in ultra-deep wells according to claim 4, characterized in that, The specific calculation process for step S4 is as follows: S4-1. Obtain geological parameters of the formation, including formation pressure P. f Based on the formation permeability K, obtain wellbore structural parameters, including well depth H and annular equivalent diameter D, and obtain fluid parameters, including fluid density ρ in the wellbore. l Fluid viscosity μ l Fluid displacement Q l Bottom hole pressure P b Obtain the wellbore air intake M q ; S4-2. Input the formation geological condition parameters, well structure parameters, and fluid parameters into the trained XGBoost gradient boosting-based bottom hole pressure prediction model, and set the initial assumption value of the bottom hole pressure at the next moment based on the output results. S4-3. Based on the pressure difference between the initial assumed bottom hole pressure and the formation pressure at the next moment, and combined with the formation permeability, bottom hole pressure difference, and fluid properties, calculate the bottom hole formation fluid intrusion rate or gas ingress rate. S4-4. The initial assumed value of the bottom pressure at the next moment and the bottom inflow conditions determined therefrom are used as the bottom boundary conditions for the transient calculation of multiphase flow in the wellbore.

6. The dual-surrogate coupling accelerated calculation method for transient solution of multiphase flow in ultra-deep wells according to claim 5, is characterized in that, The specific calculation process for step S5 is as follows: S5-1. Use the bottom boundary conditions determined in step S4 as the starting conditions for the wellbore node calculation. S5-2. Following the order of discrete nodes along the well shaft axis, perform recursive calculations node by node from the bottom of the well towards the wellhead. S5-3. For any wellbore node, input the wellbore flow parameters of the previous time step of the current node, the wellbore flow parameters of the previous wellbore node at the current time step, the node temperature, and the drilling fluid flow parameters into the trained wellbore node calculation proxy model. S5-4. The wellbore flow parameters at the current moment are output by the proxy model of the wellbore node calculation. The wellbore flow parameters include one or more of the following: wellbore node pressure, cross-sectional gas holdup, gas phase velocity, gas density, and mixed fluid density. S5-5. Use the current wellbore flow parameters at the current node as the input condition for the calculation of the next wellbore node. Repeat S5-3 to S5-4 until the flow parameters of all wellbore nodes are calculated.

7. The dual-surrogate coupling accelerated calculation method for transient solution of multiphase flow in ultra-deep wells according to claim 6, is characterized in that, The specific calculation process for step S6 is as follows: S6-1. Obtain the wellhead node flow parameters calculated in step S5. The wellhead node flow parameters include one or more of the following: wellhead pressure, wellhead flow rate, casing pressure, riser pressure, and outlet flow rate. S6-2. Compare the wellhead node flow parameters with the preset wellhead boundary conditions, and calculate the wellhead boundary error; S6-3. Determine whether the wellhead boundary error is less than or equal to a preset error threshold. S6-4. When the wellhead boundary error is less than or equal to the preset error threshold, determine the transient calculation result of the multiphase flow in the wellbore at the current moment; S6-5. When the wellhead boundary error is greater than the preset error threshold, the bottom hole pressure is corrected by using the bisection method and based on the wellhead boundary error to obtain the corrected assumed value of the bottom hole pressure. S6-6. Use the corrected bottom hole pressure assumption as the new bottom hole boundary condition, and recalculate the wellbore parameters until the wellhead boundary error meets the preset error threshold.

Citation Information

Patent Citations

  • Multi-working-condition bottom hole pressure prediction method and device, computer equipment and storage medium

    CN114386272A

  • Shaft multiphase flow model solving method and system based on physical information neural network

    CN117669430A