Non-structural hybrid grid generation method and device, equipment and storage medium
By subdividing the initial octree unit and processing of non-structural mesh types, the process of non-structural hybrid mesh generation is simplified, the problem of high complexity in the existing technology is solved, and efficient mesh generation is achieved.
Patent Information
- Application Number
- CN202411405968.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2024-11-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art produces a coordinated, suspended node-free non-structural hybrid grid that only contains standard units, and requires nearly a hundred different situations to be handled, resulting in large coding complexity and debugging workload.
By creating the initial octree unit based on the geometric structure of the object to be simulated, and subdividing it according to geometric accuracy and preset criteria, multiple octree units are obtained, and then creating a non-structural mesh around the vertices of each octree unit. If it is a non-standard unit, determine its type and subdivided, obtain the second type of adjacent grid for further subdivision, and obtain a non-structural hybrid grid.
The generation process of non-structural hybrid mesh is simplified, the coding complexity and debugging workload is reduced, and a coordinated, hanging node-free non-structural hybrid mesh is obtained by processing only a small number of non-standard cells and their adjacent cells.
Smart Images

Figure CN118916943A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for generating an unstructured hybrid grid. Background Art
[0002] In scientific and engineering applications, physical problems in many fields can be reduced to numerical solutions of partial differential equations, such as computational fluid dynamics (CFD), computational electromagnetics (CEM), computational structural mechanics, etc. Before numerical calculation, the given geometric area needs to be discretized into a combination of a finite number of simple units, a process also known as mesh generation. As a key part of numerical simulation, mesh generation directly affects the calculation accuracy, efficiency, and reliability of the final results of subsequent simulations.
[0003] At present, in order to obtain a coordinated unstructured hybrid grid without hanging nodes and containing only standard units, the template method is mainly used to divide the octree grid into an unstructured hybrid grid. Among them, the standard units include tetrahedron, pyramid, triangular prism and hexahedron.
[0004] When using the template method to generate the above unstructured hybrid grid, thousands of different situations need to be considered. Even if the symmetry rule is used to simplify, nearly a hundred situations need to be considered. Therefore, the process of using the template method to generate the above unstructured hybrid grid is relatively complicated. Summary of the invention
[0005] The present application provides a method, apparatus, device and storage medium for generating an unstructured hybrid grid, which can simplify the generation process of the unstructured hybrid grid.
[0006] In order to achieve the above objectives, this application adopts the following technical solutions: In a first aspect, the present application provides a method for generating an unstructured hybrid grid, the method comprising: Acquiring simulation requirements, wherein the simulation requirements include the geometric structure and geometric accuracy of the object to be simulated; Creating an initial octree unit according to the geometric structure of the object to be simulated; According to the geometric accuracy of the object to be simulated and a preset criterion, the initial octree unit is subdivided to obtain a plurality of octree leaf units, wherein the octree leaf unit is an octree unit without a subunit, wherein the preset criterion includes that the level difference between adjacent octree leaf units is not higher than 1, and subunits with the same octree parent unit are subdivided together; the level of the octree leaf unit is determined by obtaining the number of times the octree leaf unit is subdivided; Creating an unstructured grid around the vertices of each octahedral leaf unit, wherein the vertices of the unstructured grid are respectively located at the centroids of different octahedral leaf units; If the created unstructured grid is a non-standard unit, determining a first type of the unstructured grid; subdividing the unstructured grid according to the first type of the unstructured grid; Acquire a second type of an unstructured grid adjacent to a subdivided side of the unstructured grid; According to the second type, the adjacent unstructured grids are subdivided to obtain unstructured mixed grids.
[0007] In some possible implementations, subdividing the unstructured grid according to the first type of the unstructured grid includes: If the first type of the unstructured mesh indicates that the unstructured mesh includes 7 vertices, the unstructured mesh is split into a pyramidal mesh and a triangular prism mesh.
[0008] In some possible implementations, subdividing the unstructured grid according to the first type of the unstructured grid includes: If the first type of the unstructured mesh indicates that the unstructured mesh includes 6 vertices, the unstructured mesh is split into two tetrahedral meshes.
[0009] In some possible implementations, subdividing the unstructured grid according to the first type of the unstructured grid includes: If the first type of the unstructured mesh indicates that the unstructured mesh includes five vertices, the unstructured mesh is split into two tetrahedral meshes.
[0010] In some possible implementations, subdividing the adjacent unstructured grids according to the second type includes: If the second type of the adjacent unstructured grid represents that the adjacent unstructured grid is a pyramidal grid, the pyramidal grid is split into two tetrahedral grids along the bottom surface.
[0011] In some possible implementations, subdividing the adjacent unstructured grids according to the second type includes: If the second type of the adjacent unstructured grid represents that the adjacent unstructured grid is a triangular prism grid, a first center point is inserted inside the triangular prism grid, and the triangular prism grid is split into a plurality of pyramid grids and a plurality of tetrahedral grids based on the first center point.
[0012] In some possible implementations, subdividing the adjacent unstructured grids according to the second type includes: If the second type of the adjacent unstructured grid represents that the adjacent unstructured grid is a hexahedral grid, a second center point is inserted inside the hexahedral grid, and the hexahedral grid is split into a plurality of pyramidal grids and a plurality of tetrahedral grids based on the second center point.
[0013] In a second aspect, the present application provides a device for generating an unstructured hybrid grid, the device comprising: An acquisition module, used for acquiring simulation requirements, wherein the simulation requirements include the geometric structure and geometric accuracy of the object to be simulated; A creation module, used for creating an initial octree unit according to the geometric structure of the object to be simulated; A subdivision module, for subdividing the initial octree unit according to the geometric accuracy of the object to be simulated and a preset criterion to obtain a plurality of octree leaf units, wherein the octree leaf unit is an octree unit without a subunit, wherein the preset criterion includes that the level difference between adjacent octree leaf units is not higher than 1, and subunits with the same octree parent unit are subdivided together; the level of the octree leaf unit is determined by obtaining the number of times the octree leaf unit is subdivided; The creation module is further used to create an unstructured grid around the vertices of each octave leaf unit, wherein the vertices of the unstructured grid are respectively located at the centroids of different octave leaf units; A generation module is used to determine the first type of the unstructured grid if the created unstructured grid is a non-standard unit; subdivide the unstructured grid according to the first type of the unstructured grid; obtain the second type of the unstructured grid adjacent to the subdivided side of the unstructured grid; and subdivide the adjacent unstructured grid according to the second type to obtain an unstructured mixed grid.
[0014] In a third aspect, the present application provides a computing device, including a memory and a processor; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as described in any one of the first aspects.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method as described in any one of the first aspects.
[0016] It can be seen from the above technical solution that the present application has at least the following beneficial effects: In the present application, an initial octree unit is first created based on the geometric structure of the object to be simulated, and then the initial octree unit is subdivided according to the geometric accuracy of the object to be simulated and the preset criteria to obtain multiple octree leaf units, where the octree leaf unit is an octree unit without subunits, wherein the preset criteria include that the level difference between adjacent octree leaf units is not higher than 1, and subunits with the same octree parent unit are subdivided together; then an unstructured grid is created around the vertices of each octree unit, and the vertices of the unstructured grid are located at the centroids of different octree units, thereby obtaining 7 types of grids, 4 of which are standard units and do not require further processing. If the created unstructured grid is a non-standard unit, determine the first type of the unstructured grid; subdivide the unstructured grid according to the first type of the unstructured grid; obtain the second type of the unstructured grid adjacent to the subdivided side of the unstructured grid; subdivide the adjacent unstructured grid according to the second type to obtain an unstructured mixed grid. It can be seen that only the other three non-standard cells and the cells adjacent to these three non-standard cells need to be split to obtain a coordinated, non-hanging node-free, non-structured hybrid grid containing only standard cells. Compared with the traditional template method that needs to handle nearly a hundred different situations, the technical solution of the present application greatly reduces the coding complexity and debugging workload, and simplifies the generation process of non-structured hybrid grids.
[0017] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be realized in any single embodiment. On the contrary, it is understood that the description of features or beneficial effects means that specific technical features, technical solutions or beneficial effects are included in at least one embodiment. Therefore, the description of technical features, technical solutions or beneficial effects in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and beneficial effects described in the present embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that the embodiment can be realized without one or more specific technical features, technical solutions or beneficial effects of a specific embodiment. In other embodiments, additional technical features and beneficial effects can also be identified in a specific embodiment that does not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flow chart of a method for generating an unstructured hybrid grid provided in an embodiment of the present application; Figure 2 A schematic diagram of an object to be simulated provided in an embodiment of the present application; Figure 3 A schematic diagram of subdividing an initial octree unit provided in an embodiment of the present application; Figure 4A schematic diagram of a tetrahedral mesh provided in an embodiment of the present application; Figure 5 A schematic diagram of a pyramid-shaped grid provided in an embodiment of the present application; Figure 6 A schematic diagram of a triangular prism grid provided in an embodiment of the present application; Figure 7 A schematic diagram of a hexahedral grid provided in an embodiment of the present application; Figure 8 A schematic diagram of a first non-standard unit provided in an embodiment of the present application; Fig. 9 A schematic diagram of a second non-standard unit provided in an embodiment of the present application; Fig.10 A schematic diagram of a third non-standard unit provided in an embodiment of the present application; Fig.11 A schematic diagram of a subdivision method for a first non-standard unit provided in an embodiment of the present application; Fig.12 A schematic diagram of a subdivision method for a second non-standard unit provided in an embodiment of the present application; Fig.13 A schematic diagram of a subdivision method for a third non-standard unit provided in an embodiment of the present application; Fig.14 A schematic diagram of an unstructured hybrid grid provided in an embodiment of the present application; Fig.15 A schematic diagram of a device for generating an unstructured hybrid grid provided in an embodiment of the present application; Fig.16 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] The terms "first", "second", "third", etc. in the specification of this application and the accompanying drawings are used to distinguish different objects rather than to limit a specific order.
[0020] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0021] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given: Meshes are usually divided into structured meshes and unstructured meshes. Structured meshes are mainly suitable for geometric areas with regular shapes and simple boundaries. For complex geometric bodies, their generation is time-consuming and laborious. In actual engineering applications, unstructured meshes with good adaptability to complex shapes and high degree of automation are usually used. Unstructured mesh generation algorithms generally include three categories: Delaunay method, frontier advancing algorithm, and octree algorithm. The first two methods generate meshes from face to body, requiring the geometric boundaries to be closed and manifold. The octree algorithm generates meshes from body to face, which can be applied to "dirty" geometry, such as geometric bodies with slits, overlapping surfaces, non-manifolds, etc., which greatly reduces the requirements of mesh generation for the geometric structure of the simulation object.
[0022] In the process of generating unstructured hybrid meshes using the octree algorithm, the initial octree units need to be converted into standard units containing only tetrahedrons, pyramids, triangular prisms and hexahedrons, and the hanging nodes need to be coordinated and not included.
[0023] The current generation scheme using the template method requires many considerations, cumbersome code writing, heavy debugging workload, and a relatively complex generation process.
[0024] In view of this, an embodiment of the present application provides a method for generating an unstructured hybrid grid, which can be applied to a processing device, which can be a terminal or a server. Terminals include but are not limited to smartphones, tablet computers, laptops, personal digital assistants, or smart wearable devices. The server can be a cloud server, such as a central server in a central cloud computing cluster, or an edge server in an edge cloud computing cluster. Of course, the server can also be a server in a local data center. A local data center refers to a data center directly controlled by a user.
[0025] In order to make the technical solution of the present application clearer and easier to understand, the technical solution of the present application is introduced below in conjunction with the accompanying drawings. Figure 1 As shown in FIG. 1 , the figure is a flow chart of a method for generating an unstructured hybrid grid provided in an embodiment of the present application, the method comprising: S101, a processing device obtains simulation requirements.
[0026] The simulation requirements include the geometric structure and geometric accuracy of the object to be simulated.
[0027] In some embodiments, the processing device may provide a human-computer interaction interface to the user, in which the user may configure simulation requirements, for example, the geometric structure and geometric accuracy of the object to be simulated. The geometric accuracy is used to indicate the size of the smallest grid. Figure 2 As shown, this figure is a schematic diagram of an object to be simulated provided in an embodiment of the present application.
[0028] S102: The processing device creates an initial octree unit according to the geometric structure of the object to be simulated.
[0029] In some embodiments, after the processing device obtains the geometric structure of the object to be simulated, it can create an initial octree unit based on the geometric structure of the object to be simulated. Exemplarily, if the geometric structure of the object to be simulated represents that the length of the object to be simulated is a, the width is b, and the height is c, then the initial octree unit created by the processing device can be a regular cube, and the side length of the regular cube is greater than the maximum value of a, b, and c. The initial octree unit created by the processing device can also be a cuboid, and the length of the cuboid is greater than a, the width is greater than b, and the height is greater than c. The octree unit can be a regular cube or a cuboid.
[0030] S103: The processing device subdivides the initial octree unit according to the geometric accuracy of the object to be simulated and a preset criterion to obtain a plurality of octree leaf units.
[0031] The preset criteria include that the level difference between adjacent octree leaf units is not higher than 1, and the subunits with the same octree parent unit are subdivided together, and the octree leaf unit is an octree unit without subunits.
[0032] like Figure 3 As shown in the figure, this figure is a schematic diagram of subdividing the initial octree unit provided by an embodiment of the present application. Figure 3 Introduce preset criteria. The initial octree unit 310 is subdivided into 8 octree units, and these 8 octree units are brother units of each other and have a common parent unit (i.e., the initial octree unit 310). If these 8 octree units are no longer further subdivided, that is, there are no child units, then these 8 octree units are octree leaf units; if these 8 octree units are further subdivided, for example, the octree unit 320 is further subdivided, then the brother units of the octree unit 320 also need to be further subdivided.
[0033] The level of the octree leaf unit is determined by the number of times the octree leaf unit is subdivided. For each octree unit, each time the octree unit is subdivided, the level of the octree unit obtained after the subdivision is increased by 1. Figure 3 , the level of the initial octree unit 310 is 0, the initial octree unit 310 is subdivided to obtain the octree unit 320, the level of the octree unit 320 is 1, if the octree unit 320 is further subdivided, the level of the octree unit 330 obtained after the subdivision is 2, and so on. The level difference between adjacent octree leaf units is not higher than 1 means that if the level of an octree leaf unit is 5, the level of the octree leaf unit adjacent to the octree leaf unit can only be 4, 5 or 6.
[0034] In some embodiments, the higher the geometric accuracy of the object to be simulated, the higher the number of times the octree unit is subdivided, so that the final octree leaf unit can adapt to the geometric structure of the object to be simulated and meet the simulation accuracy requirements.
[0035] S104: The processing device creates an unstructured grid around the vertices of each octave leaf unit.
[0036] After completing the subdivision of the octree unit to obtain the octree leaf unit, the processing device can create an unstructured mesh around each vertex of the octree leaf unit, and the vertices of the unstructured mesh are located at the centroids of different octree leaf units.
[0037] Among them, the unstructured grid includes 4 standard units and 3 non-standard units. The 4 standard units include tetrahedral grid, pyramid grid, triangular prism grid and hexahedral grid, which are introduced below.
[0038] like Figure 4 As shown, this figure is a schematic diagram of a tetrahedral mesh provided in an embodiment of the present application. The processing device can create an unstructured mesh around the vertex A0 of the octet leaf unit 411. The vertices of the unstructured mesh include A1, A2, A3 and A4. It can be seen that the unstructured mesh is a tetrahedral mesh. Among them, vertex A1 is the centroid of the octet leaf unit 411, vertex A2 is the centroid of the octet leaf unit 412, vertex A3 is the centroid of the octet leaf unit 413, and vertex A4 is the centroid of the octet leaf unit 414.
[0039] like Figure 5 As shown, the figure is a schematic diagram of a pyramidal grid provided in an embodiment of the present application. The processing device can create an unstructured grid around the vertex B0 of the octet leaf unit 511. The vertices of the unstructured grid include B1, B2, B3, B4 and B5. It can be seen that the unstructured grid is a pyramidal grid. Among them, vertex B1 is the centroid of the octet leaf unit 511, vertex B2 is the centroid of the octet leaf unit 512, vertex B3 is the centroid of the octet leaf unit 513, vertex B4 is the centroid of the octet leaf unit 514, and vertex B5 is the centroid of the octet leaf unit 515.
[0040] like Figure 6As shown, the figure is a schematic diagram of a triangular prism grid provided in an embodiment of the present application. The processing device can create an unstructured grid around the vertex C0 of the octet leaf unit 611. The vertices of the unstructured grid include C1, C2, C3, C4, C5 and C6. It can be seen that the unstructured grid is a triangular prism grid. Among them, vertex C1 is the centroid of the octet leaf unit 611, vertex C2 is the centroid of the octet leaf unit 612, vertex C3 is the centroid of the octet leaf unit 613, vertex C4 is the centroid of the octet leaf unit 614, vertex C5 is the centroid of the octet leaf unit 615, and vertex C6 is the centroid of the octet leaf unit 616.
[0041] like Figure 7 As shown, the figure is a schematic diagram of a hexahedral mesh provided in an embodiment of the present application. The processing device can create an unstructured mesh around the vertex D0 of the octet leaf unit 711. The vertices of the unstructured mesh include D1, D2, D3, D4, D5, D6, D7 and D8. It can be seen that the unstructured mesh is a hexahedral mesh. Among them, vertex D1 is the centroid of the octet leaf unit 711, vertex D2 is the centroid of the octet leaf unit 712, vertex D3 is the centroid of the octet leaf unit 713, vertex D4 is the centroid of the octet leaf unit 714, vertex D5 is the centroid of the octet leaf unit 715, vertex D6 is the centroid of the octet leaf unit 716, vertex D7 is the centroid of the octet leaf unit 717, and vertex D8 is the centroid of the octet leaf unit 718.
[0042] The above are standard units that can be created by processing equipment. The following will continue to introduce non-standard units.
[0043] like Figure 8 As shown, the figure is a schematic diagram of a first non-standard unit provided in an embodiment of the present application. The processing device can create an unstructured grid around the vertex E0 of the octet leaf unit 811, and the vertices of the unstructured grid include E1, E2, E3, E4, E5, E6 and E7, and the unstructured grid is the first non-standard unit. Among them, vertex E1 is the centroid of the octet leaf unit 811, vertex E2 is the centroid of the octet leaf unit 812, vertex E3 is the centroid of the octet leaf unit 813, vertex E4 is the centroid of the octet leaf unit 814, vertex E5 is the centroid of the octet leaf unit 815, vertex E6 is the centroid of the octet leaf unit 816, and vertex E7 is the centroid of the octet leaf unit 817.
[0044] like Fig. 9As shown, this figure is a schematic diagram of a second non-standard unit provided in an embodiment of the present application. The processing device can create an unstructured grid around the vertex F0 of the octet leaf unit 911, and the vertices of the unstructured grid include F1, F2, F3, F4, F5 and F6. The unstructured grid is a second non-standard unit. Among them, vertex F1 is the centroid of the octet leaf unit 911, vertex F2 is the centroid of the octet leaf unit 912, vertex F3 is the centroid of the octet leaf unit 913, vertex F4 is the centroid of the octet leaf unit 914, vertex F5 is the centroid of the octet leaf unit 915, and vertex F6 is the centroid of the octet leaf unit 916.
[0045] like Fig.10 As shown, this figure is a schematic diagram of a third non-standard unit provided in an embodiment of the present application. The processing device can create an unstructured grid around the vertex G0 of the octet leaf unit 1011, and the vertices of the unstructured grid include G1, G2, G3, G4 and G5. The unstructured grid is the third non-standard unit. Among them, vertex G1 is the centroid of the octet leaf unit 1011, vertex G2 is the centroid of the octet leaf unit 1012, vertex G3 is the centroid of the octet leaf unit 1013, vertex G4 is the centroid of the octet leaf unit 1014, and vertex G5 is the centroid of the octet leaf unit 1015.
[0046] S105: If the created unstructured grid is a non-standard unit, the processing device determines a first type of the unstructured grid.
[0047] If the unstructured grid created by the processing device is a non-standard unit, the first type of the non-standard unit is further determined. Different first types of non-standard units lead to different subdivision methods used subsequently.
[0048] S106: The processing device subdivides the unstructured grid according to the first type of the unstructured grid.
[0049] After determining the first type of the unstructured grid, the processing device may subdivide the unstructured grid based on the first subdivision method of the unstructured grid and then subdivide the unstructured grid according to the first subdivision method.
[0050] In some embodiments, if the first type of the unstructured grid indicates that the unstructured grid includes 7 vertices, the unstructured grid is split into a pyramidal grid and a triangular prism grid. Fig.11 As shown, the figure is a schematic diagram of a subdivision method for the first non-standard unit provided in an embodiment of the present application. The processing device can divide the first non-standard unit along the plane E1E2E6E5, and then obtain a pyramid-shaped grid composed of vertices E1, E2, E6, E5 and E7, and a triangular prism-shaped grid composed of vertices E1, E2, E6, E5, E3 and E4.
[0051] In some embodiments, if the first type of the unstructured mesh indicates that the unstructured mesh includes 6 vertices, the unstructured mesh is split into two tetrahedral meshes. Fig.12 As shown, the figure is a schematic diagram of a subdivision method for the second non-standard unit provided in an embodiment of the present application. The processing device can divide the second non-standard unit along the line F3F6 to obtain a tetrahedral mesh composed of vertices F3, F2, F6 and F1, and a tetrahedral mesh composed of vertices F3, F5, F6 and F4.
[0052] In some embodiments, if the first type of the unstructured mesh indicates that the unstructured mesh includes 5 vertices, the unstructured mesh is split into two tetrahedral meshes. Fig.13 As shown, the figure is a schematic diagram of a subdivision method for the third non-standard unit provided in an embodiment of the present application. The processing device can divide the third non-standard unit along the plane G4G2G1, and then obtain a tetrahedral mesh composed of vertices G4, G2, G1 and G5, and a tetrahedral mesh composed of vertices G4, G2, G1 and G3.
[0053] In the embodiment of the present application, after the processing device further subdivides the above-mentioned non-standard units, the obtained unstructured grids are all standard units, but new dividing lines will appear after the division, resulting in inconsistency with these divided unstructured grids, which requires further processing.
[0054] S107: The processing device obtains a second type of the unstructured grid adjacent to the subdivided side of the unstructured grid.
[0055] The processing device may obtain the second type of the unstructured grid adjacent to the subdivided side of the unstructured grid. The second types of the adjacent unstructured grids are different, and further second subdivision methods are also different.
[0056] S108. The processing device subdivides adjacent unstructured grids according to the second type to obtain unstructured mixed grids.
[0057] After obtaining the second type, the processing device may first determine a second subdivision method for subdividing the adjacent unstructured grid, and then subdivide the adjacent unstructured grid according to the second subdivision method.
[0058] In some embodiments, if the second type of the adjacent unstructured grid indicates that the adjacent unstructured grid is a pyramidal grid, the bottom surface of the pyramidal grid is split into two tetrahedral grids. Fig.11After the first non-standard unit is segmented, segmentation lines E1E5 and E2E6 are formed on the surface. For example, the unstructured grid adjacent to the surface E2E4E6 is a pyramidal grid, and the segmentation line E2E6 appears on the bottom surface of the pyramidal grid. The pyramidal grid is split along the segmentation line E2E6 on the bottom surface of the pyramidal grid, thereby obtaining two tetrahedral grids.
[0059] In some embodiments, if the second type of the adjacent unstructured grid indicates that the adjacent unstructured grid is a triangular prism grid, a first center point is inserted inside the triangular prism grid, and the triangular prism grid is split into a plurality of pyramidal grids and a plurality of tetrahedral grids based on the first center point. Fig.11 After the first non-standard unit is divided, a dividing line E1E5 and a dividing line E2E6 will be formed on the surface. For example, the unstructured grid adjacent to the surface E2E4E6 is a triangular prism grid, and the above-mentioned dividing line E2E6 will appear on the surface of the triangular prism grid. The triangular prism grid is split along the dividing line E2E6 on the surface of the triangular prism grid and the inserted first center point, thereby obtaining a plurality of pyramidal grids and a plurality of tetrahedral grids. Among them, assuming that the dividing line E2E6 appears on the triangular surface of the triangular prism grid, 3 pyramidal grids and 3 tetrahedral grids will be obtained. Assuming that the dividing line E2E6 appears on the quadrilateral surface of the triangular prism, 2 pyramidal grids and 4 tetrahedral grids will be obtained.
[0060] In some embodiments, if the second type of the adjacent unstructured grid indicates that the adjacent unstructured grid is a hexahedral grid, a second center point is inserted inside the hexahedral grid, and the hexahedral grid is split into a plurality of pyramidal grids and a plurality of tetrahedral grids based on the second center point. Fig.11 After the first non-standard unit is split, a splitting line E1E5 and a splitting line E2E6 will be formed on the surface. For example, the unstructured mesh adjacent to the surface E2E4E6 is a hexahedral mesh, and the splitting line E2E6 will appear on the surface of the hexahedral mesh. The hexahedral mesh is split along the splitting line E2E6 on the surface of the hexahedral mesh and the inserted second center point, thereby obtaining a plurality of pyramidal meshes and a plurality of tetrahedral meshes. Assuming that the splitting line E2E6 appears on the surface of the quadrilateral of the hexahedral mesh, 5 pyramidal meshes and 2 tetrahedral meshes will be obtained.
[0061] If there are still incompatible or hanging nodes after the above subdivision, continue to subdivide along the newly generated partition until a compatible unstructured hybrid mesh without hanging nodes is obtained.
[0062] like Fig.14As shown in the figure, this figure is a schematic diagram of an unstructured hybrid grid provided in an embodiment of the present application. The unstructured hybrid grid is for Figure 2 Generated by the object to be simulated shown.
[0063] Based on the above description, the embodiment of the present application provides a method for generating an unstructured hybrid grid, which converts an octree structure into an unstructured hybrid grid in a dual manner. Specifically, an initial octree unit is first created based on the geometric structure of the object to be simulated, and then the initial octree unit is subdivided according to the geometric accuracy of the object to be simulated and the preset criteria to obtain multiple octree leaf units, where the octree leaf unit is an octree unit without subunits, wherein the preset criteria include that the level difference between adjacent octree leaf units is not higher than 1, and the subunits with the same octree parent unit are subdivided together; then around the vertices of each octree unit, an unstructured grid is created, and the vertices of the unstructured grid are located at the centroids of different octree units, thereby 7 types of grids can be obtained, of which 4 are standard units and do not require further processing. If the created unstructured grid is a non-standard unit, determine the first type of the unstructured grid; according to the first type of the unstructured grid, subdivide the unstructured grid; obtain the second type of the unstructured grid adjacent to the subdivided side of the unstructured grid; according to the second type, subdivide the adjacent unstructured grid to obtain an unstructured hybrid grid. It can be seen that only the other three non-standard cells and the cells adjacent to these three non-standard cells need to be split to obtain a coordinated, non-hanging node-free, non-structured hybrid grid containing only standard cells. Compared with the traditional template method that needs to handle nearly a hundred different situations, the technical solution of the present application greatly reduces the coding complexity and debugging workload, and simplifies the generation process of non-structured hybrid grids.
[0064] Combination of the above Figures 1 to 14 The method for generating an unstructured hybrid grid provided in an embodiment of the present application is introduced in detail. The device and equipment provided in the embodiment of the present application will be introduced in conjunction with the accompanying drawings.
[0065] like Fig.15 As shown, the figure is a schematic diagram of a device for generating an unstructured hybrid grid provided in an embodiment of the present application, the device comprising: An acquisition module 1401 is used to acquire simulation requirements, where the simulation requirements include the geometric structure and geometric accuracy of the object to be simulated; A creation module 1402, used to create an initial octree unit according to the geometric structure of the object to be simulated; A subdivision module 1403 is used to subdivide the initial octree unit according to the geometric accuracy of the object to be simulated and a preset criterion to obtain a plurality of octree leaf units, wherein the octree leaf unit is an octree unit without a subunit, wherein the preset criterion includes that the level difference between adjacent octree leaf units is not higher than 1, and subunits with the same octree parent unit are subdivided together; the level of the octree leaf unit is determined by obtaining the number of times the octree leaf unit is subdivided; The creation module 1402 is further used to create an unstructured grid around the vertices of each octahedral leaf unit, wherein the vertices of the unstructured grid are respectively located at the centroids of different octahedral leaf units; The generation module 1404 is used to determine the first type of the unstructured grid if the created unstructured grid is a non-standard unit; subdivide the unstructured grid according to the first type of the unstructured grid; obtain the second type of the unstructured grid adjacent to the subdivided side of the unstructured grid; and subdivide the adjacent unstructured grid according to the second type to obtain an unstructured mixed grid.
[0066] In some possible implementations, the generating module 1404 is specifically configured to split the unstructured mesh into a pyramidal mesh and a triangular prism mesh if the first type of the unstructured mesh represents that the unstructured mesh includes 7 vertices.
[0067] In some possible implementations, the generating module 1404 is specifically configured to split the unstructured mesh into two tetrahedral meshes if the first type of the unstructured mesh represents that the unstructured mesh includes 6 vertices.
[0068] In some possible implementations, the generating module 1404 is specifically configured to split the unstructured mesh into two tetrahedral meshes if the first type of the unstructured mesh represents that the unstructured mesh includes five vertices.
[0069] In some possible implementations, the generating module 1404 is specifically configured to split the adjacent unstructured grid into two tetrahedral grids along a bottom surface of the pyramidal grid if the second type of the adjacent unstructured grid indicates that the adjacent unstructured grid is a pyramidal grid.
[0070] In some possible implementations, the generation module 1404 is specifically used to insert a first center point inside the triangular prism grid if the second type of the adjacent unstructured grid characterizes that the adjacent unstructured grid is a triangular prism grid, and split the triangular prism grid into a plurality of pyramid grids and a plurality of tetrahedral grids based on the first center point.
[0071] In some possible implementations, the generation module 1404 is specifically used to insert a second center point inside the hexahedral mesh if the second type of the adjacent unstructured mesh characterizes that the adjacent unstructured mesh is a hexahedral mesh, and split the hexahedral mesh into a plurality of pyramidal meshes and a plurality of tetrahedral meshes based on the second center point.
[0072] The device for generating an unstructured hybrid grid according to an embodiment of the present application may correspond to executing the method described in the embodiment of the present application, and the above-mentioned other operations and / or functions of each module / unit of the device for generating an unstructured hybrid grid are respectively to realize Figure 1 For the sake of brevity, the corresponding processes of each method in the illustrated embodiment are not described in detail here.
[0073] The present application also provides a computing device. Fig.16 As shown, this figure is a schematic diagram of a computing device provided in an embodiment of the present application, and the computing device 1500 includes a bus 1501, a processor 1502, a communication interface 1503 and a memory 1504. The processor 1502, the memory 1504 and the communication interface 1503 communicate through the bus 1501.
[0074] The bus 1501 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.16 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0075] The processor 1502 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0076] The communication interface 1503 is used for communicating with the outside.
[0077] The memory 1504 may include a volatile memory, such as a random access memory (RAM). The memory 1504 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0078] The memory 1504 stores executable codes, and the processor 1502 executes the executable codes to perform the aforementioned method for generating an unstructured hybrid grid.
[0079] Specifically, in implementing Fig.15 In the case of the embodiment shown, and Fig.15 When each module or unit of the unstructured hybrid grid generation device described in the embodiment is implemented by software, the execution Fig.15 The software or program code required for the functions of each module / unit in the system may be partially or completely stored in the memory 1504. The processor 1502 executes the program code corresponding to each unit stored in the memory 1504 to perform the aforementioned method for generating an unstructured hybrid grid.
[0080] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned method for generating an unstructured hybrid grid.
[0081] The embodiment of the present application further provides a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.
[0082] The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0083] When the computer program product is executed by a computer, the computer executes any of the aforementioned methods for generating an unstructured hybrid grid. The computer program product may be a software installation package, and when any of the aforementioned methods for generating an unstructured hybrid grid is required, the computer program product may be downloaded and executed on a computer.
[0084] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0085] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application.
Claims
1. A method for generating an unstructured hybrid grid, characterized in that: The method comprises: Acquiring simulation requirements, wherein the simulation requirements include the geometric structure and geometric accuracy of the object to be simulated; Creating an initial octree unit according to the geometric structure of the object to be simulated; According to the geometric accuracy of the object to be simulated and a preset criterion, the initial octree unit is subdivided to obtain a plurality of octree leaf units, wherein the octree leaf unit is an octree unit without a subunit, wherein the preset criterion includes that the level difference between adjacent octree leaf units is not higher than 1, and subunits with the same octree parent unit are subdivided together; the level of the octree leaf unit is determined by obtaining the number of times the octree leaf unit is subdivided; Creating an unstructured grid around the vertices of each octahedral leaf unit, wherein the vertices of the unstructured grid are respectively located at the centroids of different octahedral leaf units; If the created unstructured grid is a non-standard unit, determining a first type of the unstructured grid; subdividing the unstructured grid according to the first type of the unstructured grid; Acquire a second type of an unstructured grid adjacent to a subdivided side of the unstructured grid; According to the second type, the adjacent unstructured grids are subdivided to obtain unstructured mixed grids.
2. The method according to claim 1, characterized in that The step of subdividing the unstructured grid according to the first type of the unstructured grid comprises: If the first type of the unstructured mesh indicates that the unstructured mesh includes 7 vertices, the unstructured mesh is split into a pyramidal mesh and a triangular prism mesh.
3. The method according to claim 1, characterized in that The step of subdividing the unstructured grid according to the first type of the unstructured grid comprises: If the first type of the unstructured mesh indicates that the unstructured mesh includes 6 vertices, the unstructured mesh is split into two tetrahedral meshes.
4. The method according to claim 1, characterized in that: The step of subdividing the unstructured grid according to the first type of the unstructured grid comprises: If the first type of the unstructured mesh indicates that the unstructured mesh includes five vertices, the unstructured mesh is split into two tetrahedral meshes.
5. The method according to any one of claims 1 to 4, characterized in that: The step of subdividing the adjacent unstructured grids according to the second type includes: If the second type of the adjacent unstructured grid represents that the adjacent unstructured grid is a pyramidal grid, the pyramidal grid is split into two tetrahedral grids along the bottom surface.
6. The method according to any one of claims 1 to 4, characterized in that: The step of subdividing the adjacent unstructured grids according to the second type includes: If the second type of the adjacent unstructured grid represents that the adjacent unstructured grid is a triangular prism grid, a first center point is inserted inside the triangular prism grid, and the triangular prism grid is split into a plurality of pyramid grids and a plurality of tetrahedral grids based on the first center point.
7. The method according to any one of claims 1 to 4, characterized in that: The step of subdividing the adjacent unstructured grids according to the second type includes: If the second type of the adjacent unstructured grid represents that the adjacent unstructured grid is a hexahedral grid, a second center point is inserted inside the hexahedral grid, and the hexahedral grid is split into a plurality of pyramidal grids and a plurality of tetrahedral grids based on the second center point.
8. A device for generating an unstructured hybrid grid, characterized in that: The device comprises: An acquisition module, used for acquiring simulation requirements, wherein the simulation requirements include the geometric structure and geometric accuracy of the object to be simulated; A creation module, used for creating an initial octree unit according to the geometric structure of the object to be simulated; A subdivision module, for subdividing the initial octree unit according to the geometric accuracy of the object to be simulated and a preset criterion to obtain a plurality of octree leaf units, wherein the octree leaf unit is an octree unit without a subunit, wherein the preset criterion includes that the level difference between adjacent octree leaf units is not higher than 1, and subunits with the same octree parent unit are subdivided together; the level of the octree leaf unit is determined by obtaining the number of times the octree leaf unit is subdivided; The creation module is further used to create an unstructured grid around the vertices of each octave leaf unit, wherein the vertices of the unstructured grid are respectively located at the centroids of different octave leaf units; A generation module is used to determine the first type of the unstructured grid if the created unstructured grid is a non-standard unit; subdivide the unstructured grid according to the first type of the unstructured grid; obtain the second type of the unstructured grid adjacent to the subdivided side of the unstructured grid; and subdivide the adjacent unstructured grid according to the second type to obtain an unstructured mixed grid.
9. A computing device, characterized in that including memory and processor; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Rapid generation method of hybrid grid
CN104732589A
Video coding and decoding method and system based on octree algorithm
CN116896644A
Thermal stress analysis hybrid finite element method based on polyhedron and octree mesh
CN117238415A
Systems and methods for simulating distortion and residual stress in an additive manufacturing process
US11663373B1
Method of simulating detailed movements of fluids using derivative particles
US20070239414A1
Cited By
Unstructured grid dual data parallel conversion method for flow field numerical simulation
CN120930541A
