A numerical simulation method of physical information neural network applicable to fractured shale gas reservoirs

By introducing physical information neural networks and specific model description methods into traditional numerical simulation methods, the problem that traditional methods are difficult to describe the complex structure and multi-scale characteristics of fractured shale gas reservoirs is solved, and high-precision and high-efficiency pressure change solutions are achieved, which improves the reliability of engineering guidance.

CN119962260BActive Publication Date: 2025-06-13CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510442908.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-06-13
Estimated Expiration
2045-04-10

AI Technical Summary

Technical Problem

Traditional numerical simulation methods are difficult to effectively describe the complex geometric structure and multi-scale characteristics of cracked shale gas reservoirs, and insufficient data can easily lead to large errors, and insufficient physical laws constraints, limiting the reliability of engineering guidance.

Method used

The physical information neural network (PINN) method is used to describe bedrock and micro-fractures through dual media model and embedded discrete model, and the matrix-micro-river fracture coupling model is established. The fully connected neural network model is used and specific network structures and hyperparameter settings are added. The loss function is constructed in combination with the finite volume method and expert experience, and dynamic time step training is carried out to solve pressure changes.

Benefits of technology

In the absence of label data, the pressure changes of fractured shale gas reservoirs can be solved with high accuracy and efficiency, which significantly improves the speed and accuracy of numerical simulation and ensures the reliability of engineering guidance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119962260B_ABST
    Figure CN119962260B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of reservoir engineering, and discloses a physical information neural network numerical simulation method applicable to fractured shale gas reservoirs. Basic data of fractured shale gas reservoirs are obtained; based on the dual-porosity model and the embedded discrete model, a matrix-microfracture-hydraulic fracture coupling model applicable to fractured shale gas reservoirs is established; a neural network model with a fully connected network as the main network and two fully connected networks as branch networks is established, and the network structure is added and relevant hyperparameters are set in the neural network model; pre-training is performed with the initial pressure as the labeled data to initialize the neural network model; based on the initialized neural network model, all time steps are trained using the dynamic time step method to obtain the pressure fields of all time steps of the shale gas reservoir. The present application can solve the pressure change in the elastic production process of fractured shale gas reservoirs through a physical information neural network without labeled data, and has high accuracy and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of reservoir engineering, and particularly to a physics-informed neural network numerical simulation method applicable to fractured shale gas reservoirs. Background Art

[0002] With the continuous growth of global energy demand and the gradual depletion of conventional oil and gas resources, shale gas, as an important part of unconventional natural gas resources, has become a key area of energy development. Fractured shale gas reservoirs exhibit significant multi-scale and multi-physical field coupling characteristics due to their unique reservoir structures (such as the interaction between complex natural fracture networks and artificially induced fractures) and heterogeneity. In the development of such gas reservoirs, numerical simulation technology is the core tool for optimizing fracturing design, predicting production capacity, and formulating development strategies. However, traditional numerical simulation methods (such as the finite element method, finite volume method, etc.) have the following problems: The geometric complexity and multi-scale characteristics of the fracture network lead to difficulties in mesh generation and high computational costs; they are highly dependent on the accurate description of reservoir geological parameters and fracture distribution, and are prone to large errors when actual data is insufficient; at the same time, traditional data-driven models (such as pure machine learning methods) often ignore physical law constraints such as fluid mechanics constitutive equations, resulting in prediction results deviating from basic physical principles such as mass conservation and Darcy's law, limiting the reliability of engineering guidance.

[0003] In recent years, Physics-Informed Neural Networks (PINN) have provided a new idea for complex reservoir simulation due to their ability to embed governing equations into neural network training, taking into account both data-driven and physical law constraints. By constructing a surrogate model through a neural network model with physical meaning, the problems of large computational volume and long time consumption of traditional reservoir numerical simulators can be solved. However, for fractured shale gas reservoirs, due to the strong nonlinear characteristics of their governing equations and the significant variation of coefficients over time, the current PINN models are difficult to be directly applied to the numerical simulation of shale gas reservoirs. Existing surrogate models often need to generate labeled data through traditional numerical solution methods, and these models can only predict the pressure distribution information at a certain moment. Summary of the Invention

[0004] The purpose of this application is to provide a physics-informed neural network numerical simulation method applicable to fractured shale gas reservoirs, so as to solve the pressure change during the elastic production process of fractured shale gas reservoirs through a physics-informed neural network without labeled data, and with high accuracy and efficiency.

[0005] To achieve the above purpose, the following technical solutions are adopted:

[0006] The present application provides a physical information neural network numerical simulation method applicable to fractured shale gas reservoirs, and the method includes:

[0007] Obtain the basic data of the fractured shale gas reservoir;

[0008] According to the basic data of the fractured shale gas reservoir, describe the matrix rock and microfractures through a dual-porosity model, and describe the hydraulic fractures through an embedded discrete model. Combine the two to establish a matrix-microfracture-hydraulic fracture coupling model applicable to the fractured shale gas reservoir for the training and prediction of the neural network model;

[0009] Establish a neural network model with a fully connected network as the main network and two fully connected networks as branch networks, and add network structures and set relevant hyperparameters in the neural network model; wherein, the network structures include adjacent position anchoring, adaptive activation functions, cross-layer connections, and gated updates;

