Super-large-scale high-expandability grid generation method and device and storage medium

By dividing the geometric model into multiple sub-connection domains and distributing it to multiple nodes for bulk mesh division and parallel writing, the memory bottlenecks and stability problems during super-large-scale mesh generation in the existing technology are solved, and efficient and stable mesh generation is achieved.

CN119885694AInactive Publication Date: 2025-04-25NAT UNIV OF DEFENSE TECH +1

Patent Information

Application Number
CN202510377287.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing grid generation methods encounter problems such as unmet memory requirements, poor stability and low generation efficiency when dealing with hyper-large-scale grids.

Method used

By obtaining the geometric model of the numerical simulation task, surface meshing and segmentation, multiple sub-connection domains are obtained, and distributed to multiple nodes for bulk meshing and parallel writing, realizing high-scalability mesh generation.

Benefits of technology

This method reduces the memory footprint of a single node through partition processing, solves the memory bottleneck problem, improves the stability and efficiency of grid generation, and can handle grids of tens of billions or higher scales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119885694A_ABST
    Figure CN119885694A_ABST
Patent Text Reader

Abstract

The invention provides a super-large-scale high-expandability grid generation method and device and a storage medium, and the method comprises the steps: obtaining a geometric model of a numerical simulation task, carrying out the surface grid division, obtaining a corresponding overall surface grid connected domain, carrying out the segmentation of the overall surface grid connected domain, obtaining a plurality of sub connected domains corresponding to the geometric model, and carrying out the segmentation of the sub connected domains; the method comprises the following steps: acquiring a plurality of sub-connected domains, distributing each sub-connected domain to each node, enabling each node to carry out volume mesh division on the sub-connected domains to obtain a mesh data file, searching other connecting surfaces corresponding to the connecting surfaces in the sub-connected domains, and finally updating mesh information in the mesh data file of each node according to a corresponding relationship among the connecting surfaces. And each node writes the updated grid information into the grid model file of the geometric model in parallel, so that the generation of the grid model for numerical simulation is realized, the memory occupation of each node during grid generation is reduced, the grid generation stability is ensured, and the file writing efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of numerical simulation technology, and in particular to a method, device and storage medium for generating an ultra-large-scale highly scalable grid. Background Art

[0002] Explosion problems involve complex flow field dynamics, such as the propagation of shock waves, the interaction of materials, and the release of energy. In order to accurately capture these fine structures, numerical simulations require the use of high-resolution grids to describe in detail the physical phenomena during the explosion. In addition, explosion simulations usually involve a large spatial range and strong nonlinear effects. These effects can cause physical quantities to change dramatically in space and time. In order to accurately simulate these changes, sufficiently dense grid points must be used to capture the gradients and rates of change of these physical quantities.

[0003] In large-scale numerical simulations, in order to ensure the accuracy and reliability of numerical simulations, large-scale grid models are needed to provide the required grid point density. The use of large-scale grid models can provide sufficient resolution, making the grid model closer to the real physical scene in size and structural details.

[0004] However, in the process of generating large-scale grid models, each grid unit and grid point needs to store corresponding data such as number and coordinate information. As the number of grid units increases, the memory demand will increase sharply. When the grid size exceeds the memory capacity, the memory demand cannot be met, which will lead to stability problems such as memory overflow and program crash, forming a memory bottleneck, which seriously restricts the grid generation process. In addition, as the number of computational model grids increases, the grid model file will also become larger, seriously reducing the efficiency of grid generation. Summary of the invention

[0005] In view of the above-mentioned defects or deficiencies in the prior art, the present application aims to provide an ultra-large-scale highly scalable grid generation method, device and storage medium to solve the problems of the existing grid generation method that cannot meet the memory requirements, poor stability, and low generation efficiency.

[0006] The present application embodiment provides a method for generating a super-large-scale highly scalable grid, the method comprising: Acquire a geometric model of a numerical simulation task, and perform surface mesh division on the geometric model to obtain an overall surface mesh connected domain corresponding to the geometric model; Segmenting the overall surface mesh connected domain to obtain multiple sub-connected domains corresponding to the geometric model, and distributing each sub-connected domain to each node; For each of the nodes, the node performs volume meshing on the sub-connected domain to obtain a mesh data file, and searches for other connected surfaces corresponding to the connected surfaces in the sub-connected domain; Based on the corresponding relationship between the connection surfaces, the mesh information in each mesh data file is updated, and each node writes the updated mesh information into the mesh model file of the geometric model in parallel.

[0007] Optionally, after performing surface mesh division on the geometric model to obtain an overall surface mesh connected domain corresponding to the geometric model, the method further includes: Determining whether there are puncture surfaces, free edges, T-shaped edges or unconnected grid points in the connected domain of the overall surface grid; If so, the connected domain of the overall surface mesh is repaired.

[0008] Optionally, the overall surface mesh connected domain is segmented to obtain a plurality of sub-connected domains corresponding to the geometric model, including: The length, width and height of the overall mesh connected domain are segmented respectively to divide the overall mesh connected domain into a plurality of regions; The connection surfaces between the regions are determined, and for each of the connection surfaces, the connection surface is copied, and the copied connection surfaces are respectively distributed to the two regions connected by the connection surface to form sub-connected domains corresponding to the regions.

