CFD grid generation method based on octree from bottom to top

By adopting a bottom-up octree CFD mesh generation method, the problems of load imbalance and low resource management efficiency in the processing of large-scale complex geometric models by top-down octree mesh generation are solved. It achieves efficient parallel computing and accurate capture of complex flow field characteristics, and generates high-quality meshes.

CN121837512APending Publication Date: 2026-04-10SHANGHAI HUANLING INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-27
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing top-down octree mesh generation methods suffer from severe load imbalance between computing nodes, low resource management efficiency, and insufficient ability to capture complex flow field features when dealing with large-scale complex geometric models.

Method used

A bottom-up octree CFD mesh generation method is adopted. By discretizing the target geometric model, basic mesh units are generated and mapped to one-dimensional state codes to construct a globally ordered linear task sequence. The sequence is dynamically partitioned by the resource state of distributed processing nodes, and the bottom-up state evolution process is executed in parallel within the nodes. Adjacent units that meet the same source condition are identified and merged into parent node units. At the same time, cross-node load balancing is achieved by adjusting the partitioning boundary of the sequence partitions.

Benefits of technology

It achieves efficient parallel computing and load balancing, reduces memory usage and communication overhead, ensures accurate capture of complex geometric boundaries and mesh quality, and meets the requirements of high-precision CFD simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121837512A_ABST
    Figure CN121837512A_ABST
Patent Text Reader

Abstract

The invention discloses a CFD grid generation method based on an octree from bottom to top, and relates to the technical field of grid generation methods, and the method comprises the following steps: carrying out discretization processing on a target geometric model, generating a basic grid unit set, mapping each basic grid unit into a one-dimensional state code according to a preset space filling curve rule, constructing a globally ordered linear task sequence; dynamically segmenting the linear task sequence into a plurality of sequence fragments according to the resource state of the distributed processing node, mapping the sequence fragments to corresponding nodes, and establishing a local jurisdiction domain at each node; executing a state evolution process from bottom to top in parallel in each node, identifying adjacent unit subsets meeting homologous conditions by polling units in a local jurisdiction domain, and combining the adjacent unit subsets into a father node unit of an upper level; the cross-node load balance is realized by adjusting the segmentation boundary of the sequence fragment on the linear task sequence; according to the method, efficient parallel computing and excellent linear expansion capability are realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of mesh generation methods, in particular to an octree CFD mesh generation method based on bottom-up. BACKGROUND

[0002] As a technology for simulating fluid flow phenomena through numerical calculation, computational fluid dynamics (CFD) is widely used in aerospace, automotive design, energy power and other fields. Mesh generation is a crucial pre-processing link in the CFD simulation process, and the quality and scale of the generated mesh directly determine the calculation accuracy and convergence efficiency of numerical simulation. In the existing technical system, the mesh generation method based on octree structure has become one of the mainstream technical routes for handling large-scale three-dimensional unstructured meshes due to its good adaptability to complex geometric shapes and flexibility of spatial subdivision. With the increasing demand for precision in industrial simulation, simulation objects often contain extremely complex geometric features, and the number of meshes often reaches the order of billions, which puts high requirements on the parallel processing capability and resource management efficiency of the mesh generation algorithm.

[0003] In the prior art, an octree mesh generation strategy from top to bottom is mainly adopted, that is, starting from the root node and subdividing to the leaf node layer by layer. This method has significant limitations when dealing with large-scale complex geometric models, which are specifically manifested as follows: the subdivision process from top to bottom leads to an exponential dynamic growth of the number of mesh cells, which easily causes a serious imbalance in the load between computing nodes, and due to the strong dependency relationship between parent and child nodes, it is difficult to perform efficient dynamic load adjustment in a distributed environment; at the same time, maintaining a globally consistent explicit tree structure requires frequent cross-node communication and huge memory overhead, resulting in low parallel expansion efficiency; in addition, when dealing with local refinement of complex boundaries, the traditional method often needs complex full tree traversal and backtracking operations, which seriously restricts the overall efficiency of mesh generation and the ability to capture complex flow field characteristics. SUMMARY

[0004] To solve the defects in the prior art, the present application provides an octree CFD mesh generation method based on bottom-up.

[0005] To solve the above technical problems, the present application provides the following technical solutions: The present application provides an octree CFD mesh generation method based on bottom-up, comprising the following steps: Step S1: discretizing the target geometric model and generating a set of basic mesh cells, mapping each basic mesh cell to a one-dimensional state code according to a preset space-filling curve rule, and constructing a globally ordered linear task sequence; Step S2: according to the resource state of the distributed processing node, the linear task sequence is dynamically divided into a plurality of continuous sequence fragments and mapped to the corresponding node, and a local jurisdiction is established in each node; Step S3: a bottom-up state evolution process is performed in parallel in each node, adjacent unit subsets meeting the homology condition are identified and merged into parent node units of the upper level by polling the units in the local jurisdiction; Step S4: during the execution of the state evolution process, the computing load of each node is monitored, and load balancing across nodes is achieved by adjusting the division boundary of the sequence fragments on the linear task sequence.

[0006] As a preferred technical solution of the present application, the method is applied to constructing a hierarchical grid based on octree logic; In step S1: The space-filling curve rule adopts Morton coding or Hilbert coding, and the one-dimensional state code is generated according to the space division logic of the octree; In step S3: The homology condition is that a plurality of spatially adjacent basic grid units meeting the octree sibling relationship are all in a mergable state; The merging operation is used to aggregate the basic grid units meeting the homology condition into corresponding parent node units of the upper level.

[0007] As a preferred technical solution of the present application, the number of the basic grid units meeting the octree sibling relationship is eight, and the eight basic grid units are spatially adjacent and share the same virtual parent node space.

[0008] As a preferred technical solution of the present application, in step S2, the establishment of the local jurisdiction specifically includes: A plurality of division anchors are calculated on the globally ordered linear task sequence, and the coding interval between adjacent division anchors is defined as the sequence fragment; A linear array is constructed in the local memory of each node, used to store the unit state data in the allocated sequence fragment and the parent node data generated by merging, forming the local jurisdiction that independently manages the local grid topology.

[0009] As a preferred technical solution of the present application, in step S4, the load balancing across nodes by adjusting the division boundary of the sequence fragments on the linear task sequence specifically includes: If it is detected that the load indicator of the first node is higher than a first threshold value, and the load indicator of a second node logically adjacent to it in the linear task sequence is lower than a second threshold value; The split boundary is moved in the direction of the first node so that the ownership of a piece of sequence patch originally belonging to the first node and the grid cell data contained therein are transferred to the second node through network transmission.

[0010] As a preferred technical solution of the present application, the bottom-up state evolution process in step S3 further comprises a variable depth refinement step based on geometric features: Before or during the merging operation, the local curvature parameter of the target geometric model surface is calculated; If the local curvature parameter of a certain region exceeds a preset complex feature threshold, the grid cells in this region are marked as a reserved state.

