A numerical simulation method for shale gas reservoirs based on physical neural network

By using a convolutional neural network based on physical meaning in the numerical simulation of shale gas reservoirs and using a finite volume discrete format to construct a loss function, the problem of traditional methods requiring label data and long calculation time is solved, and efficient and accurate arbitrary time are achieved. Step shale gas reservoir pressure simulation.

CN117236158BActive Publication Date: 2024-08-23CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310969755.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-03
Publication Date
2024-08-23
Estimated Expiration
2043-08-03

AI Technical Summary

Technical Problem

In the numerical simulation of shale gas reservoirs, due to its strong nonlinear characteristics, it is difficult to directly apply neural network models based on physical meaning, and traditional methods need to first obtain label data using traditional solving methods, resulting in long calculations and can only predict a certain moment. Stress information.

Method used

Using a convolutional neural network based on physical meaning, the loss function is constructed through a finite volume discrete format, and shale gas reservoir pressure simulation can be realized at any time step without label data. Pre-training and backpropagation are used to optimize model weights to improve the solution speed and Accuracy.

Benefits of technology

It is possible to significantly improve the solution speed of shale gas reservoir pressure simulation while ensuring solution accuracy, and can perform forward solution at any time step without label data, which is efficient and highly accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117236158B
    Figure CN117236158B
Patent Text Reader

Abstract

The present invention discloses a shale gas reservoir numerical simulation method based on a physical meaning neural network, which belongs to the field of gas reservoir engineering technology and includes the following steps: step 1, collecting shale gas reservoir related data; step 2, constructing a convolutional neural network model and setting the hyperparameters of the model; step 3, using the pressure data of the first time step as a label, pre-training to obtain an initialized convolutional neural network model; step 4, performing forward propagation according to the pressure data and model parameters output by the model in subsequent time steps, and calculating the loss error using the finite volume method; step 5, back propagating to optimize the model weights, and reducing the loss value to a specified range through continuous iterative training; step 6, repeating steps 4-5 to obtain the pressure distribution of the shale gas reservoir at any time step. The present invention realizes the forward solution of the shale gas reservoir pressure change using the convolutional neural network model embedded with physical meaning, and does not require label data, with high accuracy and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of gas reservoir engineering, and in particular relates to a shale gas reservoir numerical simulation method based on a physical significance neural network. Background Art

[0002] In the field of numerical simulation of shale gas reservoirs, gas partial differential equations can accurately describe the pressure distribution during the development of shale gas reservoirs. Simulating the pressure changes in shale gas reservoirs requires a large number of partial differential equations to solve and calculate, which is also the basis of numerical simulation technology. Traditional numerical simulation solves partial differential equations based on numerical calculation methods, such as finite element method and finite difference method. Numerical simulation of shale gas reservoirs can accurately calculate the pressure, production and other data of future shale gas reservoirs to guide production and development. However, gas is different from other fluids and has strong compressibility. The simulation and solution of shale gas reservoirs is a strong nonlinear problem, which often requires a lot of time and computing resources.

[0003] With the deepening of informatization and the continuous development of hardware level, artificial intelligence methods such as deep learning have been widely used in scenes such as image recognition and target detection. In the field of reservoir engineering, neural network models based on physical meaning have also been widely used to build proxy models to solve the problem of long time and large amount of calculation of traditional reservoir numerical simulators. However, for the numerical simulation of shale gas reservoirs, due to its strong nonlinearity, that is, the coefficients of the control equation will change significantly over time, most of the neural network models based on physical meaning cannot be directly used for numerical simulation of shale gas reservoirs. The constructed proxy model needs to first obtain label data using traditional solution methods, and this method can only predict the pressure information at a certain moment. Summary of the invention