[0010] Perform pre-training with the initial pressure as the labeled data to initialize the neural network model;

[0011] Based on the initialized neural network model, use the dynamic time step method to perform training for all time steps. During the training process of each time step, substitute the pressure predicted by the neural network model into the overall loss function, and perform backpropagation to continuously optimize the network parameters until the overall loss is reduced to a specified range to obtain the pressure field of the shale gas reservoir at all time steps; wherein, the overall loss function includes the physical loss of the control equation based on finite volume discretization and the expert experience loss.

[0012] Further, the basic data of the fractured shale gas reservoir includes the size of the reservoir and the fracturing reform area, the initial gas reservoir pressure, the matrix rock porosity and permeability, the temperature of the shale gas reservoir, the Langmuir volume, the Langmuir pressure, the microfracture spacing and aperture, the hydraulic fracture distribution, the rock particle density, the rock compressibility, and the gas adsorption and desorption curve.

[0013] Further, according to the basic data of the fractured shale gas reservoir, describe the matrix rock and microfractures through a dual-porosity model, and describe the hydraulic fractures through an embedded discrete model. Combine the two to establish a matrix-microfracture-hydraulic fracture coupling model applicable to the fractured shale gas reservoir, including:

[0014] Characterize the matrix and microfracture system through a dual-porosity model;

[0015] Characterize the hydraulic fracture system through an embedded discrete model;

[0016] Couple the dual-porosity model and the embedded discrete model to establish a matrix-microfracture-hydraulic fracture coupling model of the shale gas reservoir.

[0017] Further, in the neural network model, the pressure data of the previous time step is trained in the backbone network and then input into two branch networks to obtain the pressure data of the matrix system and the fracture system respectively, where the hyperparameter settings of each fully connected network are independent of each other;

[0018] The fully connected network includes:

[0019] An input layer for reading and saving input data;

[0020] Hidden layers, located after the input layer, are set to multiple, and the number of neurons in each hidden layer is set to multiple. The hidden layers are used for feature extraction and non-linear processing of the data of the previous layer;

[0021] An output layer, located after the hidden layers, for generating and outputting the final training result;

[0022] Activation functions, located in each neuron of the hidden layers and the output layer, for non-linear processing of the neurons;

[0023] Weights and biases, located at the positions where each neuron is connected. The weights are used to change the size of the input data, and the biases are used to change the activation threshold of the neurons.

[0024] Further, the network structure is added to the neural network model in the following way:

[0025] Adjacent position anchoring is to import the adjacency matrix representing the connection relationship between adjacent grids into the network while linearly processing the pressure field in the neural network. First, the input pressure field is encoded in the output layer to obtain the pressure matrix and the adjacency matrix representing the connection relationship between grids. After multiplying the pressure matrix by the weights of the input layer and then adding the adjacency matrix, the target pressure matrix is obtained;

[0026] The adaptive activation function is to normalize the target pressure matrix and then perform non-linear processing on the normalized target pressure matrix in the hidden layer;

[0027] Cross-layer connection and gated update is to directly transmit the input pressure field at the input layer to the output layer to achieve cross-layer connection, and through the gated update method, the input pressure field and the non-linearly processed pressure matrix are combined and output.

[0028] Further, pre-training is performed with the initial pressure as the labeled data to initialize the neural network model, including:

[0029] Using the initial shale gas reservoir pressure data as the labeled data for pre-training;

[0030] Inputting the initial pressure data of the shale gas reservoir into the constructed neural network model to obtain the pressure output data;

[0031] The mean square error between the pressure output data of the model and the label data is used as the loss value;

[0032] Based on the set learning rate and the ADAM optimizer, backpropagation is performed to update the parameters of the neural network model;

[0033] Iterative training is carried out until the loss of the neural network model drops to the set range, and an initialized neural network model is obtained.

[0034] Furthermore, the calculation formula for using the mean square error between the pressure output data of the model and the label data as the loss value is:

[0035] (4)

[0036] where, is the loss value; is the grid , is the number of grids; is the output data of the convolutional neural network model; is the label data.

[0037] Furthermore, based on the initialized neural network model, the dynamic time step method is used for training at all time steps. During the training process of each time step, the pressure predicted by the neural network model is substituted into the overall loss function, and backpropagation is performed to continuously optimize the network parameters until the overall loss is reduced to the specified range, and the pressure field at all time steps of the shale gas reservoir is obtained, including:

[0038] Dynamically set the time step according to the pressure change;

[0039] The control equation for the fractured shale gas reservoir is determined as:

[0040] (5)

[0041] where the superscript represents the previous time step, is the current time step; the subscript represents the grid , is the total number of grids; is the grid volume, m 3 ; represents all adjacent grids of the grid ; ; is the mass flow rate from the adjacent grid to the grid , kg / s; is the rock porosity; is the gas viscosity; is the source-sink term, kg / mžs; is the mass of gas adsorbed on the rock particles per unit volume, kg / m 3 ;

[0042] Gas viscosity The expression of is:

[0043] (6)

[0044] where, is the pressure, Pa; is the molar mass, g / mol; is the gas compressibility factor; is the gas molecular constant, Pa·m 3 / (mol·K); is the absolute temperature, °C;

