Non-structural hybrid grid generation method and device, equipment and storage medium

By creating initial octree units and subdividing them during the grid generation process, combining the creation and segmentation technology of non-structural grids, the complex problem of the non-structural hybrid grid generation process in the existing technology is solved, and a simplified grid generation process and reduced workload are achieved.

CN120162844AInactive Publication Date: 2025-06-17BEIJING LINGYUN ZHIQING SOFTWARE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510585109.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-10-10
Filing Date
2025-05-08
Publication Date
2025-06-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is complex when generating non-structural hybrid meshes, and thousands of different situations need to be considered, resulting in large coding complexity and debugging workload.

Method used

By creating the initial octree unit based on the geometry of the object to be simulated, and subdividing it according to geometric accuracy and preset criteria, multiple octree leaf units are obtained, and then creating a non-structural mesh around the vertices of each leaf unit. If the grid created is a non-standard unit, determine its type and subdivides until a coordinated non-structural hybrid grid is obtained.

Benefits of technology

The generation process of non-structural hybrid grids is greatly simplified, the coding complexity and debugging workload is reduced, and the standard unit grid is obtained by splitting a small number of non-standard cells.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120162844A_ABST
    Figure CN120162844A_ABST
Patent Text Reader

Abstract

The invention discloses an unstructured hybrid grid generation method and device, equipment and a storage medium, and relates to the technical field of computers, and the method comprises the steps: creating an initial octree unit; according to geometric accuracy and a preset criterion, the initial octree unit is subdivided, a plurality of octree leaf units are obtained, and the preset criterion includes that the hierarchy difference between adjacent octree leaf units is not larger than 1, and subunits with the same octree parent unit are jointly subdivided; creating an unstructured grid around the vertex of each octree leaf unit; if the created unstructured grid is a non-standard unit, determining a first type of the unstructured grid; according to the first type of the unstructured grid, subdividing the unstructured grid; obtaining a second type of an unstructured grid adjacent to the subdivided side of the unstructured grid; and according to the second type, subdividing the adjacent unstructured grids to obtain an unstructured hybrid grid. According to the method, the generation process of the unstructured hybrid grid can be simplified.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of a Chinese patent application with the application number 202411405968.2 and the invention title "A Method, Device, Equipment and Storage Medium for Generating Unstructured Hybrid Meshes" filed with the National Intellectual Property Administration on October 10, 2024, the entire content of which is incorporated herein by reference. Technical Field

[0002] This application relates to the field of computer technology, and in particular, to a method, device, equipment and storage medium for generating unstructured hybrid meshes. Background Art

[0003] In scientific and engineering applications, physical problems in many fields can be reduced to the numerical solution of partial differential equations, such as computational fluid dynamics (CFD), computational electromagnetics (CEM), computational structural mechanics, etc. Before numerical calculation, the given geometric region needs to be discretized into a combination of a finite number of simple elements, and this process is also called mesh generation. As a key link in numerical simulation, mesh generation directly affects the computational accuracy, efficiency of subsequent simulations, and the reliability of the final results.

[0004] Currently, in order to obtain a coordinated, non-suspended-node and unstructured hybrid mesh that only contains standard elements, the octree mesh is mainly divided into an unstructured hybrid mesh by using the template method. Among them, the standard elements include tetrahedrons, pyramids, triangular prisms, and hexahedrons.

[0005] When using the template method to generate the above unstructured hybrid mesh, thousands of different situations need to be considered. Even if the symmetry rule is used to simplify, nearly a hundred situations still need to be considered. Therefore, the process of generating the above unstructured hybrid mesh by using the template method is relatively complex. Summary of the Invention

[0006] This application provides a method, device, equipment and storage medium for generating unstructured hybrid meshes, which can simplify the process of generating unstructured hybrid meshes.

[0007] To achieve the above object, this application adopts the following technical solutions: In the first aspect, this application provides a method for generating an unstructured hybrid mesh, and the method includes: Obtain simulation requirements, where the simulation requirements include the geometric structure and geometric accuracy of the object to be simulated, and the object to be simulated is an aircraft, a submersible, a vehicle, an engine, or a ship; Create an initial octree cell according to the geometric structure of the object to be simulated; Subdivide the initial octree cells according to the geometric accuracy of the object to be simulated and a preset criterion to obtain a plurality of octree leaf cells, where the octree leaf cells are octree cells without child cells. Among them, the preset criterion includes that the level difference between adjacent octree leaf cells is not higher than 1, and the child cells with the same octree parent cell are jointly subdivided; the level of the octree leaf cell is determined by the number of times of subdivision to obtain the octree leaf cell. Create an unstructured grid around the vertices of each octree leaf cell, where the vertices of the unstructured grid are respectively located at the centroids of different octree leaf cells. If the created unstructured grid is a non-standard cell, 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 side where the unstructured grid is subdivided. Subdivide the adjacent unstructured grid according to the second type to obtain an unstructured hybrid grid.