[0004] In order to solve the above problems, the present invention proposes a shale gas reservoir numerical simulation method based on a physical meaning neural network. The method proposes a new neural network embedded with physical meaning, that is, a loss function is constructed according to the residual of a finite volume discrete format. The forward solution of shale gas reservoir pressure simulation at any time step can be achieved without labeled data, thereby improving the solution speed while ensuring the solution accuracy.

[0005] The technical solution of the present invention is as follows:

[0006] A shale gas reservoir numerical simulation method based on physical meaning neural network uses a convolutional neural network embedded with physical meaning to forward calculate the pressure of shale gas reservoirs at any time step without label data. The method specifically includes the following steps:

[0007] Step 1: Collect relevant data of shale gas reservoirs;

[0008] Step 2: Build a convolutional neural network model and set the model's hyperparameters;

[0009] Step 3: Pre-train the convolutional neural network model, using the pressure data of the first time step as a label, and pre-train to obtain an initialized convolutional neural network model;

[0010] Step 4: In the subsequent time steps, forward propagation is performed based on the pressure data and model parameters output by the model, and the loss error is calculated using the finite volume method;

[0011] Step 5: Back propagation optimizes the model weights, and the loss value is reduced to the specified range through continuous iterative training. At this time, the output of the model is the shale gas reservoir pressure data at the current time step;

[0012] Step 6: Repeat steps 4 and 5 for each time step to obtain the pressure distribution of the shale gas reservoir at any time step. At this time, the numerical simulation is completed.

[0013] Furthermore, in step 1, the shale gas reservoir related data include shale gas reservoir size, initial reservoir pressure, initial porosity, shale gas reservoir temperature, rock particle density, rock compressibility, Langmuir volume, and Langmuir pressure.

[0014] Furthermore, in step 2, the constructed convolutional neural network model includes two convolutional layers and a fully connected layer, and the normalization layer, the activation function layer and the maximum pooling layer are placed after the convolution operation; the two convolutional layers are the first convolutional layer and the second convolutional layer; the first normalization layer, the first activation function layer and the first maximum pooling layer are placed after the convolution operation of the first convolutional layer, and the second normalization layer, the second activation function layer and the second maximum pooling layer are placed after the convolution operation of the second convolutional layer; the input of the convolutional neural network model is the shale gas reservoir pressure data of the current time step, and the output is the shale gas reservoir pressure data of the next time step;

[0015] The hyperparameters set include the number of convolution layers, convolution kernel size, convolution step size, activation function, pooling type, pooling window size, and pooling step size;

[0016] The specific process of the convolutional neural network model outputting the shale gas reservoir pressure data for the next time step is:

[0017] Step 2.1, the initial shale gas reservoir pressure data is in matrix form, so the initial shale gas reservoir pressure data is regarded as image data of size 1×20×20, and the image data is sequentially input into the first convolution layer, the first normalization layer, the first activation function layer, and the first maximum pooling layer to obtain image data of size 25×10×10;

[0018] Step 2.2, after the image data of size 25×10×10 is input into the second convolution layer, the second normalization layer, the second activation function layer, and the second maximum pooling layer in sequence, the image data of size 50×5×5 is obtained;

[0019] Step 2.3, stretch the image data of size 50×5×5 to image data of size 1×1250, input it into the fully connected layer, output image data of size 1×400, and then reorganize the image data of 1×400 to image data of 1×20×20. At this time, the shale gas reservoir pressure data of the next time step with the same size as the initial input data is obtained.

[0020] Furthermore, in step 3, the specific process of pre-training is as follows:

[0021] Step 3.1, set the time step size, use the traditional finite volume method to obtain the shale gas reservoir pressure data of the first time step, and use it as the pre-training label data;

[0022] Step 3.2, input the initial pressure data of the shale gas reservoir into the convolutional neural network model constructed in step 2, and obtain output data of the same size as the input data;

[0023] Step 3.3: Calculate the mean square error between the model output data and the label data as the loss value. The calculation formula is:

[0024]

