CN117494617A - Carbon dioxide flooding quick simulation method based on embedded physical information neural network - Google Patents

Carbon dioxide flooding quick simulation method based on embedded physical information neural network Download PDF

Info

Publication number
CN117494617A
CN117494617A CN202311839675.0A CN202311839675A CN117494617A CN 117494617 A CN117494617 A CN 117494617A CN 202311839675 A CN202311839675 A CN 202311839675A CN 117494617 A CN117494617 A CN 117494617A
Authority
CN
China
Prior art keywords
neural network
physical information
embedded physical
model
sample
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.)
Granted
Application number
CN202311839675.0A
Other languages
Chinese (zh)
Other versions
CN117494617B (en
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 CN202311839675.0A priority Critical patent/CN117494617B/en
Publication of CN117494617A publication Critical patent/CN117494617A/en
Application granted granted Critical
Publication of CN117494617B publication Critical patent/CN117494617B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/28Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/25Design optimisation, verification or simulation using particle-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/04Constraint-based CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/10Numerical modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/08Fluids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/14Force analysis or force optimisation, e.g. static or dynamic forces

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Fluid Mechanics (AREA)
  • Algebra (AREA)
  • Pure & Applied Mathematics (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a carbon dioxide flooding quick simulation method based on an embedded physical information neural network, in particular to a carbon dioxide flooding quick simulation method based on an embedded physical information neural networkRelates to the technical field of intelligent development of oil and gas reservoirs. The invention establishes the oil reservoir model and determines CO 2 And (3) selecting a data point in the oil reservoir model to construct an input sample set and an internal configuration point set, constructing an embedded physical information neural network model capable of capturing the circumferential flow behavior of the complex well, acquiring optimal model parameters of the embedded physical information neural network model based on a particle swarm algorithm, optimizing the embedded physical information neural network model by combining the sample data in the input sample set and the internal configuration point set, and performing simulation calculation by utilizing the optimized embedded physical information neural network model to obtain a pressure distribution map and a saturation distribution map. The invention simplifies the fluid dynamics simulation process and reduces CO 2 Calculated amount of oil displacement seepage equation realizes CO 2 And (5) accurately solving an oil displacement seepage equation.

Description

Carbon dioxide flooding quick simulation method based on embedded physical information neural network
Technical Field
The invention relates to the technical field of intelligent development of oil and gas reservoirs, in particular to a carbon dioxide flooding quick simulation method based on an embedded physical information neural network.
Background
Conventional research to solve complex physical engineering scenarios is often characterized by partial differential equations based on conservation principles, simulating the production process of unconventional hydrocarbon reservoirs, which relies largely on accurately solving partial differential equations for controlling fluid flow. CO 2 Oil displacement is used as win-win technology for improving crude oil recovery ratio and reducing carbon emission, and CO is used in the application process 2 Accurate and efficient solution of partial differential equation of seepage is used for researching CO 2 Oil displacement simulation is of great importance.
At present, most partial differential equations depicting the seepage phenomenon are solved by directly solving or adopting a numerical simulation method, and common numerical simulation methods comprise a finite element method, a finite difference method, a finite volume method, a spectrum method and the like. However, the conventional numerical simulation method needs huge calculation amount and complex verification process, and the resolution solution with clean expression is usually accompanied with the reduced accuracy and limited applicability of the solution.
With the application of the deep learning method in solving partial differential equations, the embedded physical information neural network based on deep learning provides a feasible alternative for solving the fluid seepage partial differential equations. However, the conventional embedded physical information neural network based on deep learning needs to determine the most suitable super parameters in advance, and cannot be adjusted through automatic training, so that the accuracy and flexibility of the embedded physical information neural network are limited.
Disclosure of Invention
The invention aims to improve CO 2 The accuracy and the flexibility of the oil displacement simulation result provide a carbon dioxide oil displacement rapid simulation method based on an embedded physical information neural network, and the traditional embedded physical information neural network is combined with a particle swarm optimization algorithm to realize CO 2 Accurate acquisition and visualization of pressure and saturation in the displacement of reservoir oil seepage equation.
In order to achieve the above purpose, the invention adopts the following technical scheme:
the carbon dioxide flooding quick simulation method based on the embedded physical information neural network specifically comprises the following steps:
step 1, establishing an oil reservoir model and determining CO 2 Oil displacement seepage partial differential equation set;
step 2, randomly selecting a plurality of data points based on initial conditions and boundary conditions in an oil reservoir model, and constructing an input sample set by extracting sample values and performing standard normal distribution processing;
step 3, extracting internal configuration points according to the position of the shaft model in the oil reservoir model, and establishing an internal configuration point set;
step 4, constructing an embedded physical information neural network model capable of capturing the circumferential flow behavior of the complex well;
step 5, obtaining optimal model parameters of the embedded physical information neural network model based on a particle swarm algorithm, and optimizing the embedded physical information neural network model by combining the input sample set and the samples in the internal configuration point set to obtain an optimized embedded physical information neural network model;
step 6, calculating CO by using the optimized embedded physical information neural network model 2 And (3) the pressure and the saturation of the displacement seepage equation, and performing visualization to obtain a pressure distribution diagram and a saturation distribution diagram.
Preferably, in the step 1, the method includes the following steps:
step 1.1, acquiring original oil reservoir model parameters, setting an oil reservoir area range, boundary conditions and initial conditions, and establishing an oil reservoir model in which a shaft model is arranged;
step 1.2, setting control based on reservoir modelEquation build CO 2 The displacement of reservoir oil seepage partial differential equation system is as shown in formula (1):
(1)
in the method, in the process of the invention,as an approximation of the differential of the percolation flow,as the coordinates of the sample point,time for the sample point;a differential operator for approximating the solution of the partial differential equation;is an equation source sink term;in order to calculate the domain of the data,is the simulated total time;for sample point coordinatesThe time isIn the computing domainTime frameThe value of the inner part;is a boundary condition;to calculate the boundary of the domain;is an initial condition.
Preferably, in the step 2, the method includes the following steps:
step 2.1, randomly selecting a plurality of initial data points under the initial condition of an oil reservoir model, randomly selecting a plurality of boundary data points on the boundary of the oil reservoir model according to the boundary condition, acquiring time and coordinates of each data point, and constructing a primary value sample set;
and 2.2, sampling the initial edge value sample set by using Latin hypercube, determining the number n of extracted samples, dividing each extracted sample into n sections, randomly extracting sample values from each section, mapping each extracted sample value into standard normal distribution samples based on the inverse function of standard normal distribution, and constructing an input sample data set, wherein the input sample data set comprises the sample time and the sample position of each input sample, and the sample position comprises the abscissa and the ordinate of the input sample.
Preferably, in the step 3, coordinates of a wellbore model in the oil reservoir model are randomly generated, total number of internal configuration points is randomly generated, internal configuration points are selected with the wellbore model as a center, time and positions of each internal configuration point are obtained, and an internal configuration point set for training the neural network model is established.
Preferably, in the step 4, an embedded physical information neural network model capable of capturing the circumferential flow behavior of the complex well is set as a counter propagation neural network, and the embedded physical information neural network model comprises an input layer, a hidden layer and an output layer, wherein the layers are connected in a full-connection mode;
the input layer is provided with 3 input layer neurons for acquiring sample time and sample position of an input sample, and the corresponding input vectors are sample time, sample abscissa and sample ordinate;
the number of the hidden layers is 25, and the hidden layers are presetA neuron;
the output layer is provided with 2 output layer neurons which are used for outputting solving results, including a pressure value and a saturation value;
the activation function between the input layer and the first hidden layer is set as a ReLU function, and the activation function between the hidden layers is set as a tanh function.
Preferably, the solution result output by the embedded physical information neural network model is used for approximating an approximation solution of the partial differential of the seepage, as shown in a formula (2):
(2)
in the method, in the process of the invention,solving results of the embedded physical information neural network model;
substituting the formula (2) into the formula (1) to obtain the reconstructed CO 2 The displacement of reservoir oil seepage partial differential equation system is as shown in formula (3):
(3)
in the method, in the process of the invention,reconstitution of CO 2 The error form of the control equation in the displacement of reservoir oil seepage partial differential equation set,reconstitution of CO 2 The error form of boundary condition in the displacement of reservoir oil seepage partial differential equation set,reconstitution of CO 2 Error form of initial condition in displacement of reservoir oil seepage partial differential equation set;
substituting the initial data point, boundary data point and internal configuration point in the internal configuration point set in the initial value sample set into the reconstructed data pointCO 2 In the displacement fluid partial differential equation set, an initial condition loss function, a boundary loss function and a control equation loss function are obtained, and a loss function of an embedded physical information neural network model is obtained, as shown in a formula (4):
(4)
wherein,
(5)
(6)
(7)
in the method, in the process of the invention,for a loss function of an embedded physical information neural network model,as a penalty factor for the initial condition,as a penalty factor for the boundary condition,in order to control the penalty factor of the equation,a loss function for initial conditions;a loss function for boundary conditions;loss function for control equation;a serial number of the data point;as a total number of initial data points,selected for the initial conditionCoordinates of the data points;as a total number of boundary data points,selected for boundary conditionsThe coordinates of the data points are calculated,selected for boundary conditionsTime of data point;for the total number of internal configuration points,centralizing the internal configuration pointsThe location of the individual internal configuration points,centralizing the internal configuration pointsThe dot selection time of each internal configuration dot.
Preferably, in the step 5, the method includes the following steps:
step 5.1, obtaining the number of hidden layer neurons, the number of internal configuration points, an initial condition penalty factor, a boundary condition penalty factor and a control equation penalty factor of an embedded physical information neural network model, and generating a particle swarm with 5 random particles;
step 5.2, setting the maximum iteration times, initial model parameters and preset thresholds;
step 5.3, if the current iteration number exceeds the maximum iteration number, entering step 5.6, otherwise, entering step 5.4;
step 5.4, updating the speed and the position of each particle in the particle swarm in a solving space, and updating the number of neurons of the hidden layer, the number of internal configuration points, an initial condition penalty factor, a boundary condition penalty factor and a control equation penalty factor to obtain current model parameters;
step 5.5, after the loss function of the embedded physical information neural network model is updated by using the current model parameters, randomly selecting an input sample from the input sample data set and the internal configuration point set based on the Adam optimizer, and inputting the input sample into the embedded physical information neural network model to obtain a loss function value;
if the loss function value is lower than the preset threshold value, entering a step 5.6, otherwise, adjusting the network weight and bias of the embedded physical information neural network model, and returning to the step 5.3 for continuous optimization;
and 5.6, finishing optimization, namely selecting a model parameter corresponding to the minimum loss function value from the loss function values obtained by calculating the particle swarm according to each iteration as an optimal model parameter to set the embedded physical information neural network model, and obtaining the optimized embedded physical information neural network model.
Preferably, in the step 5.4, the velocity and position update formula of the particle is:
(8)
wherein,
(9)
in the method, in the process of the invention,time is;is an inertial weight;are all between [0, 1 ]]Random numbers in between, used for increasing the randomness of searching;for the individual to learn the factors to be used,is a group learning factor;to be updated afterThe velocity of the individual particles is such that,is the current firstThe velocity of the individual particles;to be updated afterThe position of the individual particles is determined,is the current firstThe position of the individual particles;as a function of the current model parameters,and the current global optimal solution.
The beneficial technical effects brought by the invention are as follows:
the invention provides a carbon dioxide flooding quick simulation method based on an embedded physical information neural network, which can realize CO under the condition of only needing partial data points 2 The problem that the traditional numerical simulation solving method needs to carry out grid division and depends on a huge reservoir data set is avoided.
The invention limits CO by introducing penalty factors 2 The intensity of each constraint item in the oil displacement seepage equation is regulated, so that the influence degree of each constraint item on a solving result is regulated, the particle swarm optimization algorithm is adopted to optimize the embedded physical information neural network model, the optimal hidden layer neuron number, the internal configuration point number and the penalty factor of each constraint item in the loss function of the embedded physical information neural network model are determined, and therefore the CO is quickly and accurately solved 2 And (5) obtaining a pressure field and a saturation field around the shaft by using an oil displacement seepage equation.
The invention combines the traditional embedded physical information neural network model with the particle swarm optimization algorithm, and captures the flowing behavior of the fluid around the shaft by using the embedded physical information neural network model to realize the CO 2 Solving of oil displacement seepage equation and application of oil displacement seepage equation to simulation of CO 2 Various manifestations of oil displacement flow reduce CO 2 The calculated amount of the displacement of reservoir oil seepage equation simplifies the simulation process of fluid dynamics and is beneficial to CO 2 And (5) researching an oil displacement complex seepage theory.
Drawings
FIG. 1 is a flow chart of a carbon dioxide flooding quick simulation method based on an embedded physical information neural network.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
Example 1
The embodiment discloses a carbon dioxide flooding quick simulation method based on an embedded physical information neural network, which specifically comprises the following steps as shown in fig. 1:
step 1, establishing an oil reservoir model and determining CO 2 The displacement of reservoir oil seepage partial differential equation system includes the following steps:
step 1.1, acquiring original oil reservoir model parameters, setting an oil reservoir area range, boundary conditions and initial conditions, and establishing an oil reservoir model in which a shaft model is arranged.
In this embodiment, the raw reservoir model parameters include temperature, reservoir size, reservoir depth, porosity, rock compression factor, simulation time, wellbore position coordinates, CO 2 Volume coefficient, viscosity, density of gas and volume coefficient, viscosity, density of crude oil.
The reservoir region range includes the length and width of the reservoir.
The boundary conditions include boundary conditions of closed boundaries, boundary conditions of constant pressure boundaries, and boundary conditions of impermeable boundaries.
The initial conditions include initial time, initial pressure, initial saturation, and initial permeability.
Step 1.2, setting a control equation based on an oil reservoir model, and constructing CO 2 The displacement of reservoir oil seepage partial differential equation system is as shown in formula (1):
(1)
in the method, in the process of the invention,as an approximation of the differential of the percolation flow,as the coordinates of the sample point,time for the sample point;a differential operator for approximating the solution of the partial differential equation;is an equation source sink term;in order to calculate the domain of the data,is the simulated total time;for sample point coordinatesThe time isIn the computing domainTime frameThe value of the inner part;is a boundary condition;to calculate the boundary of the domain;is an initial condition.
Step 2, randomly selecting a plurality of data points based on initial conditions and boundary conditions in an oil reservoir model, and constructing an input sample set by extracting sample values and performing standard normal distribution processing, wherein the method comprises the following steps:
step 2.1, randomly selecting 10000 initial data points under the initial condition of the oil reservoir model, randomly selecting 10000 boundary data points on the boundary of the oil reservoir model according to the boundary condition, acquiring the time and coordinates of each data point, and constructing a primary value sample set.
And 2.2, sampling a primary value sample set by using a Latin hypercube, setting the number n of extracted samples, dividing each extracted sample into n sections, randomly extracting sample values from each section, mapping each extracted sample value into standard normal distribution samples based on an inverse function of standard normal distribution, and constructing an input sample data set, wherein the input sample data set comprises sample time and sample positions of each input sample, and the sample positions comprise an abscissa and an ordinate of the input sample.
And 3, extracting internal configuration points according to the position of the shaft model in the oil reservoir model, and establishing an internal configuration point set.
In this embodiment, the coordinates of the wellbore model in the oil reservoir model are randomly generated, the total number of internal configuration points is selected by taking the wellbore model as the center, and in the process of selecting the internal configuration points, the point-selecting density of the internal configuration points is increased along with the decrease of the coordinates of the wellbore model, so that the selection density of the internal configuration points is increased when the distance from the wellhead is relatively close, the time and the position of each internal configuration point are obtained, and an internal configuration point set for training the neural network model is established.
And 4, constructing an embedded physical information neural network model capable of capturing the circumferential flow behavior of the complex well.
In this embodiment, the embedded physical information neural network model capable of capturing the circumferential flow behavior of the complex well adopts a counter propagation neural network, and includes an input layer, a hidden layer and an output layer, which are connected in a fully-connected manner.
In this embodiment, the number m1 of neurons of the hidden layer in the embedded physical information neural network model is randomly selected from [10, 200], and 3 input layer neurons are arranged in the input layer, and are used for obtaining sample time and sample position of an input sample, and the corresponding input vectors are sample time, sample abscissa and sample ordinate.
The number of the hidden layers is 25, and the hidden layers are presetAnd neurons.
And 2 output layer neurons are arranged in the output layer and are used for outputting a solving result comprising a pressure value and a saturation value.
After an embedded physical information neural network model capable of capturing the circumferential flow behavior of the complex well is constructed, an activation function and a loss function of the embedded physical information neural network model are set.
The activation function between the input layer and the first hidden layer is set as a ReLU function for mapping the sample time, the sample abscissa and the sample ordinate of the input sample acquired by the input layer to the first hidden layerIn each neuron, nonlinearity is increased. In this embodiment the ReLU function isWherein, the method comprises the steps of, wherein,to hide the serial numbers of neurons in a layer,and is also provided withIs an integer of the number of the times,for the total number of input vectors,the serial number of the neuron of the input layer;is the first hidden layerThe input vector of each neuron is used to determine,is the firstA plurality of input layer neurons;is the firstThe first hidden layer is connected with the first input layer neuronThe weight between the individual neurons is such that,is the first layer of the input layer and the first hidden layerNeural network bias between individual neurons;as a function of the maximum value.
The activation function between the hidden layers is set as a tanh function, and the tanh function is thatWherein, the method comprises the steps of, wherein,in order to conceal the sequence number of the layer,is the firstThe first hidden layerThe input vector of each neuron is used to determine,is the firstThe first hidden layerInput layer neurons and the firstThe first hidden layerThe weight between the individual neurons is such that,is the firstThe first hidden layerThe number of hidden neurons is such that,is the firstA hidden layer and a firstThe first hidden layerNeural network bias between individual neurons;as a hyperbolic tangent function.
And mapping the input of the first hidden layer in 25 hidden layers by using an activation function, and mapping the output result of the neural network of the last hidden layer from the m1 hidden neurons to 2 output layer neurons by using a tanh activation function.
In this embodiment, the loss function construction process of the embedded physical information neural network model is as follows:
the solution result output by the embedded physical information neural network model is used for approximating the approximate solution of the partial differential of the seepage, as shown in a formula (2):
(2)
in the method, in the process of the invention,and solving the embedded physical information neural network model.
Substituting the formula (2) into the formula (1) to obtain the reconstructed CO 2 The displacement of reservoir oil seepage partial differential equation system is as shown in formula (3):
(3)
in the method, in the process of the invention,reconstitution of CO 2 The error form of the control equation in the displacement of reservoir oil seepage partial differential equation set,reconstitution of CO 2 The error form of boundary condition in the displacement of reservoir oil seepage partial differential equation set,reconstitution of CO 2 Error form of initial condition in displacement of reservoir oil seepage partial differential equation set.
Substituting initial data points, boundary data points and internal configuration points in the internal configuration point set in the initial value sample set into the reconstructed CO 2 In the displacement fluid partial differential equation set, an initial condition loss function, a boundary loss function and a control equation loss function are obtained, and a loss function of an embedded physical information neural network model is obtained, as shown in a formula (4):
(4)
wherein,
(5)
(6)
(7)
in the method, in the process of the invention,for a loss function of an embedded physical information neural network model,as a penalty factor for the initial condition,as a penalty factor for the boundary condition,to control the equation penalty factor, the initial condition penalty factor in this embodimentBoundary condition penalty factorAnd control equation penalty factorFor adjusting the constraint capacity of the corresponding loss function term to the whole, and initial condition penalty factorBoundary condition penalty factorAnd control equation penalty factorAll from [0, 5]Random selection of the initial condition penalty factorPenalty factor of boundary condition with value of m2Penalty factor of control equation with value of m3The value is m4;a loss function for initial conditions;a loss function for boundary conditions;loss function for control equation;a serial number of the data point;as a total number of initial data points,selected for the initial conditionCoordinates of the data points;as a total number of boundary data points,selected for boundary conditionsThe coordinates of the data points are calculated,selected for boundary conditionsTime of data point;for the total number of internal configuration points,centralizing the internal configuration pointsThe location of the individual internal configuration points,centralizing the internal configuration pointsThe dot selection time of each internal configuration dot.
Step 5, obtaining optimal model parameters of the embedded physical information neural network model based on a particle swarm algorithm, and optimizing the embedded physical information neural network model by combining samples in an input sample set and an internal configuration point set to obtain an optimized embedded physical information neural network model, wherein the method comprises the following steps:
and 5.1, acquiring the number of hidden layer neurons, the number of internal configuration points of the embedded physical information neural network model, and an initial condition penalty factor, a boundary condition penalty factor and a control equation penalty factor in a loss function, correspondingly setting 5 random particles to generate a particle swarm, wherein each particle in the particle swarm has two attributes of speed and position.
And 5.2, setting the maximum iteration times, initial model parameters of the embedded physical information neural network model and a preset threshold value.
In this embodiment, the maximum iteration number is set to 50000, and the preset threshold is set to 1×10 -7 The learning rate of Adam optimizer was set to 0.0001.
And 5.3, optimizing the embedded physical information neural network model based on a particle swarm algorithm, judging whether the current iteration number exceeds the maximum iteration number, if so, entering a step 5.6, and otherwise, entering a step 5.4.
And 5.4, updating the speed and the position of each particle in the particle swarm in a solving space, and acquiring the number of the updated hidden layer neurons, the number of the internal configuration points, and initial condition penalty factors, boundary condition penalty factors and control equation penalty factors in a loss function to obtain current model parameters.
In this embodiment, the update formula of the speed and position of each particle in the particle swarm is:
(8)
wherein,
(9)
in the method, in the process of the invention,time is;is an inertial weight;are all between [0, 1 ]]Random numbers in between, used for increasing the randomness of searching;for the individual to learn the factors to be used,is a group learning factor;to be updated afterThe velocity of the individual particles is such that,is the current firstThe velocity of the individual particles;to be updated afterThe position of the individual particles is determined,is the current firstThe position of the individual particles;as a function of the current model parameters,and the current global optimal solution.
And 5.5, after updating the loss function of the embedded physical information neural network model according to the current model parameters obtained in the step 5.4, training the embedded physical information neural network model based on an Adam optimizer, randomly selecting an input sample from an input sample data set and an internal configuration point set, inputting the input sample into the embedded physical information neural network model, and calculating the loss function value of the embedded physical information neural network model.
If the loss function value is lower than the preset threshold value, entering a step 5.6, otherwise, adjusting the network weight and bias of the embedded physical information neural network model, and returning to the step 5.3 to continuously optimize the embedded physical information neural network model by using the particle swarm.
And 5.6, finishing optimizing the embedded physical information neural network model, selecting the model parameter corresponding to the minimum value of the loss function value as the optimal model parameter according to the loss function value corresponding to the current model parameter determined by each iteration calculation particle swarm, and setting the embedded physical information neural network model according to the optimal model parameter to obtain the optimized embedded physical information neural network model.
Step 6, calculating CO by using the optimized embedded physical information neural network model 2 And (3) the pressure and the saturation of the displacement seepage equation, and performing visualization to obtain a pressure distribution diagram and a saturation distribution diagram.
Example 2
In order to further verify the effect of the method, in this embodiment, taking an oil-gas two-phase flow oil reservoir conceptual model in a certain average value reservoir as an example, the method for quickly simulating carbon dioxide flooding based on the embedded physical information neural network described in embodiment 1 is adopted to obtain the pressure distribution and saturation distribution of the oil-gas two-phase flow oil reservoir conceptual model.
In this embodiment, the area of the oil-gas two-phase flow reservoir conceptual model is 100m×100m, the periphery is a closed boundary, the coordinate positions of the gas injection well are (5, 5), the coordinate positions of the production well are (95, 95), the permeability of the reservoir in the oil-gas two-phase flow reservoir conceptual model is set to 1mD, the porosity is set to 0.2, the initial pressure is set to 30MPa, the initial oil saturation is set to 0.6, the beam water saturation is set to 0.2, and the remaining oil saturation is set to 0.2.
In this embodiment, the two-phase flow control equation set of pressure and saturation of the oil-gas two-phase flow reservoir conceptual model is:
(10)
in the method, in the process of the invention,is the permeability of the oil reservoir;for the relative permeability of the oil,is CO 2 Is a relatively permeable rate of (a);is CO 2 Is used for the viscosity of the product,is the viscosity of the oil;is CO 2 Is used for the volume coefficient of the (c) in the (c),is the volume coefficient of the oil;is CO 2 Is used for the pressure of the liquid,is the pressure of the oil, when the capillary pressure is ignored,is CO 2 Is used to determine the source and sink terms of (1),is a source sink of oil;is the volume of the oil reservoir;is porosity.
Assuming that the oil phase has slight compressibility, while the lithology and gas phase are considered incompressible, we get:
(11)
in the method, in the process of the invention,in order to achieve a saturation level of the residual oil,is CO 2 The degree of saturation is such that,to tie up the gas saturation.
Based on the reservoir model and the seepage partial differential equation set, the method described in the embodiment 1 is adopted to solve the pressure and the saturation of the oil-gas two-phase flow reservoir conceptual model. Comparing the solving result of the method with the solving result of commercial software, the invention finds that the pressure field and the saturation field obtained by the method are very close to the reference result obtained by the commercial software, and the relative error between the pressure field and the saturation field is always less than 6%, thereby further verifying that the carbon dioxide flooding quick simulation method based on the embedded physical information neural network can be used for solving the problems of multiple wells and multiphase flow.
In the description of the present invention, it should be noted that, unless explicitly specified and limited otherwise, the terms "disposed," "mounted," "connected," and "fixed" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art in a specific case.
It should be understood that the above description is not intended to limit the invention to the particular embodiments disclosed, but to limit the invention to the particular embodiments disclosed, and that the invention is not limited to the particular embodiments disclosed, but is intended to cover modifications, adaptations, additions and alternatives falling within the spirit and scope of the invention.