[0008] In some possible implementation manners, the step of subdividing the unstructured grid according to the first type of the unstructured grid includes: If the first type of the unstructured grid indicates that the unstructured grid includes 7 vertices, split the unstructured grid into a pyramidal grid and a triangular prism grid.

[0009] In some possible implementation manners, the step of subdividing the unstructured grid according to the first type of the unstructured grid includes: If the first type of the unstructured grid indicates that the unstructured grid includes 6 vertices, split the unstructured grid into two tetrahedral grids.

[0010] In some possible implementation manners, the step of subdividing the unstructured grid according to the first type of the unstructured grid includes: If the first type of the unstructured grid indicates that the unstructured grid includes 5 vertices, split the unstructured grid into two tetrahedral grids.

[0011] In some possible implementation manners, the step of subdividing the adjacent unstructured grid according to the second type includes: If the second type of the adjacent unstructured grid indicates that the adjacent unstructured grid is a pyramidal grid, split it along the bottom surface of the pyramidal grid into two tetrahedral grids.

[0012] In some possible implementation manners, subdividing the adjacent unstructured grids according to the second type includes: If the second type of the adjacent unstructured grids characterizes that the adjacent unstructured grids are triangular prism-shaped grids, insert a first central point inside the triangular prism-shaped grids, and based on the first central point, split the triangular prism-shaped grids into a plurality of pyramid-shaped grids and a plurality of tetrahedron-shaped grids.

[0013] In some possible implementation manners, subdividing the adjacent unstructured grids according to the second type includes: If the second type of the adjacent unstructured grids characterizes that the adjacent unstructured grids are hexahedron-shaped grids, insert a second central point inside the hexahedron-shaped grids, and based on the second central point, split the hexahedron-shaped grids into a plurality of pyramid-shaped grids and a plurality of tetrahedron-shaped grids.

[0014] In a second aspect, the present application provides a device for generating an unstructured hybrid grid, and the device includes: An acquisition module, configured to acquire a simulation requirement, where the simulation requirement includes a geometric structure and a geometric accuracy of an object to be simulated, and the object to be simulated is an aircraft, a submersible vehicle, a vehicle, an engine, or a ship; A creation module, configured to create an initial octree cell according to the geometric structure of the object to be simulated; A subdivision module, configured to subdivide the initial octree cell according to the geometric accuracy of the object to be simulated and a preset criterion to obtain a plurality of octree leaf cells, where the octree leaf cells are octree cells without sub-cells, and where the preset criterion includes that a level difference between adjacent octree leaf cells is not higher than 1, and sub-cells having the same octree parent cell are jointly subdivided; and a level of the octree leaf cell is determined by the number of times of subdividing to obtain the octree leaf cell; The creation module is further configured to create an unstructured grid around vertices of each octree leaf cell, and vertices of the unstructured grid are respectively located at centroids of different octree leaf cells; A generation module, configured to if the created unstructured grid is a non-standard cell, determine a first type of the unstructured grid; subdivide the unstructured grid according to the first type of the unstructured grid; acquire a second type of an unstructured grid adjacent to a side where the unstructured grid is subdivided; and subdivide the adjacent unstructured grid according to the second type to obtain an unstructured hybrid grid.

[0015] In a third aspect, the present application provides a computing device, including a memory and a processor; Among them, 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 is caused to execute the method described in any one of the first aspect.

[0016] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program for executing the method described in any one of the first aspect.

[0017] From the above technical solutions, it can be seen that the present application has at least the following beneficial effects: In the present application, an initial octree cell is first created based on the geometric structure of the object to be simulated, and then the initial octree cell is subdivided according to the geometric accuracy of the object to be simulated and a preset criterion to obtain a plurality of octree leaf cells, where an octree leaf cell is an octree cell without sub-cells. The preset criterion includes that the level difference between adjacent octree leaf cells is not higher than 1, and the sub-cells having the same octree parent cell are jointly subdivided; then, an unstructured grid is created around the vertices of each octree cell, and the vertices of the unstructured grid are located at the centroids of different octree cells, whereby 7 types of grids can be obtained, and 4 of them are standard cells that do not require further processing. If the created unstructured grid is a non-standard cell, 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 side where the unstructured grid is subdivided; according to the second type, subdivide the adjacent unstructured grid to obtain an unstructured hybrid grid. It can be seen that only the other 3 non-standard cells and the cells adjacent to these 3 non-standard cells need to be split to obtain an unstructured hybrid grid that is coordinated, has no hanging nodes, and only contains 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 the unstructured hybrid grid.