[0025] Among them, MSELoss is the loss value; is the grid number sequence of the shale gas reservoir model, is the number of grids in the shale gas reservoir model; y i Output data for the convolutional neural network model; is the label data;

[0026] Step 3.4, set the learning rate, select the ADAM optimizer, back propagate, and update the convolutional neural network model parameters;

[0027] Step 3.5: Repeat steps 3.1 to 3.4 above, iterate the training 200 times, and finally the loss of the convolutional neural network model is reduced to 1×10 -14 Below, the model initialization weights are completed, and the initialized convolutional neural network model is obtained.

[0028] Furthermore, the specific process of step 4 is as follows:

[0029] Step 4.1, input the pressure data of the second time step into the convolutional neural network model initialized in step 3, perform a forward propagation, and obtain output data of the same size as the input data;

[0030] Step 4.2, construct the loss value calculation formula;

[0031] Considering the simulation of shale gas reservoirs with adsorption and desorption, each grid in the image is equivalent to a source term, and its differential equation is:

[0032]

[0033] Where p is the current pressure; t is the time; represents the divergence operator; ρ is the gas density; k is the permeability; μ is the gas viscosity; q m is the production; C(p) is the gas mass per unit volume of rock, and the calculation formula is as follows:

[0034] C(p)=φρ+(1-φ)m g (7);

[0035] Where φ is the porosity of the porous medium; m g is the mass of gas adsorbed on unit volume of rock particles;

[0036] The implicit control equation after discretization using the finite volume method is:

[0037]

[0038] Where n represents the current time step, n+1 represents the next time step; i and j represent the numbers of different grids; Δt is the time interval; T ij is the conductivity between the i-th grid and the j-th grid; V is the grid volume; η i Represents the set of all grid numbers connected to the i-th grid; represents the pressure value of the next time step of the i-th grid, shows the pressure value of the i-th grid at the current time step, represents the pressure value of the jth grid at the next time step; q is the unit volume production;

[0039] The calculation formula of loss value loss is:

[0040]

[0041] Step 4.3: Calculate the loss value of each grid according to formula (9), and combine the loss values ​​of all grids into a matrix of the same size as the shale gas reservoir in order. Finally, calculate the mean square error of the matrix as the final loss error of this iterative training.

[0042] Furthermore, the specific process of step 5 is as follows: back propagate according to the loss error calculated in step 4, use the ADAM optimizer to iteratively update the network model weights, and when the loss error is reduced to 1×10 -18 When the pressure is solved as follows, the pressure data of the current time step is obtained.

[0043] Beneficial technical effects brought by the present invention:

[0044] The loss function is constructed by residual in finite volume discrete format, so that the convolutional neural network model is embedded with physical meaning, and the forward solution of shale gas reservoir pressure simulation at any time step can be achieved without labeled data, with high accuracy and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 The present invention is a flow chart of the shale gas reservoir numerical simulation method based on physical significance neural network.

[0046] Figure 2 This is a logarithmic graph of the permeability of the shale gas reservoir with a base of 10 in an embodiment of the present invention.

[0047] Figure 3 This is a specific calculation flow chart of the convolutional neural network model in an embodiment of the present invention.

[0048] Figure 4 1 is a diagram comparing the predicted pressure field data and the actual pressure field data at the last time step in an embodiment of the present invention; wherein (a) is the actual pressure field diagram at the last time step, (b) is the predicted pressure field diagram at the last time step, and (c) is the relative error diagram between the two.

[0049] Figure 5 This is a comparison chart of the actual value and predicted value of the daily production of shale gas reservoirs in an embodiment of the present invention.

[0050] Figure 6 This is a comparison chart of the actual value and predicted value of the cumulative production of shale gas reservoirs in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0052] like Figure 1 As shown, a shale gas reservoir numerical simulation method based on a physical meaning neural network uses a convolutional neural network embedded in physical meaning to forward calculate the pressure of a shale gas reservoir at any time step without the need for labeled data. Specifically, the method includes the following steps:

