A method for constructing a recurrent neural network proxy model for CO2 storage in deep saline aquifers
Optimizing the RU-Net network through the recurrent neural network proxy model and MAML framework, the problem of high sample demand in CO2 geological storage in deep neural networks is solved, and the efficient CO2 storage potential evaluation is achieved in the case of few samples, reducing the computational cost and Improved model adaptability.
Patent Information
- Application Number
- CN202411410353.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-10-10
AI Technical Summary
The proxy model constructed by deep neural network requires a large number of training samples during CO2 geological storage, which leads to high computational costs, which limits its practical application, especially in complex situations under multi-physics coupling, which is relatively expensive to calculate.
The recurrent neural network proxy model is adopted to generate porosity and permeability attribute models under different reservoir conditions through the probability Krieg valuation method, build a thermal-seepage coupled numerical simulation mathematical model, and optimize the RU-Net network under the MAML framework , use cross-task training methods to reduce sample demand and improve model adaptability and computational efficiency.
The CO2 storage potential assessment of rapidly adapting to different reservoir conditions and injection wells under small samples was achieved, reducing computational costs, improving the hardware compatibility and training efficiency of the model, and performing better than traditional methods.
Smart Images

Figure CN118917355B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of CO2 storage, and specifically discloses a method for constructing a recurrent neural network agent model for CO2 storage in deep saline water layers. Background Art
[0002] The storage of CO2 in saline aquifers is to separate CO2 from the source or capture it in large industrial plants, compress it, transport it, and inject it into the nearest underground saline aquifers so that it can be preserved underground for a long time, thereby reducing CO2 in the atmosphere and alleviating the greenhouse effect.
[0003] In order to improve the flow capacity of CO2 in aquifers, the residual water saturation should be reduced as much as possible during the storage process; residual gas saturation is an important parameter for evaluating the potential of residual gas storage, which is affected by multiple factors such as initial gas saturation, rock wettability, porosity, permeability and rock sample type; the solubility of CO2 in salt water increases with increasing pressure and decreasing temperature, and decreases with increasing mineralization of pore fluids; during the injection process, formation water will continue to evaporate, causing salt precipitation, which in turn leads to changes in formation porosity and permeability, thereby affecting the CO2 storage efficiency.
[0004] The storage of CO2 in saline aquifers involves many complex hydrogeological, geomechanical, and heat transfer processes. Practical applications often require repeated numerical simulations to optimize solutions. Three-dimensional dynamic numerical simulation of saline CO2 storage layers is a common means of evaluating and analyzing the regional storage potential of CO2. This method can effectively evaluate different storage solutions by simulating the migration and distribution of CO2 after injection into underground saline aquifers. However, the computational cost of repeated numerical simulations under multi-physical field coupling is high, so proxy models are often used as a solution to reduce computational costs.
[0005] The proxy model is a simplified model built using numerical simulation experimental data. By simplifying the complex multi-physical field coupling process, it can quickly give approximate simulation results at a lower computational cost, and realize the function of numerical simulation relatively efficiently and accurately. Among them, the neural network proxy model uses the powerful representation ability of deep neural networks to provide an efficient and flexible solution for the modeling and analysis of complex systems. It performs well in scenarios such as CO2 storage simulation that require processing high-dimensional data and capturing complex nonlinear relationships.
[0006] However, the proxy model constructed by the deep neural network requires a large number of training samples, and the acquisition of these training samples requires repeated numerical simulation processes, which require more computing and storage resources in both the process and the model training. Therefore, the training of the model increases the application cost of the proxy model, resulting in the deep neural network proxy model not having an advantage in computational cost compared to direct repeated simulation, further limiting its practical application. In view of this, the present invention provides a method for constructing a recurrent neural network proxy model for CO2 storage in deep saline layers to solve the above problems. Summary of the invention
[0007] The purpose of the present invention is to provide a recurrent neural network proxy model that can simulate the relative saturation of CO2 and the reservoir temperature in the CO2 geological storage process with a small number of samples, so as to be used for the regional storage potential assessment and analysis of CO2 storage in deep saline aquifers.
[0008] In order to achieve the above object, the basic scheme of the present invention provides a method for constructing a recurrent neural network proxy model for CO2 storage in deep saline water layers, wherein the recurrent neural network proxy model is constructed according to the following steps:
[0009] Step S1, based on a reservoir data set of deep saline CO2 storage, a probabilistic kriging estimation method is used to generate a series of attribute models of porosity and permeability under different reservoir conditions;
[0010] Step S2, based on the attribute model described in step S1, construct a mathematical model for thermal-seepage coupling numerical simulation to perform numerical simulation on different reservoir conditions and well locations to generate data samples;
[0011] Step S3, constructing a RU-Net network and optimizing the initial parameters of the constructed RU-Net network under the MAML framework to obtain a MAML-RU-Net network, and training the MAML-RU-Net network with the data samples generated in step S2 to obtain a proxy model for the target task;
[0012] Furthermore, in step S1, a series of attribute models constructed by a randomization method using the same sampling points are taken as one task to increase the difference between tasks in cross-task training.
[0013] Further, the randomization method comprises:
[0014] Use kriging to calculate estimates and error variances of reservoir properties;
[0015] Generate a three-dimensional frequency space using Fourier frequencies;
[0016] Generate random phase and amplitude for each frequency point using the spectral density of the variogram model to approximate the amplitude spectrum function given in Fourier space;
[0017] Random phase and amplitude constitute the spectrum;
[0018] The spectrum is converted into a random field in physical space through inverse Fourier transform;
[0019] The Kriging estimation and random field are superimposed to obtain the final randomized attribute model.
[0020] Furthermore, in step S2, the relative permeability expressions of the pore liquid phase and the gas phase are respectively as follows:
[0021] ;
[0022] ;
[0023] In the formula, S eff is the effective saturation, which is a constant;
[0024] λ is the pore distribution index;
[0025] k rw is the relative permeability of the liquid phase;
[0026] k rv is the relative permeability of the gas phase;
[0027] The heat transfer process in the pores is described by the following equation:
[0028] ;
[0029] Where ρ is density, T is temperature, t is time, C p,f is the relative heat capacity of the fluid phase, is the temperature difference, C p is the heat capacity at constant pressure, ρ f is the density of the fluid phase, λ eff is the effective thermal conductivity, Q is the mass source and heat source term, and u is the fluid velocity.
[0030] Further, in step S2, the recurrent neural network proxy model expression is as follows:
[0031] ;
[0032] In the formula, is the trained recurrent neural network proxy model, represents the numerical simulation method, x_data∈R ng×nc×nt, is the input data, where ng is the number of input structured grid model units, nc is the number of input features, and nt is the number of simulation time steps; y∈R ng×nr×nt , is the output result, and nr is the number of features of the simulation result.
[0033] Furthermore, when nc=3, the input features are porosity, permeability, and well location characteristics; when nr=2, the features of the simulation results are relative saturation of CO2 and regional temperature.
[0034] Furthermore, the RU-Net network includes a 3D U-Net backbone network and a 3D ConvLSTM network.
[0035] Furthermore, the 3D ConvLSTM network has two layers. The first layer 3D ConvLSTM first adds time series variation features to the input, and the second layer 3D ConvLSTM extracts and calculates the target output.
[0036] Further, in step S3, the following steps are included:
[0037] First, perform cross-task training on all tasks;
[0038] After completing the training of all tasks, the next iteration is performed until the training process is completed to obtain the final prior model parameters;
[0039] Use prior model parameters for target task training.
[0040] The principle and effect of this scheme are:
[0041] The present invention is based on different probability levels and randomly generated series of porosity and permeability attribute models to build a mathematical model of TH coupled numerical simulation. Through the TH coupled numerical simulation process, a series of numerical simulation data sets with different reservoir conditions and different injection well locations are generated to train the MAML-RU-Net proxy model. The cross-task method is used to optimize the initial parameters of the 3D RU-Net network under the MAML framework. The optimized network can use a small number of samples to quickly adapt to new tasks under different reservoir condition scenarios, providing effective technical support for CO2 storage situations that require multiple simulation evaluations - uncertain reservoir conditions and injection well location optimization, and simulated calculations of different reservoir conditions and CO2 injection well locations are performed.
[0042] Compared with the prior art, the proxy model of the present invention has obvious advantages over the numerical simulation method in terms of time. Since the proxy model directly obtains the prediction result through calculation through a set of model parameters, and the proxy model needs to solve equations for each unit, the proxy model is less time-consuming. The proxy model can make full use of the parallel computing power of the GPU, and it has the advantage of hardware compatibility. During the training process, the MAML-RU-Net model is less affected by the saddle point than the non-meta-learning method and can quickly converge to a better loss range. The RMSE, MAE, and R of the proxy models trained under different conditions for the simulation calculation results of CO2 relative saturation for specific well locations and reservoir conditions are compared. 2 On average, MAML-RU-Net performs better than RU-Net under the same number of samples, which shows that the MAML-RU-Net model has an advantage in the restoration of simulation results when fewer samples are used for training. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0044] Figure 1 A flowchart of a method for constructing a recurrent neural network agent model for deep saline CO2 storage proposed in an embodiment of the present application is shown;
[0045] Figure 2 The RU-Net network structure diagram in the method for constructing a recurrent neural network agent model for deep saline CO2 storage proposed in an embodiment of the present application is shown;
[0046] Figure 3 Schematic diagram of the target task training process in the method for constructing a recurrent neural network agent model for deep saline CO2 storage proposed in an embodiment of the present application, wherein (a) is a schematic diagram of the RMSE change during the 300-sample training process, (b) is a schematic diagram of the RMSE change during the 600-sample training process, (c) is a schematic diagram of the RMSE change during the 900-sample training process, (d) is a schematic diagram of the MAE change during the 300-sample training process, (e) is a schematic diagram of the MAE change during the 600-sample training process, (f) is a schematic diagram of the MAE change during the 900-sample training process, and (g) is a schematic diagram of the RMS change during the 300-sample training process. 2 Schematic diagram of changes, (h) is 600 samples R 2 Schematic diagram of changes, (i) is 900 samples R 2 Schematic diagram of changes;
[0047] Figure 4 A schematic diagram of reservoir permeability and porosity is shown for a method for constructing a recurrent neural network proxy model for CO2 storage in deep saline water layers proposed in an embodiment of the present application, wherein (a) is a schematic diagram of porosity, and (b) is a schematic diagram of permeability;
[0048] Figure 5 Schematic diagrams of gas migration and diffusion simulation results in a method for constructing a recurrent neural network proxy model for deep saline CO2 storage proposed in an embodiment of the present application are shown, wherein (a) is a schematic diagram of gas migration and diffusion simulation after 10 years, (b) is a schematic diagram of gas migration and diffusion simulation after 20 years, (c) is a schematic diagram of gas migration and diffusion simulation after 40 years, and (d) is a schematic diagram of gas migration and diffusion simulation after 50 years;
[0049] Figure 6 Schematic diagrams of the simulation results of reservoir temperature changes in a method for constructing a recurrent neural network proxy model for deep saline CO2 storage proposed in an embodiment of the present application are shown, wherein (a) is a schematic diagram of the simulation of reservoir temperature changes after 10 years, (b) is a schematic diagram of the simulation of reservoir temperature changes after 20 years, (c) is a schematic diagram of the simulation of reservoir temperature changes after 40 years, and (d) is a schematic diagram of the simulation of reservoir temperature changes after 50 years;
[0050] Figure 7 A schematic diagram of the gas relative saturation results obtained by simulation is shown;
[0051] Figure 8 A schematic diagram showing the error visualization between the surrogate model and the numerical simulation results is shown. DETAILED DESCRIPTION
[0052] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation mode, structure, characteristics and effects of the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments.
[0053] A method for constructing a recurrent neural network proxy model for CO2 storage in deep saline aquifers, implementing e.g. Figure 1 As shown in Figure 1, the recurrent neural network agent model is constructed through the following steps:
[0054] Step S1, based on the reservoir data set of deep saline CO2 storage, a series of attribute models of porosity and permeability under different reservoir conditions are generated using the probabilistic kriging estimation method, as follows:
[0055] The Kriging Method is used to model the attributes of the study area based on the theory of variogram. Kriging estimation is a linear unbiased optimal estimation (Best Linear Unbiased Prediction, BLUP). The linear function is used to estimate the attributes of the unknown point z0 (u0, v0, w0), which can be described as:
[0056] (1);
[0057] where z i is the measured attribute value of the known point, λ i is the weight coefficient of the known point. The Kriging method is to obtain a set of weight coefficients λ i The variance between the estimated attribute value and the measured attribute value of each point is minimized. Kriging interpolation satisfies the "unbiased" condition that the expectation of all estimated values at the measured data points is equal to the measured value:
[0058] (2);
[0059] Combined with the second-order stationary assumption, formula (2) can be equivalently written as:
[0060] (3);
[0061] The variance between the estimated and measured values at each point can be written as:
[0062] (4);
[0063] To obtain Minimum value, constructing the Lagrangian function, we can get:
[0064] (5);
[0065] (6);
[0066] The above equation group includes (n+1) unknown numbers and (n+1) expressions. By solving the equation group, the weight coefficients of the known points can be obtained to construct the Kriging interpolation function. The present invention obtains the attribute model through the Kriging method and the variance of the attributes of each grid unit in the model, thereby constructing the Gaussian distribution of the attribute values of each grid unit.
[0067] In the present invention, the attribute data of each grid position is considered to conform to the Gaussian distribution. For a single position Z on the grid model, i have:
[0068] (7);
[0069] This probability distribution can describe the uncertainty of the attribute at each location. By sampling multiple times in the probability distribution, we can obtain the spatial parameter estimation results at different percentiles. By sampling the probability distribution of each grid cell, we can obtain different attribute values. For each location attribute, we sample m times to obtain multiple attribute values, and set them in ascending order as {z i ,i=1,2,3,…m}, the position k of the pth percentile is:
[0070] (8);
[0071] Rounding k, the attribute value at the pth percentile is:
[0072] (9);
[0073] By the percentile attribute value r of each location p Calculations can be performed to obtain the attribute model implementation R at different percentiles p .
[0074] In order to increase the difference between tasks in cross-task training, the present invention uses a series of attribute models constructed by randomization method using the same sampling points as a task. The randomization method mainly includes the following steps: (1) using the Kriging method to calculate the estimation and error variance of reservoir attributes; (2) using Fourier frequency to generate a three-dimensional frequency space; (3) using the spectral density of the variogram model to approximate the amplitude spectrum function given in Fourier space to generate random phase and amplitude for each frequency point; (4) random phase and amplitude constitute the spectrum; (5) through the inverse Fourier transform, the spectrum is converted into a random field in the physical space; (6) superimposing the Kriging estimation and the random field to obtain the final randomized attribute model.
[0075] Step S2, constructing a mathematical model for TH coupling numerical simulation, that is, a mathematical model for thermal-seepage coupling numerical simulation, numerically simulating different reservoir conditions and well locations, and generating data samples, as follows:
[0076] Combined with the CO2 storage environment studied, the mathematical model is constructed and simplified based on the following assumptions:
[0077] The numerical simulation process simulates the CO2 migration and diffusion changes for 25 years after CO2 injection and 25 years after injection is stopped. The influence of chemical reaction process on the capture and migration of CO2 gas is ignored. The rock in the grid unit of the three-dimensional model is regarded as a uniform porous medium material. It is assumed that the fluid flow in the medium conforms to Darcy's seepage law and its generalized form of two-phase flow. The mass conservation and momentum conservation laws are complied with in the entire seepage process. The control equations involved in the numerical simulation mathematical model are as follows:
[0078] Ignoring the effect of chemical field, the migration of CO2 in reservoir saline water follows the law of conservation of mass. The mass conservation differential equation of the seepage continuity equation in the rectangular coordinate system is expressed as:
[0079] (10);
[0080] Where u, v, and w represent the velocities in the x, y, and z directions in the rectangular coordinate system of the flow field, respectively. For a single phase κ, the density ρ of the fluid in the porous medium can be expressed using the density of each fluid phase κ as follows:
[0081] (11);
[0082] where ρ k The fluid density of the κ phase (kg•m -3 ), S k is the saturation of the κ phase, and N is the number of phases. In the two-phase flow problem, w is used to represent the water phase and v is used to represent the gas phase. Then N=2 and:
[0083] (12);
[0084] For a single fluid phase, the velocity components in all directions are written as u, and the mass conservation control equation can be written as:
[0085] (13);
[0086] where u k is the velocity of phase κ, In the two-term flow problem, w is used to represent the water phase, v is used to represent the gas phase, and q is used to represent the porosity. k is the source and sink term. According to the extended two-phase flow Darcy's law, the velocities of the two fluids are:
[0087] (14);
[0088] where η κ represents the dynamic viscosity of the fluid κ phase, k rκ is the relative permeability, K is the absolute permeability, p is the pressure, g is the acceleration of gravity, and x, y, and z represent the axes of the Cartesian coordinate system.
[0089] Combining formula (13) and formula (14), we can get:
[0090] (15);
[0091] Under the conditions of gas-liquid two-phase flow simulation, the capillary pressure in the pore is equal to the gas pressure minus the liquid pressure, that is:
[0092] (16);
[0093] where p c represents the capillary pressure. It can be obtained that:
[0094] (17);
[0095] When p is known in two-phase flow c With S κ conform to: ,replace We can get:
[0096] (18);
[0097] At the same time, according to the Brooks-COrey model, the formula for capillary pressure can be written as:
[0098] (19);
[0099] where p ec represents the inlet capillary pressure, λ is the pore distribution index, S eff is the effective saturation, which is a constant parameter in the present invention.
[0100] Using the effective saturation to take the partial derivative of the capillary pressure, we get:
[0101] (20);
[0102] For the liquid phase:
[0103] (twenty one);
[0104] remember C pv In the present invention, the non-liquid phase only includes the gas phase. For the gas phase:
[0105] (twenty two);
[0106] According to the Brooks-Corey model, we know that the effective saturation and liquid saturation have the following relationship:
[0107] (twenty three);
[0108] Where S w_res and S v_res are the residual saturations of the liquid phase and the gas phase, respectively. Combining the Brooks-Corey and Burdine models, the relative permeabilities of the two phases can be expressed as follows:
[0109] (twenty four);
[0110] (25);
[0111] Since there is a temperature difference between the injected CO2 and the reservoir, there is a heat exchange process during the CO2 injection process. For the heat transfer process, including heat convection and heat conduction, energy conservation and mixing principles, the heat transfer equation can be described by the following general control equation:
[0112] (26);
[0113] Where ρ is density, T is temperature, t is time, C p,f is the relative heat capacity of the fluid phase, is the temperature difference, C p is the heat capacity at constant pressure, ρ f is the density of the fluid phase, λ eff is the effective thermal conductivity, Q is the mass source and heat source term, and u is the fluid velocity, which can be obtained from Darcy's law above. Under heat flow conditions, (ρC p ) eff The term can be written as:
[0114] (27);
[0115] The subscript s represents the solid phase, f represents the fluid phase, and θ s is the volume fraction of the solid. In the present invention, the pores are considered to be saturated, then:
[0116] θ s =1-θ f (28);
[0117] For the effective thermal conductivity, we have:
[0118] k eff =θ s k s +θ f k f (29);
[0119] A series of numerical simulations are performed on the generated series of property models, and their realizations are used as training samples for the surrogate model.
[0120] Step S3, construct the RU-Net network and optimize the initial parameters of the constructed RU-Net network under the MAML framework to obtain the MAML-RU-Net network, and train the MAML-RU-Net network with the data samples generated in step S2 to obtain the proxy model of the target task, as follows:
[0121] The recurrent neural network agent model can be expressed as:
[0122] (30);
[0123] in is the trained recurrent neural network proxy model, represents the numerical simulation method, x_data∈R ng ×nc×nt , is the input data, where ng is the number of input structured grid model units, nc is the number of input features, and nt is the number of simulation time steps; y∈R ng×nr×nt , is the output result, where nr is the number of features of the simulation result. In the present invention, nc=3, the input features are porosity, permeability, and well location characteristics; nr=2, the output features are the relative saturation of CO2 and the regional temperature.
[0124] The constructed RU-Net network structure is as follows Figure 2 As shown. The model input is the porosity, permeability, and well location features simulated by the current task. It is a multi-dimensional feature tensor. For the well location feature, the unit value at the injection well location is 1 and the other locations are 0. This allows more tasks to be accommodated in the MAML process. The RU-Net network is mainly composed of a 3D U-Net backbone network combined with a 3D ConvLSTM network. The U-Net network performs feature extraction and semantic segmentation on the variables, combined with ConvLSTM prediction and capture of time features, and the RU-Net network can capture the spatial distribution changes and temporal evolution of CO2 saturation in three-dimensional space.
[0125] The 3D U-Net network structure is improved, and adjustments are made to the MAML framework and current data. In order to control the network scale during the meta-learning process, the encoding process is compressed and adjusted: one downsampling is reduced to simplify the convolution process, and the 3D ConvLSTM network is modified to reduce the number of cell hidden layers. The encoded and copied copies of the feature input are used as the input of each unit of the 3D ConvLSTM, so the ConvLSTM input is always a single variable and the output is a variable containing different time series variables. In order to further reflect the time series changes, the present invention deepens the 3D ConvLSTM, first adding time series change features to the input through the first layer of 3D ConvLSTM, and then extracting and calculating the target output through the second layer of 3D ConvLSTM.
[0126] In this embodiment, the proxy model is trained and verified by the weight initialization algorithm of the MAML regression task. As shown in Table 1, all tasks are first trained across tasks. For each task in the support set, N samples are calculated, and the sample loss function is calculated to perform gradient updates. This process is the same as the intra-task training process. After completing the calculation of a batch of tasks, the parameters are updated again, and the calculated gradients are directly applied to the original model through SGD to obtain new model parameters. Through this process, the training improves the generalization ability of the initial parameters. After that, the model parameters can be evaluated and verified by performing cross-task training on the query set task. Adapt to new tasks.
[0127] After completing the training of all tasks, the next iteration is performed until the training process is completed to obtain the final prior model parameters. ,Using this model parameter, during the target task training process, only a small number of sample models are needed to quickly adjust and adapt to new tasks.
[0128] Table 1 Pseudo code for weight initialization of MAML regression task
[0129]
[0130] MAML focuses on generating a “highly adaptable” prior model for model training—— , After several gradient descents, the proxy model can be well adapted to the target task. .
[0131] In the input setting of the CO2 saline aquifer storage proxy model, in order to restore the reservoir morphology and meet the requirements of network structured input. The saline aquifer domain size is an irregular area of 6400m×6400m thickness. The entire area is represented by 32×32×80 grid blocks, which include the overburden rock and bedrock. This paper constructs tasks under original reservoir conditions and random reservoir conditions. For each reservoir condition task, there are 10 tasks, and the simulation of the diffusion and migration of CO2 under each random injection well position is regarded as a sample. Using attribute modeling methods, 50 different sets of sampling points for randomized attribute modeling were simulated and constructed as tasks under different reservoir condition scenarios. Each task contains 10 simulation results under different reservoir attribute models and different random well positions as samples. Among the 50 tasks, 40 tasks are used as support sets and 10 as query sets, and 5-fold cross validation is used.
[0132] If the data in the task is used directly for model training, sufficient samples need to be constructed. Different numerical simulation results are used, in which the ratio of training set to test set is 4:1, and 5-fold cross validation is used. To verify the performance of MAML under the condition of less samples. The reservoir attribute model under different probability levels of the target task data set comes from the probability Kriging estimation. By randomly selecting injection wells, the relative saturation of CO2 in different injection time periods under various well locations is simulated. The structure of the input data of the data set is [n, c, h, w, d], where n is the number of samples; c is the input feature. In this paper, there are three input features: permeability, porosity, and well location; h, w, d are the length, width, and height of the grid, which are 32, 32, and 80 respectively. The input features only contain porosity, permeability, and well location data. The grid with an attribute value of 1 in the well location feature represents the location of the injection well, and the other grids are 0. Each sample contains only one injection well location. The output data [t, n, c, h, w, d], where t is the output time step, the number of output data features is c, and it is the relative saturation of CO2 at the grid location. Since the temperature field changes have been included in the calculation during the construction of the mathematical model, the sample includes the impact of the temperature field on the model prediction results. In order to minimize the network scale of the model and the resource consumption of training in the cross-task process, the proxy model output does not include the temperature field output. At the same time, in terms of time series, this paper uses the input and results of the 0th, 1st, 3rd, 10th, 16th, 20th, 28th, 34th, 40th, and 50th years after the start of injection as training data, with a total number of time steps of 10.
[0133] Since the physical units of permeability, porosity and other features are different, the value ranges of the two features are different, so the input features need to be normalized:
[0134] (31);
[0135] Among them C input,k is the kth feature of the input, C min , C max They represent the minimum and maximum values of the feature respectively.
[0136] Since the upper cap rock and bedrock of the reservoir are impermeable layers, the CO2 saturation of these parts will not change significantly. In order to reduce the impact of these irrelevant areas on the model effect, the present invention extracts the location index of the reservoir area grid and uses the output features of the index position in the reservoir to calculate the loss function through the root mean square error (RMSE). The RMSE calculation formula is:
[0137] (32);
[0138] Where n is the number of samples; y iis the true value of the output feature; is the predicted value of the corresponding feature. MSE is the square root of the mean of the sum of squared errors. RMSE is sensitive to outliers and can reflect the distribution of prediction errors.
[0139] The adopted loss function can be expressed as:
[0140] (33);
[0141] Where n' is the number of samples at the index position in the reservoir; y i is the true value of the output feature, is the predicted value of the corresponding feature, and i' represents the i'th grid index position in the reservoir.
[0142] The learning rate of the RU-Net network is fixed at 0.001, and the batch size of the training is 16, with a total of 100 iterations. The learning rate of the MAML process is fixed at 0.001. Since the number of tasks is smaller than the number of samples in the deep learning network, the batch size of the MAML learner is 4, and the number of iterations is also 100. Since it is a regression task, in addition to RMSE as a loss function, the mean absolute error (MAE) and the coefficient of determination (R) are also used. 2 Quantitatively evaluate the model prediction results. The calculation formulas of these two statistical indicators are as follows:
[0143] (34);
[0144] (35);
[0145] Where n is the number of samples; y i is the true value of the output feature; is the predicted value of the corresponding feature. MAE is the average of the absolute values of the errors. MAE is insensitive to outliers, but it is difficult to reflect the distribution of the prediction errors. RMSE is the square root of the average of the sum of squared errors. RMSE is sensitive to outliers and can reflect the distribution of the prediction errors. 2 It measures how well the predicted value fits the true value. The above parameters are calculated through the corresponding features, reflecting the network's prediction of CO2 relative saturation.
[0146] To build a small sample proxy model, we first learn and adjust the initialization parameters of the task under the MAML framework. In MAML training, the number of iterations of each internal loop is 20. After 100 rounds of MAML training, the optimized initialization parameters are obtained. For most tasks in the task set, after 20 rounds of iterations, the RMSE is around 0.041, the MAE is around 0.05, and the R 2 The effect is around 0.21. The initialization parameters obtained after MAML training are applied to the training of samples in the target study area.
[0147] After completing the optimization process of the model initialization parameters, the model is fine-tuned using the RU-Net network and the target task samples, so that the model can be further optimized for the data in the study area and become the model required for the current target task. The network parameters optimized by MAML can learn the characteristics of the target data with a smaller number of samples. In order to compare the performance difference between the network using the initialization parameters optimized by MAML and the network using random initialization parameters under different sample conditions, this paper trains the network with and without parameter optimization under the conditions of 300, 600, and 900 samples respectively. During the training process, RMSE, MAE, R 2 Changes such as Figure 3 shown.
[0148] After analyzing the training process, after at least 20 rounds of training, both the RU-Net model and the MAML-RU-Net model can learn the data features in the target dataset. However, it can be seen from the figure that for the model without initial parameter optimization, its RMSE, MAE, R 2 The indicators all have an obvious step structure. In the first step, the loss function will oscillate in a fixed area. In this loss range, the loss function has a saddle point. For 300 samples, the RU-Net model crossed this saddle point after 40 iterations. Similarly, for the randomly initialized parameter models of 600 and 900 samples, they crossed the saddle point after about 20 and 5 iterations, respectively. However, the MAML-RU-Net model was not affected by this saddle point and quickly converged to a better loss range.
[0149] The number of structured grid units used is 32×32×80, and the size of a single grid unit in the x, y, and z directions is 200m×200m×10m respectively. In this study, the upper cover city and the bottom bedrock are simplified as the same impermeable layer. The reservoir permeability and porosity conditions are as follows: Figure 4 The constructed mathematical model simulates the gas migration and diffusion after CO2 injection into the injection well at x=6000m, y=6000m, z=-2700m. The simulation results are shown in Figure 5The reservoir temperature changes obtained by simulation are shown in Figure 6 The proxy model obtained by training with different numbers of samples is used to simulate the relative saturation of gas after CO2 injection. The time consumption of numerical simulation and proxy model calculation is shown in Table 2. The proxy model has advantages in calculation speed and computing platform.
[0150] Table 2 Statistics of average time consumption of calculation process
[0151]
[0152] The gas relative saturation results obtained by simulation are as follows: Figure 7 Compare the error between the proxy model and the numerical simulation results, and visualize the error ( Figure 8 ) Under the condition of the same number of samples, the performance of MAML-RU-Net is better than that of RU-Net. This shows that the MAML-RU-Net model has advantages when using fewer samples for training.
[0153] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A deep saline layer CO 2 The construction method of the sealed recurrent neural network proxy model, Features: The recurrent neural network proxy model is constructed according to the following steps: Step S1, based on the deep saline layer CO 2 The sealed reservoir data set uses the probabilistic kriging estimation method to generate a series of attribute models of porosity and permeability under different reservoir conditions, and uses a series of attribute models constructed by randomization methods using the same sampling points as a task to increase the difference between tasks in cross-task training. The randomization methods include: Use kriging to calculate estimates and error variances of reservoir properties; Generate a three-dimensional frequency space using Fourier frequencies; Generate random phase and amplitude for each frequency point using the spectral density of the variogram model to approximate the amplitude spectrum function given in Fourier space; Random phase and amplitude constitute the spectrum; The spectrum is converted into a random field in physical space through inverse Fourier transform; Superimpose the Kriging estimation and random field to obtain the final randomized attribute model; Step S2, based on the attribute model described in step S1, a mathematical model for thermal-seepage coupling numerical simulation is constructed to perform numerical simulation on different reservoir conditions and well locations, and generate data samples. The relative permeability expressions of the pore liquid phase and the gas phase are as follows: ; ; In the formula, S eff is the effective saturation, which is a constant; λ is the pore distribution index; k rw is the relative permeability of the liquid phase; k rv is the relative permeability of the gas phase; The heat transfer process in the pores is described by the following equation: ; Where ρ is density, T is temperature, t is time, C p,f is the relative heat capacity of the fluid phase, is the temperature difference, C p is the heat capacity at constant pressure, ρ f is the density of the fluid phase, λ eff is the effective thermal conductivity, Q is the mass source and heat source term, and u is the fluid velocity; Step S3, construct the RU-Net network and optimize the initial parameters of the constructed RU-Net network under the MAML framework to obtain the MAML-RU-Net network, and train the MAML-RU-Net network with the data samples generated in step S2 to obtain the proxy model of the target task. The expression of the recurrent neural network proxy model is as follows: ; In the formula, is the trained recurrent neural network proxy model, represents the numerical simulation method, x_data∈R ng ×nc×nt , is the input data, where ng is the number of input structured grid model units, nc is the number of input features, and nt is the number of simulation time steps; y∈R ng×nr×nt , is the output result, and nr is the number of features of the simulation result.
2. A deep saline layer CO according to claim 1 2 The construction method of the sealed recurrent neural network proxy model, It is characterized in that For nc=3, the input features are porosity, permeability, and well location characteristics; for nr=2, the simulation result features are CO 2 relative saturation and regional temperature.
3. A deep saline layer CO according to claim 1 or 2 2 The construction method of the sealed recurrent neural network proxy model, It is characterized in that The RU-Net network includes a 3D U-Net backbone network and a 3D ConvLSTM network.
4. A deep saline layer CO according to claim 3 2 The construction method of the sealed recurrent neural network proxy model, It is characterized in that The 3D ConvLSTM network has two layers. The first layer 3D ConvLSTM first adds time series variation features to the input, and the second layer 3D ConvLSTM extracts and calculates the target output.
5. A deep saline layer CO according to claim 4 2 The construction method of the sealed recurrent neural network proxy model, It is characterized in that In step S3, the following steps are included: First, perform cross-task training on all tasks; After completing the training of all tasks, the next iteration is performed until the training process is completed to obtain the final prior model parameters; Use prior model parameters for target task training.