[0011] As a preferred technical solution of the present application, the homology condition in step S3 further comprises a size smooth transition constraint: When attempting to combine the subset of adjacent cells and create a parent node cell, the level difference between the parent node cell and existing cells in its spatial neighborhood is detected; If the level difference exceeds a preset level difference limit, the current merging operation is suspended, or a split operation of large size cells in the neighborhood is triggered to maintain smooth transition of the global grid size.

[0012] As a preferred technical solution of the present application, when the merging operation in step S3 triggers an exception due to insufficient memory resources, the current grid state is locked; The load balancing logic described in step S4 is triggered to migrate part of the sequence patch and corresponding grid data of the abnormal node to a logically adjacent node with lower resource load for processing.

[0013] As a preferred technical solution of the present application, the method further comprises a grid quality post-processing step: A position smoothing optimization algorithm is performed on the merged grid nodes to improve cell shape; All grid cells are traversed to check the twist index, and if a poor quality cell is found, the merging state of the cell is rolled back and local subdivision is performed again.

[0014] As a preferred technical solution of the present application, the hierarchical grid adopts an implicit tree structure for organization, and the maintenance and homology verification of the implicit tree structure are achieved in the following way: Each node only stores one-dimensional state codes, level depth and parent-child index relationship of cells within its jurisdiction in local memory, without storing memory pointers to parent nodes or child nodes; In the step S3 of performing the merging operation, for any grid cell, a binary direction code is extracted from its one-dimensional state code, and a bit operation is performed using the direction code and the parent node address bits to determine the octree parent node position and the encoding index of the sibling cell, thereby completing the verification of the isomorphism condition without traversing the tree structure.

[0015] The present application has the following advantages: 1. The present application maps each basic grid cell to a one-dimensional state code according to a preset space-filling curve rule, and constructs a globally ordered linear task sequence by discretizing the target geometric model; this method converts the complex three-dimensional spatial topological relationship into a compact one-dimensional linear relationship, and organizes the hierarchical grid using an implicit tree structure; each node only needs to store the one-dimensional state code in the local memory, and the verification of the isomorphism condition can be completed by extracting the binary direction code and performing a bit operation, without the need to store and maintain memory pointers to the parent node or child node; this pointer-free implicit storage and parent-child positioning mechanism based on bit operation greatly reduces the memory occupation and avoids the huge communication overhead caused by maintaining a global explicit tree structure in the traditional top-down method, thereby realizing efficient parallel computing and excellent linear scalability.

[0016] 2. The present application establishes a local jurisdiction for each node, and monitors the computing load of each node in real time during the execution of the bottom-up state evolution process; by adjusting the segmentation boundary of the sequence slice on the linear task sequence, the load balancing across nodes can be realized; specifically, when an uneven load is detected, only the segmentation boundary needs to be moved towards the high-load node, and the ownership of a sequence slice and the grid cell data contained therein originally belonging to the node are transferred to the logically adjacent low-load node through the network; this boundary moving strategy based on linear sequence slicing avoids the complex three-dimensional region redivision and global index reconstruction in the traditional method, and can realize dynamic balancing of computing resources at a very low computational and communication cost, effectively solving the load imbalance problem in large-scale grid generation.

[0017] 3. The present application integrates a variable depth refinement step based on geometric features and a size smooth transition constraint in the bottom-up state evolution process; by calculating the local curvature parameter of the surface of the target geometric model, complex feature regions can be automatically identified and marked as reserved states, prohibiting their merging to the upper level, thereby ensuring the accurate capture of high-curvature regions; at the same time, the size transition of adjacent cells is controlled by detecting the level difference, and combined with the position smoothing optimization algorithm and twist check in the grid quality post-processing step, the poor quality cells are eliminated; this mechanism ensures that the finally generated hierarchical grid not only closely follows the complex geometric boundary, but also has good size smoothness and cell shape quality, meeting the requirements of high-precision CFD simulation on the grid. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0019] Figure 1 This is a schematic diagram illustrating the workflow of a bottom-up octree CFD mesh generation method according to the present invention. Figure 2 This is a schematic diagram of the process of generating an octree mesh using a top-down strategy in the prior art. Figure 3 This is a schematic diagram illustrating the process of generating an octree mesh using a bottom-up strategy according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the bottom-up octree generation process of the present invention; Figure 5 This is a schematic diagram of the space filling curve and sequence segmentation of the present invention; Figure 6 This is a schematic diagram illustrating the global mesh generation effect of the car model of the present invention; Figure 7 This is a schematic diagram illustrating the local mesh generation effect in the air intake grille area of ​​the car model according to the present invention; Figure 8 This is a schematic diagram illustrating the mesh generation effect of the wheel hub and wheel arch area of ​​the car model according to the present invention; Figure 9 This is a schematic diagram illustrating the global mesh generation effect of the civil aircraft model of this invention; Figure 10 This is a schematic diagram illustrating the local mesh generation effect in the aircraft pylon area of ​​the present invention; Figure 11 This is a schematic diagram illustrating the spatial mesh generation effect in the tail region of an aircraft engine according to the present invention. Detailed Implementation

[0020] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0021] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0022] Example 1 like Figure 1 As shown, a bottom-up octree CFD mesh generation method includes the following steps: Step S1: Discretize the target geometric model and generate a set of basic grid cells. Based on the preset space filling curve rules, map each basic grid cell to a one-dimensional state code to construct a globally ordered linear task sequence. In this step, the target geometric model to be simulated (such as a car or aircraft surface model in STL format) is first introduced. Discretization means identifying the spatial location occupied by the surface of the geometric model according to the preset minimum mesh resolution requirement, and directly generating a set of basic mesh units covering the surface of the model at the finest level. These basic mesh units are the starting point for subsequent bottom-up generation, avoiding the redundant process of generating huge root nodes and then subdividing layer by layer in the traditional top-down method.

[0023] Step S2: Based on the resource status of the distributed processing nodes, the linear task sequence is dynamically divided into multiple consecutive sequence fragments and mapped to the corresponding nodes, and a local jurisdiction is established on each node. This step aims to establish a distributed parallel computing environment. The system first obtains the resource status of the distributed processing nodes currently participating in the computation. This resource status includes, but is not limited to, the number of CPU cores, available memory size, and current network bandwidth load of the nodes. Based on these resource indicators, the system calculates a series of split points on the globally ordered linear task sequence constructed in step S1, and logically divides the long sequence into multiple consecutive sequence fragments. The principle of splitting is to match the amount of computational tasks contained in each fragment with the processing capacity of the corresponding node.