[0053] Step 1: Collect shale gas reservoir related data, including shale gas reservoir size, initial reservoir pressure, initial porosity, shale gas reservoir temperature, rock particle density, rock compression coefficient, Langmuir volume, Langmuir pressure and other data.

[0054] Step 2: Build a convolutional neural network model, set the hyperparameters of the network model, convert the shale gas reservoir pressure data into image data, and use convolution operation to extract pressure information.

[0055] Convolutional neural networks mainly include: input layer, convolution layer, activation function, pooling layer, fully connected layer and output layer. The convolution layer is composed of several convolution units, and it has two key operations: local association and window sliding. The function of the convolution layer is to perform convolution operation on the input data. The purpose of the convolution operation is to extract different features of the input. At present, the common activation functions are Relu, tanh, and sigmoid. Relu is a linear function with the characteristics of fast convergence and simple gradient calculation, but it is relatively fragile. The function of the pooling layer is to reduce the dimension of the data. Usually, large-dimensional features will be obtained after the convolution layer. Pooling can reduce the number of parameters and prevent overfitting. There are two common pooling methods: maximum pooling and mean pooling. The fully connected layer combines all local features into global features and is usually placed at the last layer of the convolutional neural network.

[0056] The input of the convolutional neural network model is the pressure data of the current time step, and the output is the pressure data of the next time step.

[0057] The convolutional neural network model includes two convolutional layers and one fully connected layer, and the activation function and pooling layer are placed after the convolution operation. The two convolutional layers are the first convolutional layer and the second convolutional layer; the first activation function layer and the first maximum pooling layer are placed after the convolution operation of the first convolutional layer, and the second activation function layer and the second maximum pooling layer are placed after the convolution operation of the second convolutional layer.

[0058] The hyperparameters of the network model settings include: the number of convolutional layers is set to 2, the convolution kernel size is 3×3, the convolution step size is 1, the activation function is tanh, the pooling layer uses maximum pooling, the pooling window size is 2, and the pooling step size is 2.

[0059] The steps of forward propagation of shale gas reservoir pressure data in the constructed convolutional neural network model are as follows:

[0060] Step 2.1, the initial shale gas reservoir pressure data is in matrix form, so the initial shale gas reservoir pressure data can be regarded as image data of size 1×20×20, 1 represents the number of channels, 20×20 represents the data size, and after the first convolution layer, the number of channels becomes 25, and then the image data is passed through the first normalization layer and the first activation function layer in sequence, and the image data size remains unchanged, and then the image data is passed through the first maximum pooling layer, and the output size is 25×10×10 image data, 25 represents the number of channels, and 10×10 represents the data size;

[0061] Step 2.2, after the image data of size 25×10×10 passes through the second convolution layer, the second normalization layer, the second activation function layer, and the second maximum pooling layer in the same way, the output image data of size 50×5×5 is output, where 50 represents the number of data channels and 5×5 represents the data size;

[0062] Step 2.3, stretch the image data of size 50×5×5 to image data of size 1×1250, input it into the fully connected layer, output image data of size 1×400, and then reorganize it into image data of size 1×20×20. At this time, the shale gas reservoir pressure data of the next time step with the same size as the initial input data is obtained.

[0063] Step 3: Pre-train the convolutional neural network model, using the pressure data of the first time step as a label to obtain an initialized convolutional neural network model through pre-training.

[0064] Since the solution of shale gas reservoir pressure is a strong nonlinear problem, the coefficients of the control equation are all functions of pressure. If there is no suitable initialization method, the error between the model output and the real data in the first time step will be very large, so that the loss value in step 4 cannot be calculated, resulting in solution failure. Therefore, the traditional shale gas reservoir numerical simulation method is first used to solve the pressure data of the first time step as a label, and the initial pressure data is used as the input of the model. The weight of the model is updated for pre-training to reduce the error between the output of the model in the first time step and the real value, so that the residual can be calculated as the loss value using the finite volume discrete format. This step is only to initialize the model parameters reasonably. The iterative solution of subsequent time steps does not require label data. It only needs to input the pressure data of the current time step into the initialized convolutional neural network model to forward solve and obtain the pressure data of the next time step.

