A method and system for predicting coalbed methane reservoir pressure dynamics
By applying deep learning methods in coalbed methane reservoir pressure prediction, combined with the axial visual Transformer and ConvLSTM models, the problems of strong data dependence and high cost in the existing technology are solved, and fast, economical and accurate pressure dynamic prediction is achieved. .
Patent Information
- Application Number
- CN202411448175.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-17
AI Technical Summary
The prior art has problems such as strong data dependence, high time scale requirements, high interpretation, and high cost and time costs in the coalbed methane reservoir pressure prediction.
Adopting deep learning methods, using the proxy models of axial vision Transformer and CONVLSTM, combined with static geology and development parameters, predict the space -time pressure dynamics of the coal seam storage layer.
It achieves rapid, economical and accurate prediction of pressure evolution dynamics in coalbed methane reservoirs, reduces time and economic costs, and improves prediction accuracy and adaptability.
Smart Images

Figure CN118966086B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of coalbed methane reservoir pressure prediction, and in particular relates to a method and system for predicting coalbed methane reservoir pressure dynamics. Background Art
[0002] Coalbed methane is an important unconventional energy resource in the world's energy supply. Formulating a correct coalbed methane development strategy requires a priori understanding of the temporal and spatial pressure characteristics of the reservoir gas reservoir to ensure coalbed methane recovery and project economics. However, due to the multi-scale anisotropic properties of porous materials in unconventional oil and gas reservoirs, complex fluid thermodynamics, and the coupled physical principles of heat transfer and geomechanics, the governing equations describing the flow of multiphase fluids in porous media are highly nonlinear and complex.
[0003] The most commonly used methods for studying the dynamic characteristics and laws of pressure in coalbed methane reservoirs include pressure transient analysis, regression analysis, and numerical simulation.
[0004] The pressure transient analysis method mainly includes the steps of data collection, data preprocessing, data analysis, and result interpretation. Among them, data collection is to collect fracturing data in real time at the well site through pressure gauges, flow meters, fracturing pumps and other equipment; after data collection, the collected data is cleaned to remove noise and outliers; after data cleaning, the pressure decay curve is drawn, and the fracture closure pressure, reservoir permeability, etc. are analyzed through the curve; finally, adjustments are made based on the analysis results and the actual production system. It can be seen that the pressure transient analysis method relies on on-site monitoring data, and the analysis process is highly subjective. It has poor adaptability and generalization to different geological feature data, so it cannot adapt to high-dimensional and nonlinear complex scenarios.
[0005] Regression analysis is to calculate the output result by specifying the logical relationship between input and output data or learning the implicit relationship with the help of machine learning methods. Regression analysis also has strict requirements on data quality. Although machine learning algorithms improve problem-solving capabilities, machine learning methods require a large amount of data support and the output results correspond one-to-one with the input conditions. Therefore, it is difficult to use production system parameters to calculate the future multi-time pressure characteristics.
[0006] The traditional numerical simulation method is to construct a conceptual model through geological condition parameters, call a numerical simulator to simulate the evolution of pressure, saturation, etc., calculate the dynamics of physical property evolution, and perform repeated iterative optimization. This method includes the steps of conceptual model construction, geological / injection and production parameter setting, numerical simulation calculation, etc. The numerical simulation method requires the use of a special numerical simulator. The current commercial numerical simulator has a high purchase cost, and the numerical simulation calculation is large and the calculation efficiency is low. In addition, the rock fluid physical property parameters required in the numerical simulation generally require a large number of physical simulation experiments to ensure the reliability of the calculation results.
[0007] It can be seen that compared with pressure transient analysis and regression analysis, numerical simulation methods have better physical interpretation and more rigorous simulation process, which can accurately calculate the pressure, saturation, production and other reservoir states of future oil and gas reservoirs for dynamic evaluation of production and development. However, real two-dimensional or three-dimensional geological models have many grids, large models and complex boundaries, and solving them often requires a lot of time and computing resources, with high economic and time costs.
[0008] Through the above analysis, the problems and defects of the existing technology are as follows: the existing coalbed methane reservoir pressure prediction methods mainly include pressure transient analysis, regression analysis and numerical simulation. Among them, the pressure transient analysis data has strong dependence on accuracy, high time scale requirements, and great difficulty in interpretation. In essence, it is a quantitative analysis of one-dimensional pressure and time, targeting actual monitoring data. The regression analysis method also relies on data quality and quantity, and the model lacks interpretability. It is mainly suitable for simple linear relationship data regression, and the error is large. The numerical simulation method requires the use of professional numerical simulators. On the one hand, the purchase cost is high, and on the other hand, a large number of fluid and rock parameters need to be set. These parameters generally need to be obtained through a large number of experiments, and the economic and time costs are high. In addition, numerical calculations involve a large number of complex operations, which consume a lot of computing resources and take a long time. Summary of the invention
[0009] In order to overcome the problems existing in the related art, the disclosed embodiment of the present invention provides a method and system for predicting the dynamics of coalbed methane reservoir pressure, and specifically relates to a two-dimensional coalbed methane reservoir pressure dynamics prediction method based on deep learning.
[0010] The technical solution is as follows: a method for predicting the pressure dynamics of a coalbed methane reservoir, which method predicts the spatiotemporal pressure dynamics of a coalbed methane reservoir using an axial visual Transformer and a ConvLSTM proxy model given a set of static geological and development parameters, and specifically includes the following steps:
[0011] S1, set reservoir parameters, build a three-dimensional geological conceptual model, use the Gaussian covariance model in the geospatial data processing and statistical modeling tool library to generate a heterogeneous permeability field, and use a numerical simulator to solve the internal pressure and bottom hole flow pressure corresponding to different permeability conceptual models as a sample library;
[0012] S2, builds a prediction network of visual Transformer and ConvLSTM, combines ordinary convolution and Transformer based on axial self-attention as the encoder network, uses ordinary convolution to extract global information, uses visual Transformer to capture local information, and uses ConvLSTM to consider both temporal and spatial information; incorporates image structural similarity and perceptual similarity loss constraints;
[0013] S3, setting the hyperparameters of the network model, dividing the sample library into data sets according to the proportion, using permeability and bottom hole pressure as inputs and pressure dynamics as outputs, and training and correcting the network under the training set and validation set;
[0014] S4, use the test set to evaluate the performance of the network model and calculate the MSE error and R 2 Scoring, calculate the image similarity score SSIM and perceptual similarity error LPIPS between the predicted results and the real data.
[0015] In step S1, reservoir parameters are set to construct a three-dimensional geological conceptual model, including:
[0016] Step 1.1: Collect and organize geological and development data of coalbed methane, including: permeability, porosity, reservoir thickness and density, saturation, pressure, Poisson's ratio, compressibility, Langmuir pressure, Langmuir volume, ratio of desorption pressure to reservoir pressure, and relative permeability curve;
[0017] Step 1.2: Establish a basic numerical conceptual model based on Cartesian coordinates, generate a heterogeneous permeability field for the entire basic numerical conceptual model; clear the permeability according to the length and width of the well spacing; and overwrite the heterogeneous permeability with the fracture permeability according to the location information of the hydraulic fracture to obtain the permeability distribution of the conceptual model;
[0018] Step 1.3: Use a numerical simulator to simulate and calculate the physical property dynamics of different conceptual models to obtain the temporal and spatial pressure dynamics and bottom hole flow pressure data samples.
[0019] In step 1.2, a basic numerical conceptual model is established based on Cartesian coordinates, including:
[0020] Combined with the deep learning method, the size of the input data is unified, and the size range does not exceed 128×128×1. Within this range, different well spacing lengths and well spacing widths are set according to experience. As the actual area of the production well, this area coincides with the center point of the maximum range, and a production well is set at the center point. With the production well as the center, the well spacing length and width are set as the actual area of the production well. A hydraulic fracture is set in the direction with a width of 1 and a length not exceeding the well spacing length;
[0021] In step 1.2, a heterogeneous permeability field is generated for the entire basic numerical conceptual model, including: defining the space size, setting The number of directional grids and grid numbers are consistent with the basic numerical conceptual model; the Gaussian covariance model is defined, and the expression is:
[0022]
[0023] In the formula, is the (isotropic) lag distance, is the correlation length, To adjust the rescaling factor of the model representation (default is 1), is the partial scale variance, is the subscale variance, The normalized correlation function defined for the model that depends on the dimensionless distance, is a variogram function, for The variation at increases with the increase of .
[0024] Call the SRF class and pass in the Gaussian covariance model to actually generate the spatial random field; execute the generation process, and pass the results through the standardization and cumulative distribution function process to map the values into the specified permeability range.
[0025] In step 1.3, a numerical simulator is used to simulate and calculate the physical property dynamics of different conceptual models to obtain the temporal and spatial pressure dynamics and bottom hole flow pressure data samples, including: writing the defined basic numerical conceptual model into the numerical simulator file, and setting the simulator parameters including the simulation time step and the number of running cores; calling the gem simulator, loading the model file, and executing the numerical simulation;
[0026] Among them, numerical simulation includes:
[0027] Step 1.3.1, calculate the pressure and saturation at each grid node by solving the control equation;
[0028] Step 1.3.2, updating fluid physical parameters including permeability and viscosity according to the calculated pressure and saturation;
[0029] Step 1.3.3, push the time to the next time step, and repeat the above process until the specified simulation time is reached;
[0030] Step 1.3.4, extract the output data from the simulation result file, including the pressure dynamics and bottom hole flowing pressure at different times.
[0031] In step S2, a prediction network of visual Transformer and ConvLSTM is constructed, including:
[0032] Step 2.1: Construct the encoder network AxialViT, which includes ordinary convolution blocks and axial self-attention blocks based on position-sensitive self-attention mechanism and visual Transformer;
[0033] Step 2.2: Time series prediction network, including time series information embedding and pressure dynamic prediction. The input of time series information embedding is the output feature map of the encoder network in step 2.1. The time series features, time at different moments and bottom hole pressure are respectively embedded in the channel expansion method, and the feature map is reorganized into time series data with time length. The ConvLSTM network is used to predict the pressure dynamics at multiple moments; ConvLSTM receives the time series data from the information embedding part, learns the information of each time step respectively, and transmits the time information between different moments, saves the prediction results of each time step, and obtains the prediction result features at multiple moments;
[0034] Step 2.3: The decoder network decodes the intermediate results of the timing prediction network into the original data space using a deconvolution operation, and the result obtained is the pressure prediction value for multiple time steps;
[0035] Step 2.4: Improve the loss function of the model, introduce two indicators, image structure similarity and image perception similarity, to constrain the prediction results at the pixel level; use the Bayesian optimization algorithm to find the weights of the three loss terms MSE, SSIM, and LPIPS in the loss function, calculate the overall loss and perform reverse gradient to make the prediction results closer to the real data.
[0036] In step 2.1: Construct the encoder network AxialViT, including:
[0037] The ordinary convolution block performs convolution calculation on the entire image to capture the overall details of the world. The position-sensitive axial attention mechanism uses attention in the height and width directions of the specified attention area, calculates the impact of other surrounding positions on the current calculation position, extracts spatiotemporal information in different directions, and retains high-dimensional image context information. The specific calculation formula is as follows:
[0038]
[0039]
[0040] In the formula, Indicates that position p passes The attention weight value processed by the function; For Region Internal Other related locations, is the local area of attention to be calculated, Use position-sensitive attention for different orientations of the image; For location The query matrix of is the transpose of the matrix, ; The input location The key matrix, ; The positions are To location The position encoding of key and value; For location Until now The query vector of The input location The value matrix, ; Given an input feature map , are the feature map height and width, respectively. is the number of input channels; output It's location The attention weight, , Indicates the number of output channels; is the current attention location.
[0041] In step 2.2, the ConvLSTM network is used to predict the pressure dynamics at multiple moments, including:
[0042] ConvLSTM network Input cell status at any time , hidden state , current input features , Carries time information, the expression is:
[0043]
[0044] In the formula, Forget gate, controls the state of lost cells Information in is the new candidate cell state, To update the gate, select Keep candidate cell states Some important information in is the output gate.
[0045] ConvLSTM's forget gate, input gate, output gate, and new candidate cell states The calculation formulas are:
[0046]
[0047]
[0048]
[0049]
[0050]
[0051] In the formula, are the weights of the input gate, forget gate, candidate cell state, output gate and other cell states, are the biases of the input gate, forget gate, candidate cell state and output gate respectively. The symbol * is the convolution operator for two-dimensional data. yes sigmod Activation function, the activation result is between (0, 1), The activation result is between (-1,1).
[0052] In step 2.3, the intermediate results of the timing prediction network are decoded into the original data space using a deconvolution operation, including:
[0053] The intermediate results predicted by the ConvLSTM network include a four-dimensional tensor of time length, number of channels, height, and width. The height and width are smaller than the spatial size of the input data. The output of the ConvLSTM network is a four-dimensional tensor of time length, 1, height, and width.
[0054] Deconvolution gradually upsamples low-resolution feature maps to high-resolution spatial dimensions by selecting convolution kernel size, stride, and padding. Deconvolution expands the size of the output space by specifying the stride and convolution kernel size. The stride is set to be greater than 2. In the processing of the number of channels, a 1×1 convolution kernel is used to reduce the number of channels to 1 without affecting the size of the restored space.
[0055] By applying deconvolution operations to the data at each time step, it is decoded and restored to the original data spatial resolution; the size of the deconvolution output tensor is determined by the input size , stride, convolution kernel size ,filling Among them, the output height As shown in formula (6), the width is the same;
[0056]
[0057] In step 2.4, the SSIM calculation logic is:
[0058]
[0059] in, Represent the real image and the predicted image respectively; Represent the local means of the two images respectively; Represent the local variance and covariance of the two images respectively; are three constants;
[0060] The LPIPS calculation logic is as shown in formula (8). The feature map of the layer is and ;
[0061]
[0062]
[0063] in, represents the Euclidean distance, i.e. the L2 norm; express The feature map of the layer elements; are the learned weights, reflecting the perceived importance of different layers;
[0064] The overall loss function is designed as follows:
[0065]
[0066] In the formula, Indicates the real pressure data, Represents the model prediction results; Represent the weight of each loss item respectively; Indicates the number of regions where the entire image is divided to calculate SSIM; Indicates the number of training samples involved in calculating the MSE loss.
[0067] In step S4, R 2 The calculation principle is shown in formula (10):
[0068]
[0069]
[0070] in, Represents the mean of the true value; SST and RSS are the total sum of squares and the residual sum of squares respectively.
[0071] Another object of the present invention is to provide a system for predicting the dynamics of coalbed methane reservoir pressure, which is implemented by the method for predicting the dynamics of coalbed methane reservoir pressure, and the system comprises:
[0072] The sample library solution module is used to set reservoir parameters, build a three-dimensional geological conceptual model, generate a heterogeneous permeability field using the Gaussian covariance model in the geospatial data processing and statistical modeling tool library, and use a numerical simulator to solve the internal pressure and bottom hole flow pressure corresponding to different permeability conceptual models as a sample library;
[0073] Prediction network building module, used to build the prediction network of visual Transformer and ConvLSTM, combining ordinary convolution and Transformer based on axial self-attention as the encoder network, using ordinary convolution to extract global information, using visual Transformer to capture local information, and using ConvLSTM to consider both temporal and spatial information; incorporating image structural similarity and perceptual similarity loss constraints;
[0074] The network training and correction module is used to set the hyperparameters of the network model, divide the sample library into data sets according to the proportion, use permeability and bottom hole flow pressure as input, and pressure dynamics as output, and train and correct the network under the training set and validation set;
[0075] The network model evaluation module is used to evaluate the performance of the network model using the test set, calculate the MSE error and R 2 Scoring, calculate the image similarity score SSIM and perceptual similarity error LPIPS between the predicted results and the real data.
[0076] Combined with all the above technical solutions, the beneficial effects of the present invention are as follows: the present invention establishes a method for predicting the future multi-time pressure dynamics using static parameters, so as to be able to predict the pressure evolution dynamics in the coalbed methane reservoir more quickly, economically and accurately, solving the problem that the existing pressure transient analysis, regression analysis and other methods are all for one-dimensional data and based on historical data, which are not suitable for predicting the future multi-time pressure dynamic information; it also solves the defects of the prior art numerical simulation method that is time-consuming, labor-intensive and costly. The present invention proposes a prediction model based on the latest deep learning technology, with reliable evaluation results, high efficiency and low cost; the present invention can quickly, economically and accurately predict the dynamic distribution of coalbed methane pressure in time and space.
[0077] The present invention improves prediction accuracy and can more accurately capture complex high-dimensional nonlinear relationships compared to traditional methods, thereby improving prediction accuracy; it solves the time-consuming and costly defects of numerical simulation and traditional methods, reducing time and economic costs; it has a wide range of applications and can be extended to the dynamic pressure prediction of other types of energy reservoirs or geological reservoirs, and has market potential.
[0078] The present invention applies the most cutting-edge technology in the field of image segmentation to the processing of two-dimensional data of complex formations, and predicts the pressure dynamics at multiple moments based on static initial parameters combined with a time series algorithm. This improves the interpretability and high performance of the model while proposing new ideas and solutions for solving similar problems in various fields.
[0079] The present invention breaks the essence of the traditional time series prediction problem. Instead of using historical data, it predicts the multi-time state based on static initial parameters. At the same time, unlike the existing method that uses a one-to-one regression prediction method, this method converts the initial state data into time series data by embedding time series information, and then uses the classic time series prediction model for prediction, taking into account the impact of time correlation on the time series state, thereby ensuring the rationality and accuracy of the prediction effect.
[0080] The technical solution of the present invention provides a more objective pressure dynamic prediction tool by adopting a data-driven method, comprehensive utilization of multi-dimensional data, and improving model adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure;
[0082] Figure 1 is a flow chart of a method for predicting coalbed methane reservoir pressure dynamics provided by an embodiment of the present invention;
[0083] Figure 2 It is a schematic diagram of the structure of a traditional LSTM model provided by an embodiment of the present invention;
[0084] Figure 3 It is a schematic diagram of a coalbed methane reservoir conceptual model provided by an embodiment of the present invention;
[0085] Figure 4 It is a feature input principle diagram of the deep learning network model provided by an embodiment of the present invention;
[0086] Figure 5 is an encoder network diagram based on axial self-attention-visual Transformer provided by an embodiment of the present invention;
[0087] Figure 6 It is a time series prediction network diagram based on ConvLSTM provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0088] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.
[0089] The innovation of the present invention lies in that the method combines high-performance axial attention visual Transformer, ConvLSTM and enhanced loss function, which can accurately capture the spatiotemporal pressure characteristics and has strong robustness. It provides a new framework and idea for the prediction of spatiotemporal characteristics based on static input parameters, and is expected to be applied to solving similar problems in other forms of oil and gas reservoirs or other fields.
[0090] The present invention builds a conceptual model based on geological parameters and production parameters; builds a neural network based on position-sensitive axial self-attention and visual Transformer, and considers time and space information in combination with ConvLSTM; a decoder network based on a deconvolution operator; and an improved loss function with image structural similarity (SSIM) and image perceptual similarity loss (LPIPS).
[0091] Embodiment 1, as Figure 1 As shown, the method for predicting the pressure dynamics of coalbed methane reservoirs provided by the embodiment of the present invention includes:
[0092] S1, set reservoir parameters, build a three-dimensional geological conceptual model, use the Gaussian covariance model in the geospatial data processing and statistical modeling tool library to generate a heterogeneous permeability field, and use a numerical simulator to solve the internal pressure and bottom hole flow pressure corresponding to different permeability conceptual models as a sample library;
[0093] S2, builds a prediction network of visual Transformer and ConvLSTM, combines ordinary convolution and Transformer based on axial self-attention as the encoder network, uses ordinary convolution to extract global information, uses visual Transformer to capture local information, and uses ConvLSTM to consider both temporal and spatial information; incorporates image structural similarity and perceptual similarity loss constraints;
[0094] S3, setting the hyperparameters of the network model, dividing the sample library into data sets according to the proportion, using permeability and bottom hole pressure as inputs and pressure dynamics as outputs, and training and correcting the network under the training set and validation set;
[0095] S4, use the test set to evaluate the performance of the network model and calculate the MSE error and R 2 Scoring, calculate the image similarity score SSIM and perceptual similarity error LPIPS between the predicted results and the real data.
[0096] In step S1, the underground multiphase seepage data of coalbed methane are sorted, and the Gaussian covariance model in the geospatial data processing and statistical modeling tool library (GSTools) is used to generate a permeability field that conforms to the geological characteristics. The pressure and bottom hole flow pressure over a period of time corresponding to different permeability fields and different conceptual models are calculated using a numerical simulator as a sample library, and the training set, validation set and test set are divided proportionally. The permeability, well location fracture structure, etc. are used as input, and the multi-time pressure dynamics are used as output.
[0097] The specific process is as follows:
[0098] Step 1.1: Collect and organize geological and development data of coalbed methane: permeability, porosity, reservoir thickness & density, saturation, pressure, Poisson's ratio, compressibility, Langmuir pressure, Langmuir volume, ratio of desorption pressure to reservoir pressure, relative permeability curve, etc.
[0099] Step 1.2: Establish a basic numerical conceptual model based on Cartesian coordinates, including three directions: x, y, and z. Set a production well in the center of the conceptual model, and set areas with different well spacing lengths and widths around the well as the actual effective influence range of the production well. Use the Gaussian covariance model GSTools to generate a heterogeneous permeability field inside it. In addition, set a hydraulic fracture in the x direction of the production well with a length not exceeding the length of the effective area. Specifically, first, generate a heterogeneous permeability field for the entire conceptual model; then, clear the permeability of the remaining positions according to the length and width of the well spacing; finally, according to the fracture location information, cover the heterogeneous permeability with the fracture permeability to obtain the permeability distribution of the conceptual model.
[0100] Exemplarily, the basic numerical conceptual model, first of all, combined with the deep learning method, needs to unify the size of the input data (two-dimensional), so the size range of the entire conceptual model is limited to no more than 128*128*1 (the number of grids in the maximum range of the conceptual model). Secondly, within this range, different well spacing lengths and well spacing widths are set according to experience as the actual area of the production well (the length and width do not exceed 128, the width does not exceed the length, and it is guaranteed to be a standard rectangular area). This area coincides with the center point of the maximum range, and a production well is set at the center point; finally, with the production well as the center, a hydraulic fracture is set along the x (well spacing length) direction, with a width of 1 and a length not exceeding the well spacing length. The hydraulic fracture is specifically manifested in that its permeability is different from the permeability in the actual area.
[0101] Exemplarily, a Gaussian covariance model GSTools is used internally to generate a heterogeneous permeability field. GSTools is a set of geostatistical tools for generating heterogeneous permeability fields. In the present invention, first, a Gaussian process is created based on an exponential variation function to define a spatial random process. Secondly, the parameters of the variation function are set, such as the range (describing the range of spatial correlation between permeability values), the base (describing the maximum variation of permeability within the range), the nugget effect (describing measurement errors or variations at very small scales), and the dimension of the field (two-dimensional or three-dimensional). Then, a grid is created, and the grid size and number are consistent with the basic numerical conceptual model. Finally, the generation process is executed, and the results are mapped to the specified permeability range through processes such as standardization and cumulative distribution function.
[0102] Step 1.3: Use a numerical simulator to simulate and calculate the physical property dynamics of different conceptual models to obtain data samples such as time-space pressure dynamics and bottom hole flow pressure.
[0103] Specifically, it includes: first, writing the defined conceptual model into the numerical simulator file (.dat file), and setting the simulator parameters, such as simulation time step, number of running cores, etc.
[0104] Then, the gem simulator is called, the model file is loaded, and numerical simulation is performed. The numerical simulation includes the following steps:
[0105] Step 1.3.1, by solving the control equations (Darcy's law, fluid continuity equation, etc.), calculate the pressure, saturation, etc. at each grid node. The gas phase solution process is shown in Equation (11);
[0106]
[0107] in, , represents the pressure and saturation to be solved.
[0108] Step 1.3.2, based on the calculated pressure and saturation, update the fluid physical parameters (relative permeability, viscosity, etc.) to facilitate the calculation of the next time step. The calculation formula is shown in Equation (12);
[0109]
[0110] Step 1.3.3, Update and , push the time to the next time step, and repeat the above process until the specified simulation time is reached.
[0111] Step 1.3.4, extract the output data from the simulation result file, such as pressure dynamics at different times, bottom hole flowing pressure, etc.
[0112] In step S2, a neural network is constructed to predict pressure dynamics using static parameters. The network uses an encoder-decoder structure to map inputs such as permeability to output pressure dynamics. The input data is the permeability field, saturation, porosity, etc. of known observations, and the output is the pressure dynamics for a period of time in the future. The encoder part will integrate the visual Transformer and ordinary convolution based on axial self-attention, use the axial self-attention mechanism to extract local details of the image, and use two-dimensional convolution to capture global information; considering that the predicted pressure is temporal, the temporal network (ConvLSTM) that integrates convolution and LSTM features is used to consider both time and space information; and the image structure constraints of SSIM and LPIPS are added to the network loss function.
[0113] The specific process is as follows:
[0114] Step 2.1: Construct the encoder network (AxialViT), which contains a normal convolution block and the axial self-attention block based on the position-sensitive self-attention mechanism and the visual Transformer.
[0115] Convolution can perform convolution calculations on the entire image to capture the overall details of the world. The position-sensitive axial attention mechanism can use attention in both the height and width directions of the specified attention area, calculate the impact of other surrounding positions on the current calculation position, extract spatiotemporal information in different directions, and retain high-dimensional image context information. The specific calculation formula is as follows:
[0116]
[0117]
[0118] In the formula, Indicates that position p passes The attention weight value processed by the function; For Region Internal Other related locations, is the local area of attention being calculated, Use position-sensitive attention for different orientations of the image; For location The query matrix of is the transpose of the matrix, ; The input location The key matrix, ; The location To location The position encoding of key and value; For location Until now The query vector of The input location The value matrix, ; Given an input feature map , are the feature map height and width, respectively. is the number of input channels; output It's location The attention weight, , Indicates the number of output channels; is the current attention location.
[0119] Exemplarily, convolution may be performed on the entire image and the convolution calculation includes:
[0120] First, define the convolution layer, including the convolution kernel (or filter), sliding step, padding, etc. Then, the convolution kernel starts from the upper left corner of the image and slides on the image with a specified step size (from left to right by default). Each time it slides, the convolution kernel performs a matrix element-by-element multiplication operation with the area at the corresponding position of the image. These products are added together to get a value, which is a pixel point in the feature map after convolution. After all sliding operations are completed, all values form a new matrix, which is the feature map captured from the image. It contains certain features of the image extracted after filtering by the convolution kernel. The calculation process is:
[0121]
[0122] in, represents the convolution kernel size, and Indicates the size of the new matrix.
[0123] Although each convolution operation can only act on a local area of the image, the network can capture a wider range of features layer by layer through the superposition of multiple layers of convolution. The early layers capture low-level features (such as edges and textures), while the deep convolution layers can capture high-level features (such as the outline and shape of objects). The superposition of multiple convolution layers, combined with pooling and nonlinear activation functions, can gradually form a global perception of the entire image.
[0124] Step 2.2: Time series prediction network, including time series information embedding and pressure dynamics prediction. The input of the time series information embedding part is the output feature map of the encoder network in step 2.1. The time series features, time at different moments and bottom hole pressure are respectively embedded in the channel expansion method, and the feature map is reorganized into time series data with a certain time length. The purpose is to use the ConvLSTM network to predict the pressure dynamics at multiple moments. ConvLSTM integrates the convolution operation for two-dimensional data into the traditional LSTM time series prediction network to deal with two-dimensional time series prediction problems. Traditional LSTM networks such as Figure 2 As shown in the figure, ConvLSTM receives the time series data from the information embedding part, learns the information of each time step respectively, transmits the time information between different moments, saves the prediction results of each time step, and obtains the prediction result features of multiple moments. t The input at each moment includes: cell status , hidden state , the current input feature .in Carrying time information, the calculation formula is as follows:
[0125]
[0126] In the formula, Forget gate, controls the state of lost cells Information in is the new candidate cell state, To update the gate, select Keep candidate cell states Some important information in is the output gate; each gate has its own corresponding weight and bias, yes sigmod Activation function, the activation result is between (0, 1), The activation result is between (-1,1).
[0127] ConvLSTM's forget gate, input gate, output gate, and new candidate cell states The calculation formulas are:
[0128]
[0129]
[0130]
[0131]
[0132]
[0133] In the formula, are the weights of the input gate, forget gate, candidate cell state, output gate and other cell states, are the biases of the input gate, forget gate, candidate cell state and output gate respectively, and the symbol * is the convolution operator of two-dimensional data;
[0134] Exemplarily, the ConvLSTM receives time series data from the information embedding part, learns the information of each time step respectively, transmits the time information between different moments, saves the prediction result of each time step, and obtains the prediction result features of multiple moments including:
[0135] ConvLSTM receives time series data (feature maps), which usually have four dimensions: time length, number of channels, height, and width.
[0136] First, the feature map of each time step is input into the ConvLSTM unit. ConvLSTM processes these inputs in the time dimension while capturing spatial information and temporal dependencies. Specifically, each ConvLSTM unit includes elements such as input gate, forget gate, output gate, and cell state. Each element is a three-dimensional tensor of the same dimension as the input (number of channels and data space size). The input gate filters information from the current input information (current time step data, hidden state at the previous moment, cell state at the previous moment) into the current cell state; the forget gate combines the current input and the hidden state of the previous time step to calculate the forgetting ratio; the output gate selects information from the current cell state and passes it to the hidden state; the cell state saves the important spatiotemporal features of the current time step and passes it to the next moment, and is continuously recursively updated. The iterative update process can be expressed by formula (5): express.
[0137] ConvLSTM updates different state information through convolution and matrix multiplication operations, calculates the prediction results of each time step, and finally forms a time series prediction result set as the prediction output of each time step. The result set can be expressed as follows:
[0138]
[0139] in, The same as in formula (5) Results at different times.
[0140] Step 2.3: Decoder network, decodes the intermediate result of the time series prediction network into the original data space using deconvolution operation, and the result is the pressure prediction value of multiple time steps. Among them, the size of the deconvolution output tensor is determined by the input size ( ), stride, kernel size (kernal_size), padding, etc. Among them, the output height As shown in formula (6), the width is the same.
[0141]
[0142] Exemplarily, decoding the intermediate result of the time series prediction network into the original data space using a deconvolution operation includes:
[0143] The intermediate result predicted by the ConvLSTM network is a four-dimensional tensor of (time length, number of channels, height, width), where the height and width are smaller than the spatial size of the input data due to the convolution and other downsampling processes. The model output is a four-dimensional tensor of (time length, 1, height, width).
[0144] Deconvolution (transposed convolution) gradually upsamples low-resolution feature maps to high-resolution spatial dimensions by selecting appropriate convolution kernel size, stride (step length), and padding. Unlike ordinary convolution, deconvolution expands the size of the output space by specifying the stride and convolution kernel size. Larger convolution kernels can aggregate more spatial information and restore spatial resolution more smoothly. The stride is usually set to 2 or larger to achieve multiple expansion of spatial resolution. For example, with a stride of 2, the output space will be twice the size of the input space. At the same time, in the processing of the number of channels, a 1×1 convolution kernel is used to reduce the number of channels to 1 without affecting the size of the restored space.
[0145] In the present invention, by applying deconvolution operation to the data of each time step respectively, the data is decoded and restored to the original data spatial resolution.
[0146] Step 2.4: Improve the loss function of the model, introduce two indicators, image structural similarity and image perceptual similarity, and constrain the prediction results at the pixel level. Use the Bayesian optimization algorithm to find the weights of the three loss terms MSE, SSIM, and LPIPS in the loss function, calculate the overall loss and perform reverse gradient to make the prediction results closer to the real data. Among them, the SSIM calculation logic is as follows (7):
[0147]
[0148] in, Represent the real image and the predicted image respectively; Represent the local means of the two images respectively; Represent the local variance and covariance of the two images respectively; are three constants;
[0149] The LPIPS calculation logic is as shown in formula (8). The feature map of the layer is and ;
[0150]
[0151]
[0152] in, represents the Euclidean distance, i.e. the L2 norm; express The feature map of the layer elements; are the learned weights, reflecting the perceived importance of different layers;
[0153] In summary, the overall loss function of the model is designed as follows:
[0154]
[0155] In the formula, Indicates the real pressure data, Represents the model prediction results; Represent the weight of each loss item respectively; Indicates the number of regions where the entire image is divided to calculate SSIM; Indicates the number of training samples involved in calculating the MSE loss.
[0156] In step S3, set the hyperparameters of the model, such as batch size, optimizer, learning rate, learning rate scheduler, number of training times, etc. Train and optimize the network model under the training set and validation set.
[0157] In step S4, the performance of the network model is evaluated using the test set, and the MSE and LPIPS losses are calculated to quantify the error, and R is calculated. 2 and SSIM scores to quantify the prediction effect, R 2 The calculation principle is shown in formula (10):
[0158]
[0159]
[0160] in, Represents the mean of the true value; SST and RSS are the total sum of squares and the residual sum of squares respectively.
[0161] If R 2 If the score reaches 0.9 or above, the model training effect is considered to be good. Generally speaking, if the SSIM value is higher than 0.8, the images can be considered to be visually close. Otherwise, the network model or hyperparameters are readjusted and retrained until the accuracy reaches an acceptable range.
[0162] For example, as shown in the first term of formula (9), the MSE error is obtained by taking the pixel-by-pixel difference, square sum, and average between the real image and the predicted image. The smaller the value, the smaller the error between the two at the numerical level. Similarly, the smaller the LPIPS, the more similar the two images are in perception, and the smaller the human perception error.
[0163] The coefficient of determination (R 2 ) is calculated as shown in formula (10). The closer the value is to 1, the closer the model prediction is to the true value. Similarly, SSIM performs local calculations on the image based on a sliding window, and takes the average value of all windows as the final SSIM value. The closer it is to 1, the more similar the two images are in structure.
[0164] Through the above embodiments, it can be understood that the existing methods for analyzing oil and gas reservoir pressure data include pressure transient analysis, regression analysis, numerical simulation, etc. However, these methods all have certain limitations. Pressure transient analysis and regression analysis rely on historical data and certain theoretical knowledge, and are more suitable for one-dimensional data analysis; although numerical simulation can adapt to most problems, it is generally better for low-dimensional problems or smaller models. For larger actual models or high-dimensional problems, it usually takes a lot of time and computing resources, and multiple optimizations and real-time predictions are more difficult. The present invention proposes a novel two-dimensional reservoir pressure dynamic prediction method, which can use a given address and production static parameters to predict the pressure evolution dynamics within a period of time, greatly shorten the time, and achieve simple, fast, efficient and accurate predictions, significantly improve the time and economic cost of pressure dynamic prediction, and provide fast, scientific and accurate technical support for analyzing reservoir pressure and development decisions.
[0165] Embodiment 2: The system for predicting the dynamic pressure of coalbed methane reservoir provided by the embodiment of the present invention comprises:
[0166] The sample library solution module is used to set reservoir parameters, build a three-dimensional geological conceptual model, generate a heterogeneous permeability field using the Gaussian covariance model GSTools, and use a numerical simulator to solve the pressure and bottom hole flow pressure over a period of time corresponding to different permeability conceptual models as a sample library;
[0167] Prediction network building module, used to build the prediction network of visual Transformer and ConvLSTM, combining ordinary convolution and Transformer based on axial self-attention as the encoder network, using ordinary convolution to extract global information, using visual Transformer to capture local information, and using ConvLSTM to consider both temporal and spatial information. Incorporate image structural similarity and perceptual similarity loss constraints;
[0168] The network training and correction module is used to set the hyperparameters of the network model, divide the sample library into data sets according to the proportion, use permeability, bottom hole pressure and other parameters as input, and use pressure dynamics as output to train and correct the network under the training set and validation set;
[0169] The network model evaluation module is used to evaluate the performance of the network model using the test set, calculate the MSE error and R 2 Scoring, calculate the image similarity score SSIM and perceptual similarity error LPIPS between the predicted results and the real data.
[0170] To further illustrate the effects of the embodiments of the present invention, the following experiment was conducted.
[0171] The experimental example takes one of the samples in the constructed sample library as an example to illustrate the process of this method.
[0172] In step 1, the parameters required for conceptual model construction are collected, including reservoir initial permeability, initial pressure, porosity, reservoir thickness & density, compressibility, Young's modulus, Poisson's ratio, Langmuir pressure of absorbed strain, Langmuir pressure, Langmuir volume, ratio of desorption pressure to reservoir pressure, and related parameters for calculating the phase permeability curve. The above parameter settings are shown in Table 1.
[0173] Table 1 Conceptual model parameter settings
[0174]
[0175] Considering that factors such as geological structure and rock properties in reality will lead to uncertainty in the effective flow range and boundaries of production wells, a basic numerical conceptual model was established based on Cartesian coordinates. The number of grids in the direction is , , Each grid block in and The dimensions in the direction are 5m and 5m respectively. The directional dimension is set to be the same as the layer thickness. A production well is placed in the center of the grid model, and a local region is randomly generated around the well. The local region represents the actual area that affects the effective flow of the current production well. and The directional lengths vary in the range of [200m, 600m] and [200m, 600m], representing different well spacing lengths and widths. In this area, GSTools (Gaussian covariance model) is used to generate the heterogeneous permeability field. A hydraulic fracture with a length of [20m, 200m] is set in the x direction of the production well. The basic numerical conceptual model is shown in Figure 2. Figure 3 shown.
[0176] A total of 1200 sets of conceptual models were constructed, and the two-dimensional spatiotemporal pressure and flow pressure dynamics of different models for 120 months were calculated using a numerical simulator, with a step length of 12 months, resulting in 10 time steps. The conceptual model parameters were used as input to the network model in the form of a two-dimensional matrix. The input data is The tensor of Indicates the number of input parameters to consider (for tensors, it indicates the number of channels), and are the number of grids (the number of pixels in the image) of the two-dimensional conceptual model, respectively. Figure 2 As shown in the figure, the flow pressure dynamics is used as the intermediate input variable; the two-dimensional pressure dynamics is used as the model prediction target (output), which is a A tensor of , representing the pressure dynamics over 10 time steps (years). The input variables of the model are Figure 4 shown.
[0177] In step 2, the specific process is as follows:
[0178] For step 2.1, the encoder network is as follows Figure 5 . First, the input variable passes through a normal convolution block. The convolution module has a 1×1 convolution layer and a 3×3 convolution layer. While extracting global features, the number of channels is expanded to 32 dimensions, and the image size is halved to obtain a 32×64×64 tensor. The AxialViT module accepts the output from the convolution module and uses the axial attention mechanism on the height dimension and width dimension respectively to extract rich local bidirectional spatial information, obtain a rich feature set, and form a 128×64×64 3D tensor as the pressure feature at time t1. Position-sensitive axial attention is based on the use of attention mechanisms in two directions. It considers the elements calculated by the current attention and the elements at other positions in the surrounding m×m range, calculates the correlation weight, ensures the influence of other positions on the current position, and avoids the loss of high-dimensional image context during the attention calculation process.
[0179] For step 2.2, the ConvLSTM time series prediction network is as follows Figure 6 The network receives the output from the AxialViT encoder (a 3D feature tensor of 128×64×64). In the time series information embedding module, 10 is used as the prediction time step length, and the time (1~10) and the bottom hole pressure corresponding to each time step are used as the time series information. Two channels are added in the form of a two-dimensional matrix to form a 10×130×64×64 tensor. Subsequently, the feature tensor is input into the time series prediction module, and each time step enters the ConvLSTM unit to calculate the input gate , Forget Gate , candidate cells , current cell , output gate , hidden units The state matrix of and express The cell state and hidden state at the moment, which contains and the current cell information, and transmits it to The moment cell unit is used for subsequent calculations. Representative i The prediction results of cell units include The time characteristic information of the moment. The final result of splicing in the time dimension is the predicted pressure dynamic feature set of 10 time steps. Therefore, the ConvLSTM time series prediction network not only uses convolution to process the spatial relationship of two-dimensional data, but also uses the LSTM structure to retain the temporal relationship, and better predicts the spatiotemporal dependency of pressure dynamics.
[0180] For step 2.3, the decoder uses the deconvolution operator to restore the output feature tensor of step 2.2 to a 10×1×128×128 result tensor as the output of the model, specifically the predicted results of the pressure under 10 time steps.
[0181] For step 2.4, the Bayesian optimization algorithm is used to obtain the optimal weights of the three loss terms (MSE, SSIM, LPIPS). Specifically, The value range of is (0,1), the Bayesian optimization algorithm is called, the network model is used as the fitness function, 200 groups of 1200 sample sets are selected as the validation set, and the optimal weight combination is found: 0.3, 0.6, 0.5, which is assigned to the loss function. The value reflects from the side that the network model pays more attention to the similarity and error of the pixel level of the image.
[0182] In step 3, set the hyperparameters of the model. The batch size is 16, the initial learning rate is 4e-4, the optimizer is Adam, the learning rate scheduler uses OneCircle, and the number of training iterations is 400. The learning rate scheduler is used to dynamically adjust the learning rate so that the model converges quickly in the early stage of training, avoids the model from falling into the local optimum or failing to converge, and improves the performance and stability of the model. Set the upper limit of the scheduler to adjust the learning rate to 150% of the initial learning rate and the lower limit to 50%.
[0183] 800 of the 1200 sample sets were selected as training sets (excluding 200 validation sets for loss weight optimization) for model training. The training error was gradient-decreased, the error changes during training were observed, and the model hyperparameters were adjusted.
[0184] In step 4, the remaining 200 groups of samples from the 1200 groups are selected as the test set to test the performance of the model and calculate the MSE relative error between the predicted results and the true pressure value, the LPIPS image perception similarity error, and the R 2 Score, SSIM structural similarity score. The final prediction effect of the model is shown in Table 2.
[0185] Table 2 Network model performance evaluation
[0186]
[0187] The above experimental cases prove that the pressure prediction speed of coalbed methane reservoirs can be effectively improved by the method of the present invention. In the network, a visual Transformer based on axial self-attention and a ConvLSTM structure are combined to consider the spatiotemporal characteristics, and a set of reservoir static parameters are used to predict the spatiotemporal pressure dynamics within a certain period of time. This method has a better effect on processing two-dimensional coalbed methane reservoirs, with faster prediction speed, higher accuracy and better generalization.
[0188] The above cases are not limitations of the present invention. The present invention is not limited to the above samples. The technology can be applied to other two-dimensional problems under the same input and output modes.
[0189] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for predicting coalbed methane reservoir pressure dynamics, characterized in that: Given a set of static geological and development parameters, this method uses the axial visual Transformer and ConvLSTM proxy models to predict the spatiotemporal pressure dynamics of coalbed methane reservoirs. The specific steps include: S1, set reservoir parameters, build a three-dimensional geological conceptual model, use the Gaussian covariance model in the geospatial data processing and statistical modeling tool library to generate a heterogeneous permeability field, and use a numerical simulator to solve the internal pressure and bottom hole flow pressure corresponding to different permeability conceptual models as a sample library; S2, builds a prediction network of visual Transformer and ConvLSTM, combines ordinary convolution and Transformer based on axial self-attention as the encoder network, uses ordinary convolution to extract global information, uses visual Transformer to capture local information, and uses ConvLSTM to consider both temporal and spatial information; incorporates image structural similarity and perceptual similarity loss constraints; S3, setting the hyperparameters of the network model, dividing the sample library into data sets according to the proportion, using permeability and bottom hole pressure as inputs and pressure dynamics as outputs, and training and correcting the network under the training set and validation set; S4, use the test set to evaluate the performance of the network model and calculate the MSE error and R 2 Scoring, calculating the image similarity score SSIM and perceptual similarity error LPIPS between the predicted results and the real data; In step S2, a prediction network of visual Transformer and ConvLSTM is constructed, including: Step 2.1: Construct the encoder network AxialViT, which includes ordinary convolution blocks and axial self-attention blocks based on position-sensitive self-attention mechanism and visual Transformer; Step 2.2: Time series prediction network, including time series information embedding and pressure dynamic prediction. The input of time series information embedding is the output feature map of the encoder network in step 2.
1. The time series features, time at different moments and bottom hole pressure are respectively embedded in the channel expansion method, and the feature map is reorganized into time series data with time length. The ConvLSTM network is used to predict the pressure dynamics at multiple moments; ConvLSTM receives the time series data from the information embedding part, learns the information of each time step respectively, and transmits the time information between different moments, saves the prediction results of each time step, and obtains the prediction result features at multiple moments; Step 2.3: The decoder network decodes the intermediate results of the timing prediction network into the original data space using a deconvolution operation, and the result obtained is the pressure prediction value for multiple time steps; Step 2.4: Improve the loss function of the model, introduce two indicators, image structure similarity and image perception similarity, and constrain the prediction results at the pixel level; use the Bayesian optimization algorithm to find the weights of the three loss terms MSE, SSIM, and LPIPS in the loss function, calculate the overall loss and perform reverse gradient to make the prediction results closer to the real data; In step 2.1, construct the encoder network AxialViT, including: The ordinary convolution block performs convolution calculation on the entire image to capture the overall details of the world. The position-sensitive axial attention mechanism uses attention in the height and width directions of the specified attention area, calculates the influence of the surrounding positions on the current calculation position, extracts spatiotemporal information in different directions, and retains high-dimensional image context information. The calculation formula is: ; In the formula, Indicates location The attention weight value processed by the softmax function; For Region Internal Other related locations, is the local area of attention being calculated, Use position-sensitive attention for different orientations of the image; For location The query matrix of is the transpose of the matrix, ; The input location The key matrix, ; The location To location The position encoding of key and value; For location Until now The query vector of The input location The value matrix, , represents and positions Related information; given an input feature map , are the feature map height and width, is the number of input channels; output It's location The attention weight, , Indicates the number of output channels; is the current attention location.
2. The method for predicting coalbed methane reservoir pressure dynamics according to claim 1, characterized in that: In step S1, reservoir parameters are set to construct a three-dimensional geological conceptual model, including: Step 1.1: Collect and organize geological and development data of coalbed methane, including: permeability, porosity, reservoir thickness and density, saturation, pressure, Poisson's ratio, compressibility, Langmuir pressure, Langmuir volume, ratio of desorption pressure to reservoir pressure, and relative permeability curve; Step 1.2: Establish a basic numerical conceptual model based on Cartesian coordinates, generate a heterogeneous permeability field for the entire basic numerical conceptual model; clear the permeability according to the length and width of the well spacing; and overwrite the heterogeneous permeability with the fracture permeability according to the location information of the hydraulic fracture to obtain the permeability distribution of the conceptual model; Step 1.3: Use a numerical simulator to simulate and calculate the physical property dynamics of different conceptual models to obtain the temporal and spatial pressure dynamics and bottom hole flow pressure data samples.
3. The method for predicting coalbed methane reservoir pressure dynamics according to claim 2, characterized in that: In step 1.2, a basic numerical conceptual model is established based on Cartesian coordinates, including: Combined with the deep learning method, the size of the input data is unified, and different well spacing lengths and well spacing widths are set according to experience. As the actual area of the production well, this area coincides with the center point of the maximum range, and a production well is set at the center point; with the production well as the center, the well spacing length and width are set. A hydraulic fracture is set in the direction; Generate a heterogeneous permeability field for the entire basic numerical conceptual model, including: defining the space size, setting The number of directional grids and grid numbers are consistent with the basic numerical conceptual model; the Gaussian covariance model is defined, and the expression is: ; In the formula, is the lag distance, is the correlation length, To adjust the rescaling factor of the model representation, is the partial scale variance, is the subscale variance, The normalized correlation function defined for the model that depends on the dimensionless distance, is a variogram function, for The variation at Call the SRF class and pass in the Gaussian covariance model to actually generate the spatial random field; execute the generation process, and pass the results through the standardization and cumulative distribution function process to map the values into the specified permeability range.
4. The method for predicting coalbed methane reservoir pressure dynamics according to claim 2, characterized in that: In step 1.3, a numerical simulator is used to simulate and calculate the physical property dynamics of different conceptual models to obtain the temporal and spatial pressure dynamics and bottom hole flow pressure data samples, including: writing the defined basic numerical conceptual model into the numerical simulator file, and setting the simulator parameters including the simulation time step and the number of running cores; calling the gem simulator, loading the model file, and executing the numerical simulation; Among them, numerical simulation includes: Step 1.3.1, calculate the pressure and saturation at each grid node by solving the control equation; Step 1.3.2, updating fluid physical parameters including permeability and viscosity according to the calculated pressure and saturation; Step 1.3.3, push the time to the next time step, and repeat the above process until the specified simulation time is reached; Step 1.3.4, extract the output data including pressure dynamics and bottom hole flowing pressure at different times from the simulation result file.
5. The method for predicting coalbed methane reservoir pressure dynamics according to claim 1, characterized in that: In step 2.2, the ConvLSTM network is used to predict the pressure dynamics at multiple moments, including: ConvLSTM network Input cell status at any time , hidden state , current input features , Carries time information, the expression is: ; In the formula, Forget gate, controls the cell state Information in is the new candidate cell state, To update the door; ConvLSTM's forget gate, input gate, output gate, and new candidate cell states The calculation formulas are: ; In the formula, are the weights of the input gate, forget gate, candidate cell state, output gate and other cell states, are the biases of the input gate, forget gate, candidate cell state and output gate respectively. The symbol * is the convolution operator for two-dimensional data. yes sigmod Activation function, the activation result is The activation result is between between; is the output gate.
6. The method for predicting coalbed methane reservoir pressure dynamics according to claim 1, characterized in that: In step 2.3, the intermediate results of the time series prediction network are decoded into the original data space using a deconvolution operation, including: The intermediate results predicted by the ConvLSTM network include a four-dimensional tensor of time length, number of channels, height, and width. The height and width are smaller than the spatial size of the input data. The output of the ConvLSTM network is a four-dimensional tensor of time length, 1, height, and width. Deconvolution gradually upsamples low-resolution feature maps to high-resolution spatial dimensions by selecting convolution kernel size, stride, and padding. Deconvolution expands the size of the output space by specifying the stride and convolution kernel size. The stride is set to be greater than 2. In the processing of the number of channels, a 1×1 convolution kernel is used to reduce the number of channels to 1 without affecting the size of the restored space. By applying deconvolution operations to the data at each time step, it is decoded and restored to the original data spatial resolution; the size of the deconvolution output tensor is determined by the input size , Stride stride , convolution kernel size ,filling Factors determine; output height It is expressed as: ; In step 2.4, the calculation logic of SSIM is: ; in, Represent the real image and the predicted image respectively; Represent the local means of the two images respectively; Represent the local variance and covariance of the two images respectively; are three constants; The LPIPS calculation logic is as shown in formula (8). The feature map of the layer is and ; ; in, represents the Euclidean distance, i.e. the L2 norm; express The feature map of the layer elements; are the learned weights, reflecting the perceived importance of different layers; The overall loss function is designed as follows: ; In the formula, Indicates the real pressure data, Represents the model prediction results; Represent the weight of each loss item respectively; Indicates the number of regions where the entire image is divided to calculate SSIM; Indicates the number of training samples involved in calculating the MSE loss.
7. The method for predicting coalbed methane reservoir pressure dynamics according to claim 1, characterized in that: In step S4, R 2 The calculation principle is shown in formula (10): ; in, Represents the mean of the true values.
8. A system for predicting coalbed methane reservoir pressure dynamics, characterized in that: The system is implemented by the method for predicting coalbed methane reservoir pressure dynamics according to any one of claims 1 to 7, and the system comprises: The sample library solution module is used to set reservoir parameters, build a three-dimensional geological conceptual model, generate a heterogeneous permeability field using the Gaussian covariance model in the geospatial data processing and statistical modeling tool library, and use a numerical simulator to solve the internal pressure and bottom hole flow pressure corresponding to different permeability conceptual models as a sample library; Prediction network building module, used to build the prediction network of visual Transformer and ConvLSTM, combining ordinary convolution and Transformer based on axial self-attention as the encoder network, using ordinary convolution to extract global information, using visual Transformer to capture local information, and using ConvLSTM to consider both temporal and spatial information; incorporating image structural similarity and perceptual similarity loss constraints; The network training and correction module is used to set the hyperparameters of the network model, divide the sample library into data sets according to the proportion, use permeability and bottom hole flow pressure as input, and pressure dynamics as output, and train and correct the network under the training set and validation set; The network model evaluation module is used to evaluate the performance of the network model using the test set, calculate the MSE error and R 2 Scoring, calculate the image similarity score SSIM and perceptual similarity error LPIPS between the predicted results and the real data.
Citation Information
Patent Citations
Historical fitting prediction method based on time and space double dimensions
CN114462262A
Three-dimensional underground reservoir dynamic prediction method based on convolutional Fourier neural network
CN114693005A