[0024] Subsequently, the segmented sequence fragments are mapped and distributed to the corresponding distributed processing nodes. In the local memory of each node, it is not necessary to maintain the entire global tree structure. Instead, based on the assigned sequence fragment, an independent data structure is constructed to store the unit code and related attributes within that fragment. This independently maintained memory space is defined as the local jurisdiction. The establishment of the local jurisdiction allows each node to focus only on the data maintenance and evolution within its own fragment, thereby achieving decentralized data management and significantly reducing the communication overhead between nodes.

[0025] Step S3: Execute the bottom-up state evolution process in parallel within each node. By polling the units within the local jurisdiction, identify the subset of adjacent units that meet the same origin condition and merge them into the parent node unit of the next higher level.

[0026] This process no longer relies on explicit tree pointer traversal, but is based on the traversal of linear data. The computation process within a node quickly identifies potential merging objects by polling the one-dimensional state codes stored in the local jurisdiction and utilizing the geometric position information contained in the codes themselves.

[0027] Specifically, the system checks whether there is a subset of adjacent units in the sequence that meets the same origin condition. The same origin condition means that a set of units belongs to the set of child nodes of the same parent node in spatial structure (e.g., eight sibling nodes in an octree structure), and these units have all been generated and are in a mergeable state. Once a subset that meets the condition is identified in the polling, the system performs a merge operation, marks these child units as invalid from the local jurisdiction, and generates a new parent node unit that represents the spatial range of the next higher level and adds it to the sequence.

[0028] Step S4: During the execution of the state evolution process, monitor the computational load of each node and achieve cross-node load balancing by adjusting the partitioning boundary of the sequence shards on the linear task sequence; Due to the complexity of the geometric model (such as curvature changes) and the non-uniformity of the merging process, the computation speed and remaining workload of each node will change dynamically during the evolution process, resulting in load imbalance. Therefore, this step continuously monitors the computational load of each node (such as the number of units to be processed or memory usage) during the execution of the state evolution process.

[0029] When the load difference between nodes exceeds a preset threshold, the system does not perform complex global repartitioning, but instead achieves load balancing by adjusting the partitioning boundaries of the sequence shards on the globally ordered linear task sequence. The specific operation is as follows: shrink the sequence fragment boundary of the high-load node inward and expand the sequence fragment boundary of the low-load node outward, thereby transferring ownership of a continuous coding interval (and its corresponding grid cell data) originally belonging to the high-load node to the low-load node.

[0030] Because the data is stored in a linearly ordered manner, this boundary adjustment only involves network transmission and index updates of the sequence edge data, enabling cross-node load balancing at extremely low cost, ensuring that all computing resources are fully utilized, thereby accelerating the overall grid generation process.

[0031] Furthermore, unlike Figure 2 The prior art shown, such as Figure 3As shown, the method of the present invention is applied to constructing a hierarchical grid based on octree logic; In step S1, in order to map the hierarchical structure of the three-dimensional space into a data format that is easy for the computer to process linearly, the space filling curve rule specifically adopts Morton coding or Hilbert coding. Both of these coding methods have good spatial locality preservation capabilities, which can ensure that adjacent grid cells in the three-dimensional space still maintain a high proximity in the mapped one-dimensional sequence, thereby improving the cache hit rate of subsequent memory accesses.

[0032] Specifically, the system generates the one-dimensional state code based on the spatial partitioning logic of the octree. In this process, the bounding box of the computational domain where the target geometric model is located is first determined and used as the root node space of the octree. As the discretization process progresses, the space is recursively subdivided at a ratio of 1:2. For any basic mesh cell, its one-dimensional state code is not merely an unordered unique identifier, but strictly contains the cell's hierarchical depth information and spatial location index in the octree.

[0033] Taking Morton coding as an example, the process of generating the one-dimensional state code includes: extracting the discretized integer coordinates (x, y, z) of the basic grid cell in the Cartesian coordinate system; mixing and arranging the binary bits of these three coordinate values ​​according to a preset bit interleaving rule (e.g., xyzxyz...); and adding hierarchical information to the high bits or specific fields of the code. The generated code can directly reflect the exact position of the cell in the octree structure.

[0034] For example, the encoding of a child node can be derived from its encoding through simple bitwise operations, or it can be used to determine whether two units belong to the same parent node. This encoding mechanism based on octree logic lays the data foundation for efficient same-origin condition judgment without relying on explicit pointers.

[0035] In the bottom-up state evolution process of step S3, the core task is to determine whether a group of units should be aggregated. This embodiment clearly defines the homogeneous condition, namely: multiple spatially adjacent basic grid units that conform to the octree sibling relationship are all in a mergeable state.

[0036] Spatial adjacency means that the units to be merged are in close physical contact, without gaps or overlaps; conforming to octree sibling relationship means that in the logical structure of the octree, this group of units belongs to the same virtual parent node space at the same upper level. Under the logic of the octree, a parent node space is strictly divided into eight sub-quadrants. Therefore, units that conform to sibling relationship must be occupiers in these eight specific quadrants.

[0037] In actual CFD mesh generation, not all sibling nodes can be merged unconditionally. For example, if some elements are marked as reserved because they are located near high curvature boundaries, or need to be kept compact due to size transition constraints, these elements are not in a mergeable state. The system determines that the common origin condition is met only when a group of sibling elements all exist and are not locked by any geometric or physical constraints.

[0038] Once a set of cells that meet the same origin condition is identified, the system performs a merging operation, which aggregates the basic mesh cells that meet the same origin condition into the corresponding parent node cells of the next higher level.

[0039] The specific working process is as follows: In the linear array of the local jurisdiction, the system marks and removes (or invalidates) the one-dimensional state codes of a group of sibling units, calculates the one-dimensional state code of their common parent node, and inserts the parent node unit into the data structure. Through this operation, multiple discrete, high-resolution sub-units are logically replaced by a low-resolution parent unit, thereby realizing the bottom-up transition of the mesh hierarchy, completing the transition from a fine discrete surface to a coarse background mesh, and effectively controlling the number of volume meshes generated in the end.

[0040] Specifically, such as Figure 4 As shown, attached Figure 4 A simplified bottom-up octree generation and aggregation process is shown, which specifically corresponds to step S3 in claim 1 and the merge operation in claim 2.

[0041] This process consists of four evolutionary stages (marked from ① to ④): Stage 1 and Stage 2 (corresponding to the initial state of steps S1 and S3): The system first identifies the geometric boundary and generates discrete basic mesh elements at the finest level (marked as Level 3 in the figure). As shown in the figure, at the initial moment, only leaf node elements representing the geometric surface (such as elements coded as 00, 01, 10, 11) exist. These elements are assigned a unique one-dimensional state code through Morton coding and their spatial coordinates are represented in the form of a binary string.

[0042] Phase ③ (corresponding to the same source identification and merging in step S3): The system polls these basic grid cells within its local jurisdiction. When a group of spatially adjacent cells that conform to the octree sibling relationship (e.g., the four cells 00, 01, 10, and 11 in Level 3 of the figure) are identified as being in a mergeable state, the system performs a merging operation. As shown by the lines in the figure, these four Level 3 sub-cells are aggregated to generate a corresponding parent node cell in the next higher level (Level 2) (node ​​01 in Level 2 of the figure).

