A load balancing method based on parallel computing of embedded discrete crack model
By separating and processing the matrix grid and fracture grid in the embedded discrete fracture model, the problem of large calculation overhead and low parallel computing efficiency when demarcating molecular regional grids is solved, and efficient load balancing and parallel computing are achieved.
Patent Information
- Application Number
- CN202111182165.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-11
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2041-10-11
AI Technical Summary
When traditional region decomposition algorithms deal with embedded discrete fracture models, it is difficult to divide sub-region grid systems with the same scale without destroying the connection between the matrix and the fracture, resulting in large computing overhead and low parallel computing efficiency.
By separating the matrix grid and the crack grid, saving its connection relationship, generating the adjacency relationship between the grids, calculating the weight of the matrix grid, performing multi-level coarse decomposition until the required number of sub-regions is reached, and the corresponding crack grid is allocated to each sub-region, and the connection relationship is renumbered.
The load balancing method with less computing overhead, least interface between sub-regions, and efficient parallel computing is realized, which improves the parallel computing efficiency of the model.
Smart Images

Figure CN113901661B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of regional decomposition, and in particular to a load balancing method, device, equipment and storage medium. Background Art
[0002] Fractured rocks are widely present in petroleum, geology and geotechnical engineering, and the embedded discrete fracture model is often used in petroleum, geology and geotechnical engineering simulation. The model is composed of independent matrix grids and fracture grids overlapping each other, and there is a mutual connection between the fracture grid and the matrix grid. This connection is the basis for constructing the numerical format and needs to be fully retained during regional decomposition.
[0003] At present, it is usually difficult for traditional domain decomposition algorithms to divide sub-regional grid systems of the same size without destroying the connection between the matrix and the cracks when processing such models, and the computational overhead is large, which greatly reduces the parallel computing efficiency of the model. In addition, the load balancing method of traditional domain decomposition is only applicable to the parallel computing of single-layer grid models, and the fractures and matrix in the embedded discrete fracture model use two sets of independent overlapping grids, and there is a connection relationship between the matrix and the fractures, which makes it very difficult to divide the sub-regions for parallel computing. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a load balancing method, device, equipment and storage medium, which has low computational overhead, has minimal interfaces between decomposed sub-regions, and has high parallel computing efficiency. The specific scheme is as follows:
[0005] A load balancing method, comprising:
[0006] Separate the matrix grid and the fracture grid, and preserve the connection relationship between the fracture grid and the matrix grid;
[0007] Generate adjacency relations between matrix grids and adjacency relations between fracture grids;
[0008] Calculate the weight of each matrix grid according to the saved connection relationship between the fracture grid and the matrix grid, and the generated adjacency relationship between the matrix grids and the adjacency relationship between the fracture grids;
[0009] According to the generated adjacency relationship between the matrix grids and the calculated weight of each matrix grid, the matrix grid is subjected to multi-level coarsening decomposition until the number of coarse grids obtained by coarsening is the number of sub-regions required to be divided;
[0010] According to the connection relationship between the fracture grid and the matrix grid, a corresponding fracture grid is allocated to each decomposed matrix grid sub-region;
[0011] The fracture grid and matrix grid of each sub-region are renumbered, and the connection relationship between adjacent sub-regions is constructed.
[0012] Preferably, in the load balancing method provided in the embodiment of the present invention, the multi-level coarsening decomposition of the matrix grid until the number of coarse grids obtained by coarsening is the number of sub-regions required to be divided includes:
[0013] Select a grid in the matrix grid;
[0014] Merge a selected grid with its surrounding adjacent grids and calculate the new weight of the merged grid;
[0015] After the calculated new weight reaches a preset value, a coarse grid is constructed;
[0016] Then select another grid and repeat the steps of calculating new weights and constructing coarse grids until all grids in this layer are coarsened and the adjacency relationship between the coarse grids in this layer is generated;
[0017] If the number of coarse grids in this layer reaches the preset number of sub-regions, the sub-grids under each coarse grid in this layer are divided into a matrix grid sub-region.
[0018] Preferably, in the load balancing method provided in the embodiment of the present invention, after generating the adjacency relationship between the coarse grids of the layer, the method further includes:
[0019] If the number of coarse grids in this layer does not reach the preset number of sub-regions, the next level of coarsening is performed on the grids in this layer.
[0020] Preferably, in the load balancing method provided in the embodiment of the present invention, a first formula is used to calculate the weight of each matrix grid; the first formula is:
[0021] V m =N m +N f
[0022] Among them, V m is the calculated weight of the matrix grid, N m is the number of matrix grids adjacent to the matrix grid, N f is the number of fracture grids adjacent to the fracture grid connected to the matrix grid.
[0023] Preferably, in the load balancing method provided in the embodiment of the present invention, the step of renumbering the fracture grids and matrix grids of each sub-region and constructing a connection relationship between adjacent sub-regions includes:
[0024] Renumber the fracture grids and matrix grids in each sub-region. After local numbering, the fracture grids and matrix grids in each sub-region start from sequence 1, and generate connection information between the fracture grids and matrix grids based on the new numbering.
[0025] According to the saved connection relationship between the fracture grid and the matrix grid, and the generated connection information between the fracture grid and the matrix grid based on the new number, the connection relationship between the adjacent sub-region grids is constructed.
[0026] Preferably, in the load balancing method provided by the embodiment of the present invention, the number of crack grids and matrix grids in each sub-region is the same.
[0027] Preferably, in the load balancing method provided in the embodiment of the present invention, the separation of the matrix grid and the fracture grid comprises:
[0028] Import mesh data of embedded discrete fracture model;
[0029] The matrix grid and the fracture grid in the embedded discrete fracture model are separated and stored as independent data structures.
[0030] The embodiment of the present invention further provides a load balancing device, including:
[0031] A grid separation module is used to separate the matrix grid and the fracture grid, and save the connection relationship between the fracture grid and the matrix grid;
[0032] An adjacency relationship generation module, used to generate adjacency relationships between matrix grids and adjacency relationships between fracture grids;
[0033] A weight calculation module, used for calculating the weight of each matrix grid according to the saved connection relationship between the fracture grid and the matrix grid, and the generated adjacency relationship between the matrix grids and the adjacency relationship between the fracture grids;
[0034] A coarsening decomposition module, used to perform multi-level coarsening decomposition on the matrix grid according to the generated adjacency relationship between the matrix grids and the calculated weight of each matrix grid, until the number of coarse grids obtained by coarsening is the number of sub-regions required to be divided;
[0035] A region allocation module, used for allocating a corresponding fracture grid to each decomposed matrix grid sub-region according to the connection relationship between the fracture grid and the matrix grid;
[0036] The connection relationship construction module is used to renumber the fracture grid and matrix grid of each sub-region and construct the connection relationship between adjacent sub-regions.
[0037] An embodiment of the present invention further provides a load balancing device, comprising a processor and a memory, wherein the processor implements the above-mentioned load balancing method provided in the embodiment of the present invention when executing a computer program stored in the memory.
[0038] An embodiment of the present invention further provides a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the load balancing method provided by the embodiment of the present invention is implemented.
[0039] It can be seen from the above technical scheme that a load balancing method provided by the present invention includes: separating matrix grids and crack grids, and preserving the connection relationship between the crack grids and the matrix grids; generating the adjacency relationship between the matrix grids and the adjacency relationship between the crack grids; calculating the weight of each matrix grid according to the connection relationship between the crack grids and the matrix grids that are preserved, and the adjacency relationship between the matrix grids and the adjacency relationship between the crack grids that are generated; performing multi-level coarsening decomposition on the matrix grid according to the adjacency relationship between the generated matrix grids and the calculated weight of each matrix grid, until the number of coarse grids obtained by coarsening is the number of sub-regions required to be divided; allocating a corresponding crack grid to each matrix grid sub-region after decomposition according to the connection relationship between the crack grid and the matrix grid; renumbering the crack grid and the matrix grid of each sub-region, and constructing the connection relationship between adjacent sub-regions.
[0040] The present invention separates the matrix grid from the crack grid, avoids the problem of directly decomposing the two sets of grids to destroy the connectivity between the matrix and the cracks, and divides the grids according to the adjacency relationship without calculating the spatial coordinate distance, with low calculation overhead, and can efficiently process large-scale physical models. In addition, the present invention only needs to use the grid adjacency table to coarsen the grid, and uses the weight as a reference for coarsening, which can balance the influence of the connectivity of the two sets of grids on the generated sub-region grid system in the process of decomposing only the matrix grid, and the grids in the generated sub-region still retain the complete crack-matrix connection relationship. During calculation, the calculation overhead required for each sub-region is similar, there is a minimum interface between the sub-regions, and the number of communications is minimum, thereby improving the parallel computing efficiency of the model.
[0041] In addition, the present invention also provides corresponding devices, equipment and computer-readable storage media for the load balancing method, which further makes the above method more practical. The device, equipment and computer-readable storage medium have corresponding advantages. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0043] Figure 1 A flow chart of a load balancing method provided by an embodiment of the present invention;
[0044] Figure 2 The embodiment of the present invention provides Figure 1 Specific flow chart of step S104;
[0045] Figure 3 A schematic diagram of the structure of a load balancing device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The load balancing of parallel computing with grid method is achieved through regional decomposition. The division of sub-regions is a key step in determining the efficiency of parallel computing. The linear system scale generated by the divided sub-region grids must have very good consistency, and at the same time, the least boundary grids need to be generated to minimize the communication load.
[0047] Based on this, the present invention provides a load balancing method, which can perform regional decomposition of the model without destroying the connectivity between the matrix and the grid in the model. The linear system scale generated by the decomposed sub-region grids has very good consistency, and the number of interfaces between sub-regions is minimized. Therefore, the model has good parallel efficiency.
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] See also Figure 1 , Figure 1 : is a flow chart of a load balancing method provided by an embodiment of the present invention. The load balancing method provided by the present invention is described below. Figure 1 As shown, the following steps are included:
[0050] S101, separating the matrix grid and the fracture grid, and saving the connection relationship between the fracture grid and the matrix grid;
[0051] S102, generating adjacency relations between matrix grids and adjacency relations between fracture grids;
[0052] S103, calculating the weight of each matrix grid according to the connection relationship between the stored fracture grid and the matrix grid, and the generated adjacency relationship between the matrix grids and the adjacency relationship between the fracture grids;
[0053] S104, performing multi-level coarsening decomposition on the matrix grid according to the adjacency relationship between the generated matrix grids and the calculated weight of each matrix grid, until the number of coarse grids obtained by coarsening is the number of sub-regions required to be divided;
[0054] S105, assigning a corresponding fracture grid to each decomposed matrix grid sub-region according to the connection relationship between the fracture grid and the matrix grid;
[0055] S106. Renumber the fracture grid and matrix grid of each sub-region, and construct a connection relationship between adjacent sub-regions.
[0056] It should be noted that the sub-region obtained after completing steps S101 to S106 can be imported into the solver for parallel calculation.
[0057] In the load balancing method provided in the embodiment of the present invention, the matrix grid and the crack grid are separated to avoid the problem of directly decomposing the two sets of grids to destroy the connectivity between the matrix and the cracks, and the division of the grids according to the adjacency relationship does not require the calculation of the spatial coordinate distance, the calculation overhead is low, and large-scale physical models can be efficiently processed. In addition, the present invention only needs to use the grid adjacency table to coarsen the grid, and uses the weight as a reference for coarsening, which can balance the influence of the connectivity of the two sets of grids on the generated sub-region grid system in the process of decomposing only the matrix grid. The grid in the generated sub-region still retains the complete crack-matrix connection relationship. During the calculation, the calculation overhead required for each sub-region is similar, there is a minimum interface between the sub-regions, and the number of communications is minimum, thereby improving the parallel computing efficiency of the model.
[0058] In the specific implementation, in the load balancing method provided by the embodiment of the present invention, step S101 of separating the matrix grid and the crack grid may specifically include: importing the grid data of the embedded discrete crack model, the grid data including the crack grid data, the matrix grid data and the connection information between the crack matrix grid; separating the matrix grid and the crack grid in the embedded discrete crack model, and storing the matrix grid and the crack grid as independent data structures. In this way, the matrix grid and the crack grid are separated, which effectively avoids the problem of directly decomposing the two sets of grids to destroy the connectivity between the matrix and the crack.
[0059] In specific implementation, in the load balancing method provided in the embodiment of the present invention, the weight of each matrix grid is calculated using the first formula in step S103; the first formula is:
[0060] V m =N m +N f
[0061] Among them, V m is the calculated weight of the matrix grid, N m is the number of matrix grids adjacent to the matrix grid, N f is the number of fracture grids adjacent to the fracture grid connected to the matrix grid.
[0062] In the specific implementation, in the above load balancing method provided in the embodiment of the present invention, if Figure 2 As shown, step S104 performs multi-level coarsening decomposition on the matrix grid until the number of coarse grids obtained by coarsening is the number of sub-regions required to be divided, which may specifically include: selecting a grid in the matrix grid; merging the selected grid with the surrounding adjacent grids, calculating the new weight of the merged grid, where the new weight of the merged grid may be the sum of the weights of the merged grids; completing the construction of a coarse grid after the calculated new weight reaches a preset value; selecting another grid and repeating the steps of calculating the new weight and constructing the coarse grid, that is, repeating the steps of "merging the selected grid with the surrounding adjacent grids, calculating the new weight of the merged grid, where the new weight of the merged grid may be the sum of the weights of the merged grids; completing the construction of a coarse grid after the calculated new weight reaches a preset value", until all grids of the layer are coarsened and the adjacency relationship between the coarse grids of the layer is generated; if the number of coarse grids of the layer reaches the preset number of sub-regions, that is, the number of coarse grids of the layer is equal to the number of sub-regions required to be divided, then stop obtaining the coarse grids corresponding to the sub-regions, and divide the sub-grids under each coarse grid of the layer into a matrix grid sub-region. Furthermore, if the number of coarse grids in this layer does not reach the preset number of sub-regions, the next level of coarsening is performed on the grids in this layer.
[0063] It should be noted that this method only needs to use the grid adjacency list to repeatedly coarsen the grid, and the calculation efficiency is very high. At the same time, a matrix grid weight calculation method is designed before the above coarsening process, and the calculated weight is used as a reference for coarsening. It can ensure the balance of the connectivity of the two sets of grids on the generated sub-region grid system in the process of decomposing only the matrix grid.
[0064] In a specific implementation, in the above-mentioned load balancing method provided by an embodiment of the present invention, step S106 renumbers the crack grids and matrix grids of each sub-region to construct a connection relationship between adjacent sub-regions, which may specifically include: first, renumbering the crack grids and matrix grids in each sub-region, and after local numbering, the crack grids and matrix grids in each sub-region start from serial number 1, and at the same time generate connection information between the crack grids and matrix grids based on the new numbers; then, according to the saved connection relationship between the crack grids and the matrix grids, and the generated connection information between the crack grids and the matrix grids based on the new numbers, construct a connection relationship between the grids of adjacent sub-regions.
[0065] It should be pointed out that after the above steps, the grids in the generated sub-areas still retain the complete fracture-matrix connection relationship. The number of fracture grids and matrix grids in each sub-area is the same, so the computational overhead required for each area during calculation is similar. At the same time, due to the use of the adjacency relationship between grids for coarsening, there are the least interfaces between sub-areas and the least number of communications, which ensures that the model has high parallel computing efficiency.
[0066] Based on the same inventive concept, an embodiment of the present invention further provides a load balancing device. Since the principle of solving the problem by the device is similar to that of the aforementioned load balancing method, the implementation of the device can refer to the implementation of the load balancing method, and the repeated parts will not be repeated.
[0067] In specific implementation, the load balancing device provided by the embodiment of the present invention is as follows: Figure 3 As shown, specifically including:
[0068] A grid separation module 11 is used to separate the matrix grid and the fracture grid, and save the connection relationship between the fracture grid and the matrix grid;
[0069] An adjacency relationship generating module 12, used for generating adjacency relationships between matrix grids and adjacency relationships between fracture grids;
[0070] A weight calculation module 13, used to calculate the weight of each matrix grid according to the connection relationship between the stored fracture grid and the matrix grid, and the adjacency relationship between the generated matrix grids and the adjacency relationship between the fracture grids;
[0071] A coarsening and decomposition module 14 is used to perform multi-level coarsening and decomposition on the matrix grid according to the adjacency relationship between the generated matrix grids and the calculated weight of each matrix grid, until the number of coarse grids obtained by coarsening is the number of sub-regions required to be divided;
[0072] A region allocation module 15 is used to allocate a corresponding fracture grid to each decomposed matrix grid sub-region according to the connection relationship between the fracture grid and the matrix grid;
[0073] The connection relationship construction module 16 is used to renumber the fracture grids and matrix grids of each sub-region and construct the connection relationship between adjacent sub-regions.
[0074] In the load balancing device provided in the embodiment of the present invention, the interaction of the six modules can avoid the problem of directly decomposing the two sets of grids to destroy the connectivity between the matrix and the cracks. There is no need to calculate the spatial coordinate distance, the calculation overhead is low, and large-scale physical models can be efficiently processed. In addition, the influence of the connectivity of the two sets of grids on the generated sub-region grid system can be balanced in the process of decomposing only the matrix grid. The grids in the generated sub-regions still retain the complete crack-matrix connection relationship. The calculation overhead required for each sub-region during calculation is similar, there are the least interfaces between the sub-regions, and the number of communications is the least, thereby improving the parallel computing efficiency of the model.
[0075] For more specific working processes of the above modules, please refer to the corresponding contents disclosed in the above embodiments, which will not be repeated here.
[0076] Correspondingly, an embodiment of the present invention further discloses a load balancing device, including a processor and a memory; wherein the processor implements the load balancing method disclosed in the above embodiment when executing a computer program stored in the memory.
[0077] For more specific processes of the above method, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0078] Furthermore, the present invention also discloses a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, the load balancing method disclosed above is implemented.
[0079] For more specific processes of the above method, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0080] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the devices, equipment, and storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part.
[0081] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0082] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0083] In summary, an embodiment of the present invention provides a load balancing method, including: separating matrix grids and crack grids, and saving the connection relationship between the crack grids and the matrix grids; generating the adjacency relationship between the matrix grids and the adjacency relationship between the crack grids; calculating the weight of each matrix grid according to the saved connection relationship between the crack grids and the matrix grids, and the generated adjacency relationship between the matrix grids and the adjacency relationship between the crack grids; performing multi-level coarsening decomposition on the matrix grid according to the generated adjacency relationship between the matrix grids and the calculated weight of each matrix grid, until the number of coarse grids obtained by coarsening is the number of sub-regions required to be divided; assigning a corresponding crack grid to each matrix grid sub-region after decomposition according to the connection relationship between the crack grid and the matrix grid; renumbering the crack grid and the matrix grid of each sub-region, and constructing the connection relationship between adjacent sub-regions. The present invention separates the matrix grid from the crack grid, avoids the problem of directly decomposing the two sets of grids to destroy the connectivity between the matrix and the crack, and does not need to calculate the spatial coordinate distance when dividing the grid according to the adjacency relationship, has low computational overhead, and can efficiently process large-scale physical models. In addition, the present invention only needs to use the grid adjacency table to coarsen the grid, and uses the weight as a reference for coarsening, which can balance the influence of the connectivity of the two sets of grids on the generated sub-region grid system in the process of decomposing only the matrix grid. The grid in the generated sub-region still retains the complete crack-matrix connection relationship. The computational overhead required for each sub-region is similar during calculation, and there is a minimum interface between the sub-regions, and the number of communications is the minimum, thereby improving the parallel computing efficiency of the model. In addition, the present invention also provides a corresponding device, equipment and computer-readable storage medium for the load balancing method, further making the above method more practical, and the device, equipment and computer-readable storage medium have corresponding advantages.
[0084] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0085] The load balancing method, device, equipment and storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A load balancing method, characterized in that: include: Separate the matrix grid and the fracture grid, and preserve the connection relationship between the fracture grid and the matrix grid; Generate adjacency relations between matrix grids and adjacency relations between fracture grids; The weight of each matrix grid is calculated according to the connection relationship between the stored fracture grid and the matrix grid, and the generated adjacency relationship between the matrix grids and the adjacency relationship between the fracture grids; wherein the weight of each matrix grid is calculated using a first formula; the first formula is: V m =N m +N f ; Among them, V m is the calculated weight of the matrix grid, N m is the number of matrix grids adjacent to the matrix grid, N f is the number of fracture grids adjacent to the fracture grid connected to the matrix grid; According to the generated adjacency relationship between the matrix grids and the calculated weight of each matrix grid, the matrix grid is subjected to multi-level coarsening decomposition until the number of coarse grids obtained by coarsening is the number of sub-regions required to be divided; According to the connection relationship between the fracture grid and the matrix grid, a corresponding fracture grid is allocated to each decomposed matrix grid sub-region; The fracture grid and matrix grid of each sub-region are renumbered, and the connection relationship between adjacent sub-regions is constructed.
2. The load balancing method according to claim 1, characterized in that: The method of performing multi-level coarsening and decomposing the matrix grid until the number of coarse grids obtained by coarsening is the number of sub-regions required to be divided includes: Select a grid in the matrix grid; Merge a selected grid with its surrounding adjacent grids and calculate the new weight of the merged grid; After the calculated new weight reaches a preset value, a coarse grid is constructed; Then select another grid and repeat the steps of calculating new weights and constructing coarse grids until all grids in this layer are coarsened and the adjacency relationship between the coarse grids in this layer is generated; If the number of coarse grids in this layer reaches the preset number of sub-regions, the sub-grids under each coarse grid in this layer are divided into a matrix grid sub-region.
3. The load balancing method according to claim 2, characterized in that: After generating the adjacency relationship between the coarse grids of the layer, the method further includes: If the number of coarse grids in this layer does not reach the preset number of sub-regions, the next level of coarsening is performed on the grids in this layer.
4. The load balancing method according to claim 1, characterized in that: The step of renumbering the fracture grid and matrix grid of each sub-region and constructing the connection relationship between adjacent sub-regions includes: Renumber the fracture grids and matrix grids in each sub-region. After local numbering, the fracture grids and matrix grids in each sub-region start from sequence 1, and generate connection information between the fracture grids and matrix grids based on the new numbering. According to the saved connection relationship between the fracture grid and the matrix grid, and the generated connection information between the fracture grid and the matrix grid based on the new number, the connection relationship between the adjacent sub-region grids is constructed.
5. The load balancing method according to claim 4, characterized in that: The number of fracture grids and matrix grids in each sub-region is the same.
6. The load balancing method according to claim 1, characterized in that: The separation matrix grid and the fracture grid include: Import mesh data of embedded discrete fracture model; The matrix grid and the fracture grid in the embedded discrete fracture model are separated and stored as independent data structures.
7. A load balancing device, characterized in that: include: A grid separation module is used to separate the matrix grid and the fracture grid, and save the connection relationship between the fracture grid and the matrix grid; An adjacency relationship generation module, used to generate adjacency relationships between matrix grids and adjacency relationships between fracture grids; The weight calculation module is used to calculate the weight of each matrix grid according to the connection relationship between the fracture grid and the matrix grid stored, and the adjacency relationship between the matrix grids and the adjacency relationship between the fracture grids generated; wherein the weight of each matrix grid is calculated using a first formula; the first formula is: V m =N m +N f ; Among them, V m is the calculated weight of the matrix grid, N m is the number of matrix grids adjacent to the matrix grid, N f is the number of fracture grids adjacent to the fracture grid connected to the matrix grid; A coarsening decomposition module, used to perform multi-level coarsening decomposition on the matrix grid according to the generated adjacency relationship between the matrix grids and the calculated weight of each matrix grid, until the number of coarse grids obtained by coarsening is the number of sub-regions required to be divided; A region allocation module, used for allocating a corresponding fracture grid to each decomposed matrix grid sub-region according to the connection relationship between the fracture grid and the matrix grid; The connection relationship construction module is used to renumber the fracture grid and matrix grid of each sub-region and construct the connection relationship between adjacent sub-regions.
8. A load balancing device, characterized in that: The method comprises a processor and a memory, wherein the processor implements the load balancing method according to any one of claims 1 to 6 when executing the computer program stored in the memory.
9. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the load balancing method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and device for simulating dynamic discrete cracks of oil deposit
CN104392109A
Layered fracture-matrix hybrid grid modeling method and device
CN106326517A