CN117669430A - Wellbore multiphase flow model solving method and system based on physical information neural network - Google Patents

Wellbore multiphase flow model solving method and system based on physical information neural network Download PDF

Info

Publication number
CN117669430A
CN117669430A CN202410147514.3A CN202410147514A CN117669430A CN 117669430 A CN117669430 A CN 117669430A CN 202410147514 A CN202410147514 A CN 202410147514A CN 117669430 A CN117669430 A CN 117669430A
Authority
CN
China
Prior art keywords
loss
pressure
neural network
condition
multiphase flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410147514.3A
Other languages
Chinese (zh)
Inventor
王志远
刘雪琪
孙小辉
张剑波
孙宝江
陈刚
陈科杉
胡俊杰
杨继成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China University of Petroleum East China
Original Assignee
China University of Petroleum East China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China University of Petroleum East China filed Critical China University of Petroleum East China
Priority to CN202410147514.3A priority Critical patent/CN117669430A/en
Publication of CN117669430A publication Critical patent/CN117669430A/en
Pending legal-status Critical Current

Links

Abstract

The invention belongs to the technical field of petroleum exploration and development, and discloses a method and a system for solving a wellbore multiphase flow model based on a physical information neural network, wherein a solving domain interval is divided, and initial value conditions, boundary value conditions and internal sample points in the solving domain are input; calculating partial derivatives of the output data flow to the input coordinate points by using an automatic differentiation method, and constructing a control equation loss function of the wellbore multiphase flow model; calculating initial value condition and control equation condition loss by using initial point and boundary point data streams; optimizing a loss function, calculating model loss, and determining the parameters of the neural network model after optimization; and calling a model based on a physical information neural network, predicting key iteration parameters of the multiphase flow model of the time node at the next stage, and substituting the key iteration parameters serving as iteration initial values into the traditional multiphase flow model for accelerating calculation. Compared with the traditional numerical method, the calculation speed of the invention is increased by 2 to 3 orders of magnitude, the pressure state of the shaft can be predicted in advance, and effective well control measures can be adopted.

Description