[0009] Optionally, the node performs volume mesh division on the sub-connected domain, including: The node obtains a preset minimum grid size; The node performs volume mesh division on the sub-connected domain based on the minimum mesh size and the surface mesh included in the sub-connected domain.

[0010] Optionally, searching for other connected surfaces corresponding to the connected surfaces in the sub-connected domain includes: The node determines the number of searches based on the number of the sub-connected domains; The node determines a surface to be searched among other connected surfaces based on the number of searches and the connected surfaces in the sub-connected domain; For each of the faces to be searched, the node determines whether a connected face in the sub-connected domain corresponds to the face to be searched.

[0011] Optionally, the node determines whether the connected surface in the sub-connected domain corresponds to the surface to be searched, including: The node obtains the coordinates of each vertex in the to-be-searched surface and the coordinates of each vertex in the connected surface in the sub-connected domain; The node determines whether all vertices of the surface to be searched and all vertices of the connecting surface coincide with each other based on the coordinates of each vertex in the surface to be searched and the connecting surface. If so, it determines that the connecting surface corresponds to the surface to be searched.

[0012] Optionally, based on the correspondence between the connection surfaces, updating the mesh information in each mesh data file includes: For each of the nodes, the node reads the mesh data file to obtain mesh information in the sub-connected domain, wherein the mesh information includes mesh unit numbers and associated mesh point numbers of each surface mesh and volume mesh; Based on the correspondence between the connected surfaces, the repeated grid unit numbers and the associated grid point numbers of the surface meshes are eliminated, and the grid unit numbers and the associated grid point numbers of all the remaining surface meshes and volume meshes are updated.

[0013] Optionally, each of the nodes writes the updated mesh information into a mesh model file of the geometric model in parallel, including: Based on the number of grids in the updated grid information, determine the number of rows written to each node, and allocate a corresponding file partition to each node in the grid model file according to the number of rows written to each node; For each of the nodes, the node writes the updated grid information into the corresponding file partition.

[0014] The present application also provides an electronic device, the electronic device comprising: Processor and memory; The processor is used to execute the steps of the ultra-large-scale high-scalability grid generation method provided in any embodiment of the present application by calling the program or instruction stored in the memory.

[0015] An embodiment of the present application also provides a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute the steps of the ultra-large-scale and highly scalable grid generation method provided in any embodiment of the present application.

[0016] In summary, the present application proposes an ultra-large-scale highly scalable mesh generation method, which obtains a geometric model of a numerical simulation task, divides it into surface meshes, obtains a corresponding overall surface mesh connected domain, and then divides the overall surface mesh connected domain to obtain multiple sub-connected domains corresponding to the geometric model, and distributes each sub-connected domain to each node, so that each node divides the sub-connected domain into volume meshes to obtain a mesh data file, and searches for other connected surfaces corresponding to the connected surfaces in the sub-connected domain. Finally, according to the corresponding relationship between the connected surfaces, the mesh information in the mesh data file of each node is updated, and each node writes the updated mesh information in parallel into the mesh model file of the geometric model, thereby realizing the method for numerical simulation. Generation of mesh model, this method generates volume mesh through different node partitions, searches for the correspondence between connection surfaces through each node, and writes mesh model files in parallel. Compared with generating meshes by a single computer, the multi-node and multi-partition method reduces the number of meshes processed by a single node, reduces the memory usage of each process during mesh generation, solves the memory bottleneck in the mesh generation process, ensures the stability of mesh generation, and enables volume mesh generation to increase with the increase of hardware scale, reaching a scale of tens of billions or higher. Since the number of volume meshes under a single partition is relatively small, the modification and optimization of the volume mesh is relatively convenient, and the quality of the mesh can be guaranteed; and the multi-node parallel writing method can greatly improve the efficiency of file writing. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 It is a flowchart of a method for generating a super-large-scale highly scalable grid provided in an embodiment of the present application.

[0019] Figure 2 It is a schematic diagram of dividing a general surface mesh connected domain provided in an embodiment of the present application.

[0020] Figure 3 It is a schematic diagram of a sub-connected domain provided in an embodiment of the present application.

[0021] Figure 4 It is a schematic diagram of a common search method provided in an embodiment of the present application.

[0022] Figure 5 It is a schematic diagram of a load balancing search provided in an embodiment of the present application.

[0023] Figure 6 It is a schematic diagram of a file partition provided in an embodiment of the present application.

[0024] Figure 7 It is a schematic diagram of the model appearance of a numerical simulation task provided in an embodiment of the present application.

[0025] Figure 8 This is a partition diagram provided in an embodiment of the present application.

[0026] Fig. 9 It is a schematic diagram of a model body grid provided in an embodiment of the present application.

[0027] Fig.10 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.