[0045] The mass of gas adsorbed on the rock particles per unit volume is determined by the following formula :

[0046] (12)

[0047] where, , represents the first calculation coefficient, is the density of rock particles, kg / m 3 ; is the gas density under standard conditions, kg / m 3 ; is the Langmuir volume, m 3 / kg; is the Langmuir pressure, Pa;

[0048] Substitute Equation (6) and Equation (12) into Equation (5), we get:

[0049] (14)

[0050] where, , represents the second calculation coefficient;

[0051] Transform Equation (14), the residual of the shale gas reservoir control equation is:

[0052] (21)

[0053] where, is the residual of the shale gas reservoir control equation at the current time step; t n+1 is the time represented by the current time step, s;t n is the time represented by the previous time step, s; is the adjacent grid at the current time step to grid of the mass flow rate, kg / s;

[0054] Based on the residuals of the shale gas reservoir control equation, the loss function of the shale gas reservoir control equation is constructed as:

[0055] (22)

[0056] where, is the number of grids; MSE PDE is the loss function of the shale gas reservoir control equation; is the residual of grid in the shale gas reservoir control equation;

[0057] During the elastic production process of the shale gas reservoir, the expert experience constraint consists of three parts. The first part is that the pressure of the shale gas reservoir is less than the initial reservoir pressure and greater than the bottom-hole flowing pressure; the second part is that the pressure of the next time step is less than the pressure of the current time step; the third part is that the pressure of the fracture system is less than the pressure of the matrix system. According to the first part, the second part and the third part, an expert experience loss function is constructed MSE exp :

[0058] (23)

[0059] where, is the constraint of the pressure range, is the constraint of the pressure decline, is the constraint of the pressure system;

[0060] According to the loss function of the shale gas reservoir control equation and the expert experience loss function, an overall loss function is constructed MSE :

[0061] (27)

[0062] According to the overall loss function of Equation (27), backpropagation is performed to continuously optimize the model parameters until the loss value is reduced to the set range, and the pressure field of the shale gas reservoir at the current time step is output.

[0063] Furthermore, the pressure field data of the previous time step is used as the input of the current time step to obtain the pressure field data of the current time step, and the above steps are repeated to solve the pressure field data of any time step.

[0064] The beneficial effects of this application are:

[0065] The present invention can achieve the forward solution of the pressure distribution of the shale gas reservoir coupling model (matrix + microfracture + hydraulic fracture) at any time step even without labeled data, and significantly improve the solution speed while ensuring the accuracy. A core of the present invention lies in constructing a loss function through the finite volume method and expert experience, taking into account the strong nonlinear problem of shale gas and combining expert experience constraints to improve the solution efficiency; establishing a neural network model mainly composed of a fully connected network supplemented by two fully connected networks, and adding network structures such as adjacent position anchoring, adaptive activation function, cross-layer connection and gated update on this basis; adopting a dynamic adjustment method for time steps to enable the network to train the pressure change in the early stage more precisely; introducing pre-training to initialize the network, reducing the randomness of the network output and ensuring that the network output is positive; adopting the method of transfer learning during the pressure training process to further improve the training efficiency. Description of the Drawings

[0066] Figure 1 It is a flowchart of a physical information neural network numerical simulation method applicable to fractured shale gas reservoirs provided by an embodiment of the present application;

[0067] Figure 2 It is a specific calculation flowchart of the neural network model provided by an embodiment of the present application;

[0068] Figure 3 It is a fracture distribution map of the shale gas reservoir provided by an embodiment of the present application;

[0069] Figure 4 It is a true pressure field map for 100 days provided by an embodiment of the present application;

[0070] Figure 5 It is a predicted pressure field map for 100 days provided by an embodiment of the present application;

[0071] Figure 6 It is a relative error map of the true pressure field and the predicted pressure field for 100 days provided by an embodiment of the present application;

[0072] Figure 7 It is a comparison map of the true value and the predicted value of the cumulative gas production of the shale gas reservoir provided by an embodiment of the present application;

[0073] Figure 8 It is a comparison map of the true value and the predicted value of the daily gas production of the shale gas reservoir provided by an embodiment of the present application. Detailed Embodiments

[0074] The following describes the implementation manners of the present application through specific specific examples. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0075] The following further describes in detail the specific implementation manners of the present application in conjunction with the accompanying drawings and embodiments.

[0076] Please refer to Figure 1 , which is a flowchart of a physical information neural network numerical simulation method applicable to a fractured shale gas reservoir provided by an embodiment of the present application. An embodiment of the present application provides a physical information neural network numerical simulation method applicable to a fractured shale gas reservoir. The flow schematic diagram of solving the pressure of the shale gas reservoir after embedding physical meanings by using an improved fully connected neural network model is as Figure 1 shown, including the following steps 1 to step 6.