Wellbore multiphase flow model solving method and system based on physical information neural network
Technical Field
The invention belongs to the technical field of petroleum exploration and development, and particularly relates to a method and a system for solving a wellbore multiphase flow model based on a physical information neural network.
Background
With the development of deep water, deep layers, unconventional and other complex reservoirs, reservoir types and formation pressure systems are increasingly complex. After the high-pressure oil and gas layer is drilled, stratum fluid invades the well bore, and the multiphase flow rule in the well bore is complex due to the influences of fluid phase state, flow pattern conversion, working condition change and the like at high temperature and high pressure, so that the accuracy and timeliness of well bore pressure calculation can directly influence the safety and the high efficiency of well drilling. The traditional multiphase flow model is solved by adopting methods such as finite difference, finite volume and the like, and when a complex well structure, a complex working condition and a complex flow system are faced, the problems of complex calculation process, low calculation efficiency, low speed and misconvergence are frequently encountered. The refinement of the space-time grid is a main reason for causing the problems of calculation, and if the time step and the space step are not proper, the phenomenon of non-convergence is very easy to occur, so that the calculation is wrongly reported. The hidden method of finite difference has lower calculation accuracy and higher calculation speed; the dominant method of finite volume has higher calculation accuracy at abrupt positions, but has slower calculation speed. Along with the rapid development of logging and logging while drilling technology, real-time data which can be acquired in the drilling process are gradually enriched, and higher requirements are put forward on the calculation accuracy and calculation speed of a wellbore multiphase flow model in the oil and gas drilling process. With rapid development of computer technologies such as artificial intelligence and deep learning, considerable data output can be obtained through huge data training. In the field of drilling engineering, however, the available and available data sets are in many cases limited and are difficult to combine with deep learning techniques. The deep learning technology based on the physical information neural network can couple the physical model and the drilling data set, and can accelerate the solution of the multiphase flow model of the oil and gas well bore through the training of the model.
Through the above analysis, the problems and defects existing in the prior art are as follows:
(1) The traditional multiphase flow model solving method is used for solving the problems of complex calculation process, low calculation efficiency, low speed and frequent non-convergence when calculating a complex well structure, a complex working condition and a complex flow system.
(2) In the field of drilling engineering, the available and available data sets are limited in many cases, and the combination of deep learning technology is difficult.
(3) The traditional wellbore multiphase flow model solving method is a finite difference method, when a simple physical model is solved, the calculating speed is low, the influence of space-time grid division on convergence is very large, and the model and data coupling driving solving is not realized.
Disclosure of Invention
In order to overcome the problems in the related art, the disclosed embodiment of the invention provides a method and a system for solving a wellbore multiphase flow model based on a physical information neural network.
The technical scheme is as follows: the wellbore multiphase flow model solving method based on the physical information neural network comprises the following steps:
S1, inputting initial value condition constraint, boundary value condition constraint and solving a data tag set in a domain;
s2, setting a neural network input layer, a hidden layer, a node number, an output layer and an activation function, initializing the weight and bias of the neural network, and calculating the output data stream of the neural network;
s3, calculating partial derivatives of the output data flow to the input coordinate points by using an automatic differentiation method, and constructing a control equation loss function of the wellbore multiphase flow model; calculating initial value condition and boundary value condition loss by using the initial point and boundary point data streams; the wellbore multiphase flow model includes: mass conservation equation, momentum conservation equation and drift flow model;
s4, iterating model loss by using a loss function optimization algorithm, updating neural network model parameters, optimizing loss function weights until the model loss meets the minimum condition, storing the model and calculating multiphase flow model parameters;
s5, using the prior results of all time nodes calculated by the numerical method as a data tag set, predicting the iteration parameters of the multiphase flow model of the time node in the next stage, and substituting the iteration parameters of the multiphase flow model as iteration initial values into the traditional multiphase flow model to accelerate calculation.
In step S1, the solving intra-domain internal data tag set is selected and sampled or given through wellbore single-phase calculation, and the wellbore single-phase flow pressure result is used as the solving intra-domain initial data tag.
In step S2, the updating the neural network model parameters includes: setting the number of hidden layers of the neural network, and selecting a tanh function as an activation function according to the number of neurons of each layer; the neuron connection mode of the neural network is full connection, and the input and output modes of the neural network are constructed and calculated based on a deep learning framework and programming;
neural network output data flow including depth-time solution intra-domain pressureCirculation pressure consumption->Air content->Gas velocity->And gas Density->
In step S3, the partial derivative calculation in the mass conservation equation and the momentum conservation equation adopts an automatic differentiation technology, and the loss is calculatedThe root mean square error of the control equation is used for solving the loss limit of points in the domain;
the matrix form of the multiphase flow model is:
in the method, in the process of the invention,for the partial derivative of the variable with respect to time, +.>Is the annular cross-section>Is of qi-containing rate->Is of gas phase density->For retention of fluid->For liquid phase density->For the gas phase velocity>For liquid phase velocity, +. >For the partial derivative of the variable with respect to space, +.>For wellbore pressure>For gas production rate, ++>For cyclic pressure consumption, < >>Acceleration of gravity, ++>Is a well bevel;
simplifying the model form, willExpressed as:
in the method, in the process of the invention,for a given gas phase density over the cross-sectional area, < >>For a given liquid phase density over a cross-sectional area, ">For the total mass flow of the gas-liquid two phases over a given cross-sectional area, < >>For a gas phase mass flow over a given cross-sectional area, +.>For a mass flow of liquid phase over a given cross-sectional area +.>Is the total fluid kinetic energy of the gas phase and the liquid phase on a given cross-sectional area; wellbore pressure in the output data stream>Circulation pressure consumption->Air content->Gas phase velocity->And gas Density->Time-space domain->The partial derivatives of (a) are respectivelyA loss function is obtained.
Further, the loss function includes:
the loss function of the wellbore gas phase continuity equation is:
in the method, in the process of the invention,loss function as a well bore gas phase continuity equation, +.>To find the number of sampling points in the solution domain,partial derivatives of gas phase density with respect to time at different nodes +.>Partial derivatives of gas phase mass flow at different nodes with respect to space;
the loss function of the wellbore liquid phase continuity equation is:
in the method, in the process of the invention,is a loss function of the well bore liquid phase continuity equation, +. >For the partial derivative of the liquid phase density with respect to time at different nodes,/->Partial derivatives of liquid phase mass flow at different nodes to space;
the loss function of the wellbore gas-liquid two-phase momentum conservation equation is as follows:
in the method, in the process of the invention,loss function of gas-liquid two-phase momentum conservation equation of shaft>The partial derivative of the total mass flow of the gas phase and the liquid phase at different nodes with respect to time is +.>The partial derivative of the total kinetic energy of the gas phase and the liquid phase at different nodes to the space is +.>For the partial derivative of friction versus space at a given cross section at different nodes, +.>For different nodesPartial derivatives of pressure versus space over a given cross section;
the loss function of the closed relationship of the multiphase flow equation set is:
in the method, in the process of the invention,loss function for closed relation of multiphase flow equation set, < ->For the distribution coefficient +.>For the gas velocity +.>For mixing fluid speed, +.>For the gas slip speed, & lt + & gt>Is a different temporal and spatial node;
by increasing the loss weight term before lossConstructing control equation loss->By increasing the loss weight term +.>Constructing control equation loss->
In step S3, the calculating the initial value condition and the boundary value condition loss using the initial point and the boundary point data stream includes: loss of initial value condition For the root mean square error between the initial and boundary data and the input data in the output data stream, the method is used for solving the loss limit of the domain initial point and the boundary point; input data including pressure, gas fraction, and gas velocity; constructing initial value condition and boundary value condition loss; the method specifically comprises the following steps:
(a) Under overflow working condition, the shaft pressure and the gas content rate in steady-state circulation are used as initial value conditions, the wellhead pressure and the bottom hole gas production rate are used as boundary value conditions, and the expression is:
in the method, in the process of the invention,for the initial value loss of overflow condition +.>Loss of boundary value for overflow condition, +.>For the number of initial data points, +.>For the number of boundary data points, +.>Calculating the output pressure profile for each iteration in overflow conditions,/->Calculating the output initial value of the air content for each iteration under overflow condition>Is overflowed toUnder the working condition, the wellhead back pressure is calculated and output every time in an iterative manner>Calculating an output intake speed boundary value for each iteration under overflow conditions, +.>For the pressure profile input in overflow mode, +.>The initial value of the air content input under overflow working condition is +.>Is input wellhead back pressure under overflow working condition, < + >>The input air inlet speed boundary value under the overflow working condition;
(b) Under the pressure control drilling working condition, taking the shaft pressure and the gas content at the overflow end as initial value conditions, taking the bottom hole pressure as boundary value conditions, and the expression is as follows:
in the method, in the process of the invention,loss of initial value for pressure controlled drilling conditions, < ->Loss of boundary value condition for pressure-controlled drilling conditions, < ->For each iteration calculation of the output pressure profile under the pressure-controlled drilling regime,calculating the output initial value of the air content for each iteration under the pressure control drilling working condition, and performing +.>Calculating the output bottom hole pressure boundary value for each iteration under the pressure control drilling working condition>For the pressure profile entered under the pressure-controlled drilling regime, < ->For the initial value of the gas content input under the pressure control drilling condition,/-for>The bottom hole pressure boundary value is input under the pressure control drilling working condition;
(c) Under the well closing working condition, the shaft pressure and the gas content at the end of overflow are used as initial value conditions, the wellhead flow rate is used as boundary value conditions, and the expression is:
in the method, in the process of the invention,loss of initial value for shut-in condition, +.>Boundary value condition loss of shut-in condition, +.>Calculating the output pressure profile for each iteration under shut-in conditions, < >>Calculating the output initial value of the gas content for each iteration under the well closing working condition,/>calculating an output wellhead flow speed boundary value for each iteration under the well closing working condition +. >The well mouth flow speed boundary value is input under the well closing working condition;
(d) Under the well-killing working condition, the shaft pressure and the gas content at the end of well-closing are taken as initial value conditions, the bottom hole pressure and the bottom hole flow rate are taken as boundary value conditions, and the expression is as follows:
in the method, in the process of the invention,loss of initial value for well control conditions, +.>Loss of boundary value condition for well control conditions, +.>Calculating the output pressure profile for each iteration under the well-killing condition, < >>Calculating the output initial value of the air content for each iteration under the well-killing working condition, +/->Calculating the output bottom hole pressure for each iteration under the well-killing working condition, +.>The output air inlet speed boundary value is calculated for each iteration under the well control working condition,for the pressure profile entered under the shut-in condition, < +.>For the initial value of the gas content input under the well closing working condition, < + >>For the bottom hole pressure input under the condition of closing the well, < + >>Is an input air inlet speed boundary value under the well closing working condition.
Further, the build control equation losesThe method comprises the following steps:
the build control equation is lostThe method comprises the following steps:
solving the internal point limit and the initial boundary point limit of the domain to obtain the total loss of the wellbore multiphase flow model equationThe method comprises the following steps:
and simultaneously optimizing the loss weight in the cyclic iteration process to obtain the total loss of the wellbore multiphase flow model.
In step S4, the applying the loss function optimization algorithm to iterate model loss, and updating the neural network model parameters includes:
L-BFG is adopted for loss function optimizationS algorithm, optimizing total loss of multiphase flow modelSolving the multiphase flow parameters of the shaft under the minimum condition; the learning rate, the maximum iteration number of each optimization step, the maximum number of each optimization function calculation, the update history size, the first order optimal termination tolerance, the termination tolerance of function value/parameter variation, and the linear search algorithm criteria are shown in the following formula:
total loss ofAfter the minimum condition is met, the neural network model parameters are saved; invoking neural network model parameters, inputting sample points in a solving domain interval and initial value conditions under the working condition, and deducing key parameters of the multiphase flow model to obtain pressure +_ at future time>Circulation pressure consumption->Air content->Gas velocity->And gas Density->
In step S5, substituting the multiphase flow model iteration parameter as an iteration initial value into the conventional multiphase flow model acceleration calculation includes: by fusing a neural network model solving method and a numerical value calculating method, prior data of each moment calculated by the numerical value calculating method is used as internal input of the neural network, and an output result is used as an initial iteration parameter at a time node of the next stage in numerical value calculation.
Another object of the present invention is to provide a wellbore multiphase flow model solving system based on a physical information neural network, the system implementing the wellbore multiphase flow model solving method based on the physical information neural network, the system comprising:
the data input module is used for inputting initial value condition constraint, boundary value condition constraint and solving a data tag set in the domain;
the neural network construction module is used for setting a neural network input layer, a hidden layer, a node number, an output layer and an activation function, initializing the weight and bias of the neural network and calculating the output data stream of the neural network;
the loss function construction module is used for calculating the partial derivative of the output data flow to the input coordinate point by using an automatic differentiation method and constructing a control equation loss function of the wellbore multiphase flow model; calculating initial value condition and boundary value condition loss by using the initial point and boundary point data streams; the wellbore multiphase flow model includes: mass conservation equation, momentum conservation equation and drift flow model;
the model loss calculation module is used for iterating model loss by applying a loss function optimization algorithm, updating the model parameters of the neural network, optimizing the weight of the loss function until the model loss meets the minimum condition, saving the model and calculating the parameters of the multiphase flow model;
The model solving module is used for taking the prior results of all time nodes calculated by the numerical method as a data tag set, predicting the iteration parameters of the multiphase flow model of the time node in the next stage, and substituting the iteration parameters of the multiphase flow model as iteration initial values into the traditional multiphase flow model to accelerate calculation.
By combining all the technical schemes, the invention has the advantages and positive effects that:
1. the method disclosed by the invention is integrated with priori data or real-time data, solves the problems of low numerical solution efficiency, low speed, non-convergence and the like of the multiphase flow model, and achieves the purposes of calculating and accelerating the solution of the multiphase flow model of the shaft and realizing real-time accurate simulation of the flow state of the shaft. According to the method, through the models such as the definite constraint condition, the loss function and the optimizer, the wellbore key parameter calculation method is provided, meanwhile, the calculation result can be used as an iteration initial value to further participate in the physical model solution, the calculation speed is improved, and the solution speed and the calculation accuracy of the wellbore multiphase flow model are effectively improved.
2. The invention introduces a neural network (PINN), which is a gridless technology, can effectively avoid truncation errors in the traditional algorithm, can fuse a Physical model and a data structure, and has stronger generalization under the condition of incomplete data. The method takes a wellbore multiphase flow model as a PINN internal solving domain constraint, and takes a wellbore initial value condition and a boundary value condition as a PINN initial and boundary solving domain constraint. Under the conditions of small tag data sets and even no tag data sets (random data), well bore pressure and key parameter distribution (gas content, gas speed and the like) in a full solution domain can be obtained in a short time through training and inference, the calculation speed is increased by 2-3 orders of magnitude compared with the traditional numerical method, the well bore pressure state can be predicted in advance on the basis, and effective well control measures can be adopted.
3. The method can be simultaneously applied to the aspects of iteration initial value prediction when solving the finite difference method and the finite volume method to realize the coupling driving of the physical model and the data. In the solving process of the numerical method, the selection of key parameter iteration initial values such as pressure, gas content and the like at each moment has specificity, and the adaptability to different flow systems is poor, so that the calculation efficiency is low, the speed is low and the convergence is often not achieved. The PINN method guides the priori calculation result into the neural network in real time as a label data set, and continuously trains under the constraint of an established physical model, so that iteration initial values such as pressure, air content and the like at a node of the time to be solved can be predicted, the iteration initial values reach corresponding precision under the primary prediction of the PINN, and the solving speed can be greatly improved when the physical model is solved for the second time. Compared with the oil gas exploitation process, the wellbore multiphase flow system in the drilling process is a relative transient process, and the requirements on the calculation speed and the calculation precision are extremely high. Compared with the traditional solving method, the method improves the calculating speed and calculating precision, promotes the development of the intelligent solving method of the wellbore multiphase flow model, and provides powerful guarantee for the drilling safety of complex oil and gas reservoirs.
4. The invention constructs the continuous equation, the momentum conservation equation and the loss function of the drift flow model which meet the multiphase flow of the shaft, considers the prior data or the real-time data to perform the simulation calculation of the multiphase flow state of the shaft, and has wider application range. The wellbore multiphase flow model solving method avoids the truncation errors of the finite difference and finite volume methods, is independent of a huge priori data set, but can remarkably improve the calculation efficiency under the support of the prior priori data set, and saves the training time. Under the support of the prior data or the real-time data of the shaft, the invention can be coupled with the shaft multiphase flow physical model, has the characteristic of coupling driving of the data and the model, greatly improves the numerical calculation speed and calculation precision of the shaft multiphase flow model by continuously deducing the iteration initial value, and provides technical support for the real-time calculation of the key flow parameters of the shaft. The method is scientific, and meets the engineering precision requirement.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure;
FIG. 1 is a flow chart of a method for solving a wellbore multiphase flow model based on a physical information neural network, which is provided by an embodiment of the invention;
FIG. 2 is a flow chart of accelerating solution of a multiphase flow model of an oil and gas well bore based on a physical information neural network, which is provided by the embodiment of the invention;
FIG. 3 is a graph of bottom hole pressure versus field pressure for a physical information neural network based solution provided by an embodiment of the present invention;
FIG. 4 is a graph of wellhead back pressure versus field pressure for a physical information neural network based solution provided by an embodiment of the present invention;
fig. 5 is a graph of iterative convergence of a loss function provided by an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the invention will be readily understood, a more particular description of the invention will be rendered by reference to the appended drawings. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. The invention may be embodied in many other forms than described herein and similarly modified by those skilled in the art without departing from the spirit or scope of the invention, which is therefore not limited to the specific embodiments disclosed below.
The wellbore multiphase flow model solving method and system based on the physical information neural network provided by the embodiment of the invention have the innovation points that:
(1) The invention constructs a loss function of the multiphase flow model of the oil and gas well shaft, comprising a mass conservation equation, a momentum conservation equation, a drift flow model and initial boundary value condition losses of different working conditions. The method for solving the multiphase flow model of the shaft based on the physical information neural network is established by taking the minimum loss function as a target, and the multiphase flow model of the shaft can be accurately solved.
(2) The wellbore multiphase flow model solving method avoids the truncation errors of the finite difference and finite volume methods, is independent of a huge priori data set, but can remarkably improve the calculation efficiency under the support of the prior priori data set, and saves the training time.
(3) The method has the characteristic of coupling driving of the physical model and the real-time data, and can greatly improve the numerical calculation speed and calculation precision of the wellbore multiphase flow model by continuously deducing the iteration initial value.
Furthermore, the invention performs technical investigation, and obtains that the prior art discloses a self-adaptive neural network model for two-phase flow annulus pressure prediction, but only analyzes the pressure control drilling working condition, and the invention provides a calculation method of various working conditions. Second, this prior art does not illustrate the impact of neural networks in terms of increasing computational speed, and the present invention illustrates, by way of example, the impact in terms of increasing computational speed.
Embodiment 1, as shown in fig. 1, the wellbore multiphase flow model solving method based on the physical information neural network provided by the embodiment of the invention comprises the following steps:
s1, inputting initial value condition constraint, boundary value condition constraint and solving a data tag set in a domain;
s2, setting a neural network input layer, a hidden layer, a node number, an output layer and an activation function, initializing the weight and bias of the neural network, and calculating the output data stream of the neural network;
s3, calculating partial derivatives of the output data flow to the input coordinate points by using an automatic differentiation method, and constructing a control equation loss function of the wellbore multiphase flow model; calculating initial value condition and boundary value condition loss by using the initial point and boundary point data streams; the wellbore multiphase flow model includes: mass conservation equation, momentum conservation equation and drift flow model;
s4, iterating model loss by using a loss function optimization algorithm, updating neural network model parameters, optimizing loss function weights until the model loss meets the minimum condition, storing the model and calculating multiphase flow model parameters;
s5, using the prior results of all time nodes calculated by the numerical method as a data tag set, predicting the iteration parameters of the multiphase flow model of the time node in the next stage, and substituting the iteration parameters of the multiphase flow model as iteration initial values into the traditional multiphase flow model to accelerate calculation.
In step S1, during the wellbore multiphase flow calculation, the initial, boundary value conditions are established in relation to the operating conditions, and step S3 is described in detail. The single-phase flow pressure result of the shaft is used as an initial data tag in the solving domain, and is closer to a target result than sampling data, so that the condition of unconvergence of the neural network derivation can be effectively relieved, and the training speed of the neural network is increased. The calculation formula of the single-phase flow pressure of the shaft is shown in formula (1).
In the method, in the process of the invention,to solve for the initial pressure inside the domain, +.>For different positionsSingle-phase flowing friction block>For the density of the liquid column in the shaft>Acceleration of gravity, ++>Is a space step length;
in the embodiment of the present invention, in step S1, the initial data tag set is selected and sampled or calculated by the single-phase calculation of the well bore, and the single-phase flow pressure result of the well bore is used as the initial data tag in the solving domain.
In step S2, setting the number of hidden layers of the neural network, and selecting a tanh function as an activation function according to the number of neurons of each layer; the neuron connection mode of the neural network is full connection, and the input and output modes of the neural network are built and calculated based on a deep learning framework and programming.
In step S2, the wellbore flow is considered to be one-dimensional multiphase flow, and the input space-time coordinate points are The space coordinates comprise boundary point coordinates and space coordinates in each time solving domain, and the time coordinates are each time in solving time. Based on a PyTorch deep learning framework, a fully connected neural network framework is constructed on a Pycharm platform by using Python language. In the embodiment, the number of hidden layers of the neural network is set, the number of neurons in each layer is set, and the tanh function is selected as the activation function; the neuron connection mode of the neural network is full connection, and the input and output modes of the neural network are built and calculated based on a deep learning framework and programming. The output data stream comprises the depth-time solution domain pressure +.>Circulation pressure consumption->Air content->Velocity of gasAnd gas Density->
In step S3, loss function forms (2) to (4) of the wellbore multiphase flow equation are created, representing a gas phase continuity equation, a liquid phase continuity equation, and a gas-liquid two-phase momentum conservation equation, respectively. The traditional wellbore multiphase flow equation is hyperbolic and contains convection flux termsPressure flux term->And Source sink item->Can be expressed as formula (5) and matrix form (6). To simplify the model form, will ∈>And->Component (S)>Expressed by formula (7). Specific terms of the loss function are derived from the automatic differentiation technique output. In particular, the pressure of the output data stream +. >Circulation pressure consumption->Air content->Gas velocity->And gas Density->Parameter time-space domain->The partial derivatives of (2) are>The loss function is obtained by calculation by substituting the equations (2) to (4).
The loss function includes:
the loss function of the wellbore gas phase continuity equation is:
in the method, in the process of the invention,loss function as a well bore gas phase continuity equation, +.>To find the number of sampling points in the solution domain,partial derivatives of gas phase density with respect to time at different nodes +.>Partial derivatives of gas phase mass flow at different nodes with respect to space;
the loss function of the wellbore liquid phase continuity equation is:
;/>
in the method, in the process of the invention,is a loss function of the well bore liquid phase continuity equation, +.>For the partial derivative of the liquid phase density with respect to time at different nodes,/->Partial derivatives of liquid phase mass flow at different nodes to space;
the loss function of the wellbore gas-liquid two-phase momentum conservation equation is as follows:
in the method, in the process of the invention,loss function of gas-liquid two-phase momentum conservation equation of shaft>The partial derivative of the total mass flow of the gas phase and the liquid phase at different nodes with respect to time is +.>The partial derivative of the total kinetic energy of the gas phase and the liquid phase at different nodes to the space is +.>For the partial derivative of friction versus space at a given cross section at different nodes, +.>Partial derivatives of pressure versus space for a given cross section at different nodes;
In the method, in the process of the invention,for mass flow->For convection flux and pressure flux, < >>Is a source item;
in the method, in the process of the invention,is the annular cross-section>For wellbore pressure>For cyclic pressure consumption, < >>Is of qi-containing rate->In order to achieve a liquid holdup,for the gas phase velocity>For liquid phase velocity, +.>Is of gas phase density->For liquid phase density->Is the angle of inclination of the well>In order to achieve a rate of gas production,acceleration of gravity, ++>For the partial derivative of the variable with respect to time, +.>Partial derivatives of variables to space;
;/>
in the method, in the process of the invention,for a given gas phase density over the cross-sectional area, < >>For a given liquid phase density over a cross-sectional area, ">For the total mass flow of the gas-liquid two phases over a given cross-sectional area, < >>For a gas phase mass flow over a given cross-sectional area, +.>For a mass flow of liquid phase over a given cross-sectional area +.>Is the total fluid kinetic energy of the gas phase and the liquid phase on a given cross-sectional area;
a loss function form of a closed relation (drift flow model) of the multiphase flow equation set is created, and can be expressed by a formula (8):
in the method, in the process of the invention,loss function for closed relation of multiphase flow equation set, < ->For the distribution coefficient +.>For the gas velocity +.>For mixing fluid speed, +.>For the gas slip speed, & lt + & gt>Is a different temporal and spatial node;
increasing loss weight terms before each loss Constructing control equation loss->
In the embodiment of the present invention, in step S3, the initial value condition is lostFor the root mean square error between the initial and boundary data and the input data in the output data stream, the method is used for solving the loss limit of the domain initial point and the boundary point; the input data includes pressure, gas content and gas velocity;
and constructing initial value condition and boundary value condition loss. The complexity of the drilling conditions determines the complexity of the initial value condition and the boundary value condition in the calculation process of the wellbore multiphase flow model. And constructing initial value conditions and boundary value condition losses according to working conditions as shown in formulas (9) to (16). The method specifically comprises the following steps:
(1) under overflow working condition, taking the shaft pressure and the gas content rate in steady-state circulation as initial value conditions, and taking the wellhead pressure and the bottom hole gas production rate as boundary value conditions:
in the method, in the process of the invention,for the initial value loss of overflow condition +.>Loss of boundary value for overflow condition, +.>For the number of initial data points, +.>For the number of boundary data points, +.>Calculating the output pressure profile for each iteration in overflow conditions,/->Calculating the output initial value of the air content for each iteration under overflow condition>Calculating the output wellhead back pressure for each iteration under overflow working condition >Calculating an output intake speed boundary value for each iteration under overflow conditions, +.>For the pressure profile input in overflow mode, +.>The initial value of the air content input under overflow working condition is +.>Is input wellhead back pressure under overflow working condition, < + >>The input air inlet speed boundary value under the overflow working condition;
(2) under the pressure control drilling working condition, taking the shaft pressure and the gas content at the overflow end as initial value conditions and taking the bottom hole pressure as boundary value conditions:
in the method, in the process of the invention,loss of initial value for pressure controlled drilling conditions, < ->Loss of boundary value condition for pressure-controlled drilling conditions, < ->For each iteration calculation of the output pressure profile under the pressure-controlled drilling regime,calculating the output initial value of the air content for each iteration under the pressure control drilling working condition, and performing +.>Calculating the output bottom hole pressure boundary value for each iteration under the pressure control drilling working condition>For the pressure profile entered under the pressure-controlled drilling regime, < ->For controlling pressureAn initial value of the gas content input under the well working condition, < + >>The bottom hole pressure boundary value is input under the pressure control drilling working condition;
(3) under the well closing working condition, taking the shaft pressure and the gas content at the end of overflow as initial value conditions and taking the wellhead flow rate as boundary value conditions:
in the method, in the process of the invention, Loss of initial value for shut-in condition, +.>Boundary value condition loss of shut-in condition, +.>Calculating the output pressure profile for each iteration under shut-in conditions, < >>Calculating the output initial value of the air content for each iteration under the well closing working condition, +/->Calculating an output wellhead flow speed boundary value for each iteration under the well closing working condition +.>The well mouth flow speed boundary value is input under the well closing working condition;
(4) under the well-killing working condition, taking the shaft pressure and the gas content at the end of well-closing as initial value conditions and taking the bottom hole pressure and the bottom hole flow rate as boundary value conditions:
in the method, in the process of the invention,loss of initial value for well control conditions, +.>Loss of boundary value condition for well control conditions, +.>Calculating the output pressure profile for each iteration under the well-killing condition, < >>Calculating the output initial value of the air content for each iteration under the well-killing working condition, +/->Calculating the output bottom hole pressure for each iteration under the well-killing working condition, +.>The output air inlet speed boundary value is calculated for each iteration under the well control working condition,for the pressure profile entered under the shut-in condition, < +.>For the initial value of the gas content input under the well closing working condition, < + >>For the bottom hole pressure input under the condition of closing the well, < + >>Is an input air inlet speed boundary value under the well closing working condition.
Increasing loss weight terms before each lossConstruction of control equation lossesAnd loss of threshold condition->The expression (17) and (18) can be used. And simultaneously optimizing the loss weight in the cyclic iteration process to obtain the total loss of the wellbore multiphase flow model, wherein the total loss can be represented by the formula (19):
in step S4, the L-BFGS algorithm is applied to optimize the loss function, wherein the learning rate, the maximum number of iterations of each optimization step, the maximum number of optimization function calculations each time, the update history size, the first order optimal termination tolerance, the termination tolerance of function value/parameter variation, and the linear search algorithm criteria are represented by the formula (20):
total loss ofAfter the minimum condition is met, the neural network model parameters are saved; invoking neural network model parameters, inputting sample points in a solving domain interval and initial value conditions under the working condition, and deducing key parameters of the multiphase flow model to obtain pressure +_ at future time>Circulation pressure consumption->Air content->Gas velocity->And gas Density->
The inference process mainly inputs a solution domain and a threshold value condition through a trained model, and invokes the trained model, so that the solution of the multiphase flow model can be inferred in a millisecond time domain.
According to the embodiment, the method and the device for solving the multiphase flow model based on the finite difference and the finite volume effectively avoid the truncation error by replacing the existing multiphase flow model solving method based on the finite difference and the finite volume, so that the technology is beneficial to improving the precision of the multiphase flow model of the oil and gas well and accelerating the solving speed, and has high value and significance for intelligent solving and developing of the multiphase flow model of the oil and gas well and safe and efficient development of the drilling of the complex oil and gas reservoir.
The invention replaces the prior ionosphere clutter suppression method of the high-frequency ground wave radar, and because the ionosphere clutter is the biggest influencing factor for limiting the detection performance of the high-frequency ground wave radar, the invention is beneficial to improving the overall performance of the high-frequency ground wave radar, and the high-frequency ground wave radar is used as important equipment for the construction of sea defense in China, and has great advantages for sea monitoring and the fighter plane for detecting ships and low-altitude sudden defense, thus the invention has high value and significance.
For the petroleum engineering drilling field, there is no effective and good method in the aspect of fast solving of the wellbore multiphase flow model in the industry, because of the limitation of the traditional finite difference method and the careful division of space-time network, the solving speed is slow, and the problem of misconvergence is frequently encountered, and the method is not effectively combined with the drilling priori data, so that the method just fills the blank.
The method solves the problem of quick solving of the multiphase flow model of the oil and gas well bore based on physical model and data coupling, and plays an important role in safe and efficient well drilling and completion of complex oil and gas reservoirs. The invention adopts the deep learning technology, and overcomes the technical prejudice that the multiphase flow model of the oil and gas well bore can not be solved quickly.
Embodiment 2, the neural network-based oil and gas wellbore multiphase flow model solving method provided in embodiment 1 is different in that:
in step S5, the result of the neural network calculation is used as an initial iteration value (initial pressure distribution at a certain moment) in the conventional numerical calculation process) The calculation is performed, and a specific calculation flow is shown in fig. 2.
(1) Parameter initialization, defining calculated boundary value condition, setting neural network inference time intervalFor 5min;
(2) Using conventional numerical calculation methods, assume thatTime wellbore pressure profile->Solving +.A mass conservation equation in equation (6) is applied>Parameter, solving the wellbore pressure distribution by using the momentum conservation equation in (6)>;/>
(3) JudgingWhether or not the error requirement (") is met>) If not, returning to step (2), and assuming again the pressure distribution +.>Up to- >The error requirement is met;
(4) The calculation result of the prior time is calculatedThe data stream is led into the neural network for training; judging whether the current calculation time is the final time step of calculation, if so, recording data and outputting, and ending the calculation; if the last time step is not the last time step, executing the step (5);
(5) Judging the difference between the current calculation time and the initial calculation timeWhether or not is less than->If yes, returning to the step (2), and continuously calculating the flow parameter of the next time step by using the traditional numerical method; if not, saving and calling a neural network trained by using the prior calculation result to infer +.>Pressure distribution at the moment->The assumed pressure distribution as this time step +.>The solution of the multiphase flow model is carried out at the initial iteration value, the iteration times are obviously reduced at the moment, and the purpose of accelerating the calculation speed is achieved;
(6) Repeating the steps (2) to (5) until the last time step is calculated, and outputting a calculation result.
Embodiment 3 of the present invention provides a wellbore multiphase flow model solving system based on a physical information neural network, comprising:
the data input module is used for inputting initial value condition constraint, boundary value condition constraint and solving a data tag set in the domain;
The neural network construction module is used for setting a neural network input layer, a hidden layer, a node number, an output layer and an activation function, initializing the weight and bias of the neural network and calculating the output data stream of the neural network;
the loss function construction module is used for calculating the partial derivative of the output data flow to the input coordinate point by using an automatic differentiation method and constructing a control equation loss function of the wellbore multiphase flow model; calculating initial value condition and boundary value condition loss by using the initial point and boundary point data streams; the wellbore multiphase flow model includes: mass conservation equation, momentum conservation equation and drift flow model;
the model loss calculation module is used for iterating model loss by applying a loss function optimization algorithm, updating the model parameters of the neural network, optimizing the weights of all loss functions until the model loss meets the minimum condition, saving the model and calculating key parameters of the multiphase flow model;
the model solving module is used for taking the prior results of all time nodes calculated by the numerical method as a data tag set, predicting the iteration parameters of the multiphase flow model of the time node in the next stage, and substituting the iteration parameters of the multiphase flow model as iteration initial values into the traditional multiphase flow model to accelerate calculation.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
The content of the information interaction and the execution process between the devices/units and the like is based on the same conception as the method embodiment of the present invention, and specific functions and technical effects brought by the content can be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present invention. For specific working processes of the units and modules in the system, reference may be made to corresponding processes in the foregoing method embodiments.
According to an embodiment of the present application, the present invention also provides a computer apparatus, including: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, which when executed by the processor performs the steps of any of the various method embodiments described above.
Embodiments of the present invention also provide a computer readable storage medium storing a computer program which, when executed by a processor, performs the steps of the respective method embodiments described above.
The embodiment of the invention also provides an information data processing terminal, which is used for providing a user input interface to implement the steps in the method embodiments when being implemented on an electronic device, and the information data processing terminal is not limited to a mobile phone, a computer and a switch.
The embodiment of the invention also provides a server, which is used for realizing the steps in the method embodiments when being executed on the electronic device and providing a user input interface.
Embodiments of the present invention also provide a computer program product which, when run on an electronic device, causes the electronic device to perform the steps of the method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
To further demonstrate the positive effects of the above embodiments, the present invention was based on the above technical solutions to perform the following experiments.
The bottom hole pressure and wellhead back pressure curves under overflow and shut-in conditions are calculated by applying the method of the invention, as shown in fig. 3 and 4. As can be seen from fig. 3 and 4, the well was shut in immediately after 7.6 minutes of overflow. The initial value condition of the overflow working condition is the shaft pressure and the gas content rate in steady-state circulation, and the boundary value condition is the wellhead pressure (atmospheric pressure) and the constant bottom hole gas production rate; the initial value condition of the well closing working condition is the shaft pressure at the end of overflow, and the boundary value condition is the open hole constant seepage rate at the bottom of the well and the wellhead flow rate (0 m/s). The calculation result of the invention is consistent with the actual measurement pressure result, and the average error is not more than 2%, which shows that the invention has high calculation precision. As can be seen from FIG. 5, after 40000 iterations, the physical information training was successful, the model inference time was 0.5077 seconds, and the calculation speed was two orders of magnitude faster than the numerical calculation speed, indicating that the invention has extremely high calculation speed. It can be seen that the physical information can accurately calculate the multiphase flow pressure of the oil and gas well bore.
In conclusion, the method for solving the wellbore multiphase flow model can accurately solve the wellbore multiphase flow model, accelerates the calculation speed of the traditional numerical method to a certain extent, and has wide application prospects under different drilling construction working conditions such as normal drilling, overflow, well shut-in, pressure control drilling, intelligent well killing and the like.
While the invention has been described with respect to what is presently considered to be the most practical and preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but on the contrary, is intended to cover various modifications, equivalents, and alternatives falling within the spirit and scope of the invention.

Claims (10)

1. A method for solving a wellbore multiphase flow model based on a physical information neural network is characterized by comprising the following steps:
s1, inputting initial value condition constraint, boundary value condition constraint and solving a data tag set in a domain;
s2, setting a neural network input layer, a hidden layer, a node number, an output layer and an activation function, initializing the weight and bias of the neural network, and calculating the output data stream of the neural network;
s3, calculating partial derivatives of the output data flow to the input coordinate points by using an automatic differentiation method, and constructing a control equation loss function of the wellbore multiphase flow model; calculating initial value condition and boundary value condition loss by using the initial point and boundary point data streams; the wellbore multiphase flow model includes: mass conservation equation, momentum conservation equation and drift flow model;
S4, iterating model loss by using a loss function optimization algorithm, updating neural network model parameters, optimizing loss function weights until the model loss meets the minimum condition, storing the model and calculating multiphase flow model parameters;
s5, using the prior results of all time nodes calculated by the numerical method as a data tag set, predicting the iteration parameters of the multiphase flow model of the time node in the next stage, and substituting the iteration parameters of the multiphase flow model as iteration initial values into the traditional multiphase flow model to accelerate calculation.
2. The method for solving the wellbore multiphase flow model based on the physical information neural network according to claim 1, wherein in step S1, the set of internal data labels in the solving domain is selected to sample or be given by wellbore single-phase calculation, and the wellbore single-phase flow pressure result is used as the initial data label in the solving domain.
3. The method of claim 1, wherein in step S2, updating the neural network model parameters comprises: setting the number of hidden layers of the neural network, and selecting a tanh function as an activation function according to the number of neurons of each layer; the neuron connection mode of the neural network is full connection, and the input and output modes of the neural network are constructed and calculated based on a deep learning framework and programming;
Neural network output data flow including depth-time solution intra-domain pressureCirculation pressure consumption->Air content->Gas velocity->And gas Density->
4. The method for solving a wellbore multiphase flow model based on a physical information neural network according to claim 1, wherein in step S3, the partial derivative calculation in the mass conservation equation and the momentum conservation equation both adopt an automatic differentiation technique, and the loss is causedThe root mean square error of the control equation is used for solving the loss limit of points in the domain;
the matrix form of the multiphase flow model is:
in the method, in the process of the invention,for the partial derivative of the variable with respect to time, +.>Is the annular cross-section>Is of qi-containing rate->Is of gas phase density->For retention of fluid->For liquid phase density->For the gas phase velocity>For liquid phase velocity, +.>For the partial derivative of the variable with respect to space, +.>For wellbore pressure>For gas production rate, ++>For cyclic pressure consumption, < >>Acceleration of gravity, ++>Is a well bevel;
simplifying the model form, willExpressed as:
in the method, in the process of the invention,for a given gas phase density over the cross-sectional area, < >>For a given liquid phase density over a cross-sectional area, ">To a given cross-sectional areaTotal mass flow of gas-liquid two phases +.>For a gas phase mass flow over a given cross-sectional area, +. >For a mass flow of liquid phase over a given cross-sectional area +.>Is the total fluid kinetic energy of the gas phase and the liquid phase on a given cross-sectional area;
outputting wellbore pressure in a data streamCirculation pressure consumption->Air content->Gas phase velocity->And gas Density->Time-space domain->The partial derivatives of (2) are>A loss function is obtained.
5. The method of solving a wellbore multiphase flow model based on a physical information neural network of claim 4, wherein the loss function comprises:
the loss function of the wellbore gas phase continuity equation is:
in the method, in the process of the invention,loss function as a well bore gas phase continuity equation, +.>To solve the number of sampling points in the domain +.>Partial derivatives of gas phase density with respect to time at different nodes +.>Partial derivatives of gas phase mass flow at different nodes with respect to space;
the loss function of the wellbore liquid phase continuity equation is:
in the method, in the process of the invention,is a loss function of the well bore liquid phase continuity equation, +.>For the partial derivative of the liquid phase density with respect to time at different nodes,/->Partial derivatives of liquid phase mass flow at different nodes to space;
the loss function of the wellbore gas-liquid two-phase momentum conservation equation is as follows:
in the method, in the process of the invention,loss function of gas-liquid two-phase momentum conservation equation of shaft >The partial derivative of the total mass flow of the gas phase and the liquid phase at different nodes with respect to time is +.>The partial derivative of the total kinetic energy of the gas phase and the liquid phase at different nodes to the space is +.>For the partial derivative of friction versus space at a given cross section at different nodes, +.>Partial derivatives of pressure versus space for a given cross section at different nodes;
the loss function of the closed relationship of the multiphase flow equation set is:
in the method, in the process of the invention,loss function for closed relation of multiphase flow equation set, < ->For the distribution coefficient +.>For the gas velocity +.>For mixing fluid speed, +.>For the gas slip speed, & lt + & gt>Is a different temporal and spatial node;
by increasing the loss weight term before lossConstructing control equation loss->By increasing the loss weight term +.>Constructing control equation loss->
6. The method of claim 1, wherein in step S3, the calculating the initial value condition and the boundary value condition loss using the initial point and the boundary point data stream comprises: loss of initial value conditionFor the root mean square error between the initial and boundary data and the input data in the output data stream, the method is used for solving the loss limit of the domain initial point and the boundary point; input data including pressure, gas fraction, and gas velocity; constructing initial value condition and boundary value condition loss; the method specifically comprises the following steps:
(a) Under overflow working condition, the shaft pressure and the gas content rate in steady-state circulation are used as initial value conditions, the wellhead pressure and the bottom hole gas production rate are used as boundary value conditions, and the expression is:
in the method, in the process of the invention,for the initial value loss of overflow condition +.>Loss of boundary value for overflow condition, +.>For the number of initial data points, +.>For the number of boundary data points, +.>Calculating the output pressure profile for each iteration in overflow conditions,/->The output initial value of the air content is calculated for each iteration under the overflow working condition,calculating the output wellhead back pressure for each iteration under overflow working condition>Calculating an output intake speed boundary value for each iteration under overflow conditions, +.>For the pressure profile input in overflow mode, +.>The initial value of the air content input under overflow working condition is +.>Is input wellhead back pressure under overflow working condition, < + >>The input air inlet speed boundary value under the overflow working condition;
(b) Under the pressure control drilling working condition, taking the shaft pressure and the gas content at the overflow end as initial value conditions, taking the bottom hole pressure as boundary value conditions, and the expression is as follows:
in the method, in the process of the invention,loss of initial value for pressure controlled drilling conditions, < ->Loss of boundary value condition for pressure-controlled drilling conditions, < - >For each iteration calculation of the output pressure profile under the pressure-controlled drilling regime,calculating the output initial value of the air content for each iteration under the pressure control drilling working condition, and performing +.>Calculating the output bottom hole pressure boundary value for each iteration under the pressure control drilling working condition>For the pressure profile entered under the pressure-controlled drilling regime, < ->For the initial value of the gas content input under the pressure control drilling condition,/-for>The bottom hole pressure boundary value is input under the pressure control drilling working condition;
(c) Under the well closing working condition, the shaft pressure and the gas content at the end of overflow are used as initial value conditions, the wellhead flow rate is used as boundary value conditions, and the expression is:
in the method, in the process of the invention,loss of initial value for shut-in condition, +.>Boundary value condition loss of shut-in condition, +.>Calculating the output pressure profile for each iteration under shut-in conditions, < >>Calculating the output initial value of the air content for each iteration under the well closing working condition, +/->Calculating an output wellhead flow speed boundary value for each iteration under the well closing working condition +.>The well mouth flow speed boundary value is input under the well closing working condition;
(d) Under the well-killing working condition, the shaft pressure and the gas content at the end of well-closing are taken as initial value conditions, the bottom hole pressure and the bottom hole flow rate are taken as boundary value conditions, and the expression is as follows:
In the method, in the process of the invention,loss of initial value for well control conditions, +.>Loss of boundary value condition for well control conditions, +.>Calculating the output pressure profile for each iteration under the well-killing condition, < >>Calculating the output initial value of the air content for each iteration under the well-killing working condition, +/->Calculating the output bottom hole pressure for each iteration under the well-killing working condition, +.>Calculating an output air inlet speed boundary value for each iteration under the well control condition, < >>For the pressure profile entered under the shut-in condition, < +.>For the initial value of the gas content input under the working condition of closing the well,for the bottom hole pressure input under the condition of closing the well, < + >>Is an input air inlet speed boundary value under the well closing working condition.
7. The method for solving a wellbore multiphase flow model based on a physical information neural network according to claim 5, wherein the construction control equation is lostThe method comprises the following steps:
the build control equation is lostThe method comprises the following steps:
solving the internal point limit and the initial boundary point limit of the domain to obtain the total loss of the wellbore multiphase flow model equationThe method comprises the following steps:
and simultaneously optimizing the loss weight in the cyclic iteration process to obtain the total loss of the wellbore multiphase flow model.
8. The method for solving a wellbore multiphase flow model based on a physical information neural network according to claim 1, wherein in step S4, the applying the loss function optimization algorithm to iterate model loss, updating neural network model parameters includes:
L-BFGS algorithm is adopted for loss function optimization, and total loss of multiphase flow model is optimizedSolving the multiphase flow parameters of the shaft under the minimum condition; the learning rate, the maximum iteration number of each optimization step, the maximum number of each optimization function calculation, the update history size, the first order optimal termination tolerance, the termination tolerance of function value/parameter variation, and the linear search algorithm criteria are shown in the following formula:
total loss ofAfter the minimum condition is met, the neural network model parameters are saved; invoking neural network model parameters, inputting sample points in a solving domain interval and initial value conditions under the working condition, and deducing key parameters of the multiphase flow model to obtain pressure +_ at future time>Circulation pressure consumption->Air content->Gas velocity->And gas Density->
9. The method for solving a wellbore multiphase flow model based on a physical information neural network according to claim 1, wherein substituting the multiphase flow model iteration parameters as iteration initial values into the conventional multiphase flow model acceleration calculation in step S5 comprises: by fusing a neural network model solving method and a numerical value calculating method, prior data of each moment calculated by the numerical value calculating method is used as internal input of the neural network, and an output result is used as an initial iteration parameter at a time node of the next stage in numerical value calculation.
10. A method for solving a wellbore multiphase flow model based on a physical information neural network, which is characterized in that the system implements the wellbore multiphase flow model solving method based on the physical information neural network as claimed in any one of claims 1 to 9, and the system comprises:
the data input module is used for inputting initial value condition constraint, boundary value condition constraint and solving a data tag set in the domain;
the neural network construction module is used for setting a neural network input layer, a hidden layer, a node number, an output layer and an activation function, initializing the weight and bias of the neural network and calculating the output data stream of the neural network;
the loss function construction module is used for calculating the partial derivative of the output data flow to the input coordinate point by using an automatic differentiation method and constructing a control equation loss function of the wellbore multiphase flow model; calculating initial value condition and boundary value condition loss by using the initial point and boundary point data streams; the wellbore multiphase flow model includes: mass conservation equation, momentum conservation equation and drift flow model;
the model loss calculation module is used for iterating model loss by applying a loss function optimization algorithm, updating the model parameters of the neural network, optimizing the weight of the loss function until the model loss meets the minimum condition, saving the model and calculating the parameters of the multiphase flow model;
The model solving module is used for taking the prior results of all time nodes calculated by the numerical method as a data tag set, predicting the iteration parameters of the multiphase flow model of the time node in the next stage, and substituting the iteration parameters of the multiphase flow model as iteration initial values into the traditional multiphase flow model to accelerate calculation.
CN202410147514.3A 2024-02-02 2024-02-02 Wellbore multiphase flow model solving method and system based on physical information neural network Pending CN117669430A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410147514.3A CN117669430A (en) 2024-02-02 2024-02-02 Wellbore multiphase flow model solving method and system based on physical information neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410147514.3A CN117669430A (en) 2024-02-02 2024-02-02 Wellbore multiphase flow model solving method and system based on physical information neural network

Publications (1)

Publication Number Publication Date
CN117669430A true CN117669430A (en) 2024-03-08

Family

ID=90086715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410147514.3A Pending CN117669430A (en) 2024-02-02 2024-02-02 Wellbore multiphase flow model solving method and system based on physical information neural network

Country Status (1)

Country Link
CN (1) CN117669430A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1970991A (en) * 2006-12-06 2007-05-30 中国石油大学(北京) Method for metering oil production yield and analyzing and optimizing operating condition of oil well and system thereof
US20100140496A1 (en) * 2007-03-05 2010-06-10 Bruno Pinguet Detection of an element in a flow
US20130096898A1 (en) * 2010-07-29 2013-04-18 Exxonmobile Upstream Research Company Methods and Systems For Machine - Learning Based Simulation of Flow
CN110424954A (en) * 2019-08-09 2019-11-08 西南石油大学 Annular space transient state water attack model based on mineshaft annulus transient multi-phase stream flow characteristics
CN114780909A (en) * 2022-04-29 2022-07-22 西安交通大学 Partial differential equation solving method and system based on physical information neural network
CN116205153A (en) * 2022-12-27 2023-06-02 重庆邮电大学 Grid density optimization method based on flow field physical information
CN116384280A (en) * 2023-04-07 2023-07-04 中国石油大学(北京) Physical differential convolution neural network multiphase seepage simulation method, device and medium
CN116958188A (en) * 2023-06-20 2023-10-27 北京理工大学 Smoke field multi-parameter prediction method based on physical information constraint neural network
CN117150968A (en) * 2023-10-09 2023-12-01 上海积鼎信息科技有限公司 Passive containment water film cooling performance analysis platform
CN117407637A (en) * 2023-11-03 2024-01-16 广州大学 High-index differential algebraic equation neural network solving method based on Radau method
CN117454802A (en) * 2023-11-23 2024-01-26 中国海洋石油集团有限公司 Method for calculating pressure wave propagation speed of gas-immersed well bore by considering gas-liquid mass transfer

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1970991A (en) * 2006-12-06 2007-05-30 中国石油大学(北京) Method for metering oil production yield and analyzing and optimizing operating condition of oil well and system thereof
US20100140496A1 (en) * 2007-03-05 2010-06-10 Bruno Pinguet Detection of an element in a flow
US20130096898A1 (en) * 2010-07-29 2013-04-18 Exxonmobile Upstream Research Company Methods and Systems For Machine - Learning Based Simulation of Flow
CN110424954A (en) * 2019-08-09 2019-11-08 西南石油大学 Annular space transient state water attack model based on mineshaft annulus transient multi-phase stream flow characteristics
CN114780909A (en) * 2022-04-29 2022-07-22 西安交通大学 Partial differential equation solving method and system based on physical information neural network
CN116205153A (en) * 2022-12-27 2023-06-02 重庆邮电大学 Grid density optimization method based on flow field physical information
CN116384280A (en) * 2023-04-07 2023-07-04 中国石油大学(北京) Physical differential convolution neural network multiphase seepage simulation method, device and medium
CN116958188A (en) * 2023-06-20 2023-10-27 北京理工大学 Smoke field multi-parameter prediction method based on physical information constraint neural network
CN117150968A (en) * 2023-10-09 2023-12-01 上海积鼎信息科技有限公司 Passive containment water film cooling performance analysis platform
CN117407637A (en) * 2023-11-03 2024-01-16 广州大学 High-index differential algebraic equation neural network solving method based on Radau method
CN117454802A (en) * 2023-11-23 2024-01-26 中国海洋石油集团有限公司 Method for calculating pressure wave propagation speed of gas-immersed well bore by considering gas-liquid mass transfer

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TAN CHAODONG 等: "Model and Experimental Study of Online measurement of multiphase flow in oil wells based on data fusion", 《ICNSER2020: PROCEEDINGS OF THE 2ND INTERNATIONAL CONFERENCE ON INDUSTRIAL CONTROL NETWORK AND SYSTEM ENGINEERING RESEARCH》, 25 September 2020 (2020-09-25), pages 28 *
宋红伟 等: "水平井生产测井气水-两相流流型试验分析", 《石油天然气学报》, 31 December 2011 (2011-12-31), pages 96 - 101 *

Similar Documents

Publication Publication Date Title
US10055684B2 (en) System and method for using an artificial neural network to simulate pipe hydraulics in a reservoir simulator
Narasingam et al. Temporal clustering for order reduction of nonlinear parabolic PDE systems with time‐dependent spatial domains: Application to a hydraulic fracturing process
US20210123334A1 (en) Hybrid physics-based and machine learning reservoir simulations for stimulation treatments
AU2011357784A1 (en) System and method for using an artificial neural network to simulate pipe hydraulics in a reservoir simulator
CN111882133B (en) Prediction-based federated learning communication optimization method and system
US11308413B2 (en) Intelligent optimization of flow control devices
CN114896903A (en) Forced learning-based decision optimization method for oil field production system
CN114282725A (en) Construction of transient oil reservoir agent model based on deep learning and oil reservoir prediction method
CN117669430A (en) Wellbore multiphase flow model solving method and system based on physical information neural network
RU2590278C1 (en) Methods and systems for controlling negative mobility of components in reservoir simulation
Song et al. An intelligent data-driven model for virtual flow meters in oil and gas development
Zhang et al. Research on remote intelligent control technology of throttling and back pressure in managed pressure drilling
WO2021133627A1 (en) Intelligent completion control in reservoir modeling
Li et al. A numerical computation approach for the optimal control of ASP flooding based on adaptive strategies
Carpenter Transformer-Based Models Aid Prediction of Transient Production of Oil Wells
Abdalla et al. Actor-critic reinforcement learning leads decision-making in energy systems optimization—steam injection optimization
US20220228465A1 (en) Multi-agent, multi-objective wellbore gas-lift optimization
Völcker et al. Explicit singly diagonally implicit Runge-Kutta methods and adaptive stepsize control for reservoir simulation
Hao et al. Adaptive decision method of directional drilling tool face based on model free online learning
Cheng et al. Deep learning-based prediction of subsurface oil reservoir pressure using spatio-temporal data
CN117494617B (en) Carbon dioxide flooding quick simulation method based on embedded physical information neural network
Bu Application of Deep Learning in Prediction of Linkage Relationship between Wells
CN117217131B (en) Oil reservoir numerical simulation method, device, equipment and storage medium
US11905817B2 (en) Method and system for managing carbon dioxide supplies using machine learning
US20230193791A1 (en) Method and system for managing carbon dioxide supplies and supercritical turbines using machine learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination