Deep learning assisted multiphase multicomponent numerical simulation method and apparatus
By employing a deep learning-assisted multiphase and multicomponent numerical simulation method, combined with a DL component solver, a phase stability classification model, and a flash evaporation calculation regression model, the computational efficiency and stability issues of traditional reservoir numerical simulation methods in complex phase behavior scenarios are resolved. This achieves high-precision and high-efficiency oil and gas reservoir simulation, applicable to deep, unconventional oil and gas reservoirs and the CCUS industry.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNIV OF GEOSCIENCES (BEIJING)
- Filing Date
- 2026-04-24
- Publication Date
- 2026-07-07
AI Technical Summary
Existing reservoir numerical simulation methods present a trade-off between computational accuracy, numerical stability, and computational efficiency. In particular, they struggle to meet the demands for high accuracy, high stability, and high efficiency in complex facies scenarios, making them unsuitable for applications in deep, unconventional oil and gas reservoirs and the CCUS industry.
A deep learning-assisted multiphase and multicomponent numerical simulation method is adopted. By coupling a DL component solver with a pre-trained phase stability classification model and a flash calculation regression model, a deep neural network is used to perform phase stability testing and flash calculation, replacing the traditional iterative solution, and achieving high precision, high stability and high computational efficiency.
It achieves high-precision, high-stability, and high-efficiency numerical simulation in complex phase behavior scenarios, and can be seamlessly adapted to existing industrial simulators, providing a high-quality data foundation for oil and gas development and the CCUS industry.
Smart Images