[0029] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0030] As mentioned in the background technology, in response to the problems in the prior art, the present application proposes an ultra-large-scale highly scalable grid generation method, which is suitable for any large-scale or ultra-large-scale numerical simulation, such as numerical simulation of tens of billions of grids, numerical simulation of hundreds of billions of grids, etc., and can also be expanded in scale according to actual numerical simulation needs.

[0031] Figure 1 is a flow chart of a method for generating a super-large-scale highly scalable grid provided in an embodiment of the present application. Figure 1 , the ultra-large-scale highly scalable grid generation method specifically includes: S110, obtaining a geometric model of a numerical simulation task, and performing surface mesh division on the geometric model to obtain an overall surface mesh connected domain corresponding to the geometric model.

[0032] The geometric model may be a three-dimensional space model established for the object to be simulated in the numerical simulation task; the geometric model may be obtained by importing a geometric file (such as STP, IGES, etc.) of the numerical simulation task.

[0033] For example, the geometry file of the numerical simulation task can be imported into the open source pre-processing software (Hypermesh / Star CCM+ / ANSYS, cfmesh / Gmsh) to obtain the geometry model of the numerical simulation task.

[0034] For example, after importing the geometry file, you can get a cube geometry model with a length (L), width (W), and height (H) of 1850m, 1600m, and 300m respectively in the spatial range.

[0035] After obtaining the geometric model, the geometric model can be further divided into surface meshes to generate the overall surface mesh connected domain corresponding to the geometric model. Surface mesh division can be understood as dividing meshes on each surface of the geometric model, and the overall surface mesh connected domain can be composed of surface meshes divided on the surface of the entire geometric model.

[0036] Specifically, the mesh type can be obtained (can be selected by the user or determined based on the type of geometric model), such as a triangular face mesh or a quadrilateral face mesh; then, according to the size of the geometric model, the basic size of the face mesh, the minimum surface size and other parameters are determined, and the face mesh is divided based on the basic size and mesh type to generate an overall face mesh connected domain.

[0037] For example, the basic size of the grid is 5mm, the surface mesh type is a triangular surface mesh, and the geometric model is surface meshed through specific software to generate the corresponding overall surface mesh connected domain (Region).

[0038] In the embodiment of the present application, considering that there may be quality problems of some meshes after the surface mesh division, the overall surface mesh connected domain may also be checked to ensure the mesh quality of the overall surface mesh connected domain.

[0039] In some implementations, after performing surface mesh division on the geometric model to obtain an overall surface mesh connected domain corresponding to the geometric model, the method further includes: Determine whether there are puncture surfaces, free edges, T-shaped edges or unconnected grid points in the connected domain of the overall surface mesh; if so, repair the connected domain of the overall surface mesh.

[0040] Among them, the puncture surface may refer to the mesh unit surface that passes through the surface of other mesh units; the free edge may refer to the edge shared by only one mesh unit, a boundary that is not connected to other parts and exists independently; the T-shaped edge may refer to the edge shared by three or more faces, presenting a "T"-shaped connection method; the unconnected mesh point may refer to an isolated point that has no connection relationship with other mesh points, that is, it has no topological connection with the surrounding mesh points through edges or faces.

[0041] Specifically, after surface meshing is performed using specific software, the overall surface mesh connectivity domain can be checked based on the mesh quality inspection tool provided by the specific software to determine whether there are puncture surfaces, free edges, T-edges, or unconnected mesh points; if so, the problematic areas can be repaired.

[0042] In the above-mentioned implementation, it is taken into consideration that when meshing a complex geometric model, due to the irregular shape of the geometric model, the presence of sharp corners or other small features, there may be problems with the meshes divided in these areas. Therefore, a mesh quality check may be performed after the surface mesh is divided to repair the quality of the problematic meshes, thereby preventing the problematic meshes from destroying the continuity of the connected domain of the overall surface mesh, making the connected domain of the overall surface mesh more regular, and thus avoiding affecting subsequent simulation calculations.

[0043] S120, segmenting the overall surface mesh connected domain to obtain multiple sub-connected domains corresponding to the geometric model, and distributing each sub-connected domain to each node.

[0044] The sub-connected domain may be an independent surface mesh connected domain obtained by dividing the overall surface mesh connected domain. Since the geometric model is complex and the number of meshes is too large, the overall surface mesh connected domain may be divided into multiple regions to form multiple sub-connected domains.

[0045] In a specific implementation, segmenting the overall surface mesh connected domain to obtain multiple sub-connected domains corresponding to the geometric model includes the following steps: Step 11: segment the length, width, and height of the overall mesh connected domain respectively, so as to divide the overall mesh connected domain into multiple regions; Step 12: Determine the connection surfaces between the various regions, and for each connection surface, copy the connection surface, and distribute the copied connection surface to the two regions connected by the connection surface, so as to form a sub-connected domain corresponding to the region.

[0046] Among them, in step 11, the length, width and height of the overall surface mesh connected domain can be counted first, and then the length, width and height can be equally divided according to the number of divisions required, so that the number of surface meshes after division is roughly similar, and the overall surface mesh connected domain can be divided into multiple regions.