[0018] 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 achieved in any single embodiment. On the contrary, it can be understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution or beneficial effect is 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 this embodiment can be combined in any appropriate manner. Those skilled in the art will understand that an embodiment can be implemented 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 specific embodiments that do not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flowchart of a method for generating a non-structured hybrid grid provided by an embodiment of this application; Figure 2 It is a schematic diagram of an object to be simulated provided by an embodiment of this application; Figure 3 It is a schematic diagram of subdividing an initial octree cell provided by an embodiment of this application; Figure 4 It is a schematic diagram of a tetrahedral mesh provided by an embodiment of this application; Figure 5 It is a schematic diagram of a pyramidal mesh provided by an embodiment of this application; Figure 6 It is a schematic diagram of a triangular prism mesh provided by an embodiment of this application; Figure 7 It is a schematic diagram of a hexahedral mesh provided by an embodiment of this application; Figure 8 It is a schematic diagram of a first non-standard cell provided by an embodiment of this application; Figure 9 It is a schematic diagram of a second non-standard cell provided by an embodiment of this application; Figure 10 It is a schematic diagram of a third non-standard cell provided by an embodiment of this application; Figure 11 It is a schematic diagram of a subdivision method for the first non-standard cell provided by an embodiment of this application; Figure 12 It is a schematic diagram of a subdivision method for the second non-standard cell provided by an embodiment of this application; Figure 13 It is a schematic diagram of a subdivision method for the third non-standard cell provided by an embodiment of this application; Figure 14 Schematic diagram of a non-structured hybrid grid provided by an embodiment of the present application; Figure 15 Schematic diagram of a device for generating a non-structured hybrid grid provided by an embodiment of the present application; Figure 16 Schematic diagram of a computing device provided by an embodiment of the present application. Detailed implementation manners

[0020] Terms such as "first", "second", and "third" in the description and drawings of the present application are used to distinguish different objects, rather than to limit a specific order.

[0021] In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.

[0022] For the sake of clear and concise description of the following embodiments, a brief introduction to the related technologies is given first: Grids are generally divided into structured grids and unstructured grids. Structured grids are mainly applicable to geometric regions with regular shapes and simple boundaries. For complex geometric bodies, it is time-consuming and laborious to generate them. In practical engineering applications, unstructured grids with good adaptability to complex shapes and high automation are usually used. Unstructured grid generation algorithms generally include three categories: Delaunay method, advancing front algorithm, and octree algorithm. The first two methods generate grids from surface to volume, requiring the geometric boundary to be closed and manifold. The octree algorithm generates grids from volume to surface, and can be applied to "dirty" geometries, such as geometries with slits, overlapping surfaces, non-manifold situations, etc., greatly reducing the requirements for the geometric structure of the object to be simulated for grid generation.

[0023] In the process of generating a non-structured hybrid grid using the octree algorithm, it is necessary to convert the initial octree cells into standard cells containing only tetrahedrons, pyramids, triangular prisms, and hexahedrons, and it is necessary to coordinate and not include hanging nodes.

[0024] Currently, for the generation scheme using the template method, numerous situations need to be considered, the code writing is cumbersome, the debugging workload is large, and the generation process is relatively complex.

[0025] 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, and the processing device can be a terminal or a server. The terminal includes but is not limited to a smart phone, a tablet computer, a laptop computer, a personal digital assistant, or a smart wearable device, etc. The server can be a cloud server, for example, 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. The local data center refers to a data center directly controlled by a user.

[0026] To make the technical solution of the present application clearer and easier to understand, the technical solution of the present application will be introduced below with reference to the accompanying drawings. As Figure 1 shown, this figure is a flowchart of a method for generating an unstructured hybrid grid provided by an embodiment of the present application. The method includes: S101. The processing device obtains a simulation requirement.

[0027] The simulation requirement includes the geometric structure and geometric accuracy of the object to be simulated.