Claims (8)

1. The carbon dioxide flooding quick simulation method based on the embedded physical information neural network is characterized by comprising the following steps of:
step 1, establishing an oil reservoir model and determining CO 2 Oil displacement seepage partial differential equation set;
step 2, randomly selecting a plurality of data points based on initial conditions and boundary conditions in an oil reservoir model, and constructing an input sample set by extracting sample values and performing standard normal distribution processing;
step 3, extracting internal configuration points according to the position of the shaft model in the oil reservoir model, and establishing an internal configuration point set;
step 4, constructing an embedded physical information neural network model capable of capturing the circumferential flow behavior of the complex well;
step 5, obtaining optimal model parameters of the embedded physical information neural network model based on a particle swarm algorithm, and optimizing the embedded physical information neural network model by combining the input sample set and the samples in the internal configuration point set to obtain an optimized embedded physical information neural network model;
step 6, calculating CO by using the optimized embedded physical information neural network model 2 And (3) the pressure and the saturation of the displacement seepage equation, and performing visualization to obtain a pressure distribution diagram and a saturation distribution diagram.
2. The method for quickly simulating carbon dioxide flooding based on the embedded physical information neural network according to claim 1, wherein the step 1 comprises the following steps:
step 1.1, acquiring original oil reservoir model parameters, setting an oil reservoir area range, boundary conditions and initial conditions, and establishing an oil reservoir model in which a shaft model is arranged;
step 1.2, setting a control equation based on an oil reservoir model, and constructing CO 2 The displacement of reservoir oil seepage partial differential equation system is as shown in formula (1):
(1)
in the method, in the process of the invention,for the approximate solution of the partial differential of the seepage, +.>For the coordinates of the sample points, +.>Time for the sample point; />A differential operator for approximating the solution of the partial differential equation; />Is an equation source sink term; />For calculating the domain +.>Is the simulated total time;for sample point coordinates +.>The time is->At the time of computing domain->Time frame->The value of the inner part;is a boundary condition; />To calculate the boundary of the domain; />Is an initial condition.
3. The method for rapidly simulating carbon dioxide flooding based on the embedded physical information neural network according to claim 1, wherein the step 2 comprises the following steps:
step 2.1, randomly selecting a plurality of initial data points under the initial condition of an oil reservoir model, randomly selecting a plurality of boundary data points on the boundary of the oil reservoir model according to the boundary condition, acquiring time and coordinates of each data point, and constructing a primary value sample set;
and 2.2, sampling the initial edge value sample set by using Latin hypercube, determining the number n of extracted samples, dividing each extracted sample into n sections, randomly extracting sample values from each section, mapping each extracted sample value into standard normal distribution samples based on the inverse function of standard normal distribution, and constructing an input sample data set, wherein the input sample data set comprises the sample time and the sample position of each input sample, and the sample position comprises the abscissa and the ordinate of the input sample.
4. The method for quickly simulating carbon dioxide flooding based on the embedded physical information neural network according to claim 1, wherein in the step 3, coordinates of a shaft model in an oil reservoir model are randomly generated, total number of internal configuration points is randomly generated, the shaft model is used as a center to select the internal configuration points, time and positions of each internal configuration point are obtained, and an internal configuration point set for training the neural network model is established.
5. The method for quickly simulating carbon dioxide flooding based on the embedded physical information neural network according to claim 1, wherein in the step 4, an embedded physical information neural network model capable of capturing the circumferential flow behavior of a complex well is set as a counter-propagation neural network, and the embedded physical information neural network model comprises an input layer, a hidden layer and an output layer, wherein all the layers are connected in a full-connection mode;
the input layer is provided with 3 input layer neurons for acquiring sample time and sample position of an input sample, and the corresponding input vectors are sample time, sample abscissa and sample ordinate;
the number of the hidden layers is 25, and the hidden layers are presetA neuron;
the output layer is provided with 2 output layer neurons which are used for outputting solving results, including a pressure value and a saturation value;
the activation function between the input layer and the first hidden layer is set as a ReLU function, and the activation function between the hidden layers is set as a tanh function.
6. The method for quickly simulating carbon dioxide flooding based on the embedded physical information neural network according to claim 5, wherein the solution result output by the embedded physical information neural network model is used for approximating an approximation solution of partial differential of seepage, as shown in formula (2):
(2)
in the method, in the process of the invention,solving results of the embedded physical information neural network model;
substituting the formula (2) into the formula (1) to obtain the reconstructed CO 2 The displacement of reservoir oil seepage partial differential equation system is as shown in formula (3):
(3)
in the method, in the process of the invention,reconstitution of CO 2 Error form of control equation in displacement of reservoir oil seepage partial differential equation set, +.>Reconstruction CO 2 Error form of boundary condition in displacement of reservoir oil seepage partial differential equation set, +.>Reconstitution of CO 2 Error form of initial condition in displacement of reservoir oil seepage partial differential equation set;
substituting initial data points, boundary data points and internal configuration points in the internal configuration point set in the initial value sample set into the reconstructed CO 2 In the displacement fluid partial differential equation set, an initial condition loss function, a boundary loss function and a control equation loss function are obtained, and a loss function of an embedded physical information neural network model is obtained, as shown in a formula (4):
(4)
wherein,
(5)
(6)
(7)
in the method, in the process of the invention,loss function for embedded physical information neural network model, +.>Penalty factor for initial conditions->Penalty factor for boundary conditions->Penalty factor for control equation, +.>A loss function for initial conditions; />A loss function for boundary conditions; />Loss function for control equation; />A serial number of the data point; />For the total number of initial data points, +.>For the initial condition +.>Coordinates of the data points; />For the total number of boundary data points, +.>For the boundary condition of selecting +.>Coordinates of data points,/->For the boundary condition of selecting +.>Time of data point; />For the total number of internal configuration points +.>For the inner configuration point set +.>Positions of the internal configuration points->For the inner configuration point set +.>The dot selection time of each internal configuration dot.
7. The method for quickly simulating carbon dioxide flooding based on the embedded physical information neural network according to claim 6, wherein the step 5 comprises the following steps:
step 5.1, obtaining the number of hidden layer neurons, the number of internal configuration points, an initial condition penalty factor, a boundary condition penalty factor and a control equation penalty factor of an embedded physical information neural network model, and generating a particle swarm with 5 random particles;
step 5.2, setting the maximum iteration times, initial model parameters and preset thresholds;
step 5.3, if the current iteration number exceeds the maximum iteration number, entering step 5.6, otherwise, entering step 5.4;
step 5.4, updating the speed and the position of each particle in the particle swarm in a solving space, and updating the number of neurons of the hidden layer, the number of internal configuration points, an initial condition penalty factor, a boundary condition penalty factor and a control equation penalty factor to obtain current model parameters;
step 5.5, after the loss function of the embedded physical information neural network model is updated by using the current model parameters, randomly selecting an input sample from the input sample data set and the internal configuration point set based on the Adam optimizer, and inputting the input sample into the embedded physical information neural network model to obtain a loss function value;
if the loss function value is lower than the preset threshold value, entering a step 5.6, otherwise, adjusting the network weight and bias of the embedded physical information neural network model, and returning to the step 5.3 for continuous optimization;
and 5.6, finishing optimization, namely selecting a model parameter corresponding to the minimum loss function value from the loss function values obtained by calculating the particle swarm according to each iteration as an optimal model parameter to set the embedded physical information neural network model, and obtaining the optimized embedded physical information neural network model.
8. The method for rapid simulation of carbon dioxide flooding based on embedded physical information neural network according to claim 7, wherein in step 5.4, the velocity and position update formula of the particles is:
(8)
wherein,
(9)
in the method, in the process of the invention,time is; />Is an inertial weight; />、/>Are all between [0, 1 ]]Random numbers in between, used for increasing the randomness of searching;/>for individual learning factors->Is a group learning factor; />For post update->Speed of individual particles>Is the current +>The velocity of the individual particles; />For post update->The position of the individual particles->Is the current +>The position of the individual particles; />For the current model parameters +.>And the current global optimal solution.
CN202311839675.0A 2023-12-29 2023-12-29 Carbon dioxide flooding quick simulation method based on embedded physical information neural network Active CN117494617B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311839675.0A CN117494617B (en) 2023-12-29 2023-12-29 Carbon dioxide flooding quick simulation method based on embedded physical information neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311839675.0A CN117494617B (en) 2023-12-29 2023-12-29 Carbon dioxide flooding quick simulation method based on embedded physical information neural network