[0043] Stage 4 (corresponding to the final hierarchical mesh): The above merging process is carried out recursively. The cells of Level 2 further search for their homologous siblings and merge them into cells of Level 1 until the root node (Level 0) is reached or the merging stops due to geometric constraints (such as variable depth refinement). Finally, a complete hierarchical mesh structure built from the bottom up is formed. Unlike the traditional top-down method, this method does not require the pre-generation of blank root nodes. Instead, the tree structure grows naturally from the existing cells.

[0044] Furthermore, the number of basic grid cells conforming to the octree sibling relationship is eight, and the eight basic grid cells are spatially adjacent and share the same virtual parent node space.

[0045] These eight basic grid cells are spatially adjacent, and they are arranged closely together in a 2x2x2 cube array, completely filling a cube region of the next level. The same virtual parent node space refers to the upper-level cube space that logically accommodates these eight child units but has not been materialized; This virtual space is the target of the merging operation: when these eight basic grid cells at the finest level (i.e., leaf nodes or intermediate level nodes of the octree) satisfy the same origin condition, they will be merged, so that this virtual parent node space is actually represented and occupied by a physical, larger parent node cell.

[0046] Furthermore, such as Figure 5 As shown, in step S2, establishing a local jurisdiction specifically includes: Calculate several segmentation anchor points on the globally ordered linear task sequence, and define the encoding interval between adjacent segmentation anchor points as the sequence fragment; Assuming the number of available distributed processing nodes is N, the system will determine N-1 intermediate splitting anchors in the global sequence based on the resource weight of each node (such as the number of CPU cores or memory capacity). Adding the start and end points of the sequence, the entire linear task sequence is divided into N consecutive intervals. The encoding interval between adjacent splitting anchors is defined as the sequence slice. Since the globally ordered linear task sequence is generated based on the space filling curve rule, each sequence slice logically corresponds to a continuous one-dimensional encoding set, and physically corresponds to one or more geometric regions that are closely clustered in spatial location.

[0047] This partitioning method ensures that the task data acquired by each node has good spatial locality, reducing the need for cross-node communication in subsequent calculations.

[0048] A linear array is constructed in the local memory of each node to store the cell state data within the allocated sequence slices and the parent node data generated by merging, forming the local jurisdiction that independently manages the local grid topology.

[0049] After completing the logical partitioning, the physical storage construction phase begins. A linear array is constructed in the local memory of each node. Unlike the linked storage structure used in traditional octree implementations (which contains a large number of pointers to parent nodes, child nodes, and neighboring nodes), this embodiment uses a compact linear array as the core data container.

[0050] This linear array primarily stores two types of data: one is the cell state data within the initially allocated sequence slices, which typically includes the one-dimensional state code of the basic grid cell (such as Morton code), the layer depth, and necessary physical attribute markers; the other is the parent node data newly generated during the bottom-up state evolution process due to merging operations. This flattened array structure not only significantly reduces memory usage (eliminating pointer overhead) but also greatly improves CPU cache hit rate because the array is contiguous in memory addresses, making it ideal for fast traversal and batch processing.

[0051] Within the local jurisdiction, nodes can autonomously perform operations such as querying, inserting (generating parent nodes), and deleting (removing merged child nodes) grid cells without requesting locks or synchronizing states from the global master node. For example, when a node identifies a subset of cells that meet the same origin condition and performs a merge, it only needs to update the corresponding entries in the local linear array, mark the state of the sub-cell as invalid or remove it from the array, and append or insert the newly generated parent node data into the appropriate position in the array. This design restricts the maintenance of mesh topology relationships to the local memory range of each node, achieving a high degree of parallelization and completely solving the bottleneck of global tree structure maintenance commonly found in large-scale CFD mesh generation.

[0052] Furthermore, in step S4, the method of achieving cross-node load balancing by adjusting the segmentation boundaries of the sequence shards on the linear task sequence specifically includes: If the load index of the first node is detected to be higher than the first threshold, and the load index of the second node logically adjacent to it in the linear task sequence is lower than the second threshold; During the execution of the state evolution process, the system monitors the load indicators of each distributed processing node in real time. The load indicators can be set according to the actual application scenario, such as the number of currently active basic grid cells in the local jurisdiction, the length of the queue of merged tasks to be processed, or the current memory usage and CPU utilization of the node.

[0053] To avoid excessive system overhead caused by frequent load fluctuations, this embodiment adopts a dual-threshold judgment mechanism. Specifically, the system sets a first threshold (overload warning line) and a second threshold (idle absorption line). The load balancing logic is triggered only if the following two conditions are met simultaneously: First, if the load index of a certain node (defined as the first node) is higher than the first threshold, it indicates that the node is overloaded and may become a bottleneck for parallel computing; Second, if the load index of the node logically adjacent to the first node in the linear task sequence (defined as the second node) is lower than the second threshold, it indicates that the adjacent node has surplus computing resources and is capable of accepting additional tasks.

[0054] It should be noted that logical adjacency refers to the sequence fragment held by the second node being adjacent to the sequence fragment held by the first node in the segmentation order of the globally ordered linear task sequence (for example, the first node is responsible for encoding the interval [A, B], and the second node is responsible for encoding the interval (B, C]). This logical adjacency is determined based on the space filling curve rule, which ensures the spatial continuity of data during task transfer.

[0055] Once the above triggering conditions are met, the system will perform a boundary adjustment operation. The segmentation boundary refers to the segmentation anchor point on the linear task sequence that distinguishes the sequence fragments belonging to the first node and the second node.

[0056] The specific operational logic is as follows: the segmentation boundary is moved toward the direction of the first node. Mathematically, this movement is represented by adjusting the index value of the segmentation anchor point in the linear task sequence.

[0057] For example, if the first node is located to the left of the partition boundary (low index end) and the second node is located to the right (high index end), then moving the boundary to the left means that the sequence partitioning range of the first node is reduced (right boundary moves to the left), while the sequence partitioning range of the second node is correspondingly expanded (left boundary moves to the left).

[0058] As the partition boundary moves, a change in data ownership inevitably occurs. The system defines the sequence fragment that originally belonged to the first node but was reassigned to the second node due to the boundary movement as the migrated data segment. For this migrated data segment, the system performs the following operations: First, change ownership, that is, revoke the management authority of the first node over the grid cells in the data segment and assign it to the local jurisdiction of the second node; Secondly, physical transmission is performed, that is, the first node packages and sends all the grid cell data (including one-dimensional state encoding, layer depth and attribute information) contained in the data segment to the second node via network transmission (such as MPI communication).