[0028] In some embodiments, the processing device can provide a human-computer interaction interface to the user. On the human-computer interaction interface, the user can configure the simulation requirement. For example, the user can configure the geometric structure and geometric accuracy of the object to be simulated. Among them, the geometric accuracy is used to represent the size of the smallest grid. Among them, the object to be simulated includes an aircraft, a submersible, a vehicle, an engine, or a ship. The aircraft can be a civilian airliner, a military aircraft, a fixed-wing UAV, a multi-rotor UAV, a propeller aircraft, a helicopter, etc. The submersible includes a submarine, a torpedo, etc. The vehicle includes a bicycle, an automobile, a rail train, etc. The engine includes an aeroengine, etc. The ship includes a warship, a steamship, etc. As Figure 2 shown, this figure is a schematic diagram of an object to be simulated provided by an embodiment of the present application. Figure 2 The object to be simulated shown is a submersible.

[0029] S102. The processing device creates an initial octree cell according to the geometric structure of the object to be simulated.

[0030] In some embodiments, after the processing device obtains the geometric structure of the object to be simulated, it can create an initial octree cell 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, the initial octree cell created by the processing device can be a cube, and the side length of the cube is greater than the maximum value of a, b, and c above. The initial octree cell created by the processing device can also be a cuboid, the length of the cuboid is greater than a, the width is greater than b, and the height is greater than c. The octree cell can be a cube or a cuboid.

[0031] S103. The processing device subdivides the initial octree unit according to the geometric accuracy of the object to be simulated and a preset criterion, obtaining a plurality of octree leaf units.

[0032] The preset criterion includes that the level difference between adjacent octree leaf units is not higher than 1, and the sub-units having the same octree parent unit are jointly subdivided, and the octree leaf unit is an octree unit without sub-units.

[0033] As Figure 3 shown, this figure is a schematic diagram of subdividing the initial octree unit provided by an embodiment of the present application. The following combines Figure 3 to introduce the preset criterion. The initial octree unit 310 is subdivided into 8 octree units. These 8 octree units are sibling units and have a common parent unit (i.e., the initial octree unit 310). If these 8 octree units are not further subdivided, that is, they have no sub-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 sibling units of the octree unit 320 also need to be further subdivided.

[0034] The level of the octree leaf unit is determined by the number of times of subdivision to obtain this octree leaf unit. For each octree unit, each time this octree unit is subdivided, the level of the obtained octree unit after subdivision is incremented by 1. Combining Figure 3 , the level of the initial octree unit 310 is 0. Subdividing the initial octree unit 310 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 obtained octree unit 330 after subdivision is 2, and so on. The level difference between adjacent octree leaf units not being higher than 1 means that assuming the level of an octree leaf unit is 5, the levels of the octree leaf units adjacent to this octree leaf unit can only be 4, 5, or 6.

[0035] In some embodiments, the higher the geometric accuracy of the object to be simulated, the higher the number of times of subdividing the octree unit, so that the finally obtained octree leaf units can adapt to the geometric structure of the object to be simulated and meet the requirements of simulation accuracy.

[0036] S104. The processing device creates an unstructured mesh around the vertices of each octree leaf unit.

[0037] After completing the subdivision of the octree unit to obtain octree leaf units, the processing device can create an unstructured mesh around each vertex of the octree leaf unit. The vertices of this unstructured mesh are located at the centroids of different octree leaf units.

[0038] Among them, the unstructured grid includes 4 standard cells and 3 non-standard cells. The 4 standard cells include tetrahedral meshes, pyramidal meshes, triangular prism meshes, and hexahedral meshes, which will be introduced separately below.

[0039] As Figure 4 shown, this figure is a schematic diagram of a tetrahedral mesh provided by an embodiment of the present application. The processing device can create an unstructured grid around the vertex A0 of the octree leaf cell 411. The vertices of this unstructured grid include A1, A2, A3, and A4. It can be seen that this unstructured grid is a tetrahedral mesh. Among them, vertex A1 is the centroid of the octree leaf cell 411, vertex A2 is the centroid of the octree leaf cell 412, vertex A3 is the centroid of the octree leaf cell 413, and vertex A4 is the centroid of the octree leaf cell 414.

[0040] As Figure 5 shown, this figure is a schematic diagram of a pyramidal mesh provided by an embodiment of the present application. The processing device can create an unstructured grid around the vertex B0 of the octree leaf cell 511. The vertices of this unstructured grid include B1, B2, B3, B4, and B5. It can be seen that this unstructured grid is a pyramidal mesh. Among them, vertex B1 is the centroid of the octree leaf cell 511, vertex B2 is the centroid of the octree leaf cell 512, vertex B3 is the centroid of the octree leaf cell 513, vertex B4 is the centroid of the octree leaf cell 514, and vertex B5 is the centroid of the octree leaf cell 515.