[0047] like Figure 2 As shown, Figure 2 This is a schematic diagram of the division of a general surface mesh connected domain provided in an embodiment of the present application. Taking a surface in the general surface mesh connected domain as an example, this surface is divided into regions 1 to 6, the surfaces between adjacent regions are defined as connecting surfaces (interior surfaces), and the non-overlapping parts are defined as solid wall boundaries (wall surfaces).

[0048] In step 12, the connecting surface between adjacent areas can be determined, and then the connecting surface can be copied into two parts, and the two parts can be distributed to the two areas connected by the connecting surface respectively, so that the divided areas form a complete connected domain, that is, a sub-connected domain, so that different sub-connected domains can be subsequently assigned to different nodes for concurrent meshing.

[0049] For example, see Figure 2 , Figure 2 The connection surface between region 4 and region 5 can be copied into two parts, namely connection surface-left and connection surface-right. Then, connection surface-left can be assigned to region 4 to form a sub-connected domain, and connection surface-right-left can be assigned to region 5 to form a sub-connected domain.

[0050] Figure 3 is a schematic diagram of a sub-connected domain provided in an embodiment of the present application, such as Figure 3 As shown in the figure, taking the example of dividing the length (L), width (W), and height (H) of the overall surface mesh connected domain into three parts respectively, the connected domain is divided from the segmentation point position, and the overall surface mesh connected domain (Region) can be divided into 27 sub-connected domains, namely region1 to region27. The method for processing the connecting surfaces between the 27 sub-connected domains is: the connecting surfaces between the 27 sub-connected domains are defined as interior-1 to interior-N, and the remaining surfaces that are not connected to other regions are defined as wall. Each connecting surface is copied and assigned to adjacent regions respectively to form 27 independent surface mesh connected domains. As shown in the figure Figure 3 One of the sub-connected domains shown in the figure has a length, width, and height of l, w, and h respectively, and has three connected surfaces, namely Interior-1, Interior-2, and Interior-3.

[0051] Through the above steps 11 and 12, the overall surface mesh connected domain can be divided into multiple complete sub-connected domains, so that the meshes in different areas can be divided into parallel volume meshes at different nodes, and the mesh requirements such as the minimum mesh size of different areas can be flexibly defined. The detailed features of the mesh model are guaranteed at high resolution, and the efficiency of volume mesh division is improved.

[0052] After obtaining each sub-connected domain, each sub-connected domain can be further distributed to different nodes, with each node being assigned a sub-connected domain. The node can refer to a computing node in a cluster.

[0053] S130 . For each node, the node performs volume meshing on the sub-connected domain to obtain a mesh data file, and searches for other connected surfaces corresponding to the connected surfaces in the sub-connected domain.

[0054] Specifically, after each sub-connected domain is assigned to a different node, for each node, the node can perform volume mesh division on the assigned sub-connected domain to generate a corresponding mesh data file. The mesh data file is used to describe the mesh information in the sub-connected domain, and the mesh information includes the mesh unit number and the associated mesh point number of each surface mesh and volume mesh in the sub-connected domain, and the associated mesh point number is the number of the vertex of the surface mesh and volume mesh unit.

[0055] In one example, the node performs volume meshing on the sub-connected domain, including: The node obtains a preset minimum grid size; the node performs volume grid division on the sub-connected domain based on the minimum grid size and the surface grid contained in the sub-connected domain.

[0056] The minimum grid size may be the minimum size of the volume grid pre-set on the node. Specifically, the node may perform volume grid division on the sub-connected domain based on the surface grid contained in the sub-connected domain according to the minimum grid size to obtain each volume grid unit.

[0057] For example, the above Figure 3 For example, the segmented regions region1 to region27 can be distributed to different nodes such as nodes 1 to 27, and specific software can be used to divide the volume mesh in parallel in different nodes to generate 27 mesh data files Volumen1 to Volumen27.

[0058] Through the above examples, the number of volume meshes generated by each node has been significantly reduced. Through reasonable area partitioning, the process of each node processes approximately the same amount of mesh partition data. This volume mesh generation method can make full use of the memory of different nodes and ensure that the memory will not overflow during the volume mesh generation process.

[0059] After completing the volume meshing of each node in parallel, the meshes generated by all nodes can be further merged. In the merging process, the corresponding relationship between each connection surface needs to be determined first, so as to facilitate the subsequent deletion of repeated surface mesh units on the connection surface and avoid retaining repeated mesh units during the merging process. The corresponding relationship of the connection surface can refer to that two corresponding connection surfaces are located at the same position in the overall surface mesh model.

[0060] In the embodiment of the present application, a load-balanced search method can be used to complete the search and confirmation of the corresponding relationship between connection surfaces. Different from the common search method, the load-balanced search method can greatly reduce the number of searches and improve the efficiency of determining the corresponding relationship between connection surfaces.