Publications (2)

Publication Number Publication Date
CN117494617A true CN117494617A (en) 2024-02-02
CN117494617B CN117494617B (en) 2024-04-16

Family

ID=89676755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311839675.0A Active CN117494617B (en) 2023-12-29 2023-12-29 Carbon dioxide flooding quick simulation method based on embedded physical information neural network

Country Status (1)

Country Link
CN (1) CN117494617B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113192569A (en) * 2021-05-11 2021-07-30 南京工程学院 Harmful gas monitoring method based on improved particle swarm and error feedback neural network
US20210390231A1 (en) * 2020-06-16 2021-12-16 North China Institute Of Science And Technology Method for Rapidly Acquiring Multi-Field Response of Mining-induced Coal Rock
CN114492213A (en) * 2022-04-18 2022-05-13 中国石油大学(华东) Wavelet neural operator network model-based residual oil saturation and pressure prediction method
WO2022101515A1 (en) * 2020-11-16 2022-05-19 UMNAI Limited Method for an explainable autoencoder and an explainable generative adversarial network
CN114693005A (en) * 2022-05-31 2022-07-01 中国石油大学(华东) Three-dimensional underground oil reservoir dynamic prediction method based on convolution Fourier neural network
WO2023019601A1 (en) * 2021-08-16 2023-02-23 苏州大学 Signal modulation recognition method for complex-valued neural network based on structure optimization algorithm
CN115935834A (en) * 2023-02-23 2023-04-07 中国石油大学(华东) History fitting method based on deep autoregressive network and continuous learning strategy
CN116467958A (en) * 2023-03-15 2023-07-21 中国科学院青海盐湖研究所 Salt lake brine numerical model construction and water supplementing and mineral dissolving efficiency calculation method
CN116644662A (en) * 2023-05-19 2023-08-25 之江实验室 Well-arrangement optimization method based on knowledge embedded neural network proxy model

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210390231A1 (en) * 2020-06-16 2021-12-16 North China Institute Of Science And Technology Method for Rapidly Acquiring Multi-Field Response of Mining-induced Coal Rock
WO2022101515A1 (en) * 2020-11-16 2022-05-19 UMNAI Limited Method for an explainable autoencoder and an explainable generative adversarial network
CN113192569A (en) * 2021-05-11 2021-07-30 南京工程学院 Harmful gas monitoring method based on improved particle swarm and error feedback neural network
WO2023019601A1 (en) * 2021-08-16 2023-02-23 苏州大学 Signal modulation recognition method for complex-valued neural network based on structure optimization algorithm
CN114492213A (en) * 2022-04-18 2022-05-13 中国石油大学(华东) Wavelet neural operator network model-based residual oil saturation and pressure prediction method
CN114693005A (en) * 2022-05-31 2022-07-01 中国石油大学(华东) Three-dimensional underground oil reservoir dynamic prediction method based on convolution Fourier neural network
CN115935834A (en) * 2023-02-23 2023-04-07 中国石油大学(华东) History fitting method based on deep autoregressive network and continuous learning strategy
CN116467958A (en) * 2023-03-15 2023-07-21 中国科学院青海盐湖研究所 Salt lake brine numerical model construction and water supplementing and mineral dissolving efficiency calculation method
CN116644662A (en) * 2023-05-19 2023-08-25 之江实验室 Well-arrangement optimization method based on knowledge embedded neural network proxy model

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张银德;匡建超;曾剑毅;: "基于粒子群算法的模糊优选神经网络储层识别模型", 物探化探计算技术, no. 03, 15 May 2008 (2008-05-15) *
江敏;钱磊;苏学满;: "基于PSO优化的灰色神经网络预测算法的研究", 宁夏师范学院学报, no. 03, 15 June 2013 (2013-06-15) *
黄朝琴;年凯;王斌;巩亮;胡慧芳;张世明;CHUNG ERIC;: "一种考虑物理过程信息的油气渗流深度学习新模型", 中国石油大学学报(自然科学版), no. 04, 30 July 2020 (2020-07-30) *