[0041] As Figure 6 shown, this figure is a schematic diagram of a triangular prism mesh provided by an embodiment of the present application. The processing device can create an unstructured grid around the vertex C0 of the octree leaf cell 611. The vertices of this unstructured grid include C1, C2, C3, C4, C5, and C6. It can be seen that this unstructured grid is a triangular prism mesh. Among them, vertex C1 is the centroid of the octree leaf cell 611, vertex C2 is the centroid of the octree leaf cell 612, vertex C3 is the centroid of the octree leaf cell 613, vertex C4 is the centroid of the octree leaf cell 614, vertex C5 is the centroid of the octree leaf cell 615, and vertex C6 is the centroid of the octree leaf cell 616.

[0042] As Figure 7As shown, this figure is a schematic diagram of a hexahedral mesh provided by an embodiment of the present application. The processing device can create an unstructured mesh around vertex D0 of the octree leaf element 711. The vertices of this unstructured mesh include D1, D2, D3, D4, D5, D6, D7, and D8. It can be seen that this unstructured mesh is a hexahedral mesh. Among them, vertex D1 is the centroid of the octree leaf element 711, vertex D2 is the centroid of the octree leaf element 712, vertex D3 is the centroid of the octree leaf element 713, vertex D4 is the centroid of the octree leaf element 714, vertex D5 is the centroid of the octree leaf element 715, vertex D6 is the centroid of the octree leaf element 716, vertex D7 is the centroid of the octree leaf element 717, and vertex D8 is the centroid of the octree leaf element 718.

[0043] The above are the standard cells that the processing device can create. Next, non-standard cells will be introduced.

[0044] As Figure 8 shown, this figure is a schematic diagram of a first non-standard cell provided by an embodiment of the present application. The processing device can create an unstructured mesh around vertex E0 of the octree leaf element 811. The vertices of this unstructured mesh include E1, E2, E3, E4, E5, E6, and E7. This unstructured mesh is the first non-standard cell. Among them, vertex E1 is the centroid of the octree leaf element 811, vertex E2 is the centroid of the octree leaf element 812, vertex E3 is the centroid of the octree leaf element 813, vertex E4 is the centroid of the octree leaf element 814, vertex E5 is the centroid of the octree leaf element 815, vertex E6 is the centroid of the octree leaf element 816, and vertex E7 is the centroid of the octree leaf element 817.

[0045] As Figure 9 shown, this figure is a schematic diagram of a second non-standard cell provided by an embodiment of the present application. The processing device can create an unstructured mesh around vertex F0 of the octree leaf element 911. The vertices of this unstructured mesh include F1, F2, F3, F4, F5, and F6. This unstructured mesh is the second non-standard cell. Among them, vertex F1 is the centroid of the octree leaf element 911, vertex F2 is the centroid of the octree leaf element 912, vertex F3 is the centroid of the octree leaf element 913, vertex F4 is the centroid of the octree leaf element 914, vertex F5 is the centroid of the octree leaf element 915, and vertex F6 is the centroid of the octree leaf element 916.

[0046] As Figure 10As shown in the figure, this is a schematic diagram of a third non-standard cell provided by an embodiment of the present application. The processing device can create an unstructured grid around the vertex G0 of the octree leaf cell 1011. The vertices of this unstructured grid include G1, G2, G3, G4, and G5, and this unstructured grid is a third non-standard cell. Among them, vertex G1 is the centroid of the octree leaf cell 1011, vertex G2 is the centroid of the octree leaf cell 1012, vertex G3 is the centroid of the octree leaf cell 1013, vertex G4 is the centroid of the octree leaf cell 1014, and vertex G5 is the centroid of the octree leaf cell 1015.

[0047] S105. If the created unstructured grid is a non-standard cell, the processing device determines the first type of the unstructured grid.

[0048] If the unstructured grid created by the processing device is a non-standard cell, then continue to determine the first type of this non-standard cell. Different first types of non-standard cells will adopt different subsequent subdivision methods.

[0049] S106. The processing device subdivides the unstructured grid according to the first type of the unstructured grid.

[0050] After the processing device determines the first type of the unstructured grid, it can be based on the first subdivision method of this unstructured grid, and then subdivide this unstructured grid according to this first subdivision method.