[0059] After receiving the data, the second node incorporates it into its own linear array for maintenance. In this way, the computational pressure that was originally accumulated on the first node is shifted to the adjacent second node, thereby dynamically achieving cross-node load balancing without disrupting global order. This mechanism avoids the need for complex geometric repartitioning of the entire grid in traditional methods, maintaining the system's efficient parallel operation by adjusting only a few index values ​​on the one-dimensional sequence and transmitting a small amount of boundary data.

[0060] Specifically, such as Figure 5 As shown in the figure, a set of discrete basic grid cells (identified by the letters B, F, J, K, L, M, H, I, D, E) are displayed. These cells exhibit two-dimensional or three-dimensional distribution characteristics in physical space (the figure shows a simplified two-dimensional quadtree form to simulate octree logic). This invention uses a preset space filling curve rule (shown by the blue connecting lines with arrows in the figure, such as Z-order curves or Hilbert curves) to connect these discrete cells together.

[0061] The system first calculates the one-dimensional state code (position code) for each unit. According to the connection order shown in the diagram (from B to F, then to J, K... and finally E), these units are arranged in ascending order, thus forming a continuous, globally ordered linear task sequence. Logically, this complex spatial structure is reduced in dimension and mapped to a linear array structure, namely the sequence [B, F, J, K, L, M, H, I, D, E]. This serialization process not only preserves the spatial proximity between units (i.e., spatially adjacent units tend to be adjacent in the sequence), but also lays the foundation for efficient storage and retrieval in the future.

[0062] Based on the linear task sequence generated above, the system performs a simple array partitioning operation to establish a local jurisdiction in a distributed environment. Assuming the system contains two distributed processing nodes, the system can calculate a splitting anchor point in the linear array (e.g., located between cells L and M), thereby dividing the global sequence [B, F, J, K, L, M, H, I, D, E] into two consecutive sequence fragments: the first fragment is [B, F, J, K, L], and the second fragment is [M, H, I, D, E].

[0063] These two sequence slices are then mapped to the corresponding nodes and stored in linear arrays built in the local memory of each node. This means that the first node only needs to maintain the data segment [B, F, J, K, L] locally, and the second node only needs to maintain [M, H, I, D, E]. This storage method only needs to store local information, and the related tree structure relationships only need to exist implicitly (i.e., deduced through encoding, rather than storing pointers), making the storage grid very efficient.

[0064] The linear structure shown in the figure also intuitively explains the dynamic load balancing mechanism described in claim 5. During the mesh generation process, as the bottom-up merging operation continues, the number of entries and computational complexity in the SFC sequence will change dynamically, resulting in increased or uneven hardware load.

[0065] At this point, the system does not need to perform complex global repartitioning. Instead, it achieves balance by "moving" the units "up and down" in the SFC sequence to adjacent PC nodes. For example, if the node responsible for [B, F, J, K, L] has a high load while the adjacent node has a low load, the system can move the partition boundary up or down in the sequence.

[0066] For example, moving the split anchor point from after L to after J, so that ownership of cells K and L is transferred from the first node to the second node, involves only index adjustment of the split boundary on the linear sequence and network transmission of a small amount of edge data, which can make dynamic load balancing extremely easy and efficient.

[0067] Furthermore, in traditional mesh generation, an overly uniform merging strategy may cause the loss of subtle geometric features on the object surface during mesh coarsening, thereby affecting the computational accuracy of CFD simulation. To address this, this embodiment adds a layer of geometric constraint mechanism to the merging decision logic.

[0068] Before or during the merging operation, the system needs to evaluate the degree of fit between the currently processed mesh cells and the target geometric model. Specifically, the system will call geometric projection or surface analysis algorithms to calculate the local curvature parameters of the target geometric model surface.

[0069] The local curvature parameter is a physical quantity that reflects the degree of curvature of the geometric surface. It can usually be obtained by calculating the rate of change of the normal vector, the average curvature, or the Gaussian curvature of the surface region corresponding to the mesh element. The timing of the calculation can be flexibly configured: one way is to pre-calculate the curvature values ​​corresponding to all basic mesh elements and store them in their attributes during the discretization process in step S1; another way is to calculate them in real time during the evolution process in step S3, that is, when attempting to merge a group of elements, dynamically query the geometric features of the area they cover.

[0070] If the local curvature parameter of a certain region exceeds the preset complex feature threshold, the mesh cells in that region are marked as reserved and are prohibited from merging with parent node cells of a coarser level. To distinguish between flat and high-curvature regions, the system sets a preset complexity feature threshold, which is a configurable quantification standard used to define what degree of curvature is considered a complex feature that requires high-resolution mesh capture.

[0071] During the state evolution process, the system compares the acquired local curvature parameters with the complex feature threshold. If the local curvature parameter of a region is lower than the threshold, it indicates that the geometric surface of the region is relatively flat and can be represented by a coarser mesh without losing accuracy. Conversely, if the local curvature parameter of a region exceeds the preset complex feature threshold, it indicates that the region has sharp edges, corners, or drastic surface changes (such as the leading edge of an airfoil, the corner of a rearview mirror, etc.), and a high mesh density must be maintained to ensure the accuracy of the flow field analysis.

[0072] Once a region is determined to meet the high curvature condition, the system will perform a state locking operation, specifically marking the mesh cells within that region as reserved.

[0073] The reserved state is a specific identifier of the grid cell attribute bit in the linear array. During the polling process in step S3, the merging algorithm will prioritize checking this identifier before checking the same source condition.

[0074] The specific prohibition logic is as follows: When the system identifies a group of potential sibling units, it will scan whether the group contains any units marked as reserved. If any unit is in a reserved state, the system will determine that the group does not meet the requirement of "all are in a mergeable state", thereby forcibly terminating the aggregation operation on the group and prohibiting it from merging with the parent node unit at a coarser level.

[0075] Through this mechanism, the present invention can automatically achieve a non-uniform grid distribution in the same bottom-up evolution process: in flat areas, grid cells can smoothly merge upwards layer by layer to form a large-sized sparse grid to save computing resources; while in areas with complex geometric features, grid cells are anchored at a finer level, thereby achieving adaptive densification for geometric features and effectively balancing simulation accuracy and computational efficiency.

[0076] Furthermore, in CFD simulations, drastic changes in the volume ratio (or size ratio) between adjacent mesh elements can lead to a significant increase in numerical discretization errors, or even cause computational divergence. In order to ensure that the final generated mesh has a high-quality gradient distribution, this embodiment adds a strict differential control mechanism to the bottom-up merging logic.

[0077] In step S3, when the system identifies a subset of adjacent units that meet the basic homogeneity condition through polling, it does not immediately perform merging, but instead enters the pre-merging detection stage. At this time, the system calculates the spatial attributes of the parent node unit at the next higher level generated after the assumed merging occurs.