[0077] Step 1: Collect data related to the shale gas reservoir, including the size of the reservoir and the fracturing transformation area, the initial gas reservoir pressure, the matrix porosity and permeability, the shale gas reservoir temperature, the Langmuir volume, the Langmuir pressure, the number and positions of wells, the bottom-hole flowing pressure, the gas molecular mass, the gas constant, the standard gas volume, the micro-fracture spacing and aperture, the hydraulic fracture distribution, the rock particle density, the rock compressibility, and the gas adsorption and desorption curves, etc. Among them, the information of the reservoir and the fracturing transformation area is used to establish the matrix-micro-fracture-hydraulic fracture coupling model of the fractured shale gas reservoir in step 2, including the size of the reservoir and the fracturing transformation area, the matrix porosity and permeability, the number and positions of wells, the micro-fracture spacing and aperture, the hydraulic fracture distribution, the rock particle density, the rock compressibility; the remaining information is mainly used to construct the loss function of the neural network in step 5.

[0078] Step 2: According to the basic data of the fractured shale gas reservoir, describe the matrix and micro-fractures through the dual-porosity model, and describe the hydraulic fractures through the embedded discrete model. Combine the two to establish a matrix-micro-fracture-hydraulic fracture coupling model applicable to the fractured shale gas reservoir for the training and prediction of the neural network model. The specific model construction process is as follows:

[0079] Step 2.1: Use the dual-porosity model to characterize the matrix system (matrix + micro-fractures) and depict the preferential flow characteristics of the micro-fractures.

[0080] Step 2.2: Use the embedded discrete fracture model to characterize the fracture system (hydraulic fractures). While depicting the high conductivity of the hydraulic fractures, it can avoid the unstructured grid design based on the hydraulic fractures.

[0081] Step 2.3: According to the pseudo-steady-state crossflow between the microfracture system and the hydraulic fracture system, couple the two models to establish a matrix-microfracture-hydraulic fracture coupling model for shale gas reservoirs.

[0082] Step 3: Establish a neural network model with a fully connected network as the main network and two fully connected networks as branch networks. Add network structures such as adjacent position anchoring, adaptive activation functions, cross-layer connections, and gated updates, and set relevant hyperparameters.

[0083] A fully connected neural network usually consists of five parts: (1) The input layer, whose main function is to read and save input data; (2) The hidden layer, which is located after the input layer. The number of hidden layers can be flexibly changed, and the number of neurons in each hidden layer is also flexible, making the network highly flexible. Its main function is to extract features and perform non-linear processing on the data of the previous layer; (3) The output layer, which is located after the hidden layer. Its main function is to generate and output the final training results; (4) The activation function, which is located in each neuron of the hidden layer and the output layer. Its main function is to perform non-linear processing on the neurons, thereby improving the ability of the neural network to extract features and the fitting ability; (5) Weights and biases, which are located at the connection positions of each neuron. The former is used to change the size of the input data, and the latter is used to change the activation threshold of the neuron. On this basis, add network structures such as adjacent position anchoring, adaptive activation functions, cross-layer connections, and gated updates.

[0084] The steps for constructing the neural network model of shale gas reservoirs are as follows:

[0085] Step 3.1: First, establish a main fully connected neural network, and then establish two branch fully connected neural networks. The input of the first fully connected neural network is the pressure data of the previous time step, and the output is the input of the two branch fully connected neural networks. The outputs of the two neural networks are the pressures of the matrix system and the fracture system, respectively.

[0086] Step 3.2: Add adjacent position anchoring to the above neural network model, and import the adjacency matrix representing the connection relationship between adjacent grids into the network while the neural network linearly processes the pressure field. First, encode the input pressure field at the output layer to obtain the pressure matrix , the adjacency matrix representing the connection relationship between grids, with the same size of . Multiply by , and then add to obtain the target pressure matrix

[0087] (1)

[0088] Among them, is the input layer weight; is the input layer bias; is the adjacency matrix.

[0089] Step 3.3. Add an adaptive activation function to the above neural network model, normalize , and then perform non-linear processing on it in the hidden layer, as shown in Equation (2):

[0090] (2)

[0091] Among them, is the pressure matrix for non-linear processing; is the hidden layer weight; is the hidden layer bias; ReLU is the rectified linear unit activation function; is the learnable parameter of the adaptive activation function; BatchNorm is the normalization, which normalizes the pressure features of different dimensions to keep them at the same order of magnitude and maintain the stability of gradient backpropagation;

[0092] Step 3.4. Add cross-layer connection and gated update to the above neural network model, directly transmit the input pressure field at the input layer at the beginning to the output layer to achieve cross-layer connection, and combine and output the input pressure field and the pressure matrix after non-linear processing through the gated update method of Equation (3):

[0093] (3)

[0094] Among them, is the pressure matrix at time t+1; is the updatable weight; is the output layer weight; is the output layer bias.

[0095] Step 4. Pre-train with the initial pressure as the labeled data and initialize the neural network model.

[0096] Since the solution of shale gas pressure is a strongly nonlinear problem and the coefficients in the governing equations are all functions of pressure, and because the initial training of the neural network is highly random, if the initial training result is not a positive value, it will cause some coefficients in the governing equations to be unsolvable, and further cause the loss value in step 5 to be uncomputable, resulting in simulation failure. Therefore, first use the initial pressure data as the input and label for pre-training, update the relevant parameters of the model, reduce the error between the output of the model at the zero time step and the true value, ensure that all model outputs are positive values, so that the coefficients of the governing equations can be solved, and further ensure that the loss value in step 5 can be calculated. This step is only to make the output of the neural network reasonable. For the solution of subsequent time steps, no label data is required. Just calculate the loss value and solve it forward according to the governing equations and expert constraints as usual to obtain the pressure at the next time step.

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