[0061] For example, Figure 4It is a schematic diagram of a common search method provided by an embodiment of the present application, in which the connection surfaces in each sub-connected domain are merged into one connection surface. The connection surfaces may be discontinuous, that is, the number of sub-connected domains is equal to the number of connection surfaces after the merger. Among them, taking the number of connection surfaces to be searched as 5 as an example, they are connection surface 1, connection surface 2, connection surface 3, connection surface 4, and connection surface 5, which are located at nodes 1 to 5 respectively. Among them, in the common search method (process), connection surface 1 in process 1 of node 1 needs to be searched 4 times with connection surfaces 2, 3, 4, and 5, connection surface 2 in process 2 of node 2 needs to be searched 3 times with connection surfaces 3, 4, and 5, connection surface 3 in process 3 of node 3 needs to be searched twice with connection surfaces 4 and 5, and connection surface 4 in process 4 of node 4 needs to be searched once with connection surface 5.

[0062] Depend on Figure 4 It can be seen that the ordinary search method requires four internal surface searches to complete a round of search. Node 1 needs to be searched 4 times, node 2 needs to be searched 3 times, and so on. As a result, the number of searches for each node is different, the search load of some nodes is too large, and the search load of some nodes is too small. The merging of the grids needs to wait until all nodes have completed the search. Therefore, the ordinary search method has problems such as high node load, low search efficiency, and low grid merging efficiency.

[0063] In order to solve this problem, the embodiment of the present application can use a load balancing search method to search for corresponding connection faces. In a specific implementation, searching for other connection faces corresponding to the connection faces in the sub-connected domain includes the following steps: Step 21, the node determines the number of searches based on the number of sub-connected domains; Step 22: The node determines a surface to be searched among other connected surfaces based on the number of searches and the connected surfaces in the sub-connected domain; Step 23: For each to-be-searched face, the node determines whether the connected face in the sub-connected domain corresponds to the to-be-searched face.

[0064] Among them, in step 21, the node can first determine the number of sub-connected domains (i.e., the number of connected surfaces after merging, and the connected surfaces may be discontinuous), the number of sub-connected domains is equal to the number of connected surfaces, that is, each sub-connected domain includes a connected surface; and then determine the number of searches according to the number of connected surfaces. Exemplarily, if the number of connected surfaces N is an even number, the number of searches is N / 2, and if the number of connected surfaces N is an odd number, the number of searches is (N-1) / 2.

[0065] Furthermore, in step 22, the node may be numbered downward from the connected faces in the allocated sub-connected domain according to the number of searches to determine faces to be searched among other connected faces, and the number of faces to be searched is equal to the number of searches.

[0066] Exemplarily, if the connected surface in the assigned sub-connected domain is interior n, the numbers may be arranged downward starting from interior n+1, such as interior n+1, interior n+2, interior n+3, etc., until the number of surfaces to be searched is equal to the number of searches.

[0067] like Figure 5 As shown, Figure 5 This is a schematic diagram of a load-balanced search provided by an embodiment of the present application. Following the above example, in process 1 of node 1, connection surface 1 needs to search twice with connection surfaces 2 and 3, in process 2 of node 2, connection surface 2 needs to search twice with connection surfaces 3 and 4, in process 3 of node 3, connection surface 3 needs to search twice with connection surfaces 4 and 5, in process 4 of node 4, connection surface 4 needs to search twice with connection surface 5 and connection surface 1, and in process 5 of node 5, connection surface 5 needs to search twice with connection surface 1 and connection surface 2. Through the load-balanced search method, to complete a round of search, each node only needs to search twice, which improves the efficiency of connection surface search and avoids waiting for some nodes to complete the search for a long time, thereby affecting the efficiency of volume mesh merging.

[0068] Furthermore, in step 23, the node can determine whether the connected faces in the assigned sub-connected domain correspond to each of the faces to be searched, that is, whether they are connected faces at the same position in the overall face grid. In particular, whether the two faces correspond can be determined by determining whether the points on the two faces overlap.

[0069] With respect to the above step 23, in some implementations, the node determines whether the connected surface in the sub-connected domain corresponds to the surface to be searched, including the following steps: Step 231, the node obtains the coordinates of each vertex in the surface to be searched and the coordinates of each vertex in the connected surface in the sub-connected domain; Step 232: The node determines whether all vertices of the surface to be searched and all vertices of the connecting surface coincide with each other based on the coordinates of the vertices in the surface to be searched and the connecting surface. If so, it is determined that the connecting surface corresponds to the surface to be searched.

[0070] In step 231, the node may obtain the coordinates of all vertices in the surface to be searched and the connected surface in the sub-connected domain, and sort all the vertices according to the x-coordinate.

[0071] Furthermore, in step 232, the vertices in the two faces may be compared one by one to determine whether the vertices in the two faces overlap. Exemplarily, to avoid the influence of numerical errors, a tolerance may be pre-set, and the tolerance may be combined to determine whether the vertices overlap. For example, the tolerance is 0.1 mm. When the spatial distance between the two vertices is less than the tolerance, the positions of the two vertices are determined to overlap. When the spatial distance between the two vertices is greater than the tolerance, the positions of the two vertices are determined to not overlap.

[0072] Furthermore, if all vertices in the surface to be searched and the connected surface in the sub-connected domain coincide with each other, it can be determined that the two surfaces correspond to each other.