[0078] Subsequently, the system performs a neighborhood search to identify all existing cells (i.e., other grid cells adjacent to its face, edge, or corner) within the spatial neighborhood of the potential parent node cell. The core parameter for detection is the level difference, which is the absolute difference between the level depth of the potential parent node cell in the octree and the level depth of each existing cell in the spatial neighborhood. This detection process is based entirely on linear array data within the local jurisdiction or neighbor query information across nodes, ensuring the real-time performance and accuracy of the detection.

[0079] The system sets a preset level difference limit as a judgment standard. In most high-precision CFD applications, this level difference limit is usually set to 1, which means that the size ratio of any two adjacent grid cells must not exceed 2 times, or that their depth difference in the octree cannot exceed 1 level.

[0080] During the detection process, if the system finds that the hierarchical difference between the potential parent node and any neighboring node exceeds the preset hierarchical difference limit (for example, the parent node is at level N, while the neighboring node is at level N+2, and the difference is 2, which exceeds the limit of 1), it determines that the size smooth transition constraint in the current homogeneous condition is not satisfied. This indicates that if merging is forcibly performed, a size mutation will occur in the mesh, resulting in a poor mesh topology.

[0081] Once an excessive level difference is detected, the system will perform one of the following two operations according to a preset priority strategy to maintain a smooth transition in the global mesh size: Strategy 1: Pause the current merge operation; The system marks the current set of adjacent cell subsets as temporarily unmergeable, keeping them at the current finer level. This strategy is a passive adaptation mechanism that eliminates the problem of excessive level difference by retaining a smaller cell size to match the finer mesh in the neighborhood.

[0082] Strategy 2: Forcefully trigger the splitting operation of large-sized cells within the neighborhood; If the level difference exceeds the limit due to the excessive size of the neighboring cells (e.g., the potential parent node has a level of N, while the neighboring cells have a level of N-2), in order to advance the current merging process and optimize the overall gradient, the system will send a split command to the large neighboring cell. The neighboring cell will then be subdivided into sub-cells of the next level until its level meets the level difference limit with the current potential parent node. This strategy is an active optimization mechanism that can push the size transition zone outward, making the change from dense to sparse mesh more gradual and natural.

[0083] By strictly enforcing the above constraints in the bottom-up state evolution process, this invention ensures that the generated hierarchical mesh does not exhibit drastic size jumps in any local region, thereby meeting the stringent requirements of CFD solvers for mesh uniformity and orthogonality.

[0084] Furthermore, to further improve the robustness of massively parallel computing systems, especially addressing the potential single-point resource bottleneck problem in generating CFD meshes on a scale of hundreds of millions, this method introduces a memory-aware anomaly recovery mechanism. When the bottom-up state evolution process is executed in parallel within each node, although the system aims to reduce the total number of grid cells through merging operations, at the moment of merging, the system may need to allocate temporary memory buffers to build the parent node data structure or maintain the neighbor index. For some regions with extremely dense geometric features (such as aircraft landing gear or engine blade edges), the density of basic grid cells in the local jurisdiction may be extremely high, causing the specific node carrying the region (defined as an anomalous node) to experience instantaneous memory spikes during the operation.

[0085] The system runs a resource monitoring daemon in the background to monitor the memory usage of each node in real time. When it detects that the available memory of a node is lower than the preset safety threshold, causing the merge operation in step S3 to be unable to allocate the necessary memory space, the system determines that there is insufficient memory resources and immediately triggers an exception signal. Once an exception is triggered, in order to prevent data corruption or process crashes due to memory overflow, the system first performs a protective operation: locking the current grid state.

[0086] Locking refers to suspending all ongoing merge calculations and memory write operations within the local jurisdiction of the anomalous node, and marking the data in the current linear array as read-only or suspended. This step ensures that the integrity and consistency of the grid topology data are not compromised before subsequent rescue operations are performed, preserving the scene for safe data migration. Once the locked state is established, the system does not wait for the regular load balancing cycle, but immediately triggers the load balancing logic described in step S4 as an emergency response. At this time, the system executes a high-priority forced migration strategy.

[0087] The system first searches for other logically adjacent nodes in the linear task sequence that are adjacent to the abnormal node, and checks the resource load of these neighboring nodes. Once a logically adjacent node with low resource load (i.e., with spare memory) is identified, the system calculates the amount of data that needs to be removed to relieve the memory pressure on the abnormal node.

[0088] Subsequently, the system forcibly moves the segmentation boundary, transferring the partial sequence fragments (usually unprocessed or locked data segments) held by the abnormal node at the boundary and their corresponding grid data to the logically adjacent node with lower resource load via high-speed network transmission. After taking over this part of the data, the receiving node incorporates it into its local jurisdiction for subsequent processing. Through this mechanism, the present invention can dynamically transfer the computational pressure of hot areas to non-hot areas, avoid global task failure caused by single point of failure, and significantly improve the success rate and stability of large-scale grid generation tasks.

[0089] Furthermore, while the bottom-up generation strategy effectively controls mesh size and load balance, it may still generate a small number of irregularly shaped mesh elements when dealing with complex surface boundaries or hierarchical transition regions. This step aims to eliminate potential inferior elements by combining geometric optimization with topology correction.

[0090] After completing the bottom-up state evolution process, the system first starts the geometry optimization program, which performs a position smoothing optimization algorithm on the merged mesh nodes. Since the original mesh generated by the octree usually presents a strictly orthogonal cubic structure, it will produce stepped serrations when approaching the curved boundary of the target geometric model, which will seriously affect the calculation accuracy of the flow field boundary layer.

[0091] The location smoothing optimization algorithm (such as the Laplace smoothing algorithm or the optimization-based variational smoothing algorithm) adjusts the spatial coordinates of the grid nodes iteratively.

[0092] Specifically, for each grid node located inside the flow field or near the boundary, the algorithm calculates the geometric center or weighted average position of its connection with adjacent nodes, and moves the grid node slightly toward the average position. This process relaxes the stress inside the grid while keeping the grid topology unchanged, making the grid line distribution more uniform and the transition more natural, thereby significantly improving the unit shape and making it closer to the ideal cube or regular polyhedron.

[0093] After performing the smoothing operation, the system enters a rigorous quality review phase. The system traverses and checks the distortion index of all mesh cells. The distortion index is a key physical quantity that measures the degree to which the shape of the mesh cell deviates from the ideal orthogonal form. In CFD calculations, cells with high distortion will lead to increased numerical discretization errors and may even cause the solution process to diverge.

[0094] The system presets a quality qualification threshold (e.g., distortion less than 0.85). During the traversal, the system calculates the distortion value of each grid cell one by one and compares it with the threshold. If the distortion index of a grid cell exceeds the safe range, the system marks it as a poor cell. These poor cells usually appear in areas with extremely sharp geometric features or narrow spaces, and simple node movement can no longer correct their quality.