[0065] The specific steps of pre-training are as follows:

[0066] Step 3.1, set the time step size to 0.1 day, use the traditional finite volume method to obtain the pressure distribution of the shale gas reservoir at 0.1 day, and use it as the label data for pre-training;

[0067] Step 3.2, input the initial pressure data of the shale gas reservoir into the convolutional neural network model constructed in step 2, and obtain output data of the same size as the input data;

[0068] Step 3.3: Calculate the mean square error between the model output data and the label data as the loss value. The calculation formula is:

[0069]

[0070] Among them, MSELoss is the loss value; is the grid number sequence of the shale gas reservoir model, is the number of grids in the shale gas reservoir model; Output data for the convolutional neural network model; is the label data;

[0071] Step 3.4, the learning rate is set to 0.001, ADAM is selected as the optimizer, back propagation is performed, and the model parameters are updated;

[0072] Step 3.5: Repeat steps 3.1 to 3.4 above, iterate the training 200 times, and finally the model loss is reduced to 1×10 -14 Now, the model weight initialization is completed, and the initialized convolutional neural network model is obtained.

[0073] Step 4: In the subsequent time steps, forward propagation is performed based on the pressure data and model parameters output by the model, and the loss error is calculated using the finite volume method.

[0074] No label data is needed for subsequent time steps. Instead, forward propagation is performed based on the pressure data and model parameters output by the model. The loss function is constructed using the finite volume discrete format to calculate the residual as the loss error output by the model. The specific steps are as follows:

[0075] Step 4.1, input the label data in the process of initializing the network model, that is, the pressure data of the second time step, into the convolutional neural network model initialized in step 3, perform a forward propagation, and obtain output data of the same size as the input data;

[0076] Step 4.2: Construct the loss value calculation formula: Considering the shale gas reservoir simulation of adsorption and desorption, each grid is equivalent to a source term, and its differential equation is:

[0077]

[0078] in:

[0079]

[0080] Where t is time, s; φ is the porosity of the porous medium, dimensionless; ρ is the gas density, kg / m 3 ;m g is the mass of gas adsorbed on unit volume of rock particles, kg / m 3 ; represents the divergence operator; v is the velocity vector, m / s; q m is the output, m 3 / s;ρ R is the rock particle density, kg / m 3 ρ gstd is the gas density under standard conditions, kg / m3 ; V L is the Langmuir volume, m 3 / kg; p is the current pressure, Pa; p L is the Langmuir pressure, Pa; M is the molar mass of the gas molecule, kg / mol; Z is the gas compressibility factor, dimensionless; R is the universal gas constant, R=8.314 J / (K·mol); T is the shale gas reservoir temperature, K; φ0 is the initial porous media porosity, dimensionless; p0 is the initial pressure, Pa; C R is the rock compression coefficient, 1 / Pa;

[0081] The final differential equation is:

[0082]

[0083] Where C(p) is the mass of gas per unit volume of rock, kg, and the calculation formula is as follows:

[0084] C(p)=φρ+(1-φ)m g (7);

[0085] Where k is the permeability, m is 2 ; μ is gas viscosity, Pa·s;

[0086] The implicit control equation after discretization using the finite volume method is:

[0087]

[0088] Where n represents the current time step, n+1 represents the next time step; i and j represent the numbers of different grids; Δt is the time interval, s; T ij is the conductivity between the i-th grid and the j-th grid, m 3 ; V is the grid volume, m 3 ; η i represents the set of all grid numbers connected to the i-th grid, and the value j belongs to it, which represents the number of the grid connected to the i-th grid; represents the pressure value of the next time step of the i-th grid, shows the pressure value of the i-th grid at the current time step, represents the pressure value of the jth grid at the next time step; q is the unit volume production;