Also Published As

Publication number Publication date
CN117494617B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
CN112360411B (en) Local well pattern water injection development optimization method based on graph neural network
Aitokhuehi et al. Optimizing the performance of smart wells in complex reservoirs using continuously updated geological models
CN109763800A (en) A kind of separated-zone water infection oil field amount prediction technique
CA2514516A1 (en) Performance prediction method for hydrocarbon recovery processes
KR101818925B1 (en) Quantitative Evaluation Modeling for Discharge of Ground Water
CN110056346B (en) Oil reservoir three-dimensional original water saturation simulation method based on trend change function
US11308413B2 (en) Intelligent optimization of flow control devices
Volkov et al. Gradient-based constrained well placement optimization
Park et al. Improved decision making with new efficient workflows for well placement optimization
Kang et al. Uncertainty quantification of channel reservoirs assisted by cluster analysis and deep convolutional generative adversarial networks
Yousefzadeh et al. An efficient method for injection well location optimization using fast marching method
CN103336997A (en) Dense oil resource distribution prediction method and prediction device
Lee et al. Regeneration of channelized reservoirs using history-matched facies-probability map without inverse scheme
CN115310645A (en) Well position optimization method and system based on displacement equilibrium degree analysis
CN115526086A (en) Carbonate reservoir water drive breakthrough time prediction method based on proxy model
CN104965237A (en) Method of quantitatively and optimally selecting unconventional oil-gas favorable area
WO2022056379A1 (en) Method and system for reservoir simulations based on an area of interest
Deutsch et al. Challenges in reservoir forecasting
CN117494617B (en) Carbon dioxide flooding quick simulation method based on embedded physical information neural network
CN116641688A (en) Method, system, equipment and storage medium for improving gas reservoir recovery ratio by CO2 and sealing storage thereof
Mantilla et al. Feedback control of polymer flooding process considering geologic uncertainty
Foroud et al. A Guided Pattern Search with a non-intrusive reduced order modeling for oil production optimization: Brugge field case study
CN111625925B (en) Ternary combination flooding injection-production optimization method based on chromatographic separation
WO2019216892A1 (en) Optimized methodology for automatic history matching of a petroleum reservoir model with ensemble kalman filter
Wang et al. On the Feasibility of An Ensemble Multi-Fidelity Neural Network for Fast Data Assimilation for Subsurface Flow in Porous Media

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
GR01 Patent grant
GR01 Patent grant