[0051] In some embodiments, if the first type of this unstructured grid indicates that this unstructured grid includes 7 vertices, then split this unstructured grid into a pyramidal grid and a triangular prism grid. As Figure 11 shown in the figure, this is a schematic diagram of a subdivision method for a first non-standard cell provided by an embodiment of the present application. The processing device can divide the first non-standard cell along the plane E1E2E6E5, and then obtain a pyramidal grid composed of vertices E1, E2, E6, E5, and E7, and a triangular prism grid composed of vertices E1, E2, E6, E5, E3, and E4.

[0052] In some embodiments, if the first type of this unstructured grid indicates that this unstructured grid includes 6 vertices, then split this unstructured grid into two tetrahedral grids. As Figure 12 shown in the figure, this is a schematic diagram of a subdivision method for a second non-standard cell provided by an embodiment of the present application. The processing device can divide the second non-standard cell along the line F3F6, and then obtain a tetrahedral grid composed of vertices F3, F2, F6, and F1, and a tetrahedral grid composed of vertices F3, F5, F6, and F4.

[0053] In some embodiments, if the first type of the unstructured grid indicates that the unstructured grid includes 5 vertices, the unstructured grid is split into two tetrahedral meshes. As Figure 13 shown, this figure is a schematic diagram of a subdivision method for a third non-standard cell provided by an embodiment of the present application. The processing device can divide the third non-standard cell 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.

[0054] In the embodiments of the present application, after the processing device re-subdivides the above non-standard cells, the obtained unstructured grids are all standard cells. However, new dividing lines will appear after the division, resulting in disharmony with these divided unstructured grids, and further processing is required.

[0055] S107. The processing device obtains the second type of the unstructured grid adjacent to the side where the unstructured grid is subdivided.

[0056] The processing device can obtain the second type of the unstructured grid adjacent to the side where the unstructured grid is subdivided. If the second types of the adjacent unstructured grids are different, the further second subdivision methods are also different.

[0057] S108. The processing device subdivides the adjacent unstructured grid according to the second type to obtain an unstructured hybrid mesh.

[0058] After obtaining the above second type, the processing device can first determine the second subdivision method for subdividing the adjacent unstructured grid, and then subdivide the adjacent unstructured grid according to the second subdivision method.

[0059] In some embodiments, if the second type of the adjacent unstructured grid indicates that the adjacent unstructured grid is a pyramid-shaped mesh, it is split into two tetrahedral meshes along the bottom surface of the pyramid-shaped mesh. See Figure 11 . After the first non-standard cell is divided, dividing lines E1E5 and dividing line E2E6 will be formed on the surface. For example, the unstructured grid adjacent to the surface E2E4E6 is a pyramid-shaped mesh, and the above dividing line E2E6 will appear on the bottom surface of the pyramid-shaped mesh. The pyramid grid is split along the dividing line E2E6 on the bottom surface of the pyramid-shaped mesh, and then two tetrahedral meshes are obtained.

[0060] In some embodiments, if the second type of the adjacent unstructured grid indicates that the adjacent unstructured grid is a triangular prism-shaped mesh, a first center point is inserted inside the triangular prism-shaped mesh. Based on the first center point, the triangular prism-shaped mesh is split into multiple pyramid-shaped meshes and multiple tetrahedral meshes. See Figure 11, after the first non-standard unit is divided, dividing lines E1E5 and dividing line E2E6 will be formed on the surface. For example, the unstructured grid adjacent to the surface E2E4E6 is a triangular prism-shaped grid, and the above-mentioned dividing line E2E6 will appear on the surface of the triangular prism-shaped grid. Along the dividing line E2E6 on the surface of the triangular prism-shaped grid and the inserted first center point, the triangular prism-shaped grid is split, and then a plurality of pyramid-shaped grids and a plurality of tetrahedron-shaped grids are obtained. Among them, assuming that the dividing line E2E6 appears on the triangular surface of the triangular prism-shaped grid, 3 pyramid-shaped grids and 3 tetrahedron-shaped grids will be obtained. Assuming that the dividing line E2E6 appears on the quadrilateral surface of the triangular prism, 2 pyramid-shaped grids and 4 tetrahedron-shaped grids will be obtained.