[0089] The loss value calculation formula is:

[0090]

[0091] in:

[0092]

[0093] Among them, T ij is the conductivity between the i-th grid and the j-th grid, m 3 ; A is the contact area between grids, m 2 ; d is the distance between the grid center points, m; q n+1 is the output of the next time step, m 3 / s;p n+1 is the pressure of the next time step, Pa; p wf is the bottom hole flowing pressure, Pa; PI is the well production index, m 3 / (Pa·s), its expression is:

[0094]

[0095] Where h is the thickness of the gas layer, m; r e is the converted radius of shale gas reservoir, m; r w is the well diameter, m; S is the skin coefficient, dimensionless.

[0096] Step 4.3, calculate the loss error: The above loss value calculation method is for each grid. Taking the i-th grid as an example, the set η of all grid numbers connected to the i-th grid is i , the pressure value of the i-th grid at the current time step The pressure value of the i-th grid at the next time step The pressure value of the jth grid at the next time step Substitute them into formula (9) to calculate the loss value of the i-th grid, and so on to obtain the loss values ​​of all grids. Then, the loss values ​​of all grids are combined in order into a matrix of the same size as the shale gas reservoir. Then, the mean square error of the matrix is ​​calculated as the final loss error of this iterative training.

[0097] Step 5: Back propagation optimizes the model weights, and the loss value is reduced to the specified range through continuous iterative training. At this time, the model output is the shale gas reservoir pressure data at the current time step;

[0098] According to the loss error calculated in step 4, back propagation is performed, and the network model weights are updated using the ADAM optimizer to gradually reduce the loss error. The initial learning rate of the ADAM optimization algorithm is 0.001. This process is repeated. Every 100 iterations, the learning rate is reduced to 90% of the original value. As the loss error decreases, the output of the model gradually approaches the true value, and the loss error is reduced to 10 -18 The following shows that the error between the pressure data output by the model and the real data is within an acceptable range, and the solution for this time step is completed.

[0099] Step 6: Repeat steps 4 and 5 for each time step to obtain the pressure distribution of the shale gas reservoir at any time step. At this time, the numerical simulation is completed.

[0100] In order to prove the feasibility of the present invention, the following specific example is given. The process of numerical simulation of shale gas reservoir in this example is as follows:

[0101] Step 1: In this embodiment, shale gas reservoir related data is collected through the shale gas reservoir model. Figure 2 As shown in the figure, the shale gas reservoir model is based on a grid with a grid size of 20×20×1. The length, width and height of the grid are all 1m. The initial reservoir pressure is 20MPa, the initial porosity is 0.05, and the permeability field that conforms to the geological characteristics is generated using the SGeMS geostatistical tool. The production well locations are marked in the figure (corresponding to the dot positions in the figure), and the rock compression coefficient is 1×10 -10 1 / Pa, rock particle density is 2850kg / m 3 , the shale gas reservoir temperature is 323.15K, and the Langmuir volume is 2.8317×10 -3 m 3 / kg, the Langmuir pressure is 10.4MPa. The model includes a production well, which adopts a constant bottom hole pressure production, the bottom hole pressure is 15MPa, the production time is 50 days, and the time step size is 0.1 day.

[0102] Step 2: In this embodiment, the convolutional neural network model constructed is as follows: Figure 3 As shown in the figure, it includes two convolutional layers and one fully connected layer, and the activation function and pooling layer are placed after the convolution operation. The convolution kernel size of the convolution layer is 3×3, the step size is 1, the activation function is tanh, and the pooling layer uses maximum pooling, the pooling window size is 2, and the step size is 2.