[0095] For the identified substandard units, this embodiment uses a topology rollback strategy for repair. Specifically, the system performs a rollback operation on the merged state of the unit. This means that the system cancels the merge instruction executed in step S3 on the basic homogeneous subset that constitutes the substandard unit, logically breaks up the parent node unit, and restores it to the set of its next level of sub-units.

[0096] Subsequently, the system re-subdivides these restored sub-units locally, that is, restores a higher resolution mesh distribution in the local area. By reducing the mesh size, the system is able to resolve the complex geometric features of the region with a finer topology, thereby eliminating the geometric distortion caused by forcibly merging large-sized units.

[0097] This closed-loop mechanism of "detection-back-refactoring" ensures that the final output mesh is free of topological defects across the entire domain, thus guaranteeing the convergence and accuracy of CFD simulation.

[0098] Furthermore, to address the extreme requirements for memory efficiency and access speed in large-scale CFD mesh generation, the hierarchical mesh is organized using an implicit tree structure. Traditional octree implementations typically use an explicit tree structure, where each node object needs to store memory pointers to its parent node and eight child nodes. For meshes of hundreds of millions in scale, the memory space occupied by these pointers often exceeds the mesh data itself, and pointer jumps lead to non-contiguous memory accesses, severely reducing cache hit rate.

[0099] To address this issue, the system no longer maintains any pointer links in the local memory of each node. Instead, the system constructs a compact linear array, where each node stores only the necessary attribute data of the cells under its jurisdiction in its local memory.

[0100] Specifically, for each grid cell, only its one-dimensional state code (i.e., Morton code or Hilbert code), the current level depth, and the necessary parent-child index relationship are stored (the index relationship here refers to the logical association based on array subscripts or hash keys, rather than physical memory addresses).

[0101] This pointerless storage method ensures that data is arranged strictly and continuously in memory. Since the one-dimensional state encoding itself is generated based on the spatial partitioning logic of the octree, the size of the encoded value directly implies the spatial location and hierarchical topology of the grid cell. Therefore, the tree structure can be restored without explicit pointers.

[0102] When performing the merging operation in step S3, the system needs to frequently determine whether a basic grid cell belongs to a certain homogeneous set to be merged and determine its relative position in the octree. This process depends entirely on the bit-level operation of the one-dimensional state encoding.

[0103] For any grid cell, the system first extracts the binary direction code from its one-dimensional state code. Taking the three-dimensional Morton code as an example, its code is formed by interlacing the binary bits of the three coordinate axes (X, Y, Z). For the cell at the Nth level, the last three bits of its code constitute the binary direction code (with a value range of 000 to 111, corresponding to the eight sub-quadrant positions of the octree).

[0104] Subsequently, the system uses this direction code and the parent node address bits to perform bitwise operations, the specific logic of which is as follows: First, the last three bits of the binary direction code are separated by bit masking, which directly indicates the specific location of the current cell within the parent node space (e.g., the upper left or lower right corner). Secondly, by right shifting, the last three bits of the current code are removed, and the remaining high bits are the parent node address bits. The parent node address bits are numerically strictly equal to the one-dimensional state code of the parent node of the previous level to which this unit belongs. Finally, in order to determine all potential sibling units of the unit, the system shifts the extracted parent node address bits three bits to the left and performs bitwise OR operations with 000 to 111 respectively. This series of operations generates a new set of codes, which are the coding indices of the seven sibling units that the unit may theoretically exist.

[0105] Based on the above calculation results, the system can complete the verification of the same origin condition without traversing the tree structure. The system uses the calculated encoding index of the sibling unit as the query key value and performs retrieval in the linear array (or hash table) of the local jurisdiction.

[0106] If all the calculated sibling unit codes can be found in the array, and the states of these units are all marked as valid, it indicates that the same-origin condition is met and merging can be performed. The entire process only involves bit operations at the CPU register level and array search in contiguous memory, completely avoiding the high overhead of recursively traversing downwards from the root node or backtracking pointers upwards from the child node in traditional methods, greatly improving the computational efficiency of same-origin identification.

[0107] Example 2 like Figures 6-8 As shown, this embodiment demonstrates the application of the bottom-up octree CFD mesh generation method described in this invention in automotive aerodynamics simulation. A general-purpose sedan model is selected as the target geometric model. This model has complex features, including intricate components such as the air intake grille, wheel hubs, and rearview mirrors.

