Oil and gas reservoir simulation method and device, storage medium and equipment
Patent Information
- Application Number
- CN202510076740.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-15
AI Technical Summary
When traditional oil and gas reservoir simulation technology faces large development blocks and complex mining conditions, the calculation is expensive, making it difficult to ensure the optimality and real-timeness of the solution. The generality and generalization of the deep learning model are insufficient, making it difficult to generalize to different blocks.
The deep learning model of the fully convolutional encoder-decoder structure combined with the transformer structure is used to build a general simulation model of oil and gas reservoirs. By building data sets, training models and fine-tuning, the prediction problem of oil and gas reservoir production dynamics of different sizes and numbers is solved.
It improves the accuracy and scope of application of deep learning models, enhances the generalization and generalization of the model, reduces the modeling work of new blocks, and solves multiple problems such as well control optimization analysis and historical fitting analysis.
Smart Images

Figure CN119830762A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil and gas field development, and in particular to an oil and gas reservoir simulation method, device, storage medium and equipment. Background Art
[0002] In the field of oil and gas drilling and production, reservoir simulation technology is the basis for evaluating the potential of oil and gas reservoirs and formulating development plans. It is the core link of oil and gas reservoir development, and it is also the most complex and difficult link. Traditional oil and gas simulation is mainly based on seepage mechanics and reservoir physics, and studies the migration laws and displacement mechanisms of oil, gas and water in the process of oil and gas development. When the development block is large and the mining conditions are complex, a large number of grid blocks are needed to capture the comprehensive information of the reservoir model (such as porosity, permeability, pressure distribution and saturation distribution, etc.). A large number of grid blocks are associated with a large number of mass balance equations that need to be solved simultaneously, which increases the calculation time required to solve these equations and brings huge calculation costs. When faced with tasks such as optimization and uncertainty quantification that require running thousands of simulations, the high calculation cost often cannot guarantee the optimality and real-time performance of the solution, which seriously hinders the development of intelligent construction of oil and gas fields.
[0003] With the development of artificial intelligence technology, artificial intelligence technology has begun to be applied to oil and gas development. Although there are many deep learning-based alternative models to simulate the production dynamics of oil and gas reservoirs, they are basically built for a specific block, which makes it difficult to generalize the model trained in this block to similar blocks. In addition, the functions of the alternative models are relatively simple, and often one model needs to be built for production optimization and another model needs to be built for history matching. Therefore, the versatility and generalization of the model are not enough. Summary of the invention
[0004] In order to address the defects of the prior art, the present invention provides an oil and gas reservoir simulation method, device, storage medium and equipment, which solve the problem of predicting the production dynamics of oil and gas reservoirs of different sizes and numbers, and improve the accuracy and scope of application of the deep learning model.
[0005] The present invention provides the following technical solutions:
[0006] In a first aspect, the present invention provides an oil and gas reservoir simulation method, the method comprising:
[0007] S1: Construct dataset;
[0008] The data set includes parameter data of all wells in the target block, the parameter data includes all attribute types of the original data file of the target block, and the target block includes at least one actual oil and gas reservoir block;
[0009] S2: Build a deep learning model;
[0010] The deep learning model includes an encoder, a converter and a decoder which are arranged in sequence. The encoder is a fully convolutional network, the converter includes a transformer structure, and the decoder includes convolution and deconvolution operations. The input data first passes through the encoder to extract features, then passes through the converter to evolve time, and finally reconstructs the dynamic field changes and well response changes through the decoder.
[0011] S3: training the constructed deep learning model through the data set, and iteratively updating the parameters to obtain the optimal model parameters;
[0012] S4: Obtain the parameter data to be predicted and input it into the trained deep learning model to obtain the oil and gas reservoir simulation results.
[0013] Furthermore, the S1 includes:
[0014] S11: Based on the original data file of the target block, randomly perturb the well control conditions and permeability information to generate multiple calculation examples with different attributes;
[0015] S12: Use simulation software to simulate each case and extract the oil and water production of the well;
[0016] S13: normalizing the simulated data to obtain the data set, and dividing the data set into a training set and a test set in a ratio of 8:2.
[0017] Furthermore, the input data of the encoder includes any attribute type of the original data file, and the input data is divided into static parameters and field dynamic parameters. The static parameters and field dynamic parameters are input into the same encoder for feature extraction. The static parameter features and field dynamic parameter features obtained after extraction are merged by splicing, and the convolution kernel is used to fuse the features. The fused features are subjected to global average pooling to remove the spatial information of the features, so as to obtain the output features of the encoder.
[0018] Furthermore, in the converter, the well control conditions are first used as input to perform dimension-upgrading processing on the well features; then, the dimension-upgrading features obtained by the dimension-upgrading processing are fused with the output features of the encoder and input into the transformer structure, and the time is evolved. In the encoder stage of the transformer structure, a masked attention mechanism is used to extract features, and finally a series of features at different times are obtained;
[0019] Among them, the well control conditions are represented by a two-dimensional tensor in the form of [number of wells, well control value], and the one-dimensional convolution kernel is used to expand the features of the wells, and the global average pooling method is used to convert the well control conditions into the corresponding one-dimensional vector form.
[0020] Furthermore, the decoder obtains corresponding well response changes according to a series of features output by the converter at different times, and obtains corresponding dynamic field changes according to the fused features output by the encoder.
[0021] Furthermore, the overall loss function E used by the deep learning model during training is AT Including dynamic field loss and well response loss , the overall loss function E AT The expression is as follows:
[0022]
[0023]
[0024]
[0025] in, represents the dynamic field loss at time t, s represents the dynamic field of different attributes, represents the well response loss at time t, p represents the well response of different attributes, α and β represent the set weight coefficients; n b Represents the total number of grids, j is the counting variable of the number of grids, n t represents the total time, N represents the total number of examples, i is the counting variable of the number of examples, and They represent the actual value and estimated value of the j-th grid of the dynamic field s at time t, respectively. and They represent the actual value and estimated value of the well response p at the jth grid at time t respectively.
[0026] Furthermore, the method further comprises:
[0027] S5: For any new block other than the target block, fine-tune using a small amount of parameter data of the new block based on the trained deep learning model.
[0028] In a second aspect, the present invention provides an oil and gas reservoir simulation device, the device comprising:
[0029] Data preparation module, used to build datasets;
[0030] The data set includes parameter data of all wells in the target block, the parameter data includes all attribute types of the original data file of the target block, and the target block includes at least one actual oil and gas reservoir block;
[0031] Model building module, used to build deep learning models;
[0032] The deep learning model includes an encoder, a converter and a decoder which are arranged in sequence. The encoder is a fully convolutional network, the converter includes a transformer structure, and the decoder includes convolution and deconvolution operations. The input data first passes through the encoder to extract features, then passes through the converter to evolve time, and finally reconstructs the dynamic field changes and well response changes through the decoder.
[0033] A model training module is used to train the constructed deep learning model through the data set and iteratively update the parameters to obtain the optimal model parameters;
[0034] The simulation module is used to obtain the parameter data to be predicted and input it into the trained deep learning model to obtain the oil and gas reservoir simulation results.
[0035] Furthermore, the data preparation module includes:
[0036] A calculation example generating unit, used for randomly disturbing well control conditions and permeability information based on the original data file of the target block to generate a plurality of calculation examples with different attributes;
[0037] The case simulation unit is used to simulate each case using simulation software and extract the oil and water production of the well;
[0038] The data set construction unit is used to normalize the simulated data to obtain the data set, and divide the data set into a training set and a test set in a ratio of 8:2.
[0039] Furthermore, the input data of the encoder includes any attribute type of the original data file, and the input data is divided into static parameters and field dynamic parameters. The static parameters and field dynamic parameters are input into the same encoder for feature extraction. The static parameter features and field dynamic parameter features obtained after extraction are merged by splicing, and the convolution kernel is used to fuse the features. The fused features are subjected to global average pooling to remove the spatial information of the features, so as to obtain the output features of the encoder.
[0040] Furthermore, in the converter, the well control conditions are first used as input to perform dimension-upgrading processing on the well features; then, the dimension-upgrading features obtained by the dimension-upgrading processing are fused with the output features of the encoder and input into the transformer structure, and the time is evolved. In the encoder stage of the transformer structure, a masked attention mechanism is used to extract features, and finally a series of features at different times are obtained;
[0041] Among them, the well control conditions are represented by a two-dimensional tensor in the form of [number of wells, well control value], and the one-dimensional convolution kernel is used to expand the features of the wells, and the global average pooling method is used to convert the well control conditions into the corresponding one-dimensional vector form.
[0042] Furthermore, the decoder obtains corresponding well response changes according to a series of features output by the converter at different times, and obtains corresponding dynamic field changes according to the fused features output by the encoder.
[0043] Furthermore, the overall loss function E used by the deep learning model during training is AT Including dynamic field loss and well response loss , the overall loss function E AT The expression is as follows:
[0044]
[0045]
[0046]
[0047] in, represents the dynamic field loss at time t, s represents the dynamic field of different attributes, represents the well response loss at time t, p represents the well response of different attributes, α and β represent the set weight coefficients; n b Represents the total number of grids, j is the counting variable of the number of grids, n t represents the total time, N represents the total number of examples, i is the counting variable of the number of examples, and They represent the actual value and estimated value of the j-th grid of the dynamic field s at time t, respectively. and They represent the actual value and estimated value of the well response p at the jth grid at time t respectively.
[0048] Furthermore, the device also includes:
[0049] The fine-tuning module is used to fine-tune any new block other than the target block based on the trained deep learning model using a small amount of parameter data of the new block.
[0050] In a third aspect, the present invention provides a computer-readable storage medium for oil and gas reservoir simulation, comprising a memory for storing processor-executable instructions, wherein the instructions, when executed by the processor, implement the steps of the oil and gas reservoir simulation method described in the first aspect.
[0051] In a fourth aspect, the present invention provides a device for oil and gas reservoir simulation, characterized in that it comprises at least one processor and a memory storing computer executable instructions, and when the processor executes the instructions, the steps of the oil and gas reservoir simulation method described in the first aspect are implemented.
[0052] The present invention has the following beneficial effects:
[0053] The present invention adopts a fully convolutional encoder-decoder structure and a converter combined with a transformer structure to construct a general simulation model of oil and gas reservoirs with stronger generalization ability, that is, the deep learning model described in the present invention, which solves the prediction problem of production dynamics of oil and gas reservoirs of different sizes and numbers; taking all attributes in the data file as input, while considering the changing dynamic field, it also considers other static information such as the location and perforation of the well, and can simulate the dynamic changes of oil and gas reservoir production under different well controls and different permeabilities, thereby well solving the simulation problems between different functions and different blocks, improving the scope of application of the deep learning model, having better generalization and better promotion, and thus can greatly reduce the modeling work of new areas. And the present invention breaks the problem of single function of the alternative model, and uses the model to solve multiple problems such as well control optimization analysis and historical matching analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a flow chart of the oil and gas reservoir simulation method of the present invention;
[0055] Figure 2 A schematic diagram of the permeability in the X direction and the well location distribution of a target block example;
[0056] Figure 3 A schematic diagram of a deep learning model used in the present invention;
[0057] Figure 4 An example diagram of the relative error of pressure and saturation changing with time;
[0058] Figure 5 An example diagram of the relative error distribution of oil, gas and water production;
[0059] Figure 6It is a schematic diagram of the oil and gas reservoir simulation device of the present invention. DETAILED DESCRIPTION
[0060] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.
[0061] The embodiment of the present invention provides a method for simulating an oil and gas reservoir. Figure 1 As shown, the method includes:
[0062] S1: Build the dataset.
[0063] The constructed data set includes parameter data of all wells in the target block, and the parameter data includes all attribute types of the original data file of the target block.
[0064] The target block can be an actual oil and gas reservoir block or multiple oil and gas reservoir blocks of different sizes. This allows the deep learning model to be trained simultaneously with oil and gas reservoir data of multiple blocks and sizes during the training process. The high generalization training method of training multiple blocks and multiple attributes together can better improve the accuracy of the model.
[0065] The specific implementation of the present invention is described based on a model block containing a grid size of 57*72*47. The block contains 68 production wells and 23 injection wells. The specific working conditions are shown in Figure 2 , Figure 2 The permeability and well location distribution in the X direction of this example are given. In this problem, the well control condition of the injection well is the water injection rate, and the well control condition of the production well is the fixed oil production. Next, based on this example, the present invention is described in detail.
[0066] In one example, the implementation of this step includes:
[0067] S11: Based on the original data file of the target block, randomly perturb the well control conditions, permeability and other information to generate multiple examples with different attributes.
[0068] S12: Use simulation software such as simba to simulate each case and extract the oil and water production of the well.
[0069] S13: Normalize the simulated data to obtain a data set, and divide it into a training set and a test set in a ratio of 8:2.
[0070] S2: Build a deep learning model.
[0071] The structure of the deep learning model of the present invention is as follows Figure 3 As shown, it includes an encoder, a converter and a decoder arranged in sequence. The input data first passes through the encoder to extract features, then passes through the converter to evolve time, and finally reconstructs the dynamic field changes and well response changes through the decoder.
[0072] The main function of the encoder is to reduce the dimension of the data and extract features. The encoder is a fully convolutional network. Through a series of convolution operations, it reduces the resolution of the input size information and improves the spatial expression ability of the data. The encoder module can design any number of convolution blocks according to requirements. In this example, 6 convolution layers are used, and the stride of each convolution layer is 2, and the padding method is the same.
[0073] The deep learning model of the present invention has a certain general generalization ability and can include any attribute information in the data file. The input data of the encoder includes any attribute type of the original data file. Therefore, the present invention divides the input data into two parts: static parameters and field dynamic parameters. The field dynamic parameters are dynamic information with clear field attributes in the oil and gas reservoir production process (such as pressure, saturation and permeability, etc.), and the static parameters are static information such as phase permeability curves, perforations, and well locations.
[0074] In order to reduce the parameters of the model, the present invention adopts a sharing mechanism and uses the same encoder to extract features from the data. The static parameters and field dynamic parameters are input into the same encoder for feature extraction. The extracted static parameter features and field dynamic parameter features are merged by splicing, and a 1x1x1 convolution kernel is used to fuse the features. The fused features are subsequently placed in the decoder to restore the information of the pressure field and saturation field. The fused features are then subjected to global average pooling to remove the spatial information of the features, and the output feature Z of the encoder is obtained. t , used as the input of the subsequent converter. Through global average pooling and full convolution operations, the grid size and well number restrictions are broken.
[0075] The converter includes a transformer structure. The main function of the converter is to convert the well control conditions and the encoder's final output feature Z tThey are then fed together to the transformer structure to learn the changes in the hidden features of the well under the influence of the well control conditions.
[0076] In the converter, the well control conditions are first used as input to perform dimension-upgrading on the well features. Then, the dimension-upgrading features obtained by the dimension-upgrading process are compared with the output features Z of the encoder. t After fusion, the data is input into the transformer structure to evolve over time. In the transformer structure, in order to avoid the impact of future well control on current features and make the entire evolution process more in line with physical laws, the mask attention mechanism is used for feature extraction in the encoder stage of the transformer structure, solving the problem that in actual physical processes, unoccurred conditions affect what has happened. After calculation by the transformer structure, a series of features at different times are obtained. .
[0077] In the converter structure, in order to solve the problem that full connection cannot be used due to different numbers of wells, the present invention converts the well control conditions into a two-dimensional tensor representation in the form of [number of wells, well control value], and uses a one-dimensional convolution kernel to expand the features of the wells, and uses global average pooling to convert the well control conditions into a corresponding one-dimensional vector representation.
[0078] The decoder is used to generate a series of features at different times according to the output of the converter The corresponding well response change (such as the corresponding production information, etc.) is obtained, and the corresponding dynamic field change is obtained according to the fused features output by the encoder (the features are up-sampled information).
[0079] The entire structure of the decoder is based on convolution and deconvolution. In the field recovery stage, the new features containing spatial information (i.e., the fused features output by the encoder) are used to recover the spatial information. Figure 3 The green box in the figure is used as a reference and fused in the first layer of the field recovery structure to improve the accuracy of field recovery. In the deconvolution operation, a deconvolution kernel suitable for upsampling information is constructed based on the depthwise separable convolution. This operation can greatly reduce the model's intermediate layer output and model parameters, and reduce the model's consumption of video memory.
[0080] S3: Train the constructed deep learning model through the data set and iteratively update the parameters to obtain the optimal model parameters.
[0081] Exemplarily, the ADAM optimizer can be used in training, the initial learning rate is 0.0001, the number of epochs is 100, and the deep learning model is trained and saved.
[0082] In order to better adjust the importance of each part of the output, the overall loss function E used by the deep learning model of the present invention during the training process is AT Dynamic Field Loss and well response loss Two parts. Overall loss function E AT The expression is as follows:
[0083]
[0084]
[0085]
[0086] in, It represents the dynamic field loss at time t, and s represents the dynamic fields with different attributes (such as pressure field and saturation field, different s values represent dynamic fields with different attributes). represents the well response loss at time t, and p represents the well response with different attributes (e.g., oil production, gas production, water production, etc., different The values represent the well responses of different attributes). α and β represent the weight coefficients set according to the actual situation. In this example, they are 2 and 5 respectively. b Represents the total number of grids, j is the counting variable of the number of grids, n t represents the total time, N represents the total number of examples, i is the counting variable of the number of examples, and They represent the actual value and estimated value of the j-th grid of the dynamic field s at time t, respectively. and They represent the actual value and estimated value of the well response p at the jth grid at time t respectively.
[0087] Figure 4 An example of the relative error of pressure and saturation changing with time is given. Figure 5 An example of the relative error distribution of oil, gas and water production is given.
[0088] S4: Obtain the parameter data to be predicted and input it into the trained deep learning model to obtain the oil and gas reservoir simulation results.
[0089] After the deep learning model is trained, it is saved as the corresponding model file. During use, the model file is first loaded, and then the pressure and saturation of the oil and gas reservoir and other prediction parameter data are taken as input together with the well control conditions. The distribution of pressure and saturation at the next moment is calculated through the deep learning model, and then the relevant information of the well is calculated to obtain the oil and gas reservoir simulation results.
[0090] As an improvement of the embodiment of the present invention, the oil and gas reservoir simulation method further includes:
[0091] S5: For any new block other than the target block, fine-tune the model based on the trained deep learning model using a small amount of parameter data of the new block.
[0092] Since the deep learning model of the present invention can be applied to wells of any size and any number, the trained deep learning model can be used as a base for any new block, and then fine-tuned with a small amount of data. This can greatly reduce the cost of building a replacement model for a new block.
[0093] The present invention adopts a fully convolutional encoder-decoder structure and a converter combined with a transformer structure to construct a general simulation model of oil and gas reservoirs with stronger generalization ability, that is, the deep learning model described in the present invention, which solves the prediction problem of production dynamics of oil and gas reservoirs of different sizes and numbers; taking all attributes in the data file as input, while considering the changing dynamic field, it also considers other static information such as the location and perforation of the well, and can simulate the dynamic changes of oil and gas reservoir production under different well controls and different permeabilities, thereby well solving the simulation problems between different functions and different blocks, improving the scope of application of the deep learning model, having better generalization and better promotion, and thus can greatly reduce the modeling work of new areas. And the present invention breaks the problem of single function of the alternative model, and uses the model to solve multiple problems such as well control optimization analysis and historical matching analysis.
[0094] Compared with the technical solutions of the prior art, the present invention can achieve better accuracy and speed. Based on the simulation results of the full physical model, the accuracy of the model of the present invention was compared. Through comparison, it was found that the maximum relative error of the pressure of the model proposed by the present invention does not exceed 0.20%, and the maximum relative error of the saturation does not exceed 0.35%. In terms of well response, the error of all production of the wells obtained by the model does not exceed 6.0%.
[0095] The embodiment of the present invention also provides an oil and gas reservoir simulation device, such as Figure 6 As shown, the device comprises:
[0096] Data preparation module 1 is used to construct the dataset.
[0097] The data set includes parameter data of all wells in the target block, the parameter data includes all attribute types of the original data file of the target block, and the target block includes at least one actual oil and gas reservoir block.
[0098] Model building module 2 is used to build a deep learning model.
[0099] Among them, the deep learning model includes an encoder, a converter and a decoder which are arranged in sequence. The encoder is a fully convolutional network, the converter includes a transformer structure, and the decoder includes convolution and deconvolution operations. The input data first passes through the encoder to extract features, then passes through the converter to evolve over time, and finally reconstructs the dynamic field changes and well response changes through the decoder.
[0100] The model training module 3 is used to train the constructed deep learning model through the data set and iteratively update the parameters to obtain the optimal model parameters.
[0101] The simulation module 4 is used to obtain the parameter data to be predicted and input it into the trained deep learning model to obtain the oil and gas reservoir simulation results.
[0102] As an example, the aforementioned data preparation module includes:
[0103] The calculation example generation unit is used to randomly perturb the well control conditions and permeability information based on the original data file of the target block to generate multiple calculation examples with different attributes.
[0104] The case simulation unit is used to simulate each case using simulation software and extract the oil and water production of the well.
[0105] The data set construction unit is used to normalize the simulated data to obtain a data set, and divide it into a training set and a test set in a ratio of 8:2.
[0106] Specifically, the input data of the encoder contains any attribute type of the original data file. The input data is divided into static parameters and field dynamic parameters. The static parameters and field dynamic parameters are input into the same encoder for feature extraction. The static parameter features and field dynamic parameter features obtained after extraction are merged by splicing, and the convolution kernel is used to fuse the features. The fused features use the global average pooling method to remove the spatial information of the features to obtain the output features of the encoder.
[0107] In the converter, the well control conditions are first used as input to perform dimensionality-upgrading on the features of the wells. Then, the dimensionality-upgraded features obtained by the dimensionality-upgrading process are fused with the output features of the encoder and input into the transformer structure to evolve over time. In the encoder stage of the transformer structure, a masked attention mechanism is used to extract features, and finally a series of features at different times are obtained.
[0108] Among them, the well control conditions are represented by a two-dimensional tensor in the form of [number of wells, well control value], and the one-dimensional convolution kernel is used to expand the features of the wells, and the global average pooling method is used to convert the well control conditions into the corresponding one-dimensional vector form.
[0109] The decoder obtains the corresponding well response changes based on a series of features output by the converter at different times, and obtains the corresponding dynamic field changes based on the fused features output by the encoder.
[0110] The overall loss function E used by the deep learning model of the present invention during the training process is AT Including dynamic field loss and well response loss , the overall loss function E AT The expression is as follows:
[0111]
[0112]
[0113]
[0114] in, represents the dynamic field loss at time t, s represents the dynamic field of different attributes, represents the well response loss at time t, p represents the well response of different attributes, α and β represent the set weight coefficients; n b Represents the total number of grids, j is the counting variable of the number of grids, n t represents the total time, N represents the total number of examples, i is the counting variable of the number of examples, and They represent the actual value and estimated value of the j-th grid of the dynamic field s at time t, respectively. and They represent the actual value and estimated value of the well response p at the jth grid at time t respectively.
[0115] As an improvement of the embodiment of the present invention, the device further includes:
[0116] The fine-tuning module is used to fine-tune any new block other than the target block based on the trained deep learning model using a small amount of parameter data of the new block.
[0117] The present invention adopts a fully convolutional encoder-decoder structure and a converter combined with a transformer structure to construct a general simulation model of oil and gas reservoirs with stronger generalization ability, that is, the deep learning model described in the present invention, which solves the prediction problem of production dynamics of oil and gas reservoirs of different sizes and numbers; taking all attributes in the data file as input, while considering the changing dynamic field, it also considers other static information such as the location and perforation of the well, and can simulate the dynamic changes of oil and gas reservoir production under different well controls and different permeabilities, thereby well solving the simulation problems between different functions and different blocks, improving the scope of application of the deep learning model, having better generalization and better promotion, and thus can greatly reduce the modeling work of new areas. And the present invention breaks the problem of single function of the alternative model, and uses the model to solve multiple problems such as well control optimization analysis and historical matching analysis.
[0118] The device provided in the above embodiment, its implementation principle and the technical effect produced correspond to the embodiment of the above method one by one. For the sake of brief description, the part not mentioned in the embodiment of the device can refer to the corresponding content in the embodiment of the above method. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the modules and units described in the device can refer to the corresponding process in the embodiment of the above method, and will not be repeated here.
[0119] The oil and gas reservoir simulation method described in the above embodiment provided by the present invention can realize the business logic through a computer program and record it on a storage medium, and the storage medium can be read and executed by a computer to achieve the effect of the scheme described in the method embodiment of this specification. Therefore, the embodiment of the present invention also provides a computer-readable storage medium for oil and gas reservoir simulation, including a memory for storing processor-executable instructions, and when the instructions are executed by the processor, the steps of the oil and gas reservoir simulation method including the above embodiment are implemented.
[0120] The storage medium may include a physical device for storing information, which is usually a medium that digitizes the information and then stores it in an electrical, magnetic or optical manner. The storage medium may include: a device that stores information in an electrical energy manner, such as various memories, such as RAM, ROM, etc.; a device that stores information in a magnetic energy manner, such as a hard disk, a floppy disk, a magnetic tape, a magnetic core memory, a magnetic bubble memory, a USB flash drive; a device that stores information in an optical manner, such as a CD or a DVD. Of course, there are other readable storage media, such as quantum memory, graphene memory, etc.
[0121] The storage medium described above may also include other implementation methods according to the description of the method embodiment. The implementation principle and technical effects produced by this embodiment are the same as those of the aforementioned method embodiment. For details, please refer to the description of the relevant method embodiment, and no further description will be given here.
[0122] The embodiment of the present invention also provides a device for oil and gas reservoir simulation, which may be a separate computer, or may include an actual operating device using one or more of the methods or one or more of the embodiments of this specification. The oil and gas reservoir simulation device may include at least one processor and a memory storing computer executable instructions, and when the processor executes the instructions, any one or more steps of the oil and gas reservoir simulation method are implemented.
[0123] The device described above may also include other implementation methods according to the description of the method embodiment. The implementation principle and technical effects produced by this embodiment are the same as those of the aforementioned method embodiment. For details, please refer to the description of the relevant method embodiment, and no further description will be given here.
[0124] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. They should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for simulating an oil and gas reservoir, characterized in that: The method comprises: S1: Construct dataset; The data set includes parameter data of all wells in the target block, the parameter data includes all attribute types of the original data file of the target block, and the target block includes at least one actual oil and gas reservoir block; S2: Build a deep learning model; The deep learning model includes an encoder, a converter and a decoder which are arranged in sequence. The encoder is a fully convolutional network, the converter includes a transformer structure, and the decoder includes convolution and deconvolution operations. The input data first passes through the encoder to extract features, then passes through the converter to evolve time, and finally reconstructs the dynamic field changes and well response changes through the decoder. S3: training the constructed deep learning model using the data set, and iteratively updating parameters to obtain optimal model parameters; S4: Obtain the parameter data to be predicted and input it into the trained deep learning model to obtain the oil and gas reservoir simulation results.
2. The oil and gas reservoir simulation method according to claim 1, characterized in that: The S1 includes: S11: Based on the original data file of the target block, randomly perturb the well control conditions and permeability information to generate multiple calculation examples with different attributes; S12: Use simulation software to simulate each case and extract the oil and water production of the well; S13: normalizing the simulated data to obtain the data set, and dividing the data set into a training set and a test set in a ratio of 8:
2.
3. The oil and gas reservoir simulation method according to claim 2, characterized in that: The input data of the encoder includes any attribute type of the original data file, and the input data is divided into static parameters and field dynamic parameters. The static parameters and field dynamic parameters are input into the same encoder for feature extraction. The static parameter features and field dynamic parameter features obtained after extraction are merged by splicing, and the convolution kernel is used to fuse the features. The fused features are subjected to global average pooling to remove the spatial information of the features, so as to obtain the output features of the encoder.
4. The oil and gas reservoir simulation method according to claim 3, characterized in that: In the converter, the well control conditions are first used as input to perform dimension-upgrading processing on the well features; then, the dimension-upgrading features obtained by the dimension-upgrading processing are fused with the output features of the encoder and input into the transformer structure, and the time is evolved. In the encoder stage of the transformer structure, a masked attention mechanism is used to extract features, and finally a series of features at different times are obtained; Among them, the well control conditions are represented by a two-dimensional tensor in the form of [number of wells, well control value], and the one-dimensional convolution kernel is used to expand the features of the wells, and the global average pooling method is used to convert the well control conditions into the corresponding one-dimensional vector form.
5. The oil and gas reservoir simulation method according to claim 4, characterized in that: The decoder obtains the corresponding well response change according to a series of features at different moments output by the converter, and obtains the corresponding dynamic field change according to the fused features output by the encoder.
6. The oil and gas reservoir simulation method according to claim 5, characterized in that: The overall loss function E used by the deep learning model during training AT Including dynamic field loss and well response loss , the overall loss function E AT The expression is as follows: in, represents the dynamic field loss at time t, s represents the dynamic field of different attributes, represents the well response loss at time t, p represents the well response of different attributes, α and β represent the set weight coefficients; n b Represents the total number of grids, j is the counting variable of the number of grids, n t represents the total time, N represents the total number of examples, i is the counting variable of the number of examples, and They represent the actual value and estimated value of the j-th grid of the dynamic field s at time t, respectively. and They represent the actual value and estimated value of the well response p at the jth grid at time t respectively.
7. The oil and gas reservoir simulation method according to claim 6, characterized in that: The method further comprises: S5: For any new block other than the target block, fine-tune using a small amount of parameter data of the new block based on the trained deep learning model.
8. An oil and gas reservoir simulation device, characterized in that: The device comprises: Data preparation module, used to build data sets; The data set includes parameter data of all wells in the target block, the parameter data includes all attribute types of the original data file of the target block, and the target block includes at least one actual oil and gas reservoir block; Model building module, used to build deep learning models; The deep learning model includes an encoder, a converter and a decoder which are arranged in sequence. The encoder is a fully convolutional network, the converter includes a transformer structure, and the decoder includes convolution and deconvolution operations. The input data first passes through the encoder to extract features, then passes through the converter to evolve time, and finally reconstructs the dynamic field changes and well response changes through the decoder. A model training module is used to train the constructed deep learning model through the data set and iteratively update the parameters to obtain the optimal model parameters; The simulation module is used to obtain the parameter data to be predicted and input it into the trained deep learning model to obtain the oil and gas reservoir simulation results.
9. A computer-readable storage medium for oil and gas reservoir simulation, characterized in that: It comprises a memory for storing processor executable instructions, and when the instructions are executed by the processor, the steps of the oil and gas reservoir simulation method according to any one of claims 1-7 are implemented.
10. A device for oil and gas reservoir simulation, characterized in that: The method comprises at least one processor and a memory storing computer executable instructions, wherein when the processor executes the instructions, the steps of the oil and gas reservoir simulation method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Method and device for characterizing dynamic flow unit of oil and gas reservoir
CN121352264A
Method and device for characterizing dynamic flow units of a hydrocarbon reservoir
CN121352264B