[0103] Step 3: Use the traditional numerical simulation method to solve the shale gas reservoir pressure data of the first time step as the label for pre-training of the neural network model, set the learning rate to 0.001, use the ADAM optimizer, iterate the training for 200 times, and obtain a reasonably initialized convolutional neural network model.

[0104] Step 4: No label data is required for subsequent time steps. Input the pressure data of the current time step, and get the output data through forward propagation of the model. Use the finite volume discrete format to calculate the loss value of each grid and combine them in sequence. Calculate their mean square error as the final loss value of this training iteration. Set the initial learning rate to 0.0001 and use the ADAM optimizer.

[0105] Step 5: Back propagate, update model parameters, and iterate training until the loss error drops to 1×10 -18The training is stopped below and the solution of the pressure field at the current time step is completed.

[0106] Figure 4 The figure shows the comparison between the predicted pressure field data and the actual pressure field data at the last time step. Figure 4 From left to right are the actual pressure field map at the last moment, the predicted pressure field map, and the relative error between the two. Figure 4 It can be seen that the maximum relative error is 0.1%.

[0107] Step 6: Repeat steps 4 and 5 to obtain the pressure distribution of the shale gas reservoir at any time step. At this time, the numerical simulation is completed. After the numerical simulation is completed, based on the obtained pressure data, the well production index and production can be calculated according to formula (11) and formula (12) respectively, and then the daily production and cumulative production of the production well can be obtained.

[0108] In this embodiment, the daily production and cumulative production of the shale gas reservoir obtained by the method of the present invention are compared with the actual values ​​of the daily production and cumulative production of the shale gas reservoir obtained by the traditional numerical simulation method. Figure 5 , Figure 6 What is shown is the comparison between the daily production and cumulative production of shale gas reservoirs solved by the above method and the actual values.

[0109] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the essential scope of the present invention should also fall within the protection scope of the present invention.

Claims

1. A shale gas reservoir numerical simulation method based on physical meaning neural network, characterized in that: The convolutional neural network embedded with physical meaning is used to forward calculate the pressure of shale gas reservoirs at any time step without label data. The specific steps include: Step 1: Collect relevant data of shale gas reservoirs; Step 2: Build a convolutional neural network model and set the model's hyperparameters; Step 3: Pre-train the convolutional neural network model, using the pressure data of the first time step as a label, and pre-train to obtain an initialized convolutional neural network model; In step 3, the specific process of pre-training is as follows: Step 3.1, set the time step size, use the traditional finite volume method to obtain the shale gas reservoir pressure data of the first time step, and use it as the pre-training label data; Step 3.2, input the initial pressure data of the shale gas reservoir into the convolutional neural network model constructed in step 2, and obtain output data of the same size as the input data; Step 3.3: Calculate the mean square error between the model output data and the label data as the loss value. The calculation formula is: Among them, MSELoss is the loss value; is the grid number sequence of the shale gas reservoir model, is the number of grids in the shale gas reservoir model; Output data for the convolutional neural network model; is the label data; Step 3.4, set the learning rate, select the ADAM optimizer, back propagate, and update the convolutional neural network model parameters; Step 3.5: Repeat steps 3.1 to 3.4 above, iterate the training 200 times, and finally the loss of the convolutional neural network model is reduced to 1×10 -14 Next, the model weight initialization is completed, and the initialized convolutional neural network model is obtained; Step 4: In the subsequent time steps, forward propagation is performed based on the pressure data and model parameters output by the model, and the loss error is calculated using the finite volume method; The specific process of step 4 is as follows: Step 4.1, input the pressure data of the second time step into the convolutional neural network model initialized in step 3, perform a forward propagation, and obtain output data of the same size as the input data; Step 4.2: Construct a loss value calculation formula; Considering the simulation of shale gas reservoirs with adsorption and desorption, each grid in the image is equivalent to a source term, and its differential equation is: Where p is the current pressure; t is the time; represents the divergence operator; ρ is the gas density; k is the permeability; μ is the gas viscosity; q m is the production; C(p) is the gas mass per unit volume of rock, and the calculation formula is as follows: C(p)=φ+(1-φ)m g (7); Where φ is the porosity of the porous medium; m g is the mass of gas adsorbed on unit volume of rock particles; The implicit control equation after discretization using the finite volume method is: Where n represents the current time step, n+1 represents the next time step; i and j represent the numbers of different grids; Δt is the time interval; T ij is the conductivity between the i-th grid and the j-th grid; V is the grid volume; η i Represents the set of all grid numbers connected to the i-th grid; represents the pressure value of the next time step of the i-th grid, shows the pressure value of the i-th grid at the current time step, represents the pressure value of the jth grid at the next time step; q is the unit volume production; The calculation formula for the loss value loss is: Step 4.3: Calculate the loss value of each grid according to formula (9), and combine the loss values ​​of all grids into a matrix with the same size as the shale gas reservoir in order. Finally, calculate the mean square error of the matrix as the final loss error of this iterative training; Step 5: Back propagation optimizes the model weights, and the loss value is reduced to the specified range through continuous iterative training. At this time, the output of the model is the shale gas reservoir pressure data at the current time step; Step 6: Repeat steps 4 and 5 for each time step to obtain the pressure distribution of the shale gas reservoir at any time step. At this time, the numerical simulation is completed.

