A neural network-based fast oil and gas reservoir numerical simulation method and device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DAQING OILFIELD CO LTD
- Filing Date
- 2024-11-27
- Publication Date
- 2026-05-29
Smart Images

Figure CN122113550A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of numerical simulation technology for oil and gas engineering, and in particular to a method and apparatus for rapid numerical simulation of oil and gas reservoirs based on neural networks. Background Technology
[0002] The simulation of complex physical systems described by nonlinear partial differential equations is central to engineering and physical sciences. Taking oil and gas reservoir numerical simulation as an example, it involves nonlinear near-elliptic pressure equations and near-hyperbolic saturation equations. Traditional solution methods, such as the finite element method (FEM) and the finite difference method (FDM), employ discretization to solve these equations. The computational grid is a crucial factor affecting the accuracy and efficiency of numerical simulations. Therefore, a trade-off must be made between resolution and computation: coarse grids are fast but less accurate; fine grids are accurate but slower. As mentioned above, complex partial differential equation systems typically require very fine discretization, which is very challenging and time-consuming for traditional solvers. Summary of the Invention
[0003] This invention proposes a rapid numerical simulation method and apparatus for oil and gas reservoirs based on neural networks, in order to solve the problem that when performing high-precision numerical simulation of oil and gas reservoirs using traditional numerical simulators, the smaller the grid, the slower the simulator simulation speed and the longer the time consumed, thus reducing work efficiency.
[0004] According to one aspect of the present invention, a rapid numerical simulation method for oil and gas reservoirs based on neural networks is provided, comprising:
[0005] Obtain numerical simulation results of coarse-grid reservoirs in the study area, including simulation results corresponding to n time steps on the coarse grid;
[0006] The numerical simulation results of the coarse-grid reservoir are upsampled using an interpolation algorithm to obtain the interpolated numerical simulation results of the fine-grid reservoir.
[0007] Establish a recurrent neural network model based on deep learning and reservoir simulation solvers;
[0008] The results of the fine-grid reservoir numerical simulation are input into the recurrent neural network model. The model is trained and predicted at each time step by combining the optimization algorithm. During the training process, the discretization format of physical laws is used as the total loss function of the network. The total loss function of the network is used to update the network weights to obtain the converged solution.
[0009] The accuracy of the trained recurrent neural network model is evaluated using an error function. If the accuracy meets the requirements, the prediction result output by the model after training is the final numerical simulation result of the oil and gas reservoir.
[0010] Preferably, before obtaining the numerical simulation results of the coarse-grid reservoir in the study area, the method for determining the numerical simulation results of the coarse-grid reservoir includes:
[0011] The reservoir numerical simulator was used to perform the simulation on a coarse grid, and low-resolution simulation results were obtained for n time steps.
[0012] Preferably, the coarse grid consists of 128×128 grid cells, with a grid size of 10ft×10ft.
[0013] Preferably, the interpolation algorithm is a bilinear interpolation algorithm.
[0014] Preferably, the fine grid consists of 512×512 grid cells, with a grid size of 10ft×10ft.
[0015] Preferably, the method for establishing a recurrent neural network model based on deep learning and a reservoir simulation solver includes:
[0016] A recurrent neural network model is constructed, consisting of an input layer, several Fourier transform layers, a fundamental function construction layer, an inverse Fourier transform layer, and an output layer.
[0017] The Fourier transform layer is used to filter out irregular fundamental waves in the input data, reduce the dimensionality of the data, and extract the frequency domain features of the data; the fundamental wave function construction layer is used to construct the fundamental wave function matrix in Fourier space; and the inverse Fourier transform layer is used to transform the fundamental wave function matrix back to the original space.
[0018] Preferably, the optimization algorithm is: stochastic optimization method with adaptive momentum.
[0019] Preferably, the method of using a discretized format of physical laws as the total loss function of the network includes:
[0020] Based on the discretization of the physical control equations, boundary conditions, and initial conditions, a total loss function is constructed.
[0021] Preferably, the physical governing equations include:
[0022]
[0023] In the formula: R l (θ P ,θ S L represents the residual of the discretized control equations. GE (θ P ,θ S ) represents the loss function of the governing equation, θ P For the network weight parameters of pressure, θ S ρ is the network weight parameter for saturation.l Let k be the density of the liquid phase. x Let k be the permeability in the x-direction. y Let k be the permeability in the y-direction. rl Let μ be the relative permeability of the l-phase fluid. l Let x be the viscosity of the l-phase fluid, P be the pressure, and x be the viscosity of the l-phase fluid. i Let x be the coordinate in the x-direction and y be the coordinate in the y-direction. i φ is the y-coordinate. i,j Let S be the porosity of grids i and j, S be the saturation, t be time, and N be the time. b N is the number of grid cells. t N is the number of time steps. bc R is the number of grid cells on the boundary. w R is the margin of the governing equations for the aqueous phase. o For the control equation margin of the oil phase, q l Let l be the phase yield and n be the time step.
[0024] Preferably, the boundary conditions include:
[0025]
[0026]
[0027] In the formula: R l,NB (θ P L represents the boundary condition margin after discretization. BC (θ P ,θ S ) is the boundary condition loss function.
[0028] Preferably, the initial conditions include:
[0029]
[0030] In the formula, R P,IC (θ P ), R S,IC (θ S ) represents the initial condition margin after discretization, L IC (θ P ,θ S ) represents the initial conditional loss function, N C N represents the total number of grid cells. 1c This represents the number of grid cells at the boundary.
[0031] Preferably, the total loss function includes:
[0032] L total =λ GE L GE (θ P ,θ S )+λBC L BC (θ P ,θ S )+λ IC L IC (θ P ,θ S );
[0033] In the formula, λ GE L represents the weighting coefficients of the governing equations. GE For the loss function of the governing equation, λ BC L represents the boundary condition weighting coefficient. BC Let λ be the boundary condition loss function. IC L represents the initial condition weighting coefficients. IC This is the initial conditional loss function.
[0034] Preferably, during the training process, if the total loss function value decreases by 10... -1 If the input data for the next iteration is replaced with the output data for the current iteration, then the input data for the next iteration will be replaced with the output data for the current iteration.
[0035] Preferably, the error function is: root mean square error function and / or scoring function.
[0036] Preferably, the training at each time step includes:
[0037] In all time steps, each pair of adjacent time steps is divided into a group, and the coarse-grid reservoir numerical simulation results corresponding to each group of time steps are input into the recurrent neural network model for training and prediction.
[0038] According to one aspect of the present invention, a rapid oil and gas reservoir numerical simulation device based on neural networks is provided, comprising:
[0039] The acquisition unit is used to acquire numerical simulation results of coarse-grid reservoirs in the study area, including simulation results corresponding to n time steps on the coarse grid.
[0040] The fine grid result generation unit is used to upsample the coarse grid reservoir numerical simulation results using an interpolation algorithm to obtain the interpolated fine grid reservoir numerical simulation results.
[0041] The model building unit is used to build a recurrent neural network model based on deep learning and reservoir simulation solvers;
[0042] The training and prediction unit is used to input the results of the fine-grid reservoir numerical simulation into the recurrent neural network model, and to train and predict the model at each time step in combination with the optimization algorithm. During the training process, the discretization format of physical laws is used as the total loss function of the network, and the network weights are updated using the total loss function of the network to obtain a converged solution.
[0043] The evaluation unit is used to evaluate the accuracy of the trained recurrent neural network model using an error function. If the accuracy meets the requirements, the prediction result output by the model after training is the final numerical simulation result of the oil and gas reservoir.
[0044] The present invention has at least the following beneficial effects:
[0045] A method and apparatus for rapid numerical simulation of oil and gas reservoirs based on neural networks is proposed. By performing coarse-grid numerical simulation of oil and gas reservoirs on a traditional numerical simulator, and then training and predicting the simulation results through a neural network model, high-precision numerical simulation results of oil and gas reservoirs are finally obtained. This can accelerate the simulation of underground flow in highly heterogeneous oil reservoirs with source and sink terms, and the simulation results are highly accurate, thereby effectively improving work efficiency. Attached Figure Description
[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present invention and, together with the specification, serve to explain the technical solutions of the present invention.
[0047] Figure 1 A flowchart illustrating a rapid oil and gas reservoir numerical simulation method based on neural networks according to an embodiment of the present invention is shown.
[0048] Figure 2 A structural diagram of a recurrent neural network model according to an embodiment of the present invention is shown;
[0049] Figure 3 The diagram shows the relative permeability and water saturation curves according to an embodiment of the present invention.
[0050] Figure 4 The graph showing the change of the total loss function during the convergence process according to an embodiment of the present invention is shown.
[0051] Figure 5 This figure shows a comparison between the pressure prediction results and the actual numerical simulation results according to an embodiment of the present invention;
[0052] Figure 6 A comparison chart of saturation prediction results and actual numerical simulation results according to an embodiment of the present invention is shown;
[0053] Figure 7 Box plots showing the relative errors of predicted pressure and saturation according to an embodiment of the present invention are shown, wherein Figure A is a box plot of the relative error of the pressure field and Figure B is a box plot of the relative error of the saturation field. Detailed Implementation
[0054] Various exemplary embodiments, features, and aspects of the present invention will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0055] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0056] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0057] Furthermore, to better illustrate the present invention, numerous specific details are set forth in the following detailed embodiments. Those skilled in the art will understand that the present invention can be practiced without certain specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art have not been described in detail in order to highlight the spirit of the invention.
[0058] Figure 1 A flowchart illustrating a rapid oil and gas reservoir numerical simulation method based on neural networks according to an embodiment of the present invention is shown. Figure 2 A structural diagram of a recurrent neural network model according to an embodiment of the present invention is shown; Figure 3 The diagram shows the relative permeability and water saturation curves according to an embodiment of the present invention. Figure 4 The graph showing the change of the total loss function during the convergence process according to an embodiment of the present invention is shown. Figure 5 This figure shows a comparison between the pressure prediction results and the actual numerical simulation results according to an embodiment of the present invention; Figure 6 A comparison chart of saturation prediction results and actual numerical simulation results according to an embodiment of the present invention is shown; Figure 7 A box plot showing the relative error of predicted pressure and saturation according to an embodiment of the present invention is shown. Figure 1-7As shown, a rapid numerical simulation method for oil and gas reservoirs based on neural networks includes: Step S01: Obtaining the numerical simulation results of coarse-grid oil reservoirs in the study area, including the simulation results corresponding to n time steps on the coarse grid; Step S02: Upsampling the numerical simulation results of the coarse-grid oil reservoirs using an interpolation algorithm to obtain the interpolated fine-grid oil reservoir numerical simulation results; Step S03: Establishing a recurrent neural network model based on deep learning and an oil reservoir simulation solver; Step S04: Inputting the numerical simulation results of the fine-grid oil reservoirs into the recurrent neural network model, and combining optimization algorithms to train and predict the model at each time step. During the training process, the discretization format of physical laws is used as the total loss function of the network, and the total loss function of the network is used to update the network weights to obtain a converged solution; Step S05: Evaluating the accuracy of the trained recurrent neural network model using an error function. If the accuracy meets the requirements, the prediction result output by the model after training is the final numerical simulation result of the oil and gas reservoir.
[0059] The rapid oil and gas reservoir numerical simulation method based on neural networks provided in this invention specifically includes the following steps:
[0060] Step S01: Obtain the numerical simulation results of the coarse-grid reservoir in the study area, including the simulation results corresponding to n time steps on the coarse grid.
[0061] In this invention, before obtaining the numerical simulation results of the coarse-grid reservoir in the study area, the method for determining the numerical simulation results of the coarse-grid reservoir includes: using a reservoir numerical simulator to perform simulation on the coarse grid to obtain low-resolution simulation results for n time steps.
[0062] In this invention, the coarse grid consists of 128×128 grid cells, with a grid size of 10ft×10ft.
[0063] In this embodiment of the invention, a coarse-grid oil and gas reservoir numerical simulation of the study area is performed on a traditional numerical simulator (solver), such as ECLIPSE, CMG, UNCONG, and other commonly used oil and gas reservoir numerical simulation software, to obtain n time steps t0-t n Simulation results of low-resolution pressure and saturation fields on a coarse grid: ζ9x cg ,y cg ,t0),ζ(x cg ,y cg ,t1),ζ(x cg ,y cg ,t2)…ζ(x cg ,y cg ,t n-1 ), ζ(x) cg ,y cg ,t n ).
[0064] Where, ζ(x) cg ,y cg (t0) represents the distribution of the pressure or saturation field on the coarse grid at time t0, x cg y cg These represent the coordinates in the x and y directions on a coarse grid. This simulation result is a low-precision simulation with a coarse grid, specifically 128×128 grid cells.
[0065] Taking a certain study area as an example, a two-dimensional oil-water two-phase heterogeneous reservoir was selected. There are 128×128 grid cells in both the x and y directions, each grid cell being 10ft×10ft in size. There are a total of 9 wells, with a total of 16384 grid cells. The coordinates of the 4 water injection wells are (64, 32), (32, 64), (96, 64), and (64, 96), respectively. The coordinates of the 5 production wells are (32, 32), (96, 32), (64, 64), (32, 96), and (66, 96), respectively. The bottom hole pressure of the water injection wells is controlled at 290 bar, and the bottom hole pressure of the production wells is controlled at 260 bar. The water saturation (krw) and relative permeability (kro) curves of the test example are shown below. Figure 3 As shown. Numerical simulation of the oil and gas reservoir was performed on a traditional numerical simulator, yielding simulation results for the pressure and saturation fields at 100 time steps: ζ(128,128,t0), ζ(128,128,t1), ζ(128,128,t2)…ζ(128,128,t…). 99 ), ζ(128,128,t 100 ).
[0066] Step S02: Upsample the coarse-grid reservoir numerical simulation results using an interpolation algorithm to obtain the interpolated fine-grid reservoir numerical simulation results.
[0067] In this invention, the interpolation algorithm is a bilinear interpolation algorithm.
[0068] In this invention, the fine grid consists of 512×512 grid cells, with a grid size of 10ft×10ft.
[0069] In this embodiment of the invention, based on the simulation results on the coarse grid obtained in step S01, n time steps t0-t are directly upsampled using a bilinear interpolation algorithm. n Results with errors at high resolution using fine mesh (results from numerical simulation of oil reservoirs using fine mesh): ζ(x fg ,y fg ,t0),ζ(x fg ,y fg ,t1,ζ(x fg ,y fg,t2),ζ(x fg ,y fg ,t3),…,ζ(x fg ,y fg ,t n-1 ), ζ(x) fg ,y fg ,t n ).
[0070] Where, ζ(x) fg ,y fg (t0) represents the distribution of the pressure or saturation field on the fine mesh at time t0, x fg y fg These represent the coordinates in the x and y directions on a fine mesh. This interpolation result is for a fine mesh, specifically a high-resolution result with errors for a 512×512 mesh cell.
[0071] Taking a certain study area as an example, the simulation results of 100 time steps obtained in step 1 are directly upsampled to a 512×512 grid size using a bilinear interpolation algorithm. The simulation results of the pressure and saturation fields at 100 time steps are as follows:
[0072] ζ(512,512,t0), ζ(512,512,t1), ζ(512,512,t2)…ζ(512,512,t 99 ), ζ(512,512,t 100 ).
[0073] Interpolation can quickly produce fine-scale mesh simulation results, but these results contain errors.
[0074] Step S03: Establish a recurrent neural network model based on deep learning and reservoir simulation solver.
[0075] In this invention, the method for establishing a recurrent neural network model based on deep learning and a reservoir simulation solver includes: constructing a recurrent neural network model comprising an input layer, several Fourier transform layers, a fundamental function construction layer, an inverse Fourier transform layer, and an output layer; wherein, the Fourier transform layer is used to filter irregular fundamental waves in the input data, reduce the dimensionality of the data, and extract the frequency domain features of the data; the fundamental function construction layer is used to construct a fundamental function matrix in Fourier space; and the inverse Fourier transform layer is used to transform the fundamental function matrix back to the original space.
[0076] In embodiments of the present invention, such as Figure 2 As shown, a DL-NRS deep learning model (recurrent neural network model) is constructed. The neural network part uses the Fourier neural operator (FNO), which contains multiple Fourier transform layers. The network structure of the model is as follows:
[0077] Input layer: Accepts high-resolution, error-laden pressure and saturation field data with a fine-grid input, i.e., interpolated fine-grid reservoir numerical simulation results. The input data is ζ(x fg y fg , t i ), where x fg y fg The coordinates t represent the fine grid. i Represents the time step, i = 0, 1, 2, 3...n.
[0078] Fourier Transform Layer: Through Fourier transform, the input data of the input layer is mapped to Fourier space. In Fourier space, complex and irregular fundamental frequencies are filtered out, achieving dimensionality reduction while preserving the main regular features. The role of the Fourier transform layer is to extract the frequency domain features of the data, thereby improving the ability to learn complex patterns.
[0079] Fundamental function construction layer: New fundamental function matrices are constructed in Fourier space. These fundamental functions represent the main features of the input data. By constructing new fundamental functions, the global characteristics of the input data can be better represented.
[0080] Inverse Fourier Transform Layer: This layer uses the inverse Fourier transform to convert the fundamental function matrix back to the original space, obtaining the predicted pressure and saturation field results. The purpose of the inverse Fourier transform layer is to restore the frequency domain features to the spatial domain features, enabling the output of visualized prediction results.
[0081] Output layer: Outputs high-resolution predictions of the fine-grid pressure and saturation fields for each time step t_i.
[0082] The DL-NRS deep learning model network structure is characterized by the use of Fourier neural operators, which effectively process high-dimensional complex data through Fourier transform and inverse transform, thus preserving the main features of the input data while reducing dimensionality. This method can significantly improve the efficiency of training and prediction, and has good generalization ability in both space and time. It can obtain more accurate high-resolution prediction results with fine grids, thereby compensating for the errors introduced by direct upsampling methods and improving the accuracy and reliability of oil and gas reservoir numerical simulation.
[0083] Step S04: Input the numerical simulation results of the fine-grid reservoir into the recurrent neural network model, and combine the optimization algorithm to train and predict the model at each time step. During the training process, the discretization format of physical laws is used as the total loss function of the network. The total loss function of the network is used to update the network weights to obtain a converged solution.
[0084] In this invention, the optimization algorithm is: stochastic optimization method based on adaptive momentum.
[0085] In this embodiment of the invention, the direct upsampling in step S02 yields n time steps t0 to t1. n The results of high-resolution simulation with errors using fine-grid technology (results of numerical simulation of reservoirs using fine-grid technology) are used as input data for the DL-NRS recurrent neural network model constructed in step S03, and are used for training and prediction at each time step.
[0086] The DL-NRS network employs Fourier neural operators and contains multiple Fourier transform layers. Input data undergoes Fourier transform to filter out complex and irregular fundamental waves in Fourier space, achieving dimensionality reduction and constructing a new fundamental wave function matrix. Finally, an inverse Fourier transform outputs the prediction results in the original space.
[0087] In this invention, training at each time step includes: dividing every two adjacent time steps into a group, and inputting the coarse-grid reservoir numerical simulation results corresponding to each group of time steps into the recurrent neural network model for training and prediction.
[0088] In this embodiment of the invention, taking a certain research area as an example, the simulation results of the pressure and saturation fields of 100 time steps obtained in step S02 are divided into 99 groups, such as: the first group is t0-t1, the second group is t1-t2, ..., the 99th group is t 99 -t 100 Each set is used as input data for the DL-NRS recurrent neural network model, and the model is trained sequentially at each (single) time step using the Adam optimization algorithm (adaptive momentum stochastic optimization method).
[0089] In this invention, the method of using the discretization format of physical laws as the total loss function of the network includes: constructing the total loss function based on the discretization of physical control equations, boundary conditions and initial conditions.
[0090] In this embodiment of the invention, the discretization format of physical laws is used as the network loss function (total loss function), and the network weights are updated using the network loss function to obtain a converged solution.
[0091] At each individual time step t i to t i+1 In the optimization process, the current time step is used at t. i+1 The upsampling result at that point is used as the initial value, instead of the previous time step t. i The result is to reduce the difficulty of optimization.
[0092] Based on the discretization scheme of physical control equations, boundary conditions, and initial conditions, the total loss function of two-phase flow in porous media is constructed.
[0093] In this invention, the physical governing equations include:
[0094]
[0095] In the formula: R l (θ P ,θ S L represents the residual of the discretized control equations. GE (θ P ,θ S ) represents the loss function of the governing equation, θ P For the network weight parameters of pressure, θ S ρ is the network weight parameter for saturation. l Let k be the density of the liquid phase. x Let k be the permeability in the x-direction. y Let k be the permeability in the y-direction. rl Let μ be the relative permeability of the l-phase fluid. l Let x be the viscosity of the l-phase fluid, P be the pressure, and x be the viscosity of the l-phase fluid. i Let x be the coordinate in the x-direction and y be the coordinate in the y-direction. i φ is the y-coordinate. i,j Let S be the porosity of grids i and j, S be the saturation, t be time, and N be the time. b N is the number of grid cells. t N is the number of time steps. bc R is the number of grid cells on the boundary. w R is the margin of the governing equations for the aqueous phase. o For the control equation margin of the oil phase, q l Let l be the phase yield and n be the time step.
[0096] In this invention, the boundary conditions include:
[0097]
[0098]
[0099] In the formula: R l,NB (θ P L represents the boundary condition margin after discretization. BC (θ P ,θ S ) is the boundary condition loss function.
[0100] In this invention, the initial conditions include:
[0101]
[0102] In the formula, R P,IC (θ P ), R S,IC (θS ) represents the initial condition margin after discretization, L IC (θ P ,θ S ) represents the initial conditional loss function, N C N represents the total number of grid cells. 1c This represents the number of grid cells at the boundary.
[0103] In this invention, the total loss function constructed according to the above includes:
[0104] L total =λ GE L GE (θ P ,θ S )+λ BC L BC (θ P ,θ S )+λ IC L IC (θ P ,θ S );
[0105] In the formula, λ GE L represents the weighting coefficients of the governing equations. GE For the loss function of the governing equation, λ BC L represents the boundary condition weighting coefficient. BC Let λ be the boundary condition loss function. IC L represents the initial condition weighting coefficients. IC This is the initial conditional loss function.
[0106] In this embodiment of the invention, the total loss function is used to calculate the prediction result of the current time step obtained in each iteration during the training of the DL-NRS deep learning model constructed in step S03, and the total loss function of the upsampling result of the current time step corresponding to step S02. The network weights are then optimized and updated based on the total loss function.
[0107] During training, the initial input values need to satisfy the discrete solutions of the flow equations, i.e., the total loss function. These solutions are encoded as physical constraints through the structure of the neural network. By implementing the discretization scheme of the physical control equations, boundary conditions, and initial conditions in the total loss function of the neural network, and combining it with automatic differentiation techniques to calculate the residuals of the control equations, the network weights are updated, allowing the results to gradually converge.
[0108] In this invention, during the training process, if the total loss function value decreases by 10... -1 If the input data for the next iteration is replaced with the output data for the current iteration, then the input data for the next iteration will be replaced with the output data for the current iteration.
[0109] In this embodiment of the invention, a novel iterative capability is implemented during network training to improve the stability and convergence of the DL-NRS solver framework. This capability is achieved when the total loss function value decreases by 10% at each individual time step during training iterations. -1 When the input sample is replaced with the output sample, that is, the output result of this iteration is used as the input data for the next iteration, and training continues. This iterative method can accelerate the convergence speed in each time step of training, reduce the optimization difficulty, and make the training process more stable and converge to the optimal solution.
[0110] By optimizing at each time step, DL-NRS can output high-resolution, accurate results over n time steps. The hybrid DL-NRS solver can obtain meaningful high-resolution solutions on fine-grid surfaces, requiring only NRS to solve the lower-resolution system partial differential equations on coarse-grid surfaces.
[0111] Taking a certain research area as an example, the total loss function is used to optimize the network. In the optimization process of each time step, the upsampled result of the current time step is used as the initial value. For example, in the optimization process of t1-t2, the upsampled result ζ(512,512,t2) at time t2 and the predicted result ζ*(512,512,t2) of the network output at the current time t2 are used to calculate the total loss function and optimize the network within a single time step. This can effectively reduce the optimization difficulty.
[0112] The change in the total loss function during the training iteration process is as follows: Figure 4 As shown, the curve of the total loss function during the optimization process within the first time step illustrates that the optimization effect is better when the upsampling result of the current time step is used as the initial value.
[0113] In each time step of the optimization process, to improve the stability and convergence of the DL-NRS solver (recurrent neural network model) framework, a new iterative capability was added during network training. Specifically, when the loss function value decreases by 10 during training... -1 When the input sample is replaced with the output sample, the input sample is replaced with the output sample.
[0114] After training and optimization are completed at the current time step, the DL-NRS prediction for the current time step is complete. Then, training and prediction are performed sequentially for the next time step, repeating the above steps until the DL-NRS completes the prediction for time t1-t. 100 The calculation of each time step in the process outputs the predicted results such as pressure and saturation at each time step, thus completing the rapid numerical simulation of oil and gas reservoirs based on the intervention of physical information in neural networks.
[0115] Step S05: Use an error function to evaluate the accuracy of the trained recurrent neural network model. If the accuracy meets the requirements, the prediction result output by the model after training is the final numerical simulation result of the oil and gas reservoir.
[0116] In this invention, the error function is: root mean square error function and / or scoring function.
[0117] In this embodiment of the invention, after the recurrent neural network model has been trained, the root mean square error function and the scoring function are used to evaluate the accuracy of the model.
[0118] like Figure 5 and 6 As shown, the test case uses the predicted results for pressure and saturation at 5 step sizes. Figure 5 and 6 In the table, the first column represents the model output prediction result (predicted value), the second column represents the actual numerical simulation result (true value), and the third column represents the error. The results show that the method of this invention can output results with sufficient accuracy.
[0119] Figure 7 Figure A shows the box plot of the relative error of the pressure field, and Figure B shows the box plot of the relative error of the saturation field. From... Figure 7 It can be seen that the average relative error of the pressure values of each box line is between 0.2% and 1.2%, and the average relative error of the oil saturation values of each box line is between 0.1% and 0.8%. Error analysis further proves the accuracy of the method of the present invention, which can completely approximate the results of numerical simulation.
[0120] The total loss function used in the training process of this invention follows physical laws and satisfies the discrete solution of the flow equation (physical control equation, initial conditions, and boundary conditions). Therefore, the pressure and saturation prediction results output at each time step after training using the recurrent neural network model are the final accurate high-precision prediction results. It is not necessary to re-input data for testing or prediction using the trained model, and it is not necessary to use labeled data during training.
[0121] It is understood that the various method embodiments mentioned above in this invention can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this invention will not elaborate further.
[0122] The execution entity of the neural network-based rapid oil and gas reservoir numerical simulation method can be an image processing device. For example, the method can be executed by a terminal device, server, or other processing device. The terminal device can be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc. In some possible implementations, this neural network-based rapid oil and gas reservoir numerical simulation method can be implemented by a processor calling computer-readable instructions stored in memory.
[0123] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0124] In this invention, a rapid oil and gas reservoir numerical simulation device based on neural networks includes: an acquisition unit for acquiring coarse-grid reservoir numerical simulation results for a study area, including simulation results corresponding to n time steps on the coarse grid; a fine-grid result generation unit for upsampling the coarse-grid reservoir numerical simulation results using an interpolation algorithm to obtain interpolated fine-grid reservoir numerical simulation results; a model building unit for building a recurrent neural network model based on deep learning and a reservoir simulation solver; a training and prediction unit for inputting the fine-grid reservoir numerical simulation results into the recurrent neural network model, combining optimization algorithms to train and predict the model at each time step, using a discretized format of physical laws as the total loss function of the network during training, updating the network weights using the total loss function of the network, and obtaining a converged solution; and an evaluation unit for evaluating the accuracy of the trained recurrent neural network model using an error function, wherein if the accuracy meets the requirements, the prediction result output by the model after training is the final oil and gas reservoir numerical simulation result.
[0125] In some embodiments, the functions or modules and units included in the apparatus provided by the present invention can be used to execute the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0126] In recent years, with the rapid development of computational science and deep learning neural networks, some machine learning-based methods have been proposed to provide faster alternatives to traditional numerical simulations. A key challenge is how to combine neural networks with traditional solvers in the absence of labeled data. This would allow a single traditional solver to solve low-resolution partial differential equations on a coarse grid, while deep learning techniques can provide meaningful high-resolution solutions, thus accelerating the simulation of subsurface flows in highly heterogeneous oil reservoirs with source-sink terms.
[0127] This invention constructs a rapid recurrent neural network model for numerical simulation of oil and gas reservoirs based on physical information-interventional neural networks. It combines key features of existing reservoir simulation solvers (NRS) with deep learning (DL) technology to accelerate traditional reservoir simulation. This model framework does not require any labeled data from fine-grid systems. It only needs to perform coarse-grid numerical simulation calculations on a traditional numerical simulator to obtain the flow field distribution under the coarse-grid system. This result is then upsampled to obtain a high-resolution fine-grid result, which serves as the network input data. Training and prediction are performed successively at each time step, and the final network model can output the predicted flow field results under the fine-grid system. The proposed DL-NRS solver framework uses a Fourier neural operator (FNO) architecture to correct numerical errors caused by coarse-grid simulation. The discretization scheme of the physical control equations, boundary conditions, and initial conditions is implemented in the neural network loss function. Automatic differentiation technology is used to calculate the residuals of the control equations, update the network weights, and bring the results to convergence.
[0128] Furthermore, this invention implements a novel iterative capability in network training to improve the stability and convergence of the DL-NRS solver framework. This method is an iterative approach, where the loss function value decreases by 10% during training. -1 When the input sample is replaced with the output sample, it provides an opportunity to solve transient problems, which can significantly reduce the cost of reservoir simulation and is particularly suitable for large-scale shale complex fracture networks.
[0129] Unlike AI-alternative models, this invention is the first to truly combine artificial intelligence with traditional numerical simulators. Only a traditional solver is needed to solve the low-resolution partial differential equations of the system on a coarse grid; meaningful high-resolution solutions can then be obtained using deep learning techniques. This accelerates the simulation of subsurface flows in highly heterogeneous reservoir models with source-sink terms.
[0130] The beneficial effects of this invention include at least the following: 1. This invention is the first to utilize deep learning technology combined with a traditional reservoir numerical simulator to accelerate the simulation of underground flow in highly heterogeneous reservoir models with source and sink terms. 2. It combines key features of existing reservoir simulation solvers with deep learning technology to construct a fast oil and gas reservoir numerical simulation method that integrates physical information into a neural network. This method does not require any labeled data from the fine-grid simulation results; it only needs the coarse-grid simulation results from the simulator as network input data to obtain an approximate solution for the fine-grid network. 3. It implements a discretization scheme for the physical control equations, boundary conditions, and initial conditions in the neural network loss function, and combines automatic differentiation technology to calculate the residuals of the control equations, update the network weights, and achieve convergence. 4. It proposes an iterative method whereby the loss function value decreases by 10% during training. -1 When the input sample is replaced by the output, the stability of the DL-NRS solver framework is improved and its convergence is enhanced.
[0131] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A rapid numerical simulation method for oil and gas reservoirs based on neural networks, characterized in that, include: Obtain numerical simulation results of coarse-grid reservoirs in the study area, including simulation results corresponding to n time steps on the coarse grid; The numerical simulation results of the coarse-grid reservoir are upsampled using an interpolation algorithm to obtain the interpolated numerical simulation results of the fine-grid reservoir. Establish a recurrent neural network model based on deep learning and reservoir simulation solvers; The results of the fine-grid reservoir numerical simulation are input into the recurrent neural network model. The model is trained and predicted at each time step by combining the optimization algorithm. During the training process, the discretization format of physical laws is used as the total loss function of the network. The total loss function of the network is used to update the network weights to obtain the converged solution. The accuracy of the trained recurrent neural network model is evaluated using an error function. If the accuracy meets the requirements, the prediction result output by the model after training is the final numerical simulation result of the oil and gas reservoir.
2. The rapid oil and gas reservoir numerical simulation method based on neural networks according to claim 1, characterized in that, Before obtaining the numerical simulation results of the coarse-grid reservoir in the study area, the method for determining the numerical simulation results of the coarse-grid reservoir includes: The reservoir numerical simulator was used to perform the simulation on a coarse grid, and low-resolution simulation results were obtained for n time steps.
3. The rapid oil and gas reservoir numerical simulation method based on neural networks according to claim 2, characterized in that: The coarse grid consists of 128×128 grid cells, with a grid size of 10ft×10ft.
4. The rapid oil and gas reservoir numerical simulation method based on neural networks according to claim 1, characterized in that: The interpolation algorithm is a bilinear interpolation algorithm.
5. The rapid oil and gas reservoir numerical simulation method based on neural networks according to claim 1, characterized in that: The fine grid consists of 512×512 grid cells, with a grid size of 10ft×10ft.
6. The rapid oil and gas reservoir numerical simulation method based on neural networks according to claim 1, characterized in that, The method for establishing a recurrent neural network model based on deep learning and reservoir simulation solvers includes: A recurrent neural network model is constructed, consisting of an input layer, several Fourier transform layers, a fundamental function construction layer, an inverse Fourier transform layer, and an output layer. The Fourier transform layer is used to filter out irregular fundamental waves in the input data, reduce the dimensionality of the data, and extract the frequency domain features of the data; the fundamental wave function construction layer is used to construct the fundamental wave function matrix in Fourier space; and the inverse Fourier transform layer is used to transform the fundamental wave function matrix back to the original space.
7. The rapid oil and gas reservoir numerical simulation method based on neural networks according to claim 1, characterized in that: The optimization algorithm is: stochastic optimization method based on adaptive momentum.
8. The method for rapid numerical simulation of oil and gas reservoirs based on neural networks according to any one of claims 1-7, characterized in that, The method of using a discretization scheme based on physical laws as the total loss function of the network includes: Based on the discretization of the physical control equations, boundary conditions, and initial conditions, a total loss function is constructed.
9. The rapid oil and gas reservoir numerical simulation method based on neural networks according to claim 8, characterized in that, The physical governing equations include: In the formula: R l (θ P ,θ S L represents the residual of the discretized control equations. GE (θ P ,θ S ) represents the loss function of the governing equation, θ P For the network weight parameters of pressure, θ S ρ is the network weight parameter for saturation. l Let k be the density of the liquid phase. x Let k be the permeability in the x-direction. y Let k be the permeability in the y-direction. rl Let μ be the relative permeability of the l-phase fluid. l Let x be the viscosity of the l-phase fluid, P be the pressure, and x be the viscosity of the l-phase fluid. i Let x be the coordinate in the x-direction and y be the coordinate in the y-direction. i φ is the y-coordinate. i,j Let S be the porosity of grids i and j, S be the saturation, t be time, and N be the time. b N is the number of grid cells. t N represents the number of time steps. bc R is the number of grid cells on the boundary. w R is the margin of the governing equations for the aqueous phase. o q represents the control equation margin for the oil phase. l Let l be the phase yield and n be the time step.
10. The rapid oil and gas reservoir numerical simulation method based on neural networks according to claim 8, characterized in that, The boundary conditions include: In the formula: R l,NB (θ P L represents the boundary condition margin after discretization. BC (θ P ,θ S ) is the boundary condition loss function.
11. The rapid oil and gas reservoir numerical simulation method based on neural networks according to claim 8, characterized in that, The initial conditions include: In the formula, R P,IC (θ P ), R S,IC (θ S ) represents the initial condition margin after discretization, L IC (θ P ,θ S ) represents the initial conditional loss function, N C N represents the total number of grid cells. 1c This represents the number of grid cells at the boundary.
12. The rapid oil and gas reservoir numerical simulation method based on neural networks according to claim 1, characterized in that, The total loss function includes: L total =λ GE L GE (i P ,i S )+λ BC L BC (i P ,i S )+λ IC L IC (i P ,i S ); In the formula, λ GE L represents the weighting coefficients of the governing equations. GE For the loss function of the governing equation, λ BC L represents the boundary condition weighting coefficient. BC Let λ be the boundary condition loss function. IC L represents the initial condition weighting coefficients. IC This is the initial conditional loss function.
13. The rapid oil and gas reservoir numerical simulation method based on neural networks according to claim 1, characterized in that: During the training process, if the total loss function value decreases by 10... -1 If the input data for the next iteration is replaced with the output data for the current iteration, then the input data for the next iteration will be replaced with the output data for the current iteration.
14. The rapid oil and gas reservoir numerical simulation method based on neural networks according to claim 1, characterized in that: The error function is: root mean square error function and / or scoring function.
15. The method for rapid numerical simulation of oil and gas reservoirs based on neural networks according to any one of claims 1-14, characterized in that, The training at each time step includes: In all time steps, each pair of adjacent time steps is divided into a group, and the coarse-grid reservoir numerical simulation results corresponding to each group of time steps are input into the recurrent neural network model for training and prediction.
16. A rapid numerical simulation device for oil and gas reservoirs based on neural networks, characterized in that, include: The acquisition unit is used to acquire numerical simulation results of coarse-grid reservoirs in the study area, including simulation results corresponding to n time steps on the coarse grid. The fine grid result generation unit is used to upsample the coarse grid reservoir numerical simulation results using an interpolation algorithm to obtain the interpolated fine grid reservoir numerical simulation results. The model building unit is used to build a recurrent neural network model based on deep learning and reservoir simulation solvers; The training and prediction unit is used to input the results of the fine-grid reservoir numerical simulation into the recurrent neural network model, and to train and predict the model at each time step in combination with the optimization algorithm. During the training process, the discretization format of physical laws is used as the total loss function of the network, and the network weights are updated using the total loss function of the network to obtain a converged solution. The evaluation unit is used to evaluate the accuracy of the trained recurrent neural network model using an error function. If the accuracy meets the requirements, the prediction result output by the model after training is the final numerical simulation result of the oil and gas reservoir.