[0061] In some embodiments, if the second type of the adjacent unstructured grid indicates that the adjacent unstructured grid is a hexahedron-shaped grid, a second center point is inserted inside the hexahedron-shaped grid, and based on this second center point, the hexahedron-shaped grid is split into a plurality of pyramid-shaped grids and a plurality of tetrahedron-shaped grids. Refer to Figure 11 , after the first non-standard unit is divided, dividing lines E1E5 and dividing line E2E6 will be formed on the surface. For example, the unstructured grid adjacent to the surface E2E4E6 is a hexahedron-shaped grid, and the above-mentioned dividing line E2E6 will appear on the surface of the hexahedron-shaped grid. Along the dividing line E2E6 on the surface of the hexahedron-shaped grid and the inserted second center point, the hexahedron-shaped grid is split, and then a plurality of pyramid-shaped grids and a plurality of tetrahedron-shaped grids are obtained. Among them, assuming that the dividing line E2E6 appears on the quadrilateral surface of the hexahedron-shaped grid, 5 pyramid-shaped grids and 2 tetrahedron-shaped grids will be obtained.

[0062] If there are still incoordinated or hanging nodes after the above-mentioned subdivision, continue to subdivide along the newly generated dividing lines until a coordinated and non-structured hybrid grid without hanging nodes is obtained.

[0063] As Figure 14 shown, this figure is a schematic diagram of an unstructured hybrid grid provided by an embodiment of the present application. The unstructured hybrid grid is generated for the Figure 2 shown object to be simulated.

[0064] Based on the above description, an embodiment of the present application provides a method for generating an unstructured hybrid mesh. This method uses a dual approach to convert an octree structure into an unstructured hybrid mesh. Specifically, an initial octree cell is created based on the geometric structure of the object to be simulated. Then, according to the geometric accuracy of the object to be simulated and a preset criterion, the initial octree cell is subdivided to obtain a plurality of octree leaf cells. An octree leaf cell is an octree cell without sub-cells. Among them, the preset criterion includes that the level difference between adjacent octree leaf cells is not higher than 1, and the sub-cells with the same octree parent cell are jointly subdivided. Then, around the vertices of each octree cell, an unstructured mesh is created. The vertices of this unstructured mesh are located at the centroids of different octree cells. Thus, 7 types of meshes can be obtained, and 4 of them are standard cells that do not require further processing. If the created unstructured mesh is a non-standard cell, determine the first type of the unstructured mesh; according to the first type of the unstructured mesh, subdivide the unstructured mesh; obtain the second type of the unstructured mesh adjacent to the side where the unstructured mesh is subdivided; according to the second type, subdivide the adjacent unstructured mesh to obtain an unstructured hybrid mesh. It can be seen that only the other 3 non-standard cells and the cells adjacent to these 3 non-standard cells need to be split, and then an unstructured hybrid mesh that is coordinated, has no hanging nodes, and only contains standard cells can be obtained. 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 process of generating an unstructured hybrid mesh.

[0065] As described above in conjunction with Figures 1 to 14 a detailed introduction to the method for generating an unstructured hybrid mesh provided by an embodiment of the present application has been given. Next, the devices and equipment provided by embodiments of the present application will be introduced with reference to the accompanying drawings.

[0066] As Figure 15 shown, this figure is a schematic diagram of an apparatus for generating an unstructured hybrid mesh provided by an embodiment of the present application. The apparatus includes: An acquisition module 1401, configured to acquire a simulation requirement, where the simulation requirement includes the geometric structure and geometric accuracy of the object to be simulated, and the object to be simulated is an aircraft, a submersible, a vehicle, an engine, or a ship; A creation module 1402, configured to create an initial octree cell according to the geometric structure of the object to be simulated; The subdivision module 1403 is configured to subdivide the initial octree cells according to the geometric accuracy of the object to be simulated and a preset criterion, so as to obtain a plurality of octree leaf cells, where the octree leaf cells are octree cells without child cells. The preset criterion includes that the level difference between adjacent octree leaf cells is not higher than 1, and the child cells with the same octree parent cell are jointly subdivided. The level of the octree leaf cell is determined by the number of times of subdivision to obtain the octree leaf cell. The creation module 1402 is further configured to create an unstructured grid around the vertices of each octree leaf cell, and the vertices of the unstructured grid are respectively located at the centroids of different octree leaf cells. The generation module 1404 is configured to, if the created unstructured grid is a non-standard cell, 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 side where the unstructured grid is subdivided; and subdivide the adjacent unstructured grid according to the second type to obtain an unstructured hybrid grid.

[0067] In some possible implementation manners, the generation module 1404 is specifically configured to, if the first type of the unstructured grid indicates that the unstructured grid includes 7 vertices, split the unstructured grid into a pyramidal grid and a triangular prism grid.