[0098] Step 4.1: Use the initial pressure data of the shale gas reservoir as the label data;

[0099] Step 4.2: Set appropriate iteration times and loss values, input the initial pressure data of the shale gas reservoir into the neural network model constructed in step 3 to obtain output data of the same size as the input data;

[0100] Step 4.3: Substitute the output data and label data into the formula to calculate the mean square error between the two as the loss value of training;

[0101] (4)

[0102] where is the loss value; is the grid , is the number of grids; is the output data of the convolutional neural network model; is the label data.

[0103] Step 4.4: Set an appropriate learning rate, select the ADAM optimizer, perform backpropagation, and update the relevant parameters of the model;

[0104] Step 4.5: Repeat steps 4.2 to 4.4 until the loss value reaches the expectation. At this time, the initialization of the relevant parameters of the model is completed, that is, the initialized neural network model is obtained.

[0105] Step 5: Use the dynamic time step method for training all time steps, that is, the time step gradually increases over time until it reaches the specified maximum value. During the training process of each time step, substitute the pressure predicted by the neural network into the overall loss function (physical loss based on the finite volume discretized control equation + expert experience loss), and perform backpropagation to continuously optimize the network parameters until the overall loss is reduced to the specified range;

[0106] During the elastic production process of fractured shale gas reservoirs, the pressure changes significantly in a short period in the early stage. Therefore, the time step cannot be too large, otherwise the pressure change cannot be finely simulated. In the later stage, the pressure changes little over a long time, so a larger time step can be used for pressure simulation to reduce the number of training times and improve the training efficiency.

[0107] The specific steps for setting the dynamic time step are as follows:

[0108] Step 5.1: Set the time step to 0.001 days, simulate and train 10 times until 0.01 days, and output the pressure data of each time step;

[0109] Step 5.2: Modify the time step to 0.01 days, simulate and train 9 times, with a total time of 0.1 days, and output the pressure data of each time step;

[0110] Step 5.3: Modify the time step to 0.1 days, simulate and train 9 times, with a total time of 1 day, and output the pressure data of each time step;

[0111] Step 5.4: Modify the time step to 1 day and keep it unchanged until the simulation ends, and output the pressure data of each time step;

[0112] Perform forward propagation based on the pressure and model parameters of the previous time step, calculate the loss of the control equation by the finite volume method, and perform backpropagation with expert constraints to continuously optimize the model parameters until the loss value is reduced to the set range, and output the pressure field of the shale gas reservoir at the current time step;

[0113] For the pre-trained time step, no labeled data is required. Just perform forward propagation based on the pressure data and model parameters output by the model, construct a loss function using the finite volume method and expert loss, and calculate the loss error output by the model. The specific steps are as follows:

[0114] Step 5.5: Input the initial pressure data of the shale gas reservoir into the convolutional neural network model initialized in Step 4, perform one forward propagation, and obtain output data of the same size as the input data;

[0115] Step 5.6: Construct the control equation residual considering the adsorption / desorption effect, real gas, and slippage effect. The calculation formula construction process is as follows:

[0116] The governing equations of the shale gas reservoir are shown in Equation (5):

[0117] (5)

[0118] Among them, the superscript represents the previous time step, is the current time step; the subscript represents the grid , is the total number of grids; is the volume of the grid , m 3 ; represents all adjacent grids of the grid ; ; is the mass flow rate from the adjacent grid to the grid , kg / s; is the rock porosity; is the gas viscosity, and its expression is:

[0119] (6)

[0120] Among them, is the pressure, Pa; is the molar mass, g / mol; is the gas compressibility factor; is the gas molecular constant, Pa·m 3 / (mol·K); is the absolute temperature, °C.

[0121] In Equation (5), is the source-sink term, kg / m³·s. Due to the large pressure gradient near the well, it is difficult to directly solve by automatic differentiation, so a well model is introduced to reduce the pressure gradient near the well. The specific definition is as follows:

[0122] (7)

[0123] Among them is the well index, defined as:

[0124] (8)

[0125] Among them is the reservoir thickness, m; is the wellbore radius, m; is the skin factor; is the gas reservoir radius, and its expression is:

[0126] (9)

[0127] where is the length in the x - direction of the grid, m; is the length in the y - direction of the grid, m.

[0128] Equation (7) is the total mobility, 1 / (Pa·s), defined as:

[0129] (10)

[0130] where, is the viscosity of the fluid, Pa·s.

[0131] In Equation (5), is the mass of gas adsorbed on the rock particles per unit volume, kg / m 3 , and its expression is:

[0132] (11)

[0133] where, is the density of rock particles, kg / m 3 ; is the density of gas under standard conditions, kg / m 3 ; is the Langmuir volume, m 3 / kg; is the Langmuir pressure, Pa.

[0134] Simplification gives:

[0135] (12)

[0136] where, , representing the first calculation coefficient.

[0137] Substituting Equation (6) and Equation (12) into Equation (5), we get:

