A method for retrieving apparent permeability of shale reservoirs based on gradient-enhanced PINN.
By using a gradient-enhanced physical constraint neural network model, combining neural networks with physical equations, the problems of low efficiency and poor accuracy in calculating apparent permeability are solved, enabling efficient and accurate prediction of apparent permeability in shale reservoirs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF SCI & TECH BEIJING
- Filing Date
- 2022-09-21
- Publication Date
- 2026-05-26
AI Technical Summary
In existing technologies, the methods for calculating apparent permeability suffer from low efficiency, high cost, large errors, and slow solution speed for complex equations, which cannot meet the needs of shale reservoir oil and gas development.
A gradient-enhanced physical constraint neural network model is adopted, which combines neural networks with physical equations. By constructing various heterogeneous models, gradient enhancement terms are used to accelerate convergence and improve the accuracy and efficiency of penetration rate prediction.
It enables efficient and accurate prediction of apparent permeability in shale reservoirs, has stronger information integration capabilities, simplifies the calculation process, and improves prediction accuracy and speed.
Smart Images

Figure CN115542415B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oilfield development technology, specifically to a method, apparatus, and electronic equipment for inverting the apparent permeability of shale reservoirs based on gradient-enhanced PINN. Background Technology
[0002] Apparent permeability reflects the degree to which the flow regime affects the flow capacity of oil and gas in shale reservoirs, and is an important parameter characterizing reservoir oil and gas features. Therefore, calculating apparent permeability is crucial.
[0003] Currently, apparent permeability is mainly calculated using two methods. One is direct measurement, calculated through core analysis, but this method is inefficient, cumbersome, time-consuming, and costly in terms of sampling and testing. The other method is prediction based on well logging and seismic data, using empirical relationships. However, this prediction method has a large error and cannot accurately predict permeability. Therefore, how to accurately predict permeability is a key and challenging problem.
[0004] In recent years, deep learning has made significant progress in the petroleum industry, providing an efficient method for oil and gas field development. Neural networks are a primary deep learning algorithm, possessing strong nonlinear data processing capabilities and the ability to learn complex data mapping relationships. However, traditional neural networks are purely data-driven models with poor generalization performance, and some solutions do not conform to relevant physical laws and theories, thus failing to meet practical engineering needs. Therefore, it is necessary to add physical constraints to neural networks, integrating governing equations and other theoretical frameworks into the network to provide theoretical guidance for accurate solutions. Furthermore, solving or inverting complex equations often requires significant time and is inefficient. Gradient-enhanced physical constraint neural networks can accelerate convergence and provide more accurate calculation results, making their application to solving forward and inverse problems of complex equations a feasible direction. Summary of the Invention
[0005] Technical problems to be solved
[0006] To address the aforementioned shortcomings of existing technologies, this invention provides a method, apparatus, and electronic device for retrieving apparent permeability of shale reservoirs based on gradient-enhanced PINN inversion. This method can be applied to the prediction of apparent permeability of shale reservoirs, has stronger information integration capabilities, and achieves high prediction accuracy.
[0007] Technical solution
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] A first aspect of the present invention provides a method for retrieving apparent permeability of shale reservoirs based on gradient-enhanced PINN inversion, comprising the following steps:
[0010] S1. Establish the basic differential equation of the target shale reservoir, and construct various heterogeneous models of the permeability of the shale reservoir based on the basic differential equation;
[0011] S2. Obtain the basic parameters required for the basic differential equation and generate datasets for the various heterogeneous models using numerical simulation methods;
[0012] S3. Construct an inversion model based on a neural network, input the dataset into the inversion model respectively, and compare the parameters inverted by the various heterogeneous models with the true parameter values respectively. If the relative error between the two does not exceed the set threshold, the inversion model is considered valid; otherwise, it is invalid.
[0013] Furthermore, the fundamental differential equations for establishing the target shale reservoir are realized through the continuity equation, the motion equation, and the state equation.
[0014] Furthermore, the various heterogeneous models include constant numerical models, linear models, exponential function models, logarithmic function models, and power function models.
[0015] Furthermore, the basic parameters include at least density, viscosity, original formation pressure, porosity, and rock compressibility.
[0016] Furthermore, the dataset includes spatial coordinates, time, and pressure field data.
[0017] Furthermore, the inversion model constructed based on the neural network specifically includes:
[0018] A data-driven module is constructed, which adopts a neural network architecture and sets parameters, including the number of hidden layers and the number of neurons in each layer, the mapping function between layers, the batch size, the optimization algorithm, and the loss function.
[0019] A physical drive module is constructed by adding a residual term to the control equation based on the loss function of the data drive module, thus forming the loss function of the physical drive module.
[0020] Define a gradient enhancement module, which further differentiates the original governing equations and expresses the differentiated equations in residual form as gradient enhancement terms.
[0021] An inversion parameter output module is constructed, and the gradient enhancement module is combined with the data-driven module and the physics-driven module to form a gradient-enhanced data-physics-driven neural network, which serves as the inversion model.
[0022] Furthermore, the loss function of the data-driven module adopts the mean squared error (MSE) method, and the calculation formula is as follows:
[0023]
[0024] Where m represents the number of data samples, This represents the result generated through network structure calculation, where y represents the actual value.
[0025] Furthermore, the loss function of the physical driving module is:
[0026]
[0027] Where f is the residual of the governing equation.
[0028] A second aspect of the present invention provides a shale reservoir permeability prediction device, comprising:
[0029] The model building module is used to establish the basic differential equation of the target shale reservoir and to build various heterogeneous models of the permeability of the shale reservoir based on the basic differential equation.
[0030] The dataset generation module is used to obtain the basic parameters required by the basic differential equation and generate datasets for the various heterogeneous models using numerical simulation methods.
[0031] The prediction module is used to construct an inversion model based on a neural network. The dataset is input into the inversion model, and the parameters inverted by the various heterogeneous models are compared with the true parameter values. If the relative error between the two does not exceed the set threshold, the inversion model is considered valid; otherwise, it is invalid.
[0032] A third aspect of the present invention provides an electronic device comprising:
[0033] Processor; and
[0034] Stored program memory,
[0035] The program includes instructions that, when executed by the processor, cause the processor to perform the method according to any one of the first aspects of the invention.
[0036] Beneficial effects
[0037] This invention addresses the problems of traditional permeability calculation methods, such as low efficiency, cumbersome experiments, long time consumption, high cost, and inability to guarantee the accuracy of calculation results. Furthermore, the solution or inversion of complex equations has a slow convergence speed, and the results cannot fully meet the requirements. This invention innovatively proposes a gradient-enhanced physical constraint neural network model. The system designed by this method can be applied to the prediction of apparent permeability of shale reservoirs. It has stronger information integration capabilities, high prediction accuracy, simple method, and fast calculation speed, and has great technical value and application prospects. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0039] Figure 1 A schematic diagram illustrating the steps of a gradient-enhanced PINN-based method for retrieving apparent permeability of shale reservoirs according to an embodiment of the present invention;
[0040] Figure 2 This is a schematic flowchart of a method for retrieving apparent permeability of shale reservoirs based on gradient-enhanced PINN inversion, provided as an embodiment of the present invention. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0042] See Figure 1 An embodiment of the present invention provides a method for retrieving the apparent permeability of shale reservoirs based on gradient-enhanced PINN, comprising the following steps:
[0043] S1. Establish the basic differential equation of the target shale reservoir, and construct various heterogeneous models of shale reservoir permeability based on the basic differential equation;
[0044] S2. Obtain the basic parameters required for the basic differential equation and generate datasets for various heterogeneous models using numerical simulation methods;
[0045] S3. Construct an inversion model based on a neural network. Input the dataset into the inversion model and compare the parameters inverted by various heterogeneous models with the true parameter values. If the relative error between the two does not exceed the set threshold, the inversion model is considered valid; otherwise, it is invalid.
[0046] First, refer to Figure 2 Step S1 will be explained below.
[0047] In this embodiment, the basic differential equations of the target shale reservoir are established through the continuity equation, the motion equation, and the state equation.
[0048] Specifically, the continuity equation is generally as follows:
[0049]
[0050] Where φ is porosity, ρ is fluid density (kg / m3), v is velocity, x and y are spatial coordinates in meters, and t represents time in days.
[0051] The equations of motion follow Darcy's linear seepage law, and are generally as follows:
[0052]
[0053] Where K is the permeability (mD), μ is the dynamic viscosity of the fluid (mPa·s), and p is the pressure (Pa).
[0054] The equation of state for the rock is:
[0055]
[0056] Among them, V p This represents the pore volume.
[0057] and thus
[0058]
[0059] Integrating both sides of the above equation, we get:
[0060]
[0061]
[0062]
[0063] Expanding the above equation using a Taylor series and discarding higher-order terms, we get:
[0064] φ=φ a [1+C f (pp a )]
[0065] Substituting the equations of motion and state into the continuity equation, we obtain the fundamental differential equation:
[0066]
[0067] In this embodiment, different heterogeneous models need to be constructed for the permeability of shale reservoirs. Various heterogeneous models generally include constant numerical models, linear models, exponential function models, logarithmic function models, and power function models. Furthermore, under different heterogeneous models, the permeability is set to vary one-dimensionally with the x-coordinate.
[0068] Specifically, when the permeability is a constant value, the expression is K = a, and the basic differential equation can be written as:
[0069]
[0070] Assuming the permeability changes linearly in the x-direction, expressed as K = ax + b, the basic differential equation can be written as:
[0071]
[0072] Suppose that the permeability varies in the x-direction according to a power function, expressed as K = x. a The fundamental differential equation can be written as:
[0073]
[0074] Suppose that the permeability changes exponentially in the x-direction, expressed as K = a x The fundamental differential equation can be written as:
[0075]
[0076] Suppose that the permeability changes in the x-direction according to a logarithmic function, expressed as K = log a The fundamental differential equation for x can be written as:
[0077]
[0078] Secondly, see Figure 2 The following is a detailed explanation of step S2.
[0079] In this embodiment, the basic parameters include at least density, viscosity, original formation pressure, porosity, and rock compressibility. The dataset includes spatial coordinates, time, and pressure field data. For the above five models, the dataset is represented by array D. const D linear D exp D power and D log express.
[0080] Specifically, the basic parameters required for the equations are obtained, including density, viscosity, initial formation pressure, porosity, and rock compressibility. Data sets, including spatial coordinates, time, and pressure field data, are generated for five different permeability models using numerical simulation. It is assumed that the fluid is a single-phase, homogeneous, weakly compressible Newtonian fluid, with no special physicochemical phenomena occurring during seepage. The oil density is 0.86 g / cm³, the dynamic viscosity μ is set to 1.27 mPa·s, the initial formation pressure is 25 MPa, the bottomhole flowing pressure is 15 MPa, the initial porosity is 0.1, and the rock compressibility is -8 × 10⁻⁴ Pa⁻¹. Flow field changes over 50 days are considered. A two-dimensional axisymmetric numerical model is established and meshed. Calculations are performed for the five different permeability models to obtain the flow field pressure value p at grid point coordinates x and y at different times t. Then, t, x, y, and the corresponding p for the five cases are stored as the dataset required for subsequent models. When the permeability is constant, the data is stored in array D. const In the middle, D const ={x, y, t, p const k const When the penetration rate changes linearly, the data is stored in array D. linear In the middle, D linear ={x, y, t, p linear k linear When the penetration rate changes exponentially, the data is stored in array D. exp In the middle, D exp ={x, y, t, p exp k exp When the permeability changes as a power function, the data is stored in array D. power In the middle, D power ={x, y, t, p power k power When the penetration rate changes logarithmically, the data is stored in array D. log In the middle, D log ={x, y, t, p log k log In these five cases, the data dimensions of x and y are all 255*1, the data dimension of t is all 101*1, the data dimension of p is all 255*101, and the data dimension of k is all 225*101.
[0081] Finally, see Figure 2 The following provides a detailed explanation of step S3.
[0082] In this embodiment, constructing the inversion model based on a neural network specifically includes:
[0083] 1. Construct a data-driven module. The data-driven module adopts a neural network architecture and sets parameters, including the number of hidden layers and the number of neurons in each layer, the mapping function between layers, the batch size, the optimization algorithm, and the loss function.
[0084] Specifically, the loss function uses the mean squared error (MSE) method, and the calculation formula is as follows:
[0085]
[0086] Where m represents the number of data samples, This represents the result generated through network structure calculation, where y represents the actual value.
[0087] 2. Construct a physics-driven module. Based on the loss function of the data-driven module, add residual terms of the control equations to form the loss function of the physics-driven module.
[0088] Specifically, the loss function of the physics-driven module is:
[0089]
[0090] Where f is the residual of the governing equation.
[0091] For simplicity, Let it be p′ x , Let it be p′ y , Let it be p′ xx , Let it be p′ yy , Let it be p′ t .
[0092] f is defined as follows under the five permeability models:
[0093] When K = a: f const =ap′ xx +ap′ yy -φμC f p′ t ;
[0094] When K = ax + b: f linear =ap′ x +(ax+b)p′ xx +(ax+b)p′ yy -φμC f p′ t ;
[0095] K = x a Time: f power =axa-1 p′ x +x a p′ xx +x a p′ yy -φμC f p′ t ;
[0096] K = a x Time: f exp =x ln a·p′ x +a x p′ xx +a x p′ yy -φμC f p′ t ;
[0097] K = log a x time:
[0098] Where p′ is the result predicted by the neural network, and a and b are the parameters to be inverted.
[0099] 3. Define a gradient enhancement module, which further differentiates the original governing equations and expresses the differentiated equations in residual form as gradient enhancement terms.
[0100] Specifically,
[0101] When K = a:
[0102] f′ const =ap′ xxx +ap′ xxy +ap′ yyx +ap′ yyy -φμC f p′ tx -φμC f p′ ty ;
[0103] When K = ax + b:
[0104] f′ linear =ap′ xx +ap′ xy +ap′ xx +(ax+b)p′ xxx +(ax+b)p′ xxy +ap′ yy +(ax+b)p′ yyx +(ax+b)p′ yyy -φμC f p′ tx -φμC f p′ty ;
[0105] K = x a When:
[0106] f′ power = a(a - 1)x a-2 p′ x + ax a-1 p′ xx + ax a-1 p′ xy + ax a-1 p′ xx + x a p′ xxx + x a p′ xxy + ax a-1 p′ yy + x a p′ yyx + x a p′ yyy - φμC f p′ tx - φμC f p′ ty ;
[0107] K = a x When:
[0108] f′ exp = x ln a · p′ x + a x p′ xx + a x p′ yy - φμC f p′ t
[0109] = ln a · p′ x + x ln a · p′ xx + x ln a · p′ xy + x ln a · p′ xx + a x p′ xxx + a x p′ xxy + x lna · p′ yy + a x p′ yyx + a x p′ yyy - φμC f p′ tx - φμC f p′ ty ;
[0110] K = loga x time:
[0111]
[0112] 4. Construct an inversion parameter output module, and combine the gradient enhancement module with the data-driven module and the physics-driven module to form a gradient-enhanced data-physics-driven neural network as the inversion model.
[0113] Specifically, without changing the basic parameter settings of the original network, only the target loss function is modified accordingly. The loss function of the fused network is as follows:
[0114]
[0115] Where f′ represents the residual term of the governing equation after gradient enhancement.
[0116] Then, the network is trained under the constraints of the new loss function loss_GPDriven, and the parameters to be inverted in the penetration rate model are output after training.
[0117] In the embodiments, for the convergence of the inversion model, the parameters inverted under the five permeability models are generally compared with the actual parameter values. If the relative error between the two does not exceed the set threshold (the set threshold depends on the actual model and parameters, and is generally set to 10%), the inversion model is considered reliable and can be used to invert other pre-defined apparent permeability change forms, thereby determining the specific apparent permeability change model.
[0118] The method of the present invention will be described below with reference to a specific implementation.
[0119] 1. Assume the shale reservoir has a permeability of -1 / 2πr², modeled as a linear equation, expressed as K = ax + b, where a = -0.03 and b = 10. Then the fundamental differential equation for this shale reservoir is:
[0120]
[0121] 2. Obtain the basic parameters required for the equation. Specifically, the oil density is 0.86 g / cm³, the dynamic viscosity μ is set to 1.27 mPa·s, the initial formation pressure is 25 MPa, the bottomhole flowing pressure is 15 MPa, the initial porosity is 0.1, and the rock compressibility coefficient is -8 × 10⁻⁴ Pa⁻¹. Consider the flow field changes over 50 days. Establish a two-dimensional axisymmetric numerical model and perform mesh generation. Generate a dataset for this linear permeability model using numerical simulation methods, storing the spatial coordinates x, y, time t, and pressure P in array D. const There are a total of 25,000 sets of data.
[0122] 3. Configure the parameters for the neural network: set the number of hidden layers to 4, the number of neurons in each layer to 20, select the Tanh function as the activation function, set the batch size to 200, use the Adam optimization algorithm, and use the mean squared error function as the loss function.
[0123]
[0124] Where m represents the number of data samples, which is 25000. This represents the pressure calculated using the network structure, where p represents the actual pressure value.
[0125] 4. Based on loss_dataDriven, add residual terms to the governing equation:
[0126] f linear =ap′ x +(ax+b)p′ xx +(ax+b)p′ yy -φμC f p′ t .
[0127] At this point, the loss function of the physics-driven module is:
[0128]
[0129] 5. Differentiate the original governing equations with respect to x and y, and express the differentiated equations in residual form as gradient strengthening terms:
[0130] f′ linear =ap′ xx +ap′ xy +ap′ xx +(ax+b)p′ xxx +(ax+b)p′ xxy +ap′ yy +(ax+b)p′ yyx +(ax+b)p′ yyy -φμC f p′ tx -φμC f p′ ty
[0131] 6. Based on the basic neural network architecture, the gradient enhancement module is combined with the data-driven module and the physics-driven module to form a gradient-enhanced data-physics-driven neural network. The new loss function is then:
[0132]
[0133] The network is then trained. In this embodiment, the loss function value is less than 10. -2 Training stops when the neural network outputs the results of the parameters to be inverted, denoted as a1 and b1 respectively.
[0134] Finally, the retrieved parameters are compared with the actual parameter values. In this example, a1 = -0.028 and b1 = 9.98. The relative error between a1 and a is 6.7%, and the relative error between b1 and b is 0.2%, both less than 10%. Therefore, the inversion model is considered reliable and can be used to invert other unknown parameters where permeability changes linearly, thereby determining the specific permeability change model.
[0135] An embodiment of the present invention also provides a gradient-enhanced PINN inversion device for shale reservoir apparent permeability, comprising:
[0136] The model building module is used to establish the basic differential equation of the target shale reservoir and to build various heterogeneous models of the permeability of the shale reservoir based on the basic differential equation.
[0137] The dataset generation module is used to obtain the basic parameters required by the basic differential equation and generate datasets for the various heterogeneous models using numerical simulation methods.
[0138] The prediction module is used to construct an inversion model based on a neural network. The dataset is input into the inversion model, and the parameters inverted by the various heterogeneous models are compared with the true parameter values. If the relative error between the two does not exceed the set threshold, the inversion model is considered valid; otherwise, it is invalid.
[0139] An embodiment of the present invention also provides an electronic device, comprising:
[0140] Processor; and
[0141] Stored program memory,
[0142] The program includes instructions that, when executed by the processor, cause the processor to perform the method according to any one of the first aspects of the invention.
[0143] The advantages of this invention are that it addresses the problems of traditional permeability calculation methods being inefficient, cumbersome, time-consuming, costly, and unable to guarantee the accuracy of calculation results. Furthermore, the solution or inversion of complex equations has a slow convergence speed, and the results cannot fully meet the requirements. This invention innovatively proposes a gradient-enhanced physical constraint neural network model. The system designed by this method can be applied to the prediction of apparent permeability in shale reservoirs. It has stronger information integration capabilities, high prediction accuracy, simple method, and fast calculation speed, and has great technical value and application prospects.
[0144] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for inverting the apparent permeability of shale reservoirs based on gradient-enhanced PINN, characterized in that, Includes the following steps: S1. Establish the basic differential equation of the target shale reservoir, and construct various heterogeneous models of the apparent permeability of the shale reservoir based on the basic differential equation; the various heterogeneous models include constant numerical models, linear models, exponential function models, logarithmic function models and power function models; S2. Obtain the basic parameters required for the fundamental differential equation and generate datasets for the various heterogeneous models using numerical simulation methods; the datasets include spatial coordinates, time and pressure field data; S3. Construct an inversion model based on a neural network, input the dataset into the inversion model respectively, and compare the parameters inverted by the various heterogeneous models with the true parameter values respectively. If the relative error between the two does not exceed the set threshold, the inversion model is considered valid; otherwise, it is invalid. The inversion model constructed based on neural networks specifically includes: A data-driven module is constructed, which adopts a neural network architecture and sets parameters, including the number of hidden layers and the number of neurons in each layer, the mapping function between layers, the batch size, the optimization algorithm, and the loss function. A physical drive module is constructed by adding a residual term to the control equation based on the loss function of the data drive module, thus forming the loss function of the physical drive module. Define a gradient enhancement module, which further differentiates the original governing equations and expresses the differentiated equations in residual form as gradient enhancement terms. An inversion parameter output module is constructed, and the gradient enhancement module is combined with the data-driven module and the physical-driven module to form a gradient-enhanced data-physical-driven neural network, which serves as the inversion model. The loss function of the data-driven module adopts the mean squared error method, and the calculation formula is as follows: in, Indicates the number of data samples; This represents the result generated through calculations using the network structure; Represents the actual value; The loss function of the physical drive module is: in, For the governing equations; Five penetration rate models They are defined as follows: hour: ; hour: ; hour: ; hour: ; hour: ; in,; and represents the parameters to be inverted; t represents time; x and y represent the grid point coordinates. P This is the true value of the pressure. μ The dynamic viscosity of the oil; Porosity; is the rock compressibility coefficient.
2. The method for retrieving apparent permeability of shale reservoirs based on gradient-enhanced PINN inversion according to claim 1, characterized in that, The fundamental differential equations for establishing the target shale reservoir are achieved through the continuity equation, the motion equation, and the state equation.
3. The method for retrieving apparent permeability of shale reservoirs based on gradient-enhanced PINN inversion according to claim 1, characterized in that, The basic parameters include at least density, viscosity, original formation pressure, porosity, and rock compressibility.
4. An electronic device, characterized in that, include: processor; as well as Stored program memory, The program includes instructions that, when executed by the processor, cause the processor to perform the method according to any one of claims 1-3.