[0073] Through the above steps 231 and 232, the vertices of the two faces can be used to determine whether the two points correspond, without using all the points on the faces. While ensuring the accuracy of the corresponding relationship search, the efficiency of the corresponding relationship search can be further improved.

[0074] Based on the above steps 21 to 23, a load-balanced search method can be implemented. During this process, the search times of each node are the same, which can avoid the problem of excessive search load on some nodes. In addition, the time required for each node to complete the search is similar, which can avoid long waiting times and improve the search efficiency of the corresponding relationship.

[0075] S140. Based on the correspondence between the connection surfaces, the mesh information in each mesh data file is updated, and each node writes the updated mesh information into the mesh model file of the geometric model in parallel.

[0076] Specifically, after obtaining the corresponding relationship between each connecting surface, the repeated surface mesh units on the connecting surface in each grid data file can be deleted, and all grid points can be renumbered (some grid points form surface meshes, and some grid points form volume meshes), and the mesh units of all surface meshes and all volume meshes can be numbered to realize the update of each grid data file, so as to facilitate the subsequent merging of all surface meshes and volume meshes.

[0077] In a specific implementation, based on the correspondence between the connection surfaces, updating the grid information in each grid data file includes the following steps: Step 31: for each node, the node reads the mesh data file to obtain the surface mesh and volume mesh information in the sub-connected domain, wherein the surface mesh and volume mesh information include the mesh unit number and the associated mesh point number of each surface mesh and volume mesh; Step 32: based on the correspondence between the connected surfaces, the repeated grid unit numbers and the associated grid point numbers of the surface meshes are eliminated, and the grid unit numbers and the associated grid point numbers of all the remaining surface meshes and volume meshes are updated.

[0078] Among them, in step 31, each node can start a process respectively, and load the mesh data file through the process to read the surface mesh information and volume mesh information in the allocated sub-connected domain. The surface mesh information and volume mesh information include the mesh unit number and the associated grid point number of each surface mesh and volume mesh in the allocated sub-connected domain, and can also include the grid point coordinates (such as x, y, z coordinates) of each surface mesh and volume mesh.

[0079] Furthermore, in step 32, the grid cell numbers and associated grid point numbers of the repeated surface meshes on the connecting surfaces can be deleted according to the corresponding relationship between the connecting surfaces, and the grid cell numbers and associated grid point numbers of all remaining surface meshes and volume meshes can be updated again according to the given numbering rules.

[0080] For example, all grid points can be renumbered according to a set logic (such as sequential arrangement, sorting by coordinates, distance-based division, etc.). At the same time, the associated grid cell numbers will also be updated according to these newly generated grid point numbers to ensure number consistency.

[0081] Through the above steps 31 and 32, the related numbers of the repeated surface meshes on the connecting surface can be deleted according to the searched correspondence, and all surface meshes and volume meshes can be renumbered, so that the numbers generated by each node when dividing the volume mesh can be converted into numbers in the entire geometric model, avoiding repeated numbers when merging the volume meshes later, thereby ensuring the accuracy of the volume mesh merging.

[0082] After completing the renumbering of each surface mesh and volume mesh, and updating the surface mesh and volume mesh information in each mesh data file, each node can further write the updated mesh information into the mesh model file of the geometric model in parallel.

[0083] The mesh model file is a file that describes the mesh division of the entire geometric model, including the mesh unit vertex coordinates, mesh unit numbers and associated mesh point numbers of each surface mesh and volume mesh. The mesh model file can be used to load the mesh model corresponding to the geometric model, and then perform numerical simulation on the mesh model.

[0084] Specifically, each node writes the grid model file in parallel, which means that each node writes the data in the corresponding updated grid data file into the grid model file at the same time. For example, if there are n nodes running n processes, each process is responsible for writing the grid information in the node into the grid model file.

[0085] In a specific implementation, each node writes the updated mesh information into the mesh model file of the geometric model in parallel, including the following steps: Step 41: based on the number of grids in the updated grid information, determine the number of rows written to each node, and allocate a corresponding file partition to each node in the grid model file according to the number of rows written to each node; Step 42: For each node, the node writes the updated grid information into the corresponding file partition.

[0086] Among them, in step 41, the number of rows written to the grid model file for each node can be calculated according to the number of grids in the updated grid information, and then the grid model file can be divided according to the number of rows written to each node to obtain the corresponding file partition allocated to each node.

[0087] Furthermore, in step 42, each node may write the updated grid information into the corresponding file partition.

[0088] For example, Figure 6 is a schematic diagram of a file partition provided in an embodiment of the present application, such as Figure 6 As shown in the figure, assuming that the total number of lines in a grid model file is P4, it can be divided into 4 partitions. Process 1 corresponds to the first file partition and writes the 1st to P1th lines of the grid model file. Process 2 corresponds to the second file partition and writes the P1th to P2th lines of the grid model file, and so on. Among them, process 1 to process 4 are processes in nodes N1 to N4, respectively, and can specifically write nodes data, faces data, cell data, etc. in the nodes into the grid model file.