[0138] (13)

[0139] Simplification gives:

[0140] (14)

[0141] where, , representing the second calculation coefficient;

[0142] The mass flow rate from the adjacent grid to the grid at the current time step is expressed as:

[0143] (15)

[0144] Among them, is the geometric conductivity term of the conductivity coefficient, and are the pressures of the grid j and the grid i at the current time step, in Pa; is the mobility term of the conductivity coefficient, and its expression is:

[0145] (16)

[0146] In Equation (15), is the geometric conductivity term of the conductivity coefficient. For an orthogonal grid, its expression is:

[0147] (17)

[0148] Among them, is the contact area between the grid and the grid , in m 2 ; is the distance from the center of the grid to the contact surface between the grid and the grid , in m; is the distance from the center of the grid to the contact surface between the grid and the grid , in m; is the average value of the intrinsic permeability of the grid , and generally the harmonic mean is adopted.

[0149] In a shale gas reservoir, in order to consider the Klinkenberg effect, Equation (16) is modified to:

[0150] (18)

[0151] Among them, is the Klinkenberg coefficient, and its expression is:

[0152] (19)

[0153] Among them, is the effective Knudsen diffusion coefficient of gas migration in the porous medium, with the unit of m 2 / s; is the intrinsic permeability of the porous medium, with the unit of m 2 ; is the gas compressibility, with the unit of 1 / Pa, and the expression is:

[0154] (20)

[0155] Transforming Equation (14), the residual of the shale gas reservoir control equation is obtained as:

[0156] (21)

[0157] where is the residual of the shale gas reservoir control equation at the current time step; t n+1 is the moment represented by the current time step, in s; t n is the moment represented by the previous time step, in s;

[0158] Thus, the loss function of the shale gas reservoir control equation is constructed as:

[0159] (22)

[0160] where is the number of grids.

[0161] Step 5.7. Construct the expert experience loss function. During the elastic production process of the shale gas reservoir, the expert experience constraint consists of three parts: the pressure in the shale gas reservoir should be less than the initial reservoir pressure and greater than the bottom-hole flowing pressure; the pressure at the next time step must be less than the pressure at the current time step; the pressure in the fracture system must be less than the pressure in the matrix system. Thus, the expert experience loss function is constructed as:

[0162] (23)

[0163] where is the constraint on the pressure range, that is, the pressure in the shale gas reservoir must be between the initial reservoir pressure and the bottom-hole flowing pressure, and the expression is:

[0164] (24)

[0165] where is the bottom-hole flowing pressure, in Pa; is the initial pressure of the shale gas reservoir, in Pa; ReLU is the rectified linear unit activation function.

[0166] In Equation (23), is the constraint on the pressure decline, that is, the pressure in the gas reservoir at the next time step must be less than the pressure at the current time step, and the expression is:

[0167] (25)

[0168] Wherein, is the pressure of the shale gas reservoir at the next time step, in Pa; is the pressure of the shale gas reservoir at the current time step, in Pa.

[0169] In Equation (23), is the constraint of the pressure system, that is, the pressure in the gas reservoir at the next time step must be less than the pressure at the current time step. The expression is:

[0170] (26)

[0171] Wherein, is the pressure of the fracture system, in Pa; is the pressure of the matrix grid adjacent to the fracture system, in Pa; is the pressure of the remaining matrix system, in Pa.

[0172] Step 5.8: Combine the control equation loss function and the expert experience loss function to establish the complete loss function as follows:

[0173] (27)

[0174] Step 5.7: Perform backpropagation according to the loss function in Equation (27), continuously optimize the model parameters until the loss value is reduced to a certain range, and output the pressure field of the shale gas reservoir at the current time step.

[0175] Step 6: Use the pressure data of the previous time step as the input for training at the current time step, repeat Step 5, and then the pressure data of the shale gas reservoir at any time step can be obtained, and a series of data such as the internal pressure and production well output at any time step can be obtained.

[0176] To prove the feasibility of the present invention, the following specific embodiments are given. The process of numerical simulation of the shale gas reservoir is as follows:

[0177] The size of the gas reservoir model is 440m × 250m × 10m, and the grid size is 10m × 10m × 10m. The initial gas reservoir pressure is 25 MPa, the initial porosity is 0.08, the temperature of the shale gas reservoir is 70 °C, the density of rock particles is 2850 kg / m 3 , the rock compressibility is 1e -10 1 / Pa, the Langmuir volume is 0.015 m 3 / kg, the Langmuir pressure is 2.5 MPa. The fracture distribution of the shale gas reservoir after hydraulic fracturing is as Figure 3 shown, and the location of the production well has been marked in the figure (corresponding to the dot position in the figure). The simulation time is 100 days, and the time step is 1 day.

[0178] Construct a fully connected neural network model, as Figure 2 shown. There are a total of three fully connected neural networks. Each fully connected neural network includes an input layer, an output layer, and a hidden layer. The matrix system pressure and the fracture system pressure are solved through two branch networks respectively.