2. The shale gas reservoir numerical simulation method based on physical meaning neural network according to claim 1 is characterized in that: In step 1, the shale gas reservoir related data include shale gas reservoir size, initial reservoir pressure, initial porosity, shale gas reservoir temperature, rock particle density, rock compression coefficient, Langmuir volume, and Langmuir pressure.

3. The shale gas reservoir numerical simulation method based on physical meaning neural network according to claim 1 is characterized in that: In the step 2, the constructed convolutional neural network model includes two convolutional layers and a fully connected layer, and the normalization layer, the activation function layer and the maximum pooling layer are placed after the convolution operation; the two convolutional layers are respectively the first convolutional layer and the second convolutional layer; the first normalization layer, the first activation function layer, and the first maximum pooling layer are placed after the convolution operation of the first convolutional layer, and the second normalization layer, the second activation function layer, and the second maximum pooling layer are placed after the convolution operation of the second convolutional layer; the input of the convolutional neural network model is the shale gas reservoir pressure data of the current time step, and the output is the shale gas reservoir pressure data of the next time step; The hyperparameters set include the number of convolution layers, convolution kernel size, convolution step size, activation function, pooling type, pooling window size, and pooling step size; The specific process of the convolutional neural network model outputting the shale gas reservoir pressure data for the next time step is: Step 2.1, the initial shale gas reservoir pressure data is in matrix form, so the initial shale gas reservoir pressure data is regarded as image data of size 1×20×20, and the image data is sequentially input into the first convolution layer, the first normalization layer, the first activation function layer, and the first maximum pooling layer to obtain image data of size 25×10×10; Step 2.2, after the image data of size 25×10×10 is input into the second convolution layer, the second normalization layer, the second activation function layer, and the second maximum pooling layer in sequence, the image data of size 50×5×5 is obtained; Step 2.3, stretch the image data of size 50×5×5 to image data of size 1×1250, input it into the fully connected layer, output image data of size 1×400, and then reorganize the image data of 1×400 to image data of 1×20×20. At this time, the shale gas reservoir pressure data of the next time step with the same size as the initial input data is obtained.

4. The shale gas reservoir numerical simulation method based on physical meaning neural network according to claim 1 is characterized in that: The specific process of step 5 is: back propagation is performed according to the loss error calculated in step 4, and the network model weights are iteratively updated using the ADAM optimizer. When the loss error is reduced to 1×10 -18 When the pressure is solved as follows, the pressure data of the current time step is obtained.