Multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing
Through the GPU distributed parallel computing method, the problem that traditional computing methods are difficult to handle large-scale pore network models is solved, efficient multi-scale pore network multi-phase seepage simulation is achieved, and the development potential of oil and gas production technology is improved.
Patent Information
- Application Number
- CN202010821830.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-15
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2040-08-15
AI Technical Summary
Existing pore network modeling and simulation technologies are difficult to handle large-scale reservoir-scale pore network models, and traditional calculation methods cannot effectively simulate multi-phase seepage in multi-scale pore networks, hindering the development of oil and gas production technology.
The GPU distributed parallel computing method is adopted, and a single-machine CPU-GPU high-performance heterogeneous computing system is used to design a GPU distributed computing algorithm. The GPU is used as a distributed working node for unsteady seepage simulation of large-scale pore networks. Through regional decomposition and COO sparse Matrix compression storage conversion improves simulation calculation efficiency.
It greatly improves the computational efficiency of multi-phase unsteady seepage simulation in multi-scale pore networks. It is more than a hundred times faster than traditional algorithms and can effectively handle large-scale pore network models.
Smart Images

Figure CN112131803B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to oil and gas field development technology, and in particular to a multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing. Background Art
[0002] At present, the main research and application objects of existing pore network modeling and simulation technologies are pore network models constructed based on CT scanning technology. The characteristics of this type of model are that the modeling results are relatively accurate, but the scale is very small, and the length, width and height of the model are all less than 1 mm; accordingly, the simulation algorithm of fluid flow in the pore network model is relatively primitive, and most simulation algorithms only consider the influence of the capillary force of the pore throat on the fluid flow; and the combination of reservoir-scale pore network model and seepage simulation method will generate large-scale (more than 100 million) sparse matrix data bodies, resulting in the inability of traditional calculation methods to cope with subsequent simulation research and analysis work, hindering the further development of oil and gas extraction technology.
[0003] In the existing high-performance computing framework, the working nodes correspond to the physical cores of the CPU. The physical cores of the CPU are relatively limited in hardware. The mid-to-high-end CPUs of current consumer-grade computers usually do not exceed 8 physical cores. If you want to increase the number of working nodes, you need to increase the number of CPUs to achieve it. Increasing the number of working nodes in this way will undoubtedly increase the cost and make management more complicated. Moreover, the number of working nodes increased is also limited, which is far from enough to meet the requirements of large-scale parallel computing. Therefore, how to combine the pore network multiphase seepage simulation method with the multi-GPU parallel computing method to realize the rapid simulation of multiphase seepage in multi-scale pore network models is a problem that needs to be solved at this stage. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing. Relying on a single CPU-GPU high-performance heterogeneous computing system (1 CPU, 8 GPUs), the corresponding GPU distributed computing algorithm is designed and compiled, and the GPU is used as a distributed working node for large-scale pore network non-steady-state seepage simulation, thereby greatly improving the simulation calculation efficiency, so that the multi-scale pore network multiphase non-steady-state seepage simulation technology involved in the present invention can be realized.
[0005] The object of the present invention is achieved by the following technical solution: a multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing, the simulation method comprising:
[0006] Calculate the conductivity of each tube bundle in the pore network model, and solve the model pressure field and model boundary conditions according to the law of conservation of mass;
[0007] According to the structure of the pore network model, a data volume in matrix form is established, and the data volume is subjected to regional decomposition and COO sparse matrix compression storage conversion;
[0008] Based on the regional decomposition, GPU distributed computing is used to determine the pipe bundle channels in each region where the injected water can flow, and the time step is calculated according to the position and pressure of the fluid interface;
[0009] Based on the regional decomposition, the GPU is used to distribute the calculation of the fluid interface in each region at the minimum time step Δt. min Displacement within the tube bundle and update the conductivity of the tube bundle in each area;
[0010] After the fluid interface is displaced, the fluid pressure field is updated through GPU distributed computing.
[0011] GPU distributed computing model water saturation and fluid flow rate at the outlet based on regional decomposition;
[0012] When the termination condition is reached, the simulation results are output.
[0013] Furthermore, the simulation method also includes returning to determine the tube bundle channels in each region where the injected water can flow through GPU distributed computing based on regional decomposition if the termination condition is not met, and continuing to execute the time step according to the position and pressure calculation of the fluid interface.
[0014] Furthermore, the calculation of the conductivity of each tube bundle in the pore network model and the solution of the model pressure field and the model boundary conditions according to the law of conservation of mass include:
[0015] According to the flow of two-phase fluid in the pore network model, the flow rate between pore throat i and node j is determined as p i -p j +p cij ≥0, and then the bundle conductivity is obtained
[0016] According to the total volume flow rate of each node in the two-phase seepage flow, the linear equation system is constructed. The algebraic multigrid algorithm is used to solve it and obtain the pressure of the pore node used at the current moment;
[0017] The linear equation is transformed into a matrix equation of [A][X] = [B], where [A] is the hydraulic conductivity coefficient matrix, [X] is the pressure matrix of all nodes in the pore network, and [B] is the matrix related to the initial and boundary conditions.
[0018] Furthermore, the step of establishing a data body in matrix form according to the structure of the pore network model and performing regional decomposition and COO sparse matrix compression storage conversion on the data body includes:
[0019] The pore network model is converted into a dense matrix form, and the pore throat length, pore throat radius, capillary pressure and hydraulic conductivity parameters representing the pore network model are represented by the first symbol in the dense matrix, and the remaining positions in the dense matrix are represented by the second symbol;
[0020] The data volume in the dense matrix is evenly divided into multiple COO data volumes in the COO sparse matrix and then compressed and stored on different GPUs. The COO data only stores the parameters represented by the first symbol in the dense matrix, and the same COO data volume also stores the pressure value p at both ends of a certain tube bundle. row and p col , to ensure that the pressure values at both ends of the tube bundle are stored on the same GPU, thereby reducing the data communication overhead between different GPUs after regional decomposition and improving the parallel computing efficiency.
[0021] Further, the calculation of the time step according to the position and pressure of the fluid interface includes: at any time, according to the time step calculation formula Δt ij =(l ij -x ij l ij ) / (q ij / A ij ) Calculate the time required for the fluid interface in all pore throats in the pore network model to reach the terminal node, and select the minimum time Δt min The time step for the next iteration.
[0022] Furthermore, the GPU distributed calculation model water saturation and fluid flow rate at the outlet end based on the regional decomposition includes: according to the water saturation calculation formula And the fluid velocity calculation formula q o / w =G o / w Δp o / w The water saturation of the model and the fluid flow rate at the outlet are obtained.
[0023] Further, solving and updating the fluid pressure field through GPU distributed computing after the fluid interface is displaced includes:
[0024] Use grids of different scales and densities to eliminate error components of different wavelengths;
[0025] An iterative method is used on a fine grid. When the convergence speed slows down, it means that the error has been eliminated. Then the error component corresponding to the grid layer that is easier to eliminate is transferred to a coarser grid.
[0026] This process is carried out layer by layer until various error components are eliminated, and then the process is returned to the fine grid layer by layer, thereby accelerating the solution and updating the fluid pressure field.
[0027] Furthermore, in the GPU distributed parallel computing process, the CPU is used to perform global synchronization processing on various data calculated in the GPU distributed parallel computing process.
[0028] Furthermore, the simulation method further comprises the step of establishing a pore network model, and the step of establishing a pore network model comprises:
[0029] Determine the size and number of nodes of the network model, and construct a three-dimensional simple cube grid of X×Y×Z. Each node represents a pore, and the nodes are connected by throats. In the established network, each node representing a pore is connected to six throats, and each throat is also connected to six pores.
[0030] The coordinates of each node in the network model are calculated according to the calculation formula (x, y, z) = [(i-1)l, (j-1)l, (k-1)l];
[0031] The probability function is set to p, and a random number generator is used to determine whether there is a tube bundle connection between adjacent nodes in the x, y and z directions;
[0032] The radius between nodes is assigned and the coordinates of the central node are modified by the central displacement to generate a random network.
[0033] Furthermore, when the connectivity probability p is 50%, the integers randomly generated by the rand() function have a 50% probability of being less than 50, and another 50% probability of being greater than 50. The expression if(rand()%100<p×100) can realize the bundle connection with probability p=50%, that is, when a number less than 50 is generated, the expression is true and the bundle radius allocation task is executed; otherwise, it is false and no operation is performed.
[0034] The beneficial effects of the present invention are as follows: the multi-scale porous network multiphase seepage simulation method based on GPU distributed parallel computing uses GPU as the distributed working node of the porous network seepage simulation calculation, and the CPU is used to collect the GPU calculation results for global synchronization processing, thereby greatly improving the efficiency of the simulation calculation. In comparison, the seepage simulation algorithm based on traditional CPU calculation is extremely slow and cannot realize multi-scale porous network seepage simulation; the simulation calculation speed based on the GPU distributed parallel computing method is more than one hundred times higher than the traditional algorithm, which ensures that the present invention can be implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A schematic diagram of a process of the present invention;
[0036] Figure 2 This is a schematic diagram of the traditional regional decomposition;
[0037] Figure 3 It is a schematic diagram of a dense matrix form corresponding to the pore network of the present invention;
[0038] Figure 4 It is a schematic diagram of the regional decomposition and COO sparse matrix compression storage format of the present invention;
[0039] Figure 5 This is an example of a model diagram for a large pore network model;
[0040] Figure 6 for Figure 5 An example of a pore network is shown with the pore space occupied by an injected fluid (water) at a certain moment in time. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application 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 application provided in the drawings is not intended to limit the scope of protection of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application. The present invention is further described below in conjunction with the drawings.
[0042] like Figure 1 As shown in FIG. 1 , a multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing is shown. Taking the oil-water two-phase seepage simulation as an example, the simulation method includes:
[0043] S1. Establishing the pore network model step and completing the model initialization, which includes:
[0044] S11. Determine the size and number of nodes of the network model, and construct a three-dimensional simple cube grid of X×Y×Z. Each node represents a pore, and the nodes are connected by throats. In the established network, each node representing a pore is connected to six throats, and each throat is also connected to six pores; similarly, each throat is also connected to six pores. The spacing between nodes in each direction (i.e., x, y, and z) is set to l, the number of nodes is set to d, and the side length of the model is (d-1)×1.
[0045] S12. Calculate the coordinates of each node in the network model according to the calculation formula (x, y, z) = [(i-1)l, (j-1)l, (k-1)l]; where i, j, k are the node numbers in the x-, y- and z-directions, respectively, and their values are 1, 2, 3, ...
[0046] S13, set the probability as a probability function of p, and use a random number generator to determine whether there are connected bundles between adjacent nodes in the x, y and z directions; use the rand() function to generate random numbers, thereby generating random probabilities. Its expression is if (rand()%100<p×100), rand()%100-the computer randomly generates any integer in the range of 0-99; at the same time, in order to improve the calculation efficiency, remove the unconnected bundles (that is, delete the bundles with 0). .
[0047] Furthermore, when the connectivity probability p is 50%, the integers randomly generated by the rand() function have a 50% probability of being less than 50, and another 50% probability of being greater than 50. The expression if(rand()%100<p×100) can realize the bundle connection with probability p=50%, that is, when a number less than 50 is generated, the expression is true and the bundle radius allocation task is executed; otherwise, it is false and no operation is performed.
[0048] S14. Assign the radius between nodes. The radius r is a random number between [r_min, r_max], where r_min is the minimum radius and r_max is the maximum radius. Generate a random network by correcting the center node coordinates through center displacement. Move the coordinates (x, y, z) of each node according to the following formula:
[0049] (x, y, z)=[(i-1)l±rand()%(0.5l), (j-1)l±rand()%(0.5l), (k-1)l±rand()%(0.5l)].
[0050] For example, the pore network model is initialized as follows: the node parameters of the pore network model are set as follows: X=300, Y=300, Z=30, the total number of nodes is X×Y×Z=2.7 million, the pore throat length is 500 microns, and the model size is: length and width are 15 cm, and thickness is 1.5 cm. In practical applications, the parameters can be set according to the actual situation to determine the model size (the method provided by the present invention can make the network model reach X×Y×Z>100 million), as well as the parameters such as the minimum value r_min and the maximum value r_max of the oil-water viscosity and the pore throat radius.
[0051] S2, calculate the conductivity of each tube bundle in the pore network model, and solve the model pressure field and model boundary conditions according to the law of conservation of mass;
[0052] Specifically, the water displacement when the rock skeleton is oil-wet is taken as an example. According to the flow of oil and water in the pore network model, it is assumed that the pore throat unit is oil-wet, oil and water are slightly compressible fluids, and the pore throat is piston-type displacement. The flow rate between the pore throat i and j nodes is determined as p i -p j +p cij ≥0, and then the bundle conductivity is obtained
[0053] Among them, r ij is the pore throat radius (μm), p cij is the capillary force of the pore throat (when the pore throat is oil-wet, the capillary force p cij is the flow resistance), p i and p j are the fluid pressures at both ends of the pore throat (tube bundle) (MPa) (the regional decomposition method proposed in the subsequent invention is mainly used to better handle the pressure value storage problem and facilitate the calculation of this formula), l ij is the pore throat length (μm), μ eff is the effective viscosity (μ eff =μ w x ij +μ o (1-x ij ), x ij is the normalized displacement of the oil-water interface in the pore throat 0≤x ij ≤1,μ w is the viscosity of water, μ o is the viscosity of the oil). When p i -p j -p cij When q is less than 0, the pore throat is “locked” by the capillary force. ij = 0. When there is only single-phase fluid in the pore throat, p cij =0,μ eff =μ w or μ o
[0054] In the actual seepage process, the fluid (oil / water) is a slightly compressible fluid, and the rock skeleton is also slightly compressible. If the compressibility of the fluid and the rock is considered, the seepage process of the fluid in the rock is a non-steady-state seepage process, and the seepage process satisfies the non-steady-state seepage equation:
[0055]
[0056] Through Taylor expansion and implicit finite difference method, the above equation can be converted into a matrix equation:
[0057]
[0058]
[0059]
[0060] In the formula, G ij is the hydraulic conductivity of the fluid (oil / water) in the tube bundle, C t is the comprehensive compressibility coefficient (mainly the compressibility coefficient of oil and water), Q is the injection velocity of the fluid at the inlet, Δt is the time step, V b The rock skeleton and pore volume controlled by a single node (here V b = l 3 , l is the pore throat length), and the superscripts n and n+1 represent the current stage (time) and the next stage (time) in the simulation process. The above matrix equation is expanded to obtain the following linear equation system: The algebraic multigrid algorithm (implemented by calling the NVIDIAAMGX algorithm library) can be used to solve it and obtain the pressure of the pore nodes used at the current moment; similarly, the above matrix equation can be simplified as the matrix equation of [A][X]=[B], where [A] is the hydraulic conductivity coefficient matrix, [X] is the pressure matrix of all nodes in the pore network, and [B] is the matrix related to the initial and boundary conditions.
[0061] At the initial moment, the model is fully saturated with oil. Under the combined effect of displacement pressure difference and capillary pressure, water enters the pore network model from the injection end. During the simulation, under certain boundary conditions (matrix [B] is constant), the movement of the oil-water interface changes the coefficient matrix [A]. It is necessary to re-solve the matrix equation to obtain the pressure field [X] at the current moment and then calculate the migration of oil and water at the next moment. Therefore, the speed and accuracy of solving the matrix equation is one of the key factors affecting the reliability and efficiency of seepage simulation.
[0062] S3, establishing a data body in matrix form according to the structure of the pore network model, and performing regional decomposition and COO sparse matrix compression storage conversion on the data body;
[0063] like Figure 2 As shown, a pore network model with 4×4 network nodes is used as an example. The figure contains two numbering methods of a (natural numbering) and b (natural numbering) for 16 nodes, and adjacent nodes are connected by pipes of different radii (different thicknesses); Figure 2 The regional decomposition method in is the regional decomposition mode of traditional distributed parallel computing, which will cause the two endpoints of the pipe bundle between regions to belong to two different decomposition regions, and the two endpoint pressures controlling the flow of fluid in the pipe bundle will be stored on two different computing devices, increasing the data communication pressure and greatly reducing the computing efficiency of parallel computing.
[0064] like Figure 3As shown, the regional decomposition method of the present invention still takes a pore network model with a certain face node number of 4×4 as an example. In the figure, the pore network model is converted into a dense matrix form. The × in the figure can represent the pore throat length, pore throat radius, capillary pressure, hydraulic conductivity and other parameters of the pore network (that is, the matrix can exist in multiple at the same time), and the position without × in the matrix is 0;
[0065] like Figure 4 As shown in the figure, the COO compressed storage format will no longer store the large number of zero elements in the original matrix, and will evenly divide the data in the matrix and send it to different GPUs for subsequent calculations. It can be found that the COO format is very conducive to GPU parallel algorithms. It should be noted here that the COO data body will simultaneously save the pressure values p at both ends of a certain tube bundle. row and p col , so that the pressure values at both ends of the tube bundle are stored on the same GPU, which greatly reduces the data communication overhead between different GPUs after regional decomposition and improves the execution efficiency of parallel computing. After regional decomposition, the CPU will no longer participate in the calculation work in the simulation process, but will be mainly used to collect GPU calculation results, pressure field synchronization and data distribution. Similarly, the above method can be used to decompose the seepage simulation process of a three-dimensional pore network model with a node number of X×Y×Z (X×Y×Z>100 million) into 2 to 16 GPUs for distributed parallel computing.
[0066] S4, based on the regional decomposition, determine the pipe bundle channel in each region where the injected water can flow through GPU distributed computing, and calculate the time step according to the position and pressure of the oil-water interface;
[0067] Specifically, when p i -p j -p cij ≥0, the time Δt required for the oil-water interface to move from the current position to the rightmost end ij =Δt ij =(l ij -x ij l ij ) / (q ij / A ij ), where A ij is the cross-sectional area of the pore throat. At any time, according to the time step calculation formula Δt ij =(l ij -x ij l ij ) / (q ij / A ij ) calculates the time required for the fluid interface in all pore throats in each region of the pore network model to reach the next terminal node, and selects the minimum time Δt from the global min The time step for the next iteration.
[0068] S5. Based on the regional decomposition, GPU distributed calculation is performed on the fluid interface in each region at the minimum time step Δt. min Displacement within the tube bundle and update the conductivity of the tube bundle in each area;
[0069] Specifically, the calculation formula of the interface displacement loc can be obtained by inverting the time step calculation formula: loc+=Δt ij (q ij / A ij ), where += represents the accumulation of the previous displacement loc. The conductivity of the tube bundle in each area of the model is updated according to the conductivity formula.
[0070] S6. After the fluid interface is displaced, the fluid pressure field is updated by GPU distributed computing (i.e., the matrix equation [A][X]=[B] derived in step S2 is solved);
[0071] Specifically, the (GPU distributed) algebraic multigrid algorithm is used to solve the fluid pressure field by calling the NVIDIA AMGX algorithm library. The basic principle of the multigrid algorithm is to use grids of different scales and densities to eliminate error components of different wavelengths. First, an iterative method is used on a fine grid. When the convergence speed slows down, it indicates that the error has been smoothed. Then, the error components that are easier to eliminate corresponding to the grid layer are transferred to a coarser grid. This process is repeated layer by layer until various error components are eliminated, and then the process is returned to the fine grid layer by layer, thereby accelerating the solution.
[0072] S7, GPU distributed computing model water saturation and fluid flow rate at the outlet based on regional decomposition;
[0073] Specifically, according to the water saturation calculation formula And the fluid velocity calculation formula q o / w =G o / w Δp o / w , calculate the water volume of each area (GPU end) and the fluid flow rate at the outlet, and obtain the total water saturation of the model and the total fluid flow rate at the outlet (CPU end performs global merging). Where n is the total number of pore throats; V wi is the water volume in the i-th pore throat; V pi is the volume of the ith pore throat; G o / w is the oil / water conductivity at the outlet; Δp o / w is the oil / water phase pressure difference at the outlet.
[0074] S8. Output the simulation results when the termination condition is reached. The termination condition can be when the water saturation or oil / water flow rate reaches a certain value.
[0075] If the termination condition is not met, the process returns to the process of determining the tube bundle channels in each region where the injected water can flow through GPU distributed computing based on regional decomposition, and continues to execute the time step according to the position and pressure calculation of the fluid interface; the CPU is used to collect GPU calculation results for global synchronization processing in several intermediate steps.
[0076] Figure 5 This is an example of a model diagram of a large pore network model. For example, the node parameters of the pore network model are set to: X = 300, Y = 300, Z = 30, and the total number of nodes is X × Y × Z = 2.7 million. The pore throat length is 500 microns, so the model size is: length and width are 15 cm, and the thickness is 1.5 cm. The viscosity of oil is 10 mPa·s, and the viscosity of water is 1 mPa·s. During the simulation, the middle injection well is set to inject water, and the injection rate is 0.5×10 -9 m 3 / s, assuming that there are 4 generating wells at the 4 corner points around the model, and the model is completely saturated with oil at the initial moment. The maximum pore throat radius of the pore network model is 100 microns, and the minimum pore throat radius is 1 micron. The output simulation results can include: the model diagram of the pore network model and the pore space occupied by the injected fluid (water) at a certain moment ( Figure 6 , obtained by calling VTK graphics library through Python), etc. The above simulation is obtained by using traditional CPU calculation method Figure 6 The results shown here take at least 10 days to obtain, but the GPU distributed parallel computing method proposed in this invention can obtain the simulation results within 6 hours. The simulation method proposed in this invention can further expand the scale of the pore network model to a range of 50m in length and 50m in width (controlled by a single well), realizing direct upscaling seepage simulation from the core to the oil and gas reservoir.
[0077] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing, characterized by: The simulation method comprises: Calculate the conductivity of each tube bundle in the pore network model, and solve the model pressure field and model boundary conditions according to the law of conservation of mass; According to the structure of the pore network model, a data volume in matrix form is established, and the data volume is subjected to regional decomposition and COO sparse matrix compression storage conversion; Based on the regional decomposition, GPU distributed computing is used to determine the pipe bundle channels in each region where the injected water can flow, and the time step is calculated according to the position and pressure of the fluid interface; Based on the regional decomposition, the GPU is used to distribute the calculation of the fluid interface in each region at the minimum time step Δt. min Displacement within the tube bundle and update the conductivity of the tube bundle in each area; After the fluid interface is displaced, the fluid pressure field is updated through GPU distributed computing. GPU distributed computing model water saturation and fluid flow rate at the outlet based on regional decomposition; When the termination condition is reached, the simulation results are output; The calculation of the conductivity of each tube bundle in the pore network model and the solution of the model pressure field and model boundary conditions according to the law of conservation of mass include: According to the flow of two-phase fluid in the pore network model, the flow rate between pore throat i and node j is determined as p i -p j +p cij ≥0, and then the bundle conductivity is obtained Among them, r ij is the pore throat radius, p cij is the capillary force of the pore throat, p i and p j are the fluid pressures at both ends of the pore throat, l ij is the pore throat length, μ eff is the effective viscosity; According to the total volume flow rate of each node in the two-phase seepage flow, the linear equation system is constructed. The algebraic multigrid method is used to solve it and obtain the pressure of the pore node used at the current moment; The linear equation is transformed into a matrix equation of [A][X] = [B], where [A] is the hydraulic conductivity coefficient matrix, [X] is the pressure matrix of all nodes in the pore network, and [B] is the matrix related to the initial and boundary conditions.
2. The multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing according to claim 1 is characterized by: The simulation method also includes returning to determine the pipe bundle channels in each region where the injected water can flow through GPU distributed computing based on the region decomposition if the termination condition is not met, and continuing to execute the time step according to the position and pressure calculation of the fluid interface.
3. The multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing according to claim 1 is characterized by: The method of establishing a data body in matrix form according to the structure of the pore network model and performing regional decomposition and COO sparse matrix compression storage conversion on the data body includes: The pore network model is converted into a dense matrix form, and the pore throat length, pore throat radius, capillary pressure and hydraulic conductivity parameters representing the pore network model are represented by the first symbol in the dense matrix, and the remaining positions in the dense matrix are represented by the second symbol; The data volume in the dense matrix is evenly divided into multiple COO data volumes in the COO sparse matrix and then compressed and stored on different GPUs. The COO data only stores the parameters represented by the first symbol in the dense matrix, and the same COO data volume also stores the pressure value p at both ends of a certain tube bundle. row and p col , to ensure that the pressure values at both ends of the tube bundle are stored on the same GPU, thereby reducing the data communication overhead between different GPUs after regional decomposition and improving the parallel computing efficiency.
4. The multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing according to claim 1, characterized in that: The calculation of the time step according to the position and pressure of the fluid interface includes: at any time, according to the time step calculation formula △t ij =(l ij -x ij l ij ) / (q ij / A ij ) Calculate the time required for the fluid interface in all pore throats in the pore network model to reach the terminal node, and select the minimum time △t min As the time step of the next iteration calculation, A ij is the cross-sectional area of the pore throat.
5. The multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing according to claim 1, characterized in that: The GPU distributed calculation model water saturation and fluid flow rate at the outlet end based on regional decomposition includes: according to the water saturation calculation formula And the fluid velocity calculation formula q o / w =G o / w Δp o / w The water saturation of the model and the fluid flow rate at the outlet are obtained, where n is the total number of pore throats, V wi is the water volume in the i-th pore throat, V pi is the volume of the ith pore throat, G o / w is the oil / water conductivity at the outlet, △p o / w is the oil / water phase pressure difference at the outlet.
6. The multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing according to claim 1, characterized in that: The updating of the fluid pressure field by using GPU distributed computing after the fluid interface is displaced comprises: Use grids of different scales and densities to eliminate error components of different wavelengths; An iterative method is used on a fine grid. When the convergence speed slows down, it means that the error has been eliminated. Then the error component that is easier to eliminate on the coarse grid is eliminated. This process is carried out layer by layer until various error components are eliminated, and then the process returns to the fine grid layer by layer, thereby accelerating the solution and updating the fluid pressure field.
7. The multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing according to claim 1, characterized in that: During the GPU distributed parallel computing process, the CPU is used to perform global synchronization processing on each data calculated during the GPU distributed parallel computing process.
8. The multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing according to any one of claims 1 to 7, characterized in that: The simulation method further comprises the step of establishing a pore network model, wherein the step of establishing a pore network model comprises: Determine the size and number of nodes of the network model, and construct a three-dimensional simple cube grid of X×Y×Z. Each node represents a pore, and the nodes are connected by throats. In the established network, each node representing a pore is connected to six throats, and each throat is also connected to six pores. Calculate the coordinates of each node in the network model according to the calculation formula (x, y, z) = [(i-1)l, (j-1)l, (k-1)l]; A probability function with a probability of p is set, and a random number generator is used to determine whether there is a tube bundle connection between adjacent nodes in the x, y and z directions; The radius between nodes is assigned and the coordinates of the central node are modified by the central displacement to generate a random network.
9. The multi-scale pore network multiphase seepage simulation method based on GPU distributed parallel computing according to claim 8, characterized in that: When the connection probability p is 50%, the integers randomly generated by the rand() function have a 50% probability of being less than 50, and another 50% probability of being greater than 50. The expression if(rand()%100<p×100) can realize the connection of the tube bundle with probability p=50%, that is, when a number less than 50 is generated, the expression is true, and the task of allocating the tube bundle radius is executed; Otherwise, false and no action is performed.
Citation Information
Patent Citations
Tight oil flow simulation and permeability prediction method based on pore network model
CN108729908A
Random pore network model modeling method based on pore throats in various shapes
CN110362842A
System and method for rendering graphics
US20070279429A1