[0089] Through the above steps 41 and 42, each node can process its corresponding partition in parallel to achieve efficient simultaneous writing operations, thereby greatly reducing the time for writing the grid model file and avoiding writing failures.

[0090] For example, Figure 7 is a schematic diagram of a model appearance of a numerical simulation task provided in an embodiment of the present application. Figure 7 After the geometric model corresponding to the model in is divided into connected domains, multiple sub-connected domains can be obtained, such as Figure 8 As shown, Figure 8 is a partitioning schematic diagram provided in an embodiment of the present application. Further, each partition (i.e., a sub-connected domain) can be divided into a volume mesh, and after the division is completed, the volume meshes are merged to obtain the volume mesh of the overall model, such as Fig. 9 As shown, Fig. 9 It is a schematic diagram of a model body grid provided in an embodiment of the present application.

[0091] The ultra-large-scale highly scalable grid generation method provided in the embodiment of the present application obtains a geometric model of a numerical simulation task, performs surface mesh division on it, obtains a corresponding overall surface mesh connected domain, and then divides the overall surface mesh connected domain to obtain multiple sub-connected domains corresponding to the geometric model, and distributes each sub-connected domain to each node, so that each node performs volume mesh division on the sub-connected domain to obtain a grid data file, and searches for other connected surfaces corresponding to the connected surfaces in the sub-connected domain. Finally, according to the corresponding relationship between the connected surfaces, the surface mesh and volume mesh information in the grid data file of each node are updated, and each node writes the updated surface mesh and volume mesh information into the grid model file of the geometric model in parallel. The generation of a mesh model for numerical simulation is realized. The method generates a volume mesh through different node partitions, searches for the correspondence between connection surfaces through each node, and writes the mesh model file in parallel. Compared with a single computer generating a mesh, the multi-node and multi-partition method reduces the number of meshes processed by a single node, reduces the memory usage of each process during mesh generation, solves the memory bottleneck in the mesh generation process, ensures the stability of mesh generation, and allows volume mesh generation to increase with the increase in hardware scale to reach a scale of tens of billions or more. Since the number of volume meshes under a single partition is relatively small, the quality of the mesh can also be guaranteed; and the multi-node parallel writing method can greatly improve the efficiency of file writing.

[0092] The embodiment of the present application divides the overall surface mesh into multiple parts, performs mesh quality repair and volume mesh generation on the divided surface mesh, and then merges the generated divided volume meshes to complete the high-quality generation of the overall mesh. Since the number of single-partitioned volume meshes is relatively small, they are easy to view, repair and adjust, which can ensure high mesh quality and ensure that the generated volume mesh can capture and reflect the details and features of the geometric model with high resolution. The parallel generation of volume meshes improves the speed of large-scale mesh division and solves the problem of low efficiency of single-process volume mesh generation. By generating a large number of computer nodes in parallel, the number of meshes processed by a single computer node is reduced, and the memory usage of each process during mesh generation is reduced, successfully solving the memory bottleneck in large-scale mesh processing.

[0093] In addition, the embodiment of the present application adopts efficient connection surface (interior surface) search and parallel writing grid file technology to improve the speed of overall grid generation. First, the corresponding relationship of the connection surface (interior surface) is searched and confirmed, and the corresponding surface relationship is searched using a load balancing method to make the search number of each node equal, thereby avoiding the situation where other nodes have to wait because the search time of a certain node is too long.

[0094] In addition, the method provided in the embodiment of the present application can be applied to complex simulation scenarios, supports the generation of grid scales of tens of billions and hundreds of billions, has high scalability, and is particularly suitable for highly dynamic and complex physical scenes such as simulation explosions, making the simulation results of complex scenes more accurate. Compared with traditional methods, this method breaks through the limitation of grid scale, so that it can process ultra-large-scale volume grids with hardware support, and is applicable to a wider range of application fields.

[0095] Fig.10 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.10 As shown, the electronic device 400 includes one or more processors 401 and a memory 402 .

[0096] The processor 401 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.

[0097] The memory 402 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 401 may run the program instructions to implement the ultra-large-scale high-scalability grid generation method of any embodiment of the present application described above and / or other desired functions. Various contents such as initial external parameters, thresholds, etc. may also be stored in the computer-readable storage medium.

[0098] In one example, the electronic device 400 may further include: an input device 403 and an output device 404, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown). The input device 403 may include, for example, a keyboard, a mouse, etc. The output device 404 may output various information to the outside, including early warning prompt information, braking force, etc. The output device 404 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.

[0099] Of course, to simplify, Fig.10 Only some of the components related to the present application in the electronic device 400 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application conditions, the electronic device 400 may also include any other appropriate components.

[0100] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the ultra-large-scale and highly scalable grid generation method provided by any embodiment of the present application.

[0101] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0102] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the ultra-large-scale and highly scalable grid generation method provided by any embodiment of the present application.

[0103] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0104] It should be noted that the terms used in this application are only for describing specific embodiments, rather than limiting the scope of this application. As shown in the specification and claims of this application, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device including the elements.