Figure CN122088320B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of oil and gas reservoir engineering technology, and in particular to a deep learning-assisted multiphase and multicomponent numerical simulation method and apparatus. Background Technology
[0002] Reservoir numerical simulation is a core tool for optimizing oil and gas resource development schemes, making dynamic predictions, and designing enhanced oil recovery. Two main technical approaches have emerged in the industry: one is the black oil model, which uses PVT (Production Verification Test) parameter lookup tables to replace complex phase equilibrium calculations. While computationally efficient, this model oversimplifies fluid phase behavior, assuming that oil and gas components do not change with temperature and pressure conditions. It is only suitable for depletion-driven development of medium-light conventional reservoirs and is completely unsuitable for scenarios with strong phase behavior, such as CO2 gas drive, condensate gas reservoir development, and deep supercritical oil and gas development. The other approach is the component model, which describes the phase equilibrium behavior of multi-component fluids based on cubic equations of state (Eos). It can accurately capture fluid phase changes and component transport patterns under different temperatures, pressures, and development stages, and is currently the only available technical solution for development scenarios with strong phase behavior.
[0003] As global oil and gas development extends to deeper and unconventional reservoirs, and with the rapid development of the CCUS (Carbon Capture, Utilization and Storage) industry, the application scenarios of composition models continue to expand, and the industry is placing higher demands on the accuracy, efficiency, and stability of composition simulations. However, composition models face a long-standing technical bottleneck recognized by the industry: phase equilibrium calculation (including phase stability testing and flash evaporation calculation) is the core computational module of composition models. During the simulation, iterative phase equilibrium calculations need to be repeatedly executed at each time step and for each active grid, and the computational cost of this module accounts for more than 70% of the overall simulation time.
[0004] Existing technologies have consistently failed to overcome the industry contradiction of "the incompatibility between computational accuracy, numerical stability, and computational efficiency." There is an urgent need to develop a multiphase and multicomponent numerical simulation scheme that combines high accuracy, high stability, and high computational efficiency, and can be seamlessly adapted to existing industrial simulators, so as to provide a high-quality data foundation for oil and gas development and the CCUS industry. Summary of the Invention
[0005] This invention provides a deep learning-assisted multiphase and multicomponent numerical simulation method to offer a multiphase and multicomponent numerical simulation scheme that combines high accuracy, high stability, and high computational efficiency, and seamlessly adapts to existing industrial simulators. This provides a high-quality data foundation for oil and gas development and the CCUS industry. The method includes:
[0006] The DL (Deep Learning) component solver is invoked to obtain real-time fluid state data for each reservoir grid cell; the DL component solver is coupled with the pre-trained phase stability classification model and the pre-trained flash evaporation calculation regression model through a unified data interface;
[0007] Real-time fluid state data is input into the phase stability classification model, and the classification results are output. The classification results indicate whether each reservoir grid unit is a single phase or a two-phase phase. The phase stability classification model is obtained by training the classification model using a training set. The training set includes historical fluid state data and historical phase equilibrium parameter data.
[0008] The real-time fluid state data of reservoir grid cells classified as two-phase are input into the flash evaporation calculation regression model, which outputs the real-time phase equilibrium parameter data of reservoir grid cells classified as two-phase. The flash evaporation calculation regression model is obtained by training a deep neural network model using a training set.
[0009] Based on the real-time fluid state data of reservoir grid cells classified as single-phase, the real-time phase equilibrium parameter data of reservoir grid cells classified as single-phase are determined.
[0010] The DL component solver is invoked to perform numerical simulations based on real-time phase equilibrium parameter data.
[0011] Another aspect of the present invention provides a deep learning-assisted multiphase and multicomponent numerical simulation device to provide a multiphase and multicomponent numerical simulation scheme that combines high precision, high stability, and high computational efficiency, and can be seamlessly adapted to existing industrial simulators, providing a high-quality data foundation for oil and gas development and the CCUS industry. The device includes:
[0012] The data acquisition module is used to call the deep learning DL component solver to acquire real-time fluid state data for each reservoir grid cell; the DL component solver is coupled with the pre-trained phase stability classification model and the pre-trained flash evaporation calculation regression model through a unified data interface;
[0013] The classification result output module is used to input real-time fluid state data into the phase stability classification model and output the classification result. The classification result indicates whether each reservoir grid unit is a single phase or a two-phase phase. The phase stability classification model is obtained by training the classification model using a training set. The training set includes historical fluid state data and historical phase equilibrium parameter data.
[0014] The flash calculation module is used to input the real-time fluid state data of reservoir grid cells classified as two-phase into the flash calculation regression model, and output the real-time phase equilibrium parameter data of reservoir grid cells classified as two-phase. The flash calculation regression model is obtained by training a deep neural network model using a training set.
[0015] The real-time phase equilibrium parameter data determination module is used to determine the real-time phase equilibrium parameter data of reservoir grid cells whose classification result is single-phase based on the real-time fluid state data of the reservoir grid cells whose classification result is single-phase.
[0016] The numerical simulation module is used to call the DL component solver to perform numerical simulations based on real-time phase equilibrium parameter data.
[0017] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described deep learning-assisted multiphase and multicomponent numerical simulation method.
[0018] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned deep learning-assisted multiphase and multicomponent numerical simulation method.
[0019] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the aforementioned deep learning-assisted multiphase and multicomponent numerical simulation method.
[0020] Compared with traditional reservoir numerical simulation methods, this invention obtains real-time fluid state data for each reservoir grid cell by calling a deep learning (DL) component solver. The DL component solver is coupled with a pre-trained phase stability classification model and a pre-trained flash evaporation calculation regression model through a unified data interface. The real-time fluid state data is input into the phase stability classification model, and the classification result is output. The classification result indicates whether each reservoir grid cell is single-phase or two-phase. The phase stability classification model is obtained by training the classification model using a training set, which includes historical fluid state data and historical phase equilibrium parameter data. The classification result for reservoir grid cells with a two-phase classification is then used to obtain the real-time fluid state data. Real-time fluid state data of the reservoir grid cells is input into the flash evaporation calculation regression model, which outputs real-time phase equilibrium parameter data for reservoir grid cells classified as two-phase. The flash evaporation calculation regression model is obtained by training a deep neural network model using a training set. Based on the real-time fluid state data of reservoir grid cells classified as single-phase, the real-time phase equilibrium parameter data of reservoir grid cells classified as single-phase is determined. The DL component solver is called to perform numerical simulation based on the real-time phase equilibrium parameter data. This provides a multiphase and multicomponent numerical simulation scheme that combines high accuracy, high stability, and high computational efficiency, and can be seamlessly adapted to existing industrial simulators, providing a high-quality data foundation for oil and gas development and the CCUS industry. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0022] Figure 1 This is a flowchart of the deep learning-assisted multiphase and multicomponent numerical simulation method in an embodiment of the present invention;
[0023] Figure 2 A flowchart illustrating a specific example of the deep learning-assisted multiphase and multicomponent numerical simulation method in this invention.
[0024] Figure 3 This is a schematic diagram of the confusion matrix of the phase stability classification model under the test dataset in this embodiment of the invention;
[0025] Figure 4 This is a schematic diagram comparing the predicted values and true values of the flash calculation regression model in an embodiment of the present invention;
[0026] Figure 5 This is a distribution diagram of relative pressure error and relative gas saturation error in the numerical simulation of the Norne case in this embodiment of the invention;
[0027] Figure 6 This is a schematic diagram showing the oil saturation, gas saturation, pressure, and average relative error of all components of all reservoir grid cells within each time step in this embodiment of the invention.
[0028] Figure 7 This is a structural diagram of the deep learning-assisted multiphase and multicomponent numerical simulation device in an embodiment of the present invention;
[0029] Figure 8 This is a schematic diagram of the computer device structure in an embodiment of the present invention. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0031] The abbreviations and key terms involved in the embodiments of this invention are defined as follows:
[0032] Multiphase and multicomponent numerical simulation: Based on the phase equilibrium law of fluid thermodynamics and the multiphase flow mechanics of porous media, it is a numerical simulation method to describe the phase changes, component migration and multiphase flow processes of multicomponent hydrocarbon or non-hydrocarbon fluids in oil and gas reservoirs under different temperature and pressure conditions. It is a core industrial tool for optimizing oil and gas field development schemes, enhancing recovery rate through CO2 flooding, designing CO2 geological sequestration schemes and predicting the dynamic development of condensate gas reservoirs.
[0033] Phase equilibrium calculation: The core calculation module of component reservoir numerical simulation refers to the complete process of calculating core parameters such as fluid phase state, equilibrium phase composition, and phase fraction under given pressure, temperature, and total fluid composition conditions, using basic thermodynamic laws. The standard process includes two core steps: phase stability testing and flash calculation. Its calculation accuracy, efficiency, and stability directly determine the overall effect of component simulation.
[0034] Phase stability test: A preliminary determination step for phase equilibrium calculation. Based on the principle of minimizing Gibbs free energy, it determines whether phase separation will occur in a fluid system under given pressure, temperature, and total composition conditions. The final output is the determination result of whether it is a single-phase state or a two-phase state, which is a prerequisite for triggering subsequent flash evaporation calculations.
[0035] Flash evaporation calculation: When the phase stability test determines that the fluid is in a two-phase state, the calculation process of phase equilibrium parameters such as the liquid phase fraction, the equilibrium mole fraction of each component in the liquid and gas phases, and the phase compressibility factor is solved based on the cubic equation of state and the principle of fugacity equilibrium. The traditional industrial solution adopts iterative solution, which is the core module with the largest computational cost in the component model.
[0036] Equations of state (Eos): Mathematical equations describing the thermodynamic relationships between fluid pressure, volume, temperature, and components. In this paper, it specifically refers to the cubic equations of state commonly used in phase equilibrium calculations of oil and gas reservoir fluids, including the PR equation and the SRK equation, which are the core theoretical foundation of traditional iterative phase equilibrium calculations.
[0037] Equilibrium ratio (K value): In a multi-component fluid, the ratio of the mole fraction of a certain component in the gas phase to the mole fraction in the liquid phase is the core iterative parameter of traditional iterative flash evaporation calculation. Its initialization accuracy directly determines the iteration convergence speed and convergence stability.
[0038] Fugacity: An equivalent thermodynamic parameter that measures the chemical potential of a real fluid, also called effective pressure; Under vapor-liquid equilibrium, the fugacity of any component is exactly the same in the liquid phase and the gas phase. This fugacity equilibrium criterion is the core criterion for phase equilibrium calculation.
[0039] Liquid fraction: In a vapor-liquid two-phase equilibrium state, the amount of substance in the liquid phase is the proportion of the total amount of substance in the fluid. It is denoted by L and is one of the core output parameters of flash evaporation calculation, directly determining the phase saturation calculation results in reservoir numerical simulation.
[0040] Black oil model: A classic simplified model for reservoir numerical simulation. It replaces complex iterative phase equilibrium calculations by looking up pre-generated PVT parameters in a table. Its core assumption is that the oil and gas composition does not change with temperature and pressure conditions. It has high computational efficiency, but it is only suitable for the depletion-type development of conventional light and medium-quality oil reservoirs. It cannot be adapted to strong phase behavior scenarios such as CO2 gas drive and condensate gas reservoir development.
[0041] Critical region: The thermodynamic range in which the temperature and pressure of a fluid approach or exceed its critical temperature and critical pressure. Within this range, the phase properties of the fluid exhibit extremely strong nonlinearity with changes in temperature and pressure. Traditional iterative phase equilibrium calculations are prone to problems such as convergence oscillations, solution failure, and insufficient thermodynamic consistency in this range.
[0042] Vapor-liquid equilibrium (VLE): Under certain pressure and temperature, when the liquid and gas phases of a multi-component fluid reach thermodynamic equilibrium, the chemical potential and fugacity of each component in the two phases are equal. This stable thermodynamic state is the core theoretical basis for phase equilibrium calculations.
[0043] Phase envelope: describes the phase boundary curve of a multi-component fluid under different temperature and pressure conditions, consisting of bubble point line and dew point line; the inside of the envelope is the vapor-liquid two-phase region, and the outside is the single-phase region. It is the core basis for verifying the accuracy and thermodynamic consistency of the phase equilibrium calculation model.
[0044] The embodiments of this invention relate to the interdisciplinary fields of oil and gas reservoir engineering and deep learning and artificial intelligence. Specifically, they are applied to multiphase-multicomponent reservoir numerical simulation in scenarios such as oil and gas field development, CO2 flooding to enhance recovery, CO2 geological sequestration, and condensate gas reservoir development. It is the core supporting technology for component reservoir numerical simulation.
[0045] This invention addresses the long-standing industry pain point in multiphase and multicomponent numerical simulation—the inability to simultaneously achieve computational accuracy, numerical stability, and computational efficiency. It precisely targets the inherent technical deficiencies of the aforementioned existing technologies and aims to provide a deep learning-assisted multiphase and multicomponent numerical simulation method, device, computer equipment, and storage medium. This fundamentally breaks through the efficiency ceiling of the traditional iterative solution framework and solves the industry problems of insufficient thermodynamic consistency of pure data-driven models and difficulty in industrial application. Ultimately, it achieves a balance between high accuracy, high stability, high efficiency, and high industrial adaptability in component reservoir simulation.
[0046] To address the problems existing in the prior art, embodiments of the present invention provide a deep learning-assisted multiphase and multicomponent numerical simulation method. Figure 1 This is a flowchart of the deep learning-assisted multiphase multicomponent numerical simulation method in an embodiment of the present invention, such as... Figure 1 As shown, the method includes:
[0047] Step 101: Call the DL component solver to obtain real-time fluid state data for each reservoir grid cell; the DL component solver is coupled with the pre-trained phase stability classification model and the pre-trained flash evaporation calculation regression model through a unified data interface;
[0048] Step 102: Input the real-time fluid state data into the phase stability classification model and output the classification result; the classification result indicates whether each reservoir grid unit is a single phase or a two-phase phase; the phase stability classification model is obtained by training the classification model using a training set; the training set includes historical fluid state data and historical phase equilibrium parameter data;
[0049] Step 103: Input the real-time fluid state data of the reservoir grid cells with a classification result of two phases into the flash evaporation calculation regression model, and output the real-time phase equilibrium parameter data of the reservoir grid cells with a classification result of two phases; the flash evaporation calculation regression model is obtained by training a deep neural network model using a training set;
[0050] Step 104: Based on the real-time fluid state data of the reservoir grid cells with a classification result of single phase, determine the real-time phase equilibrium parameter data of the reservoir grid cells with a classification result of single phase.
[0051] Step 105: Call the DL component solver to perform numerical simulation based on real-time phase equilibrium parameter data.
[0052] Depend on Figure 1 As shown in the flowchart, compared with traditional reservoir numerical simulation methods, this embodiment of the invention obtains real-time fluid state data for each reservoir grid cell by calling a deep learning (DL) component solver; the DL component solver is coupled with a pre-trained phase stability classification model and a pre-trained flash evaporation calculation regression model through a unified data interface; the real-time fluid state data is input into the phase stability classification model, and the classification result is output; the classification result indicates whether each reservoir grid cell is single-phase or two-phase; the phase stability classification model is obtained by training the classification model using a training set; the training set includes historical fluid state data and historical phase equilibrium parameter data; the classification result for two-phase... Real-time fluid state data of reservoir grid cells are input into a flash evaporation calculation regression model, which outputs real-time phase equilibrium parameter data for reservoir grid cells classified as two-phase. The flash evaporation calculation regression model is obtained by training a deep neural network model using a training set. Based on the real-time fluid state data of reservoir grid cells classified as single-phase, the real-time phase equilibrium parameter data of reservoir grid cells classified as single-phase is determined. The DL component solver is called to perform numerical simulation based on the real-time phase equilibrium parameter data. This provides a multiphase and multi-component numerical simulation scheme that combines high accuracy, high stability, and high computational efficiency, and can be seamlessly adapted to existing industrial simulators, providing a high-quality data foundation for oil and gas development and the CCUS industry.
[0053] In one embodiment, the core component provided by this invention is first introduced: the DL component solver. The DL component solver is a reservoir numerical simulation tool that achieves online coupling through a data interface consistent with a pre-trained phase stability classification model and a pre-trained flash evaporation calculation regression model, thereby completing the property update and solving the mass conservation equation. The phase stability classification model is trained using a deep neural network (DNN), with fluid state data as input, used to determine whether the fluid is single-phase or two-phase. The flash evaporation calculation regression model is also trained using a deep neural network (DNN), with fluid state data of the fluid already determined to be two-phase as input, and phase equilibrium parameter data as output.
[0054] The deep learning-assisted multiphase and multicomponent numerical simulation method provided in this embodiment of the invention may include:
[0055] Step 1: Establishing the multiphase-single-phase dataset for flash evaporation calculations:
[0056] In one embodiment, real-time fluid state data includes one or any combination of real-time pressure data, real-time temperature data, and real-time component mole fractions.
[0057] In one embodiment, the real-time phase equilibrium parameter data includes one or any combination of liquid phase fraction, gas phase mole fraction, and liquid phase mole fraction.
[0058] In one embodiment, before inputting real-time fluid state data into the phase stability classification model and outputting the classification result, the method may further include: performing multi-dimensional random state sampling on reservoir areas covering different phases within a preset pressure and temperature range to obtain historical fluid state data for each sampling point; normalizing the historical component mole fractions in the historical fluid state data for each sampling point so that the sum of the mole fractions of all components in each sampling point is 1; performing flash evaporation calculations on each sampling point based on the Eos model of the reservoir area's state equation and the historical fluid state data to determine historical phase equilibrium parameter data; determining the phase stability label for each sampling point based on the Eos model of the reservoir area's state equation and the historical fluid state data; the phase stability label includes single-phase and / or two-phase; and generating a training set based on the historical fluid state data, historical phase equilibrium parameter data, and phase stability labels.
[0059] First, based on a thermodynamically consistent reference flow, a large amount of training data is generated using traditional phase equilibrium calculation methods (such as the Eos model). This data includes phase stability tests and flash evaporation calculation results under different pressures, temperatures, and component mole fractions. The generated dataset covers the entire state space of multiphase flow, ensuring that the deep learning model can effectively capture the nonlinear relationships between pressure, temperature, and composition. The training data should include discrimination information for single-phase and two-phase systems, as well as thermodynamic parameters such as liquid phase fraction, gas phase mole fraction, and liquid phase mole fraction from phase equilibrium calculations. This dataset provides a solid foundation for subsequent deep learning model training.
[0060] Step Two: Stability Testing and Establishment of the Flash Evaporation Calculation Model
[0061] After the dataset is prepared, this invention replaces the traditional phase stability determination and flash calculation steps by designing a deep neural network (DNN) model.
[0062] In one embodiment, before inputting real-time fluid state data into the phase stability classification model and outputting the classification result, the method may further include: randomly sampling the training set; the randomly sampled training set includes various thermodynamic states from low pressure to high pressure and from low temperature to high temperature; and using the cross-entropy loss function to train the classification model using the randomly sampled training set.
[0063] First, a classification model is trained to predict whether a fluid is single-phase or two-phase at a given pressure, temperature, and composition. This model transforms the traditional phase stability test into a one-time forward prediction through a classification task, thus significantly reducing computational overhead.
[0064] In one embodiment, before inputting the real-time fluid state data of reservoir grid cells classified as two-phase into the flash evaporation calculation regression model and outputting the real-time phase equilibrium parameter data of reservoir grid cells classified as two-phase, the method may further include: training a fully connected deep neural network model using a training set; the deep neural network model has a hierarchical structure, employs a Sigmoid activation function and a linear activation function, and during training, uses a Bayesian optimization algorithm to optimize the hyperparameters of the deep neural network model, ultimately determining the optimal network topology.
[0065] For grids determined to be two-phase, a trained regression model is used to predict phase equilibrium parameters such as liquid phase fraction and gas phase mole fraction. The regression model directly outputs the phase composition and liquid phase fraction of the two-phase system through a regression task, replacing the traditional flash evaporation calculation process.
[0066] Step 3: Phase stability testing and coupling of the flash evaporation calculation model with the solver:
[0067] After establishing deep learning models for phase stability testing and flash evaporation calculations, this invention further couples these two models with a composition solver. By designing a unified data interface, this invention can seamlessly transmit the prediction results of the deep learning models (such as phase stability and phase equilibrium parameters) to the DL composition solver, completing property updates and solving the mass conservation equations. Specifically, the phase state information output by the deep learning model is used as input to update the phase state of each grid point and provide the necessary property parameters for subsequent flow calculations. This online coupling avoids the numerical instability caused by frequent iterative calculations in traditional methods and ensures the consistency and stability of data transmission.
[0068] Step 4: Case study verification and accuracy test of DL component solver:
[0069] In one embodiment, the deep learning-assisted multiphase multicomponent numerical simulation method may further include: constructing multiple test cases; the multiple test cases include a first test case and / or a second test case; the first test case is used to test the effect of the DL component solver and the preset component solver on the numerical simulation of a first reservoir model; the second test case is used to test the effect of the DL component solver and the preset component solver on the numerical simulation of a second reservoir model; the first reservoir model has a regular geological structure, the reservoir grid cell size is smaller than a first preset threshold, and the total number of active cells is smaller than a second preset threshold; the second reservoir model has an irregular geological structure, the reservoir grid cell size is larger than the first preset threshold, and the total number of active cells is larger than the second preset threshold; and the DL component solver is invoked to execute multiple tests respectively. Test cases were used to obtain multiple first execution results; a preset component solver was called to execute multiple test cases, obtaining multiple second execution results; the preset component solver performed numerical simulation according to the following steps: phase stability was tested by iteratively solving the state equation and fugacity equilibrium equation, with the Gibbs free energy change after introducing a trace amount of second phase during the solution process; flash evaporation calculations were performed by iteratively solving phase equilibrium parameter data using the Wilson equation and Rachford-Rice equation repeatedly; based on the multiple first execution results and multiple second execution results, the computational accuracy, computational speed, and stability of the DL component solver and the preset component solver were compared, or any combination thereof; based on the comparison results, the effectiveness of the DL component solver in numerical simulation based on real-time phase equilibrium parameter data was verified.
[0070] To verify the effectiveness and accuracy of the proposed method, the accuracy of the component solver was tested in multiple benchmark examples. First, test cases with typical phase behaviors (such as conventional oil and gas fields and multiphase component exploitation) were constructed to compare the computational accuracy and stability of traditional component solvers with the deep learning-assisted solver of this invention. Test results show that, under conditions of complex phase behaviors, the deep learning model can accurately predict phase states, and the output results are consistent with those of traditional solvers. By comparing simulation results at different grid scales, it was verified that the proposed method can maintain high numerical stability while improving computational efficiency.
[0071] The following is combined Figure 2 This invention introduces a deep learning-assisted multiphase and multicomponent numerical simulation method in its embodiments.
[0072] Figure 2 The flowchart is a specific example of a deep learning-assisted multiphase multicomponent numerical simulation method in the embodiments of the present invention, such as... Figure 2As shown, in this embodiment of the invention, the deep learning-assisted multiphase multicomponent numerical simulation method replaces the traditional stability analysis module with a DL stability analysis model (phase stability classification model) coupled with the DL component solver. The data processing logic of the traditional stability analysis module is as follows: for the fluid state of each unknown state grid, Michelsen phase stability analysis is performed: by performing two trial calculations of "partial flashing", assuming the fluid is in liquid and gas phases respectively, the Gibbs free energy change after introducing a trace amount of second phase is calculated to determine whether phase separation will occur in the current fluid; this process requires multiple iterations to solve the equation of state and the fugacity equilibrium equation, and finally outputs the determination results of single-phase or two-phase. Among them, K can be estimated in advance by Wilson's equation (Wilson's correlation equation). i K i To initialize the equilibrium ratio, determine the current real-time pressure data p, real-time temperature data T, and real-time component mole fraction z. i Is the state stable?
[0073] like Figure 2 As shown, in this embodiment of the invention, the deep learning-assisted multiphase multicomponent numerical simulation method replaces the traditional flash evaporation calculation module with a DL flash evaporation calculation model (flash evaporation calculation regression model) coupled with the DL component solver. The data processing logic of the traditional flash evaporation calculation module is as follows: if the traditional stability analysis module determines stability, solve the Rachford-Rice equation to determine the liquid-gas phase separation; update the K value; determine whether convergence has occurred; if not, return to iterative calculation; if so, finally determine the real-time phase equilibrium parameter data, including the liquid phase fraction L and the gas phase mole fraction x. i and liquid phase mole fraction y i If the phase stability test determines that the phase is in a two-phase state, perform iterative flash evaporation calculations: ① Initialize the equilibrium ratio K of each component using Wilson's empirical formula; ② Substitute the values into the Rachford-Rice equation to iteratively solve for the liquid phase fraction L; ③ Calculate the gas phase mole fraction x based on the liquid phase fraction L and the equilibrium ratio K. i and liquid phase mole fraction y i ④ Calculate the fugacity coefficients of each component in the liquid and gas phases using the PR and SRK cubic equations of state, and update the fugacity equilibrium residuals; ⑤ If the residuals do not meet the convergence threshold, correct the K value and repeat steps ②-④ until the fugacity equilibrium meets the convergence requirements, and output the final liquid phase fraction L and gas phase mole fraction x. i Liquid phase mole fraction y i Parameters such as phase compressibility factor.
[0074] Both schemes substitute the phase equilibrium parameters output from flash evaporation calculations into the multi-component flow control equations to solve for parameters such as pressure, saturation, and component transport, complete the simulation calculation for the current time step, and then repeat the entire process in the next time step.
[0075] Traditional stability analysis modules and traditional flash evaporation calculation modules have the following drawbacks:
[0076] 1. The computational cost grows exponentially, and the timeliness of large-scale simulations is extremely poor: In the iterative solution process, each iteration requires repeated calculation of the equation of state, fugacity coefficient, and thermodynamic parameters. For industrial-grade field reservoir models with grids of tens of thousands to millions, the simulation time for a single well group can reach several days, and the simulation time for the entire oilfield model can reach several weeks. This is completely unable to meet the engineering timeliness requirements for rapid optimization of development schemes, real-time historical fitting, and comparison of multiple schemes.
[0077] 2. Uncontrollable convergence and extremely poor numerical stability: Near phase boundaries and critical points, the phase properties of the fluid exhibit strong nonlinearity with temperature and pressure changes, the iterative convergence speed slows down sharply, and even convergence oscillations and solution divergence occur, directly leading to simulation interruption; for scenarios such as deep supercritical oil and gas reservoirs and near-critical CO2 storage, the convergence failure problem is particularly prominent, which seriously limits the engineering application scope of the component model.
[0078] 3. The phase stability test itself requires two trial flash calculations, which already contain a complete iterative solution process. Executing these calculations serially with subsequent flash calculations further amplifies the computational overhead. Even with optimization of the single-step iterative process, it is impossible to break through the efficiency ceiling of the iterative framework itself, with an efficiency improvement limit of less than 2 times, failing to fundamentally solve the computational bottleneck.
[0079] 4. The traditional Wilson initialization formula is only applicable to low-pressure conventional oil and gas reservoir scenarios. In complex fluid scenarios with high pressure, near-critical, supercritical, and high CO2 content, the initial K value deviates greatly from the true value. This not only significantly increases the number of iterations but also directly leads to iteration convergence failure, making it unsuitable for the core application scenarios of current oil and gas development and CCUS industry.
[0080] The deep learning-assisted multiphase and multicomponent numerical simulation method in this embodiment of the invention solves the above problems through the following steps.
[0081] This invention, relying on an open-source component solver and a high-performance workstation computing platform, takes a "four-pseudo-component reservoir system" as the research object and verifies the accuracy, efficiency, and stability of the model through numerical simulation. The model's physical parameters and mesh design reference industry benchmark examples (simplified oilfield model), and the specific implementation is as follows:
[0082] Step 1: Establishing the training and test sets:
[0083] Multidimensional random state sampling was performed under pressures ranging from 1 to 280 bar and temperatures from 274.15 to 674.15 K. The overall composition of all sampling points was normalized to ensure that the sum of the mole fractions of all components in each sample was 1. This sampling process aimed to cover different phase behavior regions, including single-phase, two-phase, and transition regions near the critical point, thus enabling the dataset to broadly adapt to various thermodynamic states. Flash evaporation calculations were performed on each sampling point based on the Eos (equation of state) model to determine the liquid phase fraction L and the gas phase mole fraction x. i Liquid phase mole fraction y i Flash evaporation calculations predict the liquid and gas phase compositions and their volume ratios at each state by solving the system's mass balance, phase balance, and flow equations. The liquid fraction L, as a key parameter, will be used for subsequent phase behavior prediction and flow simulation.
[0084] For each sampling point, the Eos model is used to determine whether it is a single-phase or two-phase state. Specifically, when the system's phase stability test result is single-phase, the data label is 0; when the system has a two-phase distribution, the label is 1. This classification label will be used to train the phase stability classification model in deep learning, ensuring that the model can accurately identify different phase states. To ensure the thermodynamic consistency of the data, all sampling points are screened before being input into the model, removing samples that do not conform to physical laws. For example, samples with a liquid phase fraction L less than 0 or greater than 1, as well as non-physical samples with a gas phase mole fraction or liquid phase mole fraction less than 0, are excluded. The final dataset contains a large number of multiphase and single-phase samples that meet thermodynamic requirements, for subsequent deep learning model training and validation. The dataset provides sufficient training data for subsequent deep learning models, covering a wide range of thermodynamic states and phase behaviors. The dataset not only ensures efficient model training but also provides reliable input for accurate simulation of multiphase fluid systems.
[0085] Step Two: Establishment of Phase Stability Classification Model and Flash Evaporation Regression Model:
[0086] The core task of the phase stability classification model is to determine whether a given thermodynamic state belongs to a single-phase or two-phase region. This problem is transformed into a binary classification problem and trained using a deep neural network (DNN). The input to the trained model is real-time pressure data p, real-time temperature data T, and real-time component mole fraction z. iThe output is a classification label for either single-phase (label 0) or two-phase (label 1). To train the stability testing model, we used a sample dataset obtained from flash calculations. The dataset was randomly sampled and covers various thermodynamic states from low to high pressure and from low to high temperature. All samples were calculated using Eos (equation of state) to determine their phase stability (single-phase or two-phase). The model employs a cross-entropy loss function and is trained using a standard CPU computing platform to ensure high-accuracy classification predictions under various thermodynamic conditions. Figure 3 This is a schematic diagram of the confusion matrix of the phase stability classification model under the test dataset in this embodiment of the invention, as shown below. Figure 3 As shown, there are 74,736 data points in both the true and predicted classes that are stable (single-phase); 27 data points in both the true and predicted classes that are stable (single-phase) and unstable (two-phase); 25,202 data points in both the true and predicted classes that are unstable (two-phase); and 35 data points in both the true and predicted classes that are unstable (two-phase) and stable (single-phase). Therefore, the trained phase stability classification model achieves a classification accuracy of 99.94%, indicating that it can efficiently and accurately determine the phase state of the fluid, providing reliable input results for subsequent predictions in the flash evaporation calculation regression model.
[0087] The goal of the flash evaporation calculation regression model is to base it on known thermodynamic state variables (real-time pressure data p, real-time temperature data T, and real-time component mole fraction z). i Directly predict the liquid phase fraction L and the gas phase mole fraction x. i and liquid phase mole fraction y i Unlike traditional iterative methods, this model employs a regression algorithm, using a deep learning network to predict all thermodynamic outputs at once. The model utilizes a fully connected deep neural network (DNN), taking pressure, temperature, and composition as inputs, and outputting the liquid phase fraction and the mole fraction of each phase. The network structure is hierarchically designed, employing a combination of sigmoid and linear activation functions to ensure fast convergence and output accuracy. Bayesian optimization was used to optimize the network's hyperparameters, ultimately determining the optimal network topology. During model training, over 100,000 samples were used, covering a wide range of pressures, temperatures, and compositions. Figure 4 This is a schematic diagram comparing the predicted values and true values of the flash calculation regression model in an embodiment of the present invention, as shown below. Figure 4As shown, gas phase mole fraction x i and liquid phase mole fraction y i The mean square error (MRE) between the true and predicted values is 1.05%, and the R² value is 0.9999986. The mean square error (MRE) between the true and predicted values of the liquid phase fraction L is 0.46%, and the R² value is 0.9999621. The training results show that the mean square error (MRE) of the flash evaporation calculation regression model is less than 1.05%, and the R² value is close to 1, indicating that the model can accurately predict the liquid phase fraction and the composition of each phase, and can handle complex nonlinear phase dependencies.
[0088] Step 3: Coupling the phase stability classification model and flash evaporation calculation regression model with the solver:
[0089] Before coupling the model, a detailed analysis of the component simulation solver's workflow is necessary, particularly the execution flow of flash calculations and phase stability tests. To ensure smooth integration of the deep learning model, the data interface and information flow between the model and the solver need to be clearly defined. The core of the DL component solver employs an automatic differentiation-based object-oriented (AD-OO) framework for solving the system equations. In this framework, phase equilibrium calculation is a crucial part of each nonlinear iterative step. The deep learning model, through seamless integration with the solver, replaces the traditional phase stability testing and flash calculation components. Specifically, at each time step, the solver extracts the thermodynamic state of each grid cell and inputs it into the deep learning model. The phase stability test model first determines whether the grid cell is a single-phase or two-phase region; for single-phase grids, the solver directly updates the corresponding physical properties; for two-phase grids, the flash calculation model calculates and updates the liquid phase fraction and the mole fractions of the liquid and gas phases.
[0090] In each solver iteration, the deep learning model first determines the phase stability of the mesh cells. By predicting phase stability (single-phase or two-phase), the model can quickly identify unstable regions and determine whether flash evaporation calculations are necessary based on preset labels (0 for single-phase, 1 for two-phase). For single-phase meshes, the stability model skips further calculations by directly updating physical properties, reducing unnecessary computational burden. For mesh cells identified as two-phase, the deep learning flash evaporation calculation model predicts the liquid phase fraction and the molar fractions of liquid and gas phases based on pressure, temperature, and overall composition. The core advantage of this process is that, through regression prediction by the deep learning model, flash evaporation calculations can be completed in a single forward propagation, no longer relying on traditional iterative calculations, which greatly improves computational efficiency.
[0091] Step 4: Case study verification and accuracy test of DL component solver:
[0092] In this step, the computational accuracy and stability of the DL component solver are verified through a series of typical examples. By comparing it with the traditional Eos module, the prediction accuracy, computational speed, and numerical stability of the DL component solver under different reservoir conditions are evaluated, further verifying its feasibility and superiority in practical applications. First, we use the classic SPE1 three-dimensional benchmark reservoir model to simulate the gas-driven oil recovery process. This model is based on a uniform five-point well gas injection mode with a grid size of 10×10×3 and a total of 300 active cells. This example verifies the performance of the DL coupled solver in small-scale, simple reservoir models, focusing on the accuracy of phase equilibrium calculations and the numerical stability during the simulation process. Subsequently, we select the more complex Norne oilfield model, which is derived from a typical sandstone oil and gas reservoir. The Norne oilfield has an irregular geological structure and a large grid size of 46×112×22 with a total of 44,612 active cells. Through this model, we evaluate the performance of the DL coupled solver in large-scale complex reservoir simulations and verify its stability and accuracy under complex geological conditions.
[0093] Accuracy analysis was performed on the pressure, phase saturation, and component mole fraction of all grid cells in the SPE1 model and the Norne oilfield model. Figure 5 This is a distribution diagram of the relative pressure error and relative gas saturation error in the numerical simulation of the Norne case in this embodiment of the invention, as shown below. Figure 5 As shown, the results indicate that the DL component solver maintains a relative error within 0.5% in most mesh elements. Figure 6 This is a schematic diagram illustrating the oil saturation, gas saturation, pressure, and average relative error of all components for all reservoir grid cells within each time step in this embodiment of the invention. Figure 6 As shown, especially in the prediction of oil saturation (So(oil)) and gas saturation (Sg(gas)), the error is generally less than 0.1%. In complex heterogeneous reservoir models, the DL component solver can accurately capture phase changes and maintain high computational accuracy. Through simulations under various reservoir conditions, it was found that the DL component solver can smoothly transition in the phase transition region, avoiding numerical fluctuations common in traditional methods. In addition, the DL component solver ensures physical consistency through built-in physical constraints, such as liquid fraction range limits and negative value checks, thereby avoiding non-physical solutions. Under conditions of large pressure gradients and drastic phase changes, the DL component solver still maintains good numerical stability, ensuring mass conservation and thermodynamic consistency of the fluid during the simulation process.
[0094] This invention also provides a deep learning-assisted multiphase and multicomponent numerical simulation device, as described in the following embodiments. Since the principle by which this device solves the problem is similar to that of the deep learning-assisted multiphase and multicomponent numerical simulation method, the implementation of this device can refer to the implementation of the deep learning-assisted multiphase and multicomponent numerical simulation method; repeated details will not be elaborated further.
[0095] Figure 7 This is a structural diagram of the deep learning-assisted multiphase and multicomponent numerical simulation device in an embodiment of the present invention, as shown below. Figure 7 As shown, the device includes:
[0096] The data acquisition module 701 is used to call the deep learning DL component solver to acquire real-time fluid state data for each reservoir grid cell; the DL component solver is coupled with the pre-trained phase stability classification model and the pre-trained flash evaporation calculation regression model through a unified data interface;
[0097] The classification result output module 702 is used to input real-time fluid state data into the phase stability classification model and output the classification result. The classification result indicates whether each reservoir grid unit is a single phase or a two-phase phase. The phase stability classification model is obtained by training the classification model using a training set. The training set includes historical fluid state data and historical phase equilibrium parameter data.
[0098] The flash calculation module 703 is used to input the real-time fluid state data of reservoir grid cells with a classification result of two phases into the flash calculation regression model, and output the real-time phase equilibrium parameter data of reservoir grid cells with a classification result of two phases; the flash calculation regression model is obtained by training a deep neural network model using a training set;
[0099] The real-time phase equilibrium parameter data determination module 704 is used to determine the real-time phase equilibrium parameter data of the reservoir grid unit whose classification result is single phase based on the real-time fluid state data of the reservoir grid unit whose classification result is single phase.
[0100] The numerical simulation module 705 is used to call the DL component solver to perform numerical simulations based on real-time phase equilibrium parameter data.
[0101] In one embodiment, real-time fluid state data includes one or any combination of real-time pressure data, real-time temperature data, and real-time component mole fractions.
[0102] In one embodiment, the real-time phase equilibrium parameter data includes one or any combination of liquid phase fraction, gas phase mole fraction, and liquid phase mole fraction.
[0103] In one embodiment, the deep learning-assisted multiphase multicomponent numerical simulation apparatus further includes: a training set generation module, used for:
[0104] Under preset pressure and temperature ranges, multi-dimensional random state sampling is performed on reservoir areas covering different phases to obtain historical fluid state data for each sampling point.
[0105] The historical component mole fractions in the historical fluid state data of each sampling point are normalized so that the sum of the mole fractions of all components in each sampling point is 1.
[0106] Based on the Eos model of the reservoir region, flash evaporation calculations are performed on each sampling point according to historical fluid state data to determine historical phase equilibrium parameter data;
[0107] Based on the Eos model of the reservoir region's equation of state, the phase stability label of each sampling point is determined according to historical fluid state data; the phase stability label includes single phase and / or two phases.
[0108] A training set is generated based on historical fluid state data, historical phase equilibrium parameter data, and phase stability labels.
[0109] In one embodiment, the deep learning-assisted multiphase multicomponent numerical simulation apparatus further includes: a training module, used for:
[0110] The training set is randomly sampled; the randomly sampled training set includes various thermodynamic states from low pressure to high pressure and from low temperature to high temperature.
[0111] The cross-entropy loss function is used to train the classification model using a randomly sampled training set;
[0112] A fully connected deep neural network model was trained using a training set. The deep neural network model has a hierarchical structure and uses sigmoid activation function and linear activation function. During training, Bayesian optimization algorithm was used to optimize the hyperparameters of the deep neural network model and finally determine the optimal network topology.
[0113] In one embodiment, the deep learning-assisted multiphase multicomponent numerical simulation apparatus further includes: a testing module, used for:
[0114] Multiple test cases are constructed; these test cases include a first test case and / or a second test case; the first test case is used to test the effectiveness of the DL component solver and the preset component solver in numerical simulation of the first reservoir model; the second test case is used to test the effectiveness of the DL component solver and the preset component solver in numerical simulation of the second reservoir model; the first reservoir model has a regular geological structure, the reservoir grid cell size is smaller than a first preset threshold, and the total number of active cells is smaller than a second preset threshold; the second reservoir model has an irregular geological structure, the reservoir grid cell size is larger than a first preset threshold, and the total number of active cells is larger than a second preset threshold.
[0115] The DL component solver is invoked to execute multiple test cases, resulting in multiple first execution results.
[0116] The preset component solver is invoked to execute multiple test cases and obtain multiple second execution results. The preset component solver performs numerical simulation according to the following steps: phase stability test is performed by solving the state equation and fugacity equilibrium equation through multiple iterations, and the Gibbs free energy change is introduced after a trace amount of second phase during the solution process; flash evaporation calculation is performed by repeatedly using the Wilson equation and Rachford-Rice equation to iteratively solve the phase equilibrium parameter data.
[0117] Based on multiple first execution results and multiple second execution results, compare one or any combination of the computational accuracy, computational speed and stability of the DL component solver and the preset component solver.
[0118] Based on the comparison results, the effectiveness of the DL component solver in numerical simulation based on real-time phase equilibrium parameter data is verified.
[0119] Based on the aforementioned inventive concept, such as Figure 8 As shown, the present invention also proposes a computer device 800, including a memory 801, a processor 802, and a computer program 803 stored in the memory 801 and executable on the processor 802. When the processor 802 executes the computer program 803, it implements the aforementioned deep learning-assisted multiphase multicomponent numerical simulation method.
[0120] Based on the aforementioned inventive concept, this invention proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned deep learning-assisted multiphase and multicomponent numerical simulation method.
[0121] Based on the aforementioned inventive concept, this invention proposes a computer program product, which includes a computer program that, when executed by a processor, implements a deep learning-assisted multiphase and multicomponent numerical simulation method.
[0122] The acquisition, storage, use, and processing of data in this application all comply with relevant regulations.
[0123] Compared with traditional reservoir numerical simulation methods, this invention obtains real-time fluid state data for each reservoir grid cell by calling a deep learning (DL) component solver. The DL component solver is coupled with a pre-trained phase stability classification model and a pre-trained flash evaporation calculation regression model through a unified data interface. The real-time fluid state data is input into the phase stability classification model, and the classification result is output. The classification result indicates whether each reservoir grid cell is single-phase or two-phase. The phase stability classification model is obtained by training the classification model using a training set, which includes historical fluid state data and historical phase equilibrium parameter data. The classification result for reservoir grid cells with a two-phase classification is then used to obtain the real-time fluid state data. Real-time fluid state data of the reservoir grid cells is input into the flash evaporation calculation regression model, which outputs real-time phase equilibrium parameter data for reservoir grid cells classified as two-phase. The flash evaporation calculation regression model is obtained by training a deep neural network model using a training set. Based on the real-time fluid state data of reservoir grid cells classified as single-phase, the real-time phase equilibrium parameter data of reservoir grid cells classified as single-phase is determined. The DL component solver is called to perform numerical simulation based on the real-time phase equilibrium parameter data. This provides a multiphase and multicomponent numerical simulation scheme that combines high accuracy, high stability, and high computational efficiency, and can be seamlessly adapted to existing industrial simulators, providing a high-quality data foundation for oil and gas development and the CCUS industry.
[0124] By utilizing data-driven classification and regression joint prediction technology, the phase stability discrimination and two-phase equilibrium solution in component numerical simulation are replaced by direct prediction instead of traditional iterative calculation. Coupled operation is achieved through a data interface consistent with the component solver. This significantly reduces the computational overhead of the phase behavior module and improves the numerical stability and computational efficiency of large-scale component simulation while ensuring the reliability of phase discrimination and phase equilibrium results. This is the key point and the point to be protected in this invention.
[0125] This invention addresses key bottlenecks in component numerical simulation, such as high-frequency computation of phase behavior, significant iteration overhead, and numerical fluctuations easily caused near phase boundaries. It proposes a fast phase behavior solution that can be coupled online with the component solver. Based on the two core components of "rapid phase stability determination" and "direct prediction of two-phase equilibrium," this solution establishes a data interface and workflow management mechanism consistent with the solver. Its beneficial effects are as follows:
[0126] Rapid phase stability determination. By constructing a data-driven phase state discrimination model, the traditional phase stability test is transformed from multiple iterative solutions into a one-time rapid determination, enabling rapid identification of single-phase and two-phase meshes at each time step and during nonlinear iterations. This step significantly reduces the repetitive computational burden of the phase stability module on large-scale meshes, reduces the overall call overhead of the phase behavior module, and improves the computational efficiency of large-scale models. Simultaneously, the fast and stable phase state discrimination results effectively suppress unnecessary phase equilibrium solution triggering, reduce disturbances to the nonlinear solution process, and thus improve the convergence stability and computational reliability of the solver.
[0127] Two-phase equilibrium direct prediction and state input. By constructing a phase equilibrium result prediction model, key thermodynamic results such as phase distribution (liquid phase fraction) and phase composition (liquid / gas phase mole fraction) are directly output from the grid determined to be two phases. These results are then written back to the state variables required by the composition solver through a consistent data interface, replacing the iterative process of phase behavior calculation with direct prediction. This step significantly reduces the number of iterations and accumulated time in traditional flash evaporation calculations, and reduces the risk of convergence fluctuations and result discontinuities near phase boundaries caused by iterative solutions. This improves the continuity and stability of the simulation process while ensuring the usability of the phase behavior results. Furthermore, the implementation based on batch input / output and centralized calling is more suitable for large-scale grids and long-cycle computation scenarios, further improving the overall engineering usability and computational efficiency of the composition simulation.
[0128] The coupling operation test of the deep learning Eos module and the component solver was conducted. A unified data interface and workflow management mechanism were established within the automatic differentiation framework to achieve stable data transfer between phase behavior prediction results and flow equation solutions, ensuring consistent and smooth processes between phase state updates, property updates, and mass conservation equation solutions. This coupling method reduces numerical anomalies caused by data inconsistencies or interface instability, reduces the additional solution burden such as repeated time step adjustments, guarantees stable computation under complex conditions, and provides a generalizable and reusable implementation path for large-scale component simulation.
[0129] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0130] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0131] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0132] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0133] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A deep learning-assisted numerical simulation method for multiphase and multicomponent systems, characterized in that, include: Call the deep learning DL component solver to obtain real-time fluid state data for each reservoir grid cell; The DL component solver is coupled with the pre-trained phase stability classification model and the pre-trained flash evaporation calculation regression model through a unified data interface; The task of the phase stability classification model is to determine whether a given thermodynamic state belongs to a single-phase or two-phase region; The phase stability classification model is trained using a deep neural network. The input to the trained phase stability classification model is real-time pressure data, real-time temperature data, and real-time component mole fraction. The output is the classification label for a single phase or two phases. The goal of the flash evaporation calculation regression model is to predict the liquid phase fraction, gas phase mole fraction, and liquid phase mole fraction based on real-time pressure data, real-time temperature data, and real-time component mole fractions. The flash evaporation calculation regression model uses a regression algorithm. The flash evaporation calculation regression model uses a fully connected deep neural network. The inputs are pressure, temperature and composition, and the outputs are liquid phase fraction and mole fraction of each phase. Real-time fluid state data includes one or any combination of real-time pressure data, real-time temperature data, and real-time component mole fractions. The real-time fluid state data is input into the phase stability classification model, and the classification result is output. The classification results indicate that each reservoir grid unit is a single phase or a two-phase system; the phase stability classification model is obtained by training the classification model using a training set; the training set includes historical fluid state data and historical phase equilibrium parameter data; The real-time fluid state data of the reservoir grid cells with a classification result of two phases are input into the flash evaporation calculation regression model, and the real-time phase equilibrium parameter data of the reservoir grid cells with a classification result of two phases are output. The flash evaporation calculation regression model is obtained by training a deep neural network model using the training set; Based on the real-time fluid state data of reservoir grid cells classified as single-phase, the real-time phase equilibrium parameter data of reservoir grid cells classified as single-phase are determined. The DL component solver is invoked to perform numerical simulation based on the real-time phase equilibrium parameter data.
2. The method as described in claim 1, characterized in that, The real-time phase equilibrium parameter data includes one or any combination of liquid phase fraction, gas phase mole fraction, and liquid phase mole fraction.
3. The method as described in claim 2, characterized in that, Before inputting the real-time fluid state data into the phase stability classification model and outputting the classification result, the process also includes: Under preset pressure and temperature ranges, multi-dimensional random state sampling is performed on reservoir areas covering different phases to obtain historical fluid state data for each sampling point. The historical component mole fractions in the historical fluid state data of each sampling point are normalized so that the sum of the mole fractions of all components in each sampling point is 1. Based on the Eos model of the reservoir region, flash evaporation calculations are performed on each sampling point according to the historical fluid state data to determine the historical phase equilibrium parameter data. Based on the Eos model of the reservoir region, the phase stability label of each sampling point is determined according to the historical fluid state data; the phase stability label includes single phase and / or two phases. A training set is generated based on the historical fluid state data, the historical phase equilibrium parameter data, and the phase stability labels.
4. The method as described in claim 3, characterized in that, Before inputting the real-time fluid state data into the phase stability classification model and outputting the classification result, the process also includes: The training set is randomly sampled; the randomly sampled training set includes various thermodynamic states. The cross-entropy loss function is used to train the classification model using a randomly sampled training set; Before inputting the real-time fluid state data of reservoir grid cells classified as two-phase into the flash evaporation calculation regression model and outputting the real-time phase equilibrium parameter data of reservoir grid cells classified as two-phase, the process also includes: The training set is used to train a fully connected deep neural network model. The deep neural network model has a hierarchical structure and uses the Sigmoid activation function and the linear activation function. During the training process, the Bayesian optimization algorithm is used to optimize the hyperparameters of the deep neural network model and finally determine the optimal network topology.
5. The method as described in claim 1, characterized in that, Also includes: Build multiple test cases; The plurality of test cases includes a first test case and / or a second test case; The first test case is used to test the effect of the DL component solver and the preset component solver on the numerical simulation of the first reservoir model; the second test case is used to test the effect of the DL component solver and the preset component solver on the numerical simulation of the second reservoir model; the first reservoir model has a regular geological structure, the reservoir grid cell size is smaller than the first preset threshold, and the total number of active cells is smaller than the second preset threshold; The second reservoir model has an irregular geological structure, the reservoir grid unit size is larger than the first preset threshold, and the total number of active units is greater than the second preset threshold; The DL component solver is invoked to execute multiple test cases, resulting in multiple first execution results. The preset component solver is invoked to execute multiple test cases, resulting in multiple second execution results; The preset component solver performs numerical simulation according to the following steps: phase stability test is performed by solving the equation of state and fugacity equilibrium equation through multiple iterations, and the Gibbs free energy change is introduced after a trace amount of second phase during the solution process; flash evaporation calculation is performed by repeatedly using the Wilson equation and Rachford-Rice equation to iteratively solve the phase equilibrium parameter data. Based on the plurality of first execution results and the plurality of second execution results, compare one or any combination of the computational accuracy, computational speed and stability of the DL component solver and the preset component solver; Based on the comparison results, the effectiveness of the DL component solver in numerical simulation based on the real-time phase equilibrium parameter data was verified.
6. A deep learning-assisted multiphase, multicomponent numerical simulation device, characterized in that, include: The data acquisition module is used to call the deep learning DL component solver to obtain real-time fluid state data for each reservoir grid cell; The DL component solver is coupled with the pre-trained phase stability classification model and the pre-trained flash evaporation calculation regression model through a unified data interface; The task of the phase stability classification model is to determine whether a given thermodynamic state belongs to a single-phase or two-phase region; The phase stability classification model is trained using a deep neural network. The input to the trained phase stability classification model is real-time pressure data, real-time temperature data, and real-time component mole fraction. The output is the classification label for a single phase or two phases. The goal of the flash evaporation calculation regression model is to predict the liquid phase fraction, gas phase mole fraction, and liquid phase mole fraction based on real-time pressure data, real-time temperature data, and real-time component mole fractions. The flash evaporation calculation regression model uses a regression algorithm. The flash evaporation calculation regression model uses a fully connected deep neural network. The inputs are pressure, temperature and composition, and the outputs are liquid phase fraction and mole fraction of each phase. Real-time fluid state data includes one or any combination of real-time pressure data, real-time temperature data, and real-time component mole fractions. The classification result output module is used to input the real-time fluid state data into the phase stability classification model and output the classification result; The classification results indicate that each reservoir grid unit is a single phase or a two-phase system; the phase stability classification model is obtained by training the classification model using a training set; the training set includes historical fluid state data and historical phase equilibrium parameter data; The flash calculation module is used to input the real-time fluid state data of reservoir grid cells with a classification result of two phases into the flash calculation regression model, and output the real-time phase equilibrium parameter data of reservoir grid cells with a classification result of two phases. The flash evaporation calculation regression model is obtained by training a deep neural network model using the training set; The real-time phase equilibrium parameter data determination module is used to determine the real-time phase equilibrium parameter data of reservoir grid cells whose classification result is single-phase based on the real-time fluid state data of the reservoir grid cells whose classification result is single-phase. The numerical simulation module is used to call the DL component solver to perform numerical simulations based on the real-time phase equilibrium parameter data.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 5.
9. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 5.