[0068] In some possible implementation manners, the generation module 1404 is specifically configured to, if the first type of the unstructured grid indicates that the unstructured grid includes 6 vertices, split the unstructured grid into two tetrahedral grids.

[0069] In some possible implementation manners, the generation module 1404 is specifically configured to, if the first type of the unstructured grid indicates that the unstructured grid includes 5 vertices, split the unstructured grid into two tetrahedral grids.

[0070] In some possible implementation manners, the generation module 1404 is specifically configured to, if the second type of the adjacent unstructured grid indicates that the adjacent unstructured grid is a pyramidal grid, split the pyramidal grid along its bottom surface into two tetrahedral grids.

[0071] In some possible implementation manners, the generation module 1404 is specifically configured to, if the second type of the adjacent unstructured grid indicates that the adjacent unstructured grid is a triangular prism grid, insert a first center point inside the triangular prism grid, and based on the first center point, split the triangular prism grid into a plurality of pyramidal grids and a plurality of tetrahedral grids.

[0072] In some possible implementations, the generating module 1404 is specifically configured to, if the second type of the adjacent unstructured grid represents that the adjacent unstructured grid is a hexahedral grid, insert a second center point inside the hexahedral grid, and based on the second center point, split the hexahedral grid into a plurality of pyramidal grids and a plurality of tetrahedral grids.

[0073] The non-structured hybrid grid generating device according to the embodiments of the present application may correspond to the execution of the methods described in the embodiments of the present application, and the above-mentioned other operations and / or functions of each module / unit of the non-structured hybrid grid generating device are respectively for implementing Figure 1 the corresponding processes of the respective methods in the illustrated embodiments. For the sake of brevity, they will not be described herein again.

[0074] The embodiments of the present application further provide a computing device. As Figure 16 shown, this figure is a schematic diagram of a computing device provided by the embodiments of the present application. 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 with each other through the bus 1501.

[0075] The bus 1501 may be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 16 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0076] 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), etc.

[0077] The communication interface 1503 is used for external communication.

[0078] The memory 1504 may include volatile memory, such as random access memory (RAM). The memory 1504 may also include non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0079] Executable code is stored in the memory 1504, and the processor 1502 executes the executable code to perform the foregoing method for generating an unstructured hybrid grid.

[0080] Specifically, in the case of implementing Figure 15 the illustrated embodiment, and Figure 15 when each module or unit of the apparatus for generating an unstructured hybrid grid described in the embodiment is implemented by software, the software or program code required to execute the functions of each module / unit in Figure 15 may be partially or wholly stored in the memory 1504. The processor 1502 executes the program code corresponding to each unit stored in the memory 1504 to perform the foregoing method for generating an unstructured hybrid grid.

[0081] An embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium may be any available medium that can be stored by a computing device or a data storage device such as a data center including one or more available media. The available media may be magnetic media (such as a floppy disk, a hard disk, a magnetic tape), optical media (such as a DVD), or semiconductor media (such as a solid state drive), etc. The computer-readable storage medium includes instructions that direct a computing device to perform the foregoing method for generating an unstructured hybrid grid.

[0082] An embodiment of the present application also 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 processes or functions according to the embodiments of the present application are wholly or partially generated.

[0083] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line) or a wireless manner (such as infrared, wireless, microwave, etc.).

[0084] When the computer program product is executed by a computer, the computer executes any of the methods for generating the foregoing unstructured hybrid mesh. The computer program product can be a software installation package. In the case where any of the methods for generating the foregoing unstructured hybrid mesh is required, the computer program product can be downloaded and executed on the computer.

[0085] The descriptions of the processes or structures corresponding to the foregoing various drawings each have their own emphases. For parts not detailed in a certain process or structure, reference can be made to the relevant descriptions of other processes or structures.

[0086] The above is only the specific implementation manner 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 covered within 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 an object to be simulated, wherein the object to be simulated is an aircraft, a submarine, a vehicle, an engine, or a ship; 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, and the object to be simulated is an aircraft, a submarine, a vehicle, an engine or a ship; 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

  • Self-adaptive grid division method and system based on octree

    CN110222447A

  • Aircraft simulation drive design method based on octree refined tetrahedral mesh

    CN115994410A

  • Semiconductor numerical simulation-oriented hybrid unit grid generation method

    CN117708904A

  • Grid-based loose octree for spatial partitioning

    US20030227455A1