[0105] Specific examples are used in this application to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and its core idea of ​​this application. The above is only the preferred implementation method of this application. It should be pointed out that due to the limitations of textual expression and the objective existence of infinite specific structures, ordinary technicians in this technical field can make several improvements, modifications or changes without departing from the principles of this application, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the concept and technical solution of the invention to other occasions without improvement, should be regarded as the scope of protection of this application.

Claims

1. A method for generating a super-large-scale highly scalable grid, characterized in that: include: Acquire a geometric model of a numerical simulation task, and perform surface mesh division on the geometric model to obtain an overall surface mesh connected domain corresponding to the geometric model; Segmenting the overall surface mesh connected domain to obtain a plurality of sub-connected domains corresponding to the geometric model, and distributing each sub-connected domain to each node; For each of the nodes, the node performs volume meshing on the sub-connected domain to obtain a mesh data file, and searches for other connected surfaces corresponding to the connected surfaces in the sub-connected domain; Based on the corresponding relationship between the connection surfaces, the mesh information in each mesh data file is updated, and each node writes the updated mesh information into the mesh model file of the geometric model in parallel.

2. The method for generating a super large scale highly scalable grid according to claim 1, characterized in that: After performing surface mesh division on the geometric model to obtain an overall surface mesh connected domain corresponding to the geometric model, the method further includes: Determining whether there are puncture surfaces, free edges, T-shaped edges or unconnected grid points in the connected domain of the overall surface grid; If so, the connected domain of the overall surface mesh is repaired.

3. The method for generating a super large scale highly scalable grid according to claim 1, characterized in that: The overall surface mesh connected domain is segmented to obtain a plurality of sub-connected domains corresponding to the geometric model, including: The length, width and height of the overall mesh connected domain are segmented respectively to divide the overall mesh connected domain into a plurality of regions; The connection surfaces between the regions are determined, and for each of the connection surfaces, the connection surface is copied, and the copied connection surfaces are respectively distributed to the two regions connected by the connection surface to form sub-connected domains corresponding to the regions.

4. The method for generating a super-large-scale highly scalable grid according to claim 1, characterized in that: The node performs volume mesh division on the sub-connected domain, including: The node obtains a preset minimum grid size; The node performs volume mesh division on the sub-connected domain based on the minimum mesh size and the surface mesh included in the sub-connected domain.

5. The method for generating a super large scale highly scalable grid according to claim 1, characterized in that: Searching for other connected surfaces corresponding to the connected surfaces in the sub-connected domain includes: The node determines the number of searches based on the number of the sub-connected domains; The node determines a surface to be searched among other connected surfaces based on the number of searches and the connected surfaces in the sub-connected domain; For each of the faces to be searched, the node determines whether a connected face in the sub-connected domain corresponds to the face to be searched.

6. The method for generating a super-large-scale highly scalable grid according to claim 5, characterized in that: The node determines whether the connection surface in the sub-connected domain corresponds to the surface to be searched, including: The node obtains the coordinates of each vertex in the to-be-searched surface and the coordinates of each vertex in the connected surface in the sub-connected domain; The node determines whether all vertices of the surface to be searched and all vertices of the connecting surface coincide with each other based on the coordinates of each vertex in the surface to be searched and the connecting surface. If so, it determines that the connecting surface corresponds to the surface to be searched.

7. The method for generating a super large scale highly scalable grid according to claim 1, characterized in that: Based on the correspondence between the connection surfaces, updating the mesh information in each mesh data file includes: For each of the nodes, the node reads the mesh data file to obtain mesh information in the sub-connected domain, wherein the mesh information includes mesh unit numbers and associated mesh point numbers of each surface mesh and volume mesh; Based on the correspondence between the connected surfaces, the repeated grid unit numbers and the associated grid point numbers of the surface meshes are eliminated, and the grid unit numbers and the associated grid point numbers of all the remaining surface meshes and volume meshes are updated.

8. The method for generating a super large scale highly scalable grid according to claim 1, characterized in that: Each of the nodes writes the updated mesh information into the mesh model file of the geometric model in parallel, including: Based on the number of grids in the updated grid information, determine the number of rows written to each node, and allocate a corresponding file partition to each node in the grid model file according to the number of rows written to each node; For each of the nodes, the node writes the updated grid information into the corresponding file partition.

9. An electronic device, characterized in that: The electronic device comprises: Processor and memory; The processor is used to execute the steps of the ultra-large-scale high-scalability grid generation method as described in any one of claims 1 to 8 by calling the program or instructions stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, which enables a computer to execute the steps of the ultra-large-scale and highly scalable grid generation method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Super-large scale unstructured grid generation method based on virtual merging strategy

    CN117131733A

  • Unstructured grid combination method and device based on boundary merging

    CN118966138A

  • Distributed construction method and device of grid model, equipment and medium

    CN119048712A

  • Meshing program

    JP2013037400A

  • Decoupled parallel meshing in computer aided design

    US20140039847A1

Cited By

  • Unstructured grid division method based on structured grid and electronic equipment

    CN120726262A

  • Structural grid based unstructured mesh partitioning method and electronic device

    CN120726262B