[0179] Take the initial pressure data of the shale gas reservoir as the labeled data. Set the number of iterations to 5000 times and the loss value to 1×10 -18 . Input the initial pressure data of the shale gas reservoir into the neural network model to obtain output data of the same size as the input data. Calculate the mean square error between the output data and the labeled data as the loss value for training. Set the learning rate to 0.001, select the ADAM optimizer, perform backpropagation, and update the relevant parameters of the model. Repeat the above process until the loss value reaches 1×10 -18 to obtain the initialized neural network model.

[0180] Set the dynamic time step. The time step is first set to 0.001 days and simulated for 10 times to 0.01 days; then the time step is modified to 0.01 days and simulated for 9 times, with a total time of 0.1 days; then the time step is modified to 0.1 days and simulated for 9 times, with a total time of 1 day, and the pressure data at each time step is output; finally, the time step is modified to 1 day and remains unchanged thereafter until the simulation ends.

[0181] For the training process after pre-training, no labeled data is required. Perform forward propagation based on the pressure and model parameters of the previous time step, calculate the loss of the control equation through the finite volume method, and perform backpropagation with the assistance of expert constraints to continuously optimize the model parameters until the loss value is reduced to 1×10 -18 to output the pressure field of the shale gas reservoir at the current time step. Repeating the above process can obtain the pressure field data at any time step, and the data simulation is completed. Based on this, the daily production and cumulative production of the production well can be further obtained.

[0182] Figure 4 shows the comparison between the predicted pressure field data and the real pressure field data at 100 days. From left to right are the predicted pressure field map and the real pressure field map, Figure 5 and the relative error between the two. It can be seen that the maximum relative error of the pressure prediction is 0.07%. Figure 6 、 Figure 7 show the comparison between the cumulative production and daily production of the shale gas reservoir and the real values respectively. It can be seen that the simulation accuracy is very high.

[0183] The above embodiments are only used to illustrate the present application and are not intended to limit the present application. Those of ordinary skill in the relevant technical field can also make various changes and modifications without departing from the spirit and scope of the present application. Therefore, all equivalent technical solutions also fall within the scope of the present application, and the patent protection scope of the present application shall be defined by the claims.

Claims

1. A physical information neural network numerical simulation method suitable for fractured shale gas reservoirs, characterized in that: The method comprises: Obtain basic data of fractured shale gas reservoirs; Based on the basic data of fractured shale gas reservoirs, a dual medium model is used to describe bedrock and microfractures, and an embedded discrete model is used to describe hydraulic fractures. The two are combined to establish a matrix-microfracture-hydraulic fracture coupling model suitable for fractured shale gas reservoirs, which is used for the training and prediction of neural network models. Establish a neural network model with a fully connected network as the main network and two fully connected networks as branch networks, and add a network structure to the neural network model and set relevant hyperparameters; wherein the network structure includes adjacent position anchoring, adaptive activation function, cross-layer connection and gated update; Use the initial pressure as label data for pre-training and initialize the neural network model; Based on the initialized neural network model, the dynamic time step method is used to perform training for all time steps. During the training process of each time step, the pressure predicted by the neural network model is substituted into the overall loss function, and back propagation is performed to continuously optimize the network parameters until the overall loss is reduced to a specified range, thereby obtaining the pressure field of the shale gas reservoir at all time steps; wherein the overall loss function includes the physical loss of the control equation based on finite volume discretization and the expert experience loss.

2. The physical information neural network numerical simulation method applicable to fractured shale gas reservoirs according to claim 1, characterized in that: The basic data of the fractured shale gas reservoir include the size of the reservoir and the fracturing transformation area, the initial gas reservoir pressure, the bedrock porosity, the shale gas reservoir temperature, the Langmuir volume, the Langmuir pressure, the micro-fracture spacing and aperture, the hydraulic fracture distribution, the rock particle density, the rock compressibility and the gas adsorption-desorption curve.

3. The physical information neural network numerical simulation method applicable to fractured shale gas reservoirs according to claim 1, characterized in that: Based on the basic data of fractured shale gas reservoirs, a dual medium model is used to describe bedrock and microfractures, and an embedded discrete model is used to describe hydraulic fractures. The two are combined to establish a matrix-microfracture-hydraulic fracture coupling model suitable for fractured shale gas reservoirs, including: The matrix and microfracture system are characterized by a dual medium model; Characterization of hydraulic fracture systems through embedded discrete models; The dual medium model and the embedded discrete model are coupled to establish a matrix-microfracture-hydraulic fracture coupling model of shale gas reservoirs.

4. The physical information neural network numerical simulation method applicable to fractured shale gas reservoirs according to claim 1, characterized in that: In the neural network model, the pressure data of the previous time step is trained in the main network and then input into the two branch networks to obtain the pressure data of the matrix system and the fracture system respectively, wherein the hyperparameter settings of each fully connected network are independent of each other; The fully connected network includes: Input layer, used to read and save input data; A hidden layer is located after the input layer and is set to be multiple, and the number of neurons in each hidden layer is set to be multiple. The hidden layer is used to perform feature extraction and nonlinear processing on the data of the previous layer; The output layer, located after the hidden layer, is used to generate the final training results and output them; Activation function, located in each neuron of the hidden layer and output layer, is used to perform nonlinear processing on neurons; Weights and biases are located at the connection point of each neuron. Weights are used to change the size of the input data, and biases are used to change the activation threshold of the neuron.