[0108] The attached figure illustrates the effect of the global vehicle mesh generated based on the method of this invention. In step S1, the system first discretizes the vehicle surface to generate a high-density set of basic mesh cells. Subsequently, according to the Morton coding rule, these cells are mapped to one-dimensional state codes, constructing a globally ordered linear task sequence. In the bottom-up state evolution process of step S3, the system efficiently identifies the background region far from the vehicle surface (i.e., Figure 6 (Medium gray cubic regions) Since these regions do not contain geometric boundaries, the system identifies adjacent cell subsets that satisfy the same origin condition (i.e., spatially adjacent and conforming to octree sibling relationships) and merges them layer by layer into parent node cells of the next higher level, ultimately generating a total of 26.41 million unstructured volumetric meshes.

[0109] Figure 6 The study clearly demonstrates the natural transition of the mesh from a high-resolution layer on the vehicle surface to a low-resolution layer in the far field, verifying that the proposed method can achieve efficient parallel generation by dynamically dividing and establishing local jurisdictions when dealing with meshes of tens of millions in scale.

[0110] Figure 7 This section showcases the local mesh details of the front grille area of ​​a car, an area characterized by narrow geometry and dramatic curvature variations. During generation, the system performed a variable depth refinement step based on geometric features. The system calculated the local curvature parameters of the grille blade surfaces in real time and detected that these parameters exceeded a preset complexity feature threshold. Therefore, the system marked the base mesh cells covering this grille area as reserved, forcibly preventing them from merging with coarser-level parent nodes.

[0111] from Figure 7 As can be seen, even deep within and at the edges of the grille, the mesh maintains an extremely high level of refinement, accurately reproducing the geometric contours of the air intake, without exhibiting the geometric feature loss or jaggedness commonly seen in traditional methods.

[0112] Figure 8This demonstrates the mesh distribution in the narrow gap between the car wheel hub and wheel arch. When processing such near-wall regions, the system strictly enforces dimensional smoothing constraints. When attempting to merge elements near the wheel arch, the system detects the hierarchy difference between the parent node element and existing elements in its spatial neighborhood (such as elements on the tire surface). To prevent abrupt size changes from affecting the convergence of the flow field calculation, the system controls this hierarchy difference to not exceed a preset hierarchy limit (typically level 1), thus generating a multi-layered transition mesh in the narrow gap. Furthermore... Figure 8 The results show that the grid cells on the tire surface are regular in shape and neatly arranged. This is thanks to the post-processing steps performed by the system to improve the grid quality. Through the position smoothing optimization algorithm, the system fine-tunes the node positions, improves the cell shape, effectively reduces the distortion index, and ensures that the grid quality meets the requirements of high Reynolds number turbulence simulation.

[0113] Example 3 like Figures 9-11 As shown, this embodiment demonstrates the application scenario of the method of the present invention in the aerospace field. A full-size civil airliner is selected as the target geometric model to verify the parallel efficiency and resource management capability of the method at a grid scale of hundreds of millions.

[0114] Figure 9 The example demonstrates the global mesh generation viewport for an aircraft model, ultimately generating a total of 143.68 million volume meshes. With such a massive data scale, the implicit tree structure employed in this invention plays a crucial role. Each distributed processing node stores only one-dimensional state codes in its local memory, without storing any memory pointers to parent or child nodes. This pointer-free storage method significantly reduces memory usage, allowing a single node to support a greater number of mesh cells.

[0115] Meanwhile, using bitwise operations for identity verification avoids global traversal of the massive tree structure, ensuring that the bottom-up state evolution process can still converge quickly even at scales of hundreds of millions.

[0116] Figure 10 The image shows the details of a local mesh at the connection point of an aircraft pylon. The mesh cells are closely fitted to the connection corners of the pylon, and the topological connections between the cells are correct, with no non-manifold structure. This ability to accurately capture complex aerodynamic shapes is directly due to the high-precision mapping of spatial positions by a globally ordered linear task sequence, ensuring accurate neighbor queries under complex topologies.

[0117] like Figure 11The internal structure of the hierarchical mesh based on octree logic constructed in this invention is shown. It can be clearly seen that when transitioning from tiny units close to the wing surface to huge units in the external space, the mesh exhibits a strict layered distribution. The mesh units at each level maintain good isotropy in space (i.e., aspect ratio close to 1), and the difference between adjacent levels is strictly controlled. This structure proves that in the merging operation in step S3, the system not only considers the same source condition, but also successfully applies the size smooth transition constraint. By forcibly triggering the splitting operation of large-sized units in the neighborhood, the hanging nodes and size jumps in the spatial mesh are eliminated, providing a high-quality discretized spatial base for high-precision numerical solutions of the flow field.

[0118] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A bottom-up octree CFD mesh generation method, characterized in that, Includes the following steps: Step S1: Discretize the target geometric model and generate a set of basic grid cells. Based on the preset space filling curve rules, map each basic grid cell to a one-dimensional state code to construct a globally ordered linear task sequence. Step S2: Based on the resource status of the distributed processing nodes, the linear task sequence is dynamically divided into multiple consecutive sequence fragments and mapped to the corresponding nodes, and a local jurisdiction is established on each node. Step S3: Execute the bottom-up state evolution process in parallel within each node. By polling the units within the local jurisdiction, identify the subset of adjacent units that meet the same origin condition and merge them into the parent node unit of the next higher level. Step S4: During the execution of the state evolution process, monitor the computational load of each node and achieve cross-node load balancing by adjusting the partitioning boundary of the sequence shards on the linear task sequence.

2. The bottom-up octree CFD mesh generation method according to claim 1, characterized in that, The method is applied to constructing a hierarchical grid based on octree logic; In step S1: The space-filling curve rule adopts Morton coding or Hilbert coding, and the one-dimensional state code is generated according to the space partitioning logic of the octree; In step S3: The homogeneity condition is that multiple spatially adjacent basic grid cells that conform to the octree sibling relationship are all in a mergeable state. The merge operation is used to aggregate the basic mesh cells that meet the same origin condition into the corresponding parent node cells of the next higher level.

3. The bottom-up octree CFD mesh generation method according to claim 2, characterized in that, The number of basic grid cells conforming to the octree sibling relationship is eight, and the eight basic grid cells are spatially adjacent and share the same virtual parent node space.

4. The bottom-up octree CFD mesh generation method according to claim 1, characterized in that, In step S2, establishing a local jurisdiction specifically includes: Calculate several segmentation anchor points on the globally ordered linear task sequence, and define the encoding interval between adjacent segmentation anchor points as the sequence fragment; A linear array is constructed in the local memory of each node to store the cell state data within the allocated sequence slices and the parent node data generated by merging, forming the local jurisdiction that independently manages the local mesh topology.

5. The bottom-up octree CFD mesh generation method according to claim 1, characterized in that, In step S4, the method of achieving cross-node load balancing by adjusting the segmentation boundaries of the sequence shards on the linear task sequence specifically includes: If the load index of the first node is detected to be higher than the first threshold, and the load index of the second node logically adjacent to it in the linear task sequence is lower than the second threshold; Then the segmentation boundary is moved toward the first node, so that the ownership of a sequence fragment originally belonging to the first node and its contained grid cell data are transferred to the second node through network transmission.

6. The bottom-up octree CFD mesh generation method according to claim 1, characterized in that, The bottom-up state evolution process in step S3 also includes a variable depth refinement step based on geometric features: Before or during the merging operation, calculate the local curvature parameters of the surface of the target geometric model; If the local curvature parameter of a certain region exceeds the preset complex feature threshold, the mesh cells in that region are marked as reserved.

7. The bottom-up octree CFD mesh generation method according to claim 1, characterized in that, The homogeneity condition in step S3 also includes a size smooth transition constraint: When attempting to combine the adjacent subset of units into a parent node unit, the hierarchical difference between the parent node unit and existing units in its spatial neighborhood is detected. If the level difference exceeds the preset level difference limit, the current merging operation is suspended, or a splitting operation of large-sized cells in the neighborhood is triggered to maintain a smooth transition of the global mesh size.

8. The bottom-up octree CFD mesh generation method according to claim 1, characterized in that, When the merge operation in step S3 triggers an exception due to insufficient memory resources, the current grid state is locked. The load balancing logic described in step S4 is triggered, and the partial sequence fragments and corresponding grid data of the abnormal node are migrated to logically adjacent nodes with lower resource loads for processing.

9. The bottom-up octree CFD mesh generation method according to claim 1, characterized in that, The method also includes a mesh quality post-processing step: A position smoothing optimization algorithm is applied to the merged mesh nodes to improve the cell shape; The distortion index of all mesh elements is checked. If a poor-quality element is found, the merged state of that element is rolled back and the local mesh is re-partitioned.

10. The bottom-up octree CFD mesh generation method according to claim 2, characterized in that, The hierarchical mesh is organized using an implicit tree structure, and the maintenance and homology verification of this implicit tree structure are achieved through the following methods: Each node stores only the one-dimensional status code, hierarchy depth, and parent-child index relationship of the units under its jurisdiction in its local memory, and does not store memory pointers to parent or child nodes; When performing the merging operation in step S3, for any grid cell, a binary direction code is extracted from its one-dimensional state code, and bitwise operations are performed using the direction code and the address bit of the parent node to determine the position of the parent node of the octree to which it belongs and the encoding index of the sibling cell, thereby completing the verification of the same source condition without traversing the tree structure.