5. The physical information neural network numerical simulation method applicable to fractured shale gas reservoirs according to claim 4, characterized in that: Add a network structure to the neural network model as follows: Adjacent position anchoring is to import the adjacency matrix representing the connection relationship between adjacent grids into the network while the neural network linearly processes the pressure field. The input pressure field is first encoded in the output layer to obtain the pressure matrix and the adjacency matrix representing the connection relationship between grids. After multiplying the pressure matrix with the input layer weight, the target pressure matrix is ​​obtained by adding the adjacency matrix. The adaptive activation function normalizes the target pressure matrix and then performs nonlinear processing on the normalized target pressure matrix in the hidden layer; Cross-layer connection and gated update are to directly transmit the input pressure field at the input layer to the output layer to achieve cross-layer connection, and combine the input pressure field and the nonlinearly processed pressure matrix for output through gated update.

6. The physical information neural network numerical simulation method applicable to fractured shale gas reservoirs according to claim 1, characterized in that: Use the initial pressure as label data for pre-training and initialize the neural network model, including: The initial shale gas reservoir pressure data is used as pre-training label data; The initial pressure data of the shale gas reservoir is input into the constructed neural network model to obtain the pressure output data; The mean square error between the model's pressure output data and the label data is used as the loss value; Based on the set learning rate and ADAM optimizer, back propagation is performed to update the neural network model parameters; Iterate the training until the loss of the neural network model drops to the set range to obtain the initialized neural network model.

7. The physical information neural network numerical simulation method applicable to fractured shale gas reservoirs according to claim 6, characterized in that: The calculation formula for the loss value is the mean square error between the model's pressure output data and the label data: (4) in, is the loss value; For Grid , is the number of grids; Output data for the convolutional neural network model; is the label data.

8. The physical information neural network numerical simulation method applicable to fractured shale gas reservoirs according to claim 1, characterized in that: Based on the initialized neural network model, the dynamic time step method is used to train all time steps. During the training process of each time step, the pressure predicted by the neural network model is substituted into the overall loss function, and the network parameters are continuously optimized by back propagation until the overall loss is reduced to the specified range. The pressure field of the shale gas reservoir at all time steps is obtained, including: Dynamically set the time step according to pressure changes; The governing equation for determining fractured shale gas reservoirs is: (5) Among them, the superscript represents the previous time step, is the current time step; subscript Representative Grid , is the total number of grids; For Grid Volume, m 3 ; Representation Grid All adjacent grids ; For adjacent grids To Grid Mass flow rate, kg / s; is the rock porosity; is the gas viscosity; is the source-sink term, kg / mžs; is the gas viscosity, the mass of gas adsorbed on unit volume of rock particles, kg / m 3 ; Gas viscosity The expression is: (6) in, is pressure, Pa; is the molar mass, g / mol; is the gas compressibility factor; is the gas molecular constant, Pa·m 3 / (mol·K) ; is the absolute temperature, °C; The gas viscosity (the mass of gas adsorbed on a unit volume of rock particles) is determined by the following formula: : (12) in, , represents the first calculation coefficient, is the rock particle density, kg / m 3 ; is the gas density under standard conditions, kg / m 3 ; is the Langmuir volume, m 3 / kg; is the Langmuir pressure, Pa; Substituting equation (6) and equation (12) into equation (5), we obtain: (14) in, , represents the second calculation coefficient; Transforming equation (14), the residual of the shale gas reservoir control equation is obtained as: (21) in, is the residual of the shale gas reservoir control equation at the current time step; t n+1 is the moment represented by the current time step, s; t n is the moment represented by the previous time step, s; is the neighboring grid at the current time step To Grid Mass flow rate, kg / s; The loss function of the shale gas reservoir control equation based on the residual construction of the shale gas reservoir control equation is: (22) in, is the number of grids; MSE PDE is the loss function of the shale gas reservoir control equation; The grid in the shale gas reservoir control equation is The residual of During the elastic exploitation of shale gas reservoirs, the expert experience constraint consists of three parts. The first part is that the pressure of the shale gas reservoir is less than the initial reservoir pressure and greater than the bottom hole flow pressure; the second part is that the pressure of the next time step is less than the pressure of the current time step; the third part is that the fracture system pressure is less than the bedrock system pressure. Based on the first, second and third parts, the expert experience loss function is constructed. MSE exp : (23) in, is the pressure range constraint, is the pressure decreasing constraint, Constraints for pressure systems; According to the loss function of the shale gas reservoir control equation and the expert experience loss function, the overall loss function is constructed MSE : (27) According to the overall loss function of formula (27), back propagation is performed to continuously optimize the model parameters until the loss value is reduced to the set range, and the pressure field of the shale gas reservoir at the current time step is output.

9. The physical information neural network numerical simulation method applicable to fractured shale gas reservoirs according to claim 8, characterized in that: The pressure field data of the previous time step is used as the input of the current time step to obtain the pressure field data of the current time step. The above steps are repeated to obtain the pressure field data of any time step.

Citation Information

Patent Citations

  • Shale gas yield determination method and device based on long-short-term memory neural network

    CN112761628A

  • Full mass conservation multiphase flow numerical simulation method

    CN113378493A