Quadrilateral dominant grid generation method and system based on adaptive smooth step SPH
The adaptive smooth step size (SPH) method generates quadrilateral dominant meshes, which solves the problems of insufficient parallel computing and mesh quality in existing technologies. It achieves efficient and high-quality mesh generation, which is suitable for GPU parallel computing.
Patent Information
- Application Number
- CN202511119832.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-12-09
AI Technical Summary
Existing methods for generating unstructured quadrilateral meshes have shortcomings in parallel computing and mesh quality balance. They are particularly inefficient and difficult to guarantee mesh quality under complex geometries, making it difficult to fully utilize the computing resources of modern multi-core/GPU platforms.
We employ an adaptive smooth step size (SPH) method to generate quadrilateral dominant meshes through particle relaxation optimization. By utilizing GPU parallel acceleration, the distribution of particles is adjusted within a unified optimization framework to form high-quality quadrilateral meshes.
It improves the efficiency and quality of mesh generation, is suitable for fine-grained GPU parallel computing, reduces the need for global synchronization, and the generated mesh is not sensitive to complex geometries, resulting in better global mesh characteristics.
Smart Images

Figure CN121095490A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of simulation and numerical simulation technology of fluid mechanics, and in particular to a method and system for generating quadrilateral dominant meshes based on adaptive smooth step size SPH. Background Technology
[0002] In existing technologies, the generation of unstructured quadrilateral-dominant meshes mainly falls into two categories: direct methods and indirect methods. The direct method (Paving method): Starting from the boundary of the geometric model, the paving method "lays" quadrilateral elements layer by layer inwards according to predefined element sizes or asymptotic rules. In each paving operation, the algorithm selects the most suitable quadrilateral block based on the current boundary curvature, adjacent element shapes, and required mesh density, and adjusts the geometric position of the new element through boundary projection or node interpolation. The advantage of this method is that element quality is easy to control, and the generated mesh transitions smoothly; however, when the model geometry is extremely complex or requires local refinement, the fault filling and node matching during the paving process incur significant computational overhead, and the mesh quality also decreases. The indirect method (Q-Morph algorithm): The Q-Morph algorithm first constructs a triangular mesh (usually using Delaunay triangulation), and then through multiple rounds of geometric reconstruction (re-meshing) and element merging operations, pairs and merges adjacent triangles into quadrilaterals. Each merge is optimized based on metrics such as angle deviation, length ratio, and element shape quality to ensure the overall orthogonality and dimensional uniformity of the mesh. This method balances the maturity of triangular mesh generation with the flexibility of post-processing transformation. However, in large-scale scenarios, the global data dependency of geometric reconstruction leads to limitations in parallelization, making it difficult to fully utilize the computing resources of modern multi-core / GPU platforms.
[0003] Limitations of traditional local methods: Paving and Q-Morph algorithms generate meshes by "paving" the boundary or seed region, gradually expanding inwards / outwards, focusing only on the local neighborhood in each iteration. When faced with sharp corners, narrow slits, or highly curved concave and convex structures, local strategies often lead to mesh distortion, element intersections, or degradation, necessitating repeated intersection detection and local repair, severely slowing down overall efficiency and affecting mesh quality.
[0004] In terms of parallel computing, both the Paving and Q-Morph algorithms are designed with a serial framework. Paving lays new units hierarchically from the boundary, with each step relying on the boundary information of the previous layer, making parallelism impossible. Collision detection and backoff correction require real-time decision-making and synchronization, increasing serial overhead. Quality evaluation and parameter adjustment are necessary after each tile laying, reinforcing the requirement for sequential execution. Q-Morph is serially dependent; merging triangles into quadrilaterals requires pairwise evaluation and topology updates, with subsequent operations relying on the latest results. Multi-round global reconstruction (node translation, subdivision / backoff) requires frequent synchronization, making parallelization difficult. Therefore, Paving and Q-Morph algorithms primarily use coarse-grained CPU parallel extensions, facing significant challenges in adapting to fine-grained parallel architectures like GPUs. Summary of the Invention
[0005] To address the shortcomings of the two aforementioned methods in terms of parallelization and mesh quality balance, this invention proposes a novel parallel quadrilateral dominant mesh generation method. The main principle is a particle-based mesh generation method. During particle relaxation, an adaptive smoothing step size (SPH) method based on the infinity norm metric is employed, along with GPU parallel acceleration. The unit circle of the infinity norm is a "square," and when all particle distributions reach an ideal state, the resulting particle distributions, through topological connections, can form a high-quality quadrilateral dominant mesh.
[0006] This invention proposes a quadrilateral dominant mesh generation method and system based on adaptive smooth step size (SPH). The SPH method is used for particle relaxation optimization. By establishing a governing equation model, all particles undergo "relaxed" motion within a unified optimization framework, automatically adjusting their distribution positions according to the target density and size fields. After the particles reach an ideal distribution, a topology connection algorithm is used to connect them into a high-quality mesh in one step. Since it does not rely on point-by-point expansion, complex geometry has almost no impact on mesh generation efficiency. Furthermore, due to the global optimization strategy, the mesh quality and global transition are better than the Paving method and Q-Morph algorithm under complex geometry. This invention extends the adaptive smooth step size (SPH) method by proposing an adaptive smooth step size (SPH) method based on the infinite norm metric, and applies it to quadrilateral dominant mesh generation. GPU parallelism is also employed in the SPH method solution process.
[0007] The quadrilateral-dominant mesh generation method proposed in this patent is based on a particle-based mesh generation method; therefore, it is naturally suitable for fine-grained GPU parallelism. This is because the interaction between particles is limited to the local neighborhood and can be regarded as an independent small task. Millions or even billions of particles can be mapped to the GPU's thread group for parallel execution without global synchronization.
[0008] A method for generating quadrilateral dominant meshes based on adaptive smooth step size SPH, in one embodiment, includes the following steps:
[0009] Step S1: Read model data; normalize the module and generate background network, calculate features, including geometric features and user-defined features;
[0010] Step S2, calculate the target field; the target field includes the size field h t Target density field ρ t Symbolic range field SDF and target direction field Dir t A uniform grid is used as the background grid to store the target field data;
[0011] Step S3: Mark the background mesh cell region attributes to generate the initial particle distribution;
[0012] Step S4: Perform particle relaxation calculation, which includes the particle distribution at the relaxation boundary and the particle distribution within the relaxation calculation domain.
[0013] Step S5: Connect the particle topology relationships, convert the triangular mesh to a quadrilateral-occupied mesh, optimize the mesh quality, and output the network.
[0014] In one embodiment, the size field h is calculated in step S2. t Specifically, this includes step S21, based on the maximum size h. max Parameters, initialize the size field; Step S22, calculate features based on adaptive angle parameters, and add feature dimensions to the size field; Step S23, based on the maximum size h max and minimum size h min Constraints, smooth size field; target density field ρ t and target size field h t The conversion can be performed directly, and the conversion relationship is as follows:
[0015]
[0016] In one embodiment, generating the initial particle distribution in step S3 specifically includes,
[0017] The initial particle distribution includes the initial particle distribution in the boundary region and the initial particle distribution within the computational domain; first, the region mass is calculated; then, the particle count is estimated; finally, random particle placement is performed within the region; the grid cell mass calculation formula is as follows:
[0018]
[0019] Where q (i,j) Represents a grid cell. The area of the grid cell; The average density of the grid cells is the average value of the vertex densities, which are obtained by interpolation in the target density field.
[0020] In one embodiment, the method further includes a step of calculating the symbolic distance field (SDF), specifically including: the symbolic distance field SDF represents the distance from any position in the background raster region to the boundary; with the model boundary as the zero isosurface, distances within the computational domain are positive, and distances outside the computational domain are negative; simultaneously, the symbolic distance field SDF can be used to determine whether particles have moved outside the computational domain during particle relaxation; the symbolic distance field SDF is used to determine the regional attributes of the raster cells; when all point distances of a raster cell are positive, the cell is marked as a cell within the computational domain; when all point distances of a raster cell are negative, the cell is marked as a cell outside the computational domain; the remaining cells are intersecting cells; the target direction field Dir t Its main function is to control the quadrilateral mesh generation method, using the gradient of the signed distance field SDF as the target direction field Dir. t .
[0021] In one embodiment, the particle relaxation calculation in step S4 specifically includes using the infinite norm adaptive smooth step size SPH method, where the distance between particles is calculated using the following formula:
[0022] ||x2-x1|| ∞ =max(|x2-x1|,|y2-y1|)
[0023] Where x represents the particle's position; x and y represent coordinate values;
[0024] The vector normalization formula under the infinite norm metric is as follows:
[0025]
[0026] The evolution of the entire particle system is determined by two sets of core equations—one for updating mass conservation, and the other for describing momentum transfer and the effects of force; the mass conservation equation:
[0027]
[0028] Where ρ is density; t is time; and v represents velocity;
[0029] Momentum conservation equation:
[0030]
[0031] Where g represents external force; μ represents dynamic viscosity;
[0032] After deriving the momentum conservation equation, the following equation can be obtained.
[0033]
[0034] Among them, v i and f i These represent the velocity and acceleration of the particle with id = i, respectively. It is the acceleration generated by the pressure gradient; This represents the acceleration caused by viscous force; since no external force is applied, and The discrete calculation formula is as follows:
[0035]
[0036] Where m j Represents particle mass; P represents reference pressure; r i and r j Indicates the particle positions with id values of i and j; η represents dynamic viscosity; ρ i This represents the actual density during the particle relaxation process; This represents the target density value of the particles; n represents r. i The total number of particles in the region; the kernel function chosen is the Wendland Quintic kernel (C6) kernel, whose formula is as follows:
[0037]
[0038] in r represents the distance between two adjacent particles, h represents the local smoothing step size, obtained from background mesh interpolation; d represents the dimension; for 2D, For 3D,
[0039] In one embodiment, step S4 further includes particle neighborhood search, which uses a combination of a uniform background grid and a hash function to achieve fast neighborhood search; firstly, an n×m uniform grid is constructed throughout the entire computational region, and the grid cell size is set to the maximum grid size h. max Then, the hash index of each particle is calculated based on its spatial coordinates, and each particle is mapped and stored in its corresponding grid cell. During neighborhood search, it is only necessary to traverse the grid cell containing the particle and the particles in adjacent grid cells to quickly locate all neighboring particles that satisfy the search radius. The hash value of the grid point is calculated as follows:
[0040] Hash (i,j) =j*m+i
[0041] Where (i,j) represents the position in Grid(n,m); the formula for calculating the hash value of a particle is as follows:
[0042]
[0043] Where, x i and y i Represents particle r i The coordinate values;
[0044] In one embodiment, step S4, the particle relaxation process, comprises: a) calculating the hash value of each particle and registering it to construct a fast neighborhood search structure; b) calculating the local density of each particle according to the density calculation formula; and c) calculating the acceleration of each particle caused by the pressure gradient. d. Calculate the acceleration of each particle caused by viscous forces. When the velocity is less than the threshold, viscous force is ignored; e. Calculate the new time step based on the CFL number and the maximum velocity; f. Update the particle position based on the total particle acceleration, interpolate the new position, and calculate its distance value. If the distance is positive, the new position is within the computational domain; if the distance is negative, the new position is outside the computational domain; g. Determine whether the iteration meets the convergence condition based on the convergence condition. If the convergence condition is not met, continue the iteration.
[0045] A quadrilateral dominant mesh generation system based on adaptive smooth step size SPH, employing any of the methods described above, includes a host-side CPU and a device-side GPU in one embodiment; the host-side executes step S1, reading model data; the normalization module generates a background network and calculates features, including geometric features and user-defined features;
[0046] Step S2, calculate the target field; the target field includes the size field h t Target density field ρ t Symbolic range field SDF and target direction field Dir t A uniform grid is used as the background grid to store the target field data;
[0047] Step S3: Mark the background mesh cell region attributes to generate the initial particle distribution;
[0048] Step S5: Connect the particle topology relationships, convert the triangular mesh into a quadrilateral-occupied mesh, optimize the mesh quality, and output the network;
[0049] The device executes step S4 to perform particle relaxation calculation, which includes the particle distribution at the relaxation boundary and the particle distribution within the relaxation calculation domain.
[0050] The above-mentioned technical features can be combined in various suitable ways or replaced by equivalent technical features, as long as the purpose of the present invention can be achieved.
[0051] The present invention provides a method and system for generating quadrilateral dominant meshes based on adaptive smooth step size SPH, which has at least the following advantages compared with the prior art:
[0052] The quadrilateral dominant mesh generation method proposed in this invention is a global approach. It utilizes the SPH method to solve the fluid control equations for particle relaxation, achieving an ideal particle distribution at the target size. Finally, topological connections are used to generate the mesh. This method is insensitive to geometric complexity and offers better global mesh characteristics. The SPH method is highly suitable for GPU parallelization to improve mesh generation speed and efficiency. Attached Figure Description
[0053] The invention will now be described in more detail with reference to embodiments and the accompanying drawings.
[0054] Figure 1 The algorithm framework, module division, and algorithm flow of this invention are shown.
[0055] Figure 2 The target direction field of the present invention is shown;
[0056] Figure 3 The initial particle distribution of the present invention is shown;
[0057] Figure 4 The unit circle under the infinite norm metric of this invention is shown;
[0058] Figure 5 This invention demonstrates a high-quality quadrilateral mesh;
[0059] Figure 6 The relaxed particle distribution of the present invention is shown;
[0060] Figure 7 This invention demonstrates the use of CDT for triangulation;
[0061] Figure 8 The quadrilateral dominant grid of the present invention is shown. Detailed Implementation
[0062] The invention will now be further described with reference to the accompanying drawings.
[0063] This invention provides a method and system for generating quadrilateral dominant meshes based on adaptive smooth step size SPH.
[0064] In one embodiment, the quadrilateral-dominant mesh generation method proposed in this patent has the following algorithm framework, module division, and mesh generation process as follows: Figure 1As shown, the algorithm is a parallel algorithm framework, divided into two modules: the host side and the device side. The host side is responsible for the logical control of the entire algorithm flow and small-scale computational tasks; while the device side is mainly responsible for particle relaxation calculations. The details of the algorithm flow are explained below.
[0065] In one embodiment, the target field mainly includes the target size field h. t Target density field ρ t Symbolic range field SDF and target direction field Dir t A uniform grid was used as the background grid to store the target field data. To ensure a consistent reference standard for the target field values, the model was normalized after input; then, the model was moved to the first quadrant with the origin as the starting point.
[0066] Target size field h t It is mainly used to control the mesh size and the interpolation smoothing step size. In calculating the target size field h... t When considering these factors, three main considerations are: 1. Geometric features, 2. User-defined features, and 3. Control parameters (including the maximum size h). max Minimum size h min (And adaptive angle, etc.). Calculate the target size field h. t The steps are: 1. Based on the maximum size h max 1. Initialize the size field using parameters; 2. Calculate features based on adaptive angle parameters and add feature dimensions to the size field; 3. Based on the maximum size h... max and minimum size h min Constraints, smooth size field. Target density field ρ t and target size field h t The conversion can be performed directly, and the conversion relationship is as follows:
[0067]
[0068] The symbolic distance field (SDF) represents the distance from any point in the background raster region to the boundary. Using the model boundary as the zero isosurface, distances within the computational domain are positive, while distances outside the computational domain are negative. The SDF also determines whether particles have moved outside the computational domain during particle relaxation. The SDF is used to determine the region attributes of raster cells: when all distances to points in a raster cell are positive, the cell is marked as within the computational domain; when all distances to points in a raster cell are negative, the cell is marked as outside the computational domain; the remaining cells are intersecting cells. The target direction field (Dir) is also used. t Its main function is to control the quadrilateral mesh generation method, using the gradient of the signed distance field SDF as the target direction field Dir. t, Figure 2 The orientation field of a two-dimensional model is shown.
[0069] In one embodiment, the initial particle distribution
[0070] The initial particle distribution mainly consists of two parts: the initial particle distribution in the boundary region and the initial particle distribution within the computational domain. First, the region mass is calculated; then, the particle count is estimated; finally, random particle placement is performed within the region. The formula for calculating the grid cell mass is:
[0071]
[0072] Where q (i,j) Represents a grid cell. The area of the grid cell; This represents the average density of the grid cells (the average of the vertex densities), which is obtained by interpolation in the target density field. In the previous step, the background grid cells were labeled with region attributes. When calculating the quality of the boundary region, only the sum of the masses of all intersecting cells needs to be calculated; when calculating the quality within the computational domain, only the sum of the masses of all cells within the computational domain needs to be calculated. Assuming that all particle masses are 1 and do not change during particle relaxation, the particle count can be directly rounded down to the mass. Within the background grid region, points are randomly generated. If a particle's position falls into an intersecting cell, the particle is placed in the boundary particle container; if a particle falls into a cell within the computational domain, it is placed in the computational domain particle container. When the number of particles in the container meets the predetermined estimated particle count, the initial particle distribution calculation ends. For boundary particles, the particles need to be projected onto the boundary to ensure the boundary shape. Figure 3 It is the initial particle distribution of a two-dimensional model.
[0073] In one embodiment, particle relaxation includes an adaptive smoothing step size (SPH) method based on the infinity norm.
[0074] Under the infinity norm metric, the unit circle of the infinity norm in two-dimensional space is a "square", such as... Figure 4 As shown. The formula for calculating the distance between particles is:
[0075] ||x2-x1|| ∞ =max(|x2-x1|,|y2-y1|)
[0076] Where x represents the particle's position. x and y represent coordinate values.
[0077] The vector normalization formula under the infinite norm metric is as follows:
[0078]
[0079] The SPH method is a numerical simulation technique based on particle discretization used to reproduce the motion of continuous fluids. This method decomposes the fluid into a large number of particles with properties such as mass, density, and velocity, and characterizes the overall dynamic properties of the fluid through their interactions. The density, pressure, and other physical quantities of each particle are obtained by weighted summation of the contributions of all particles in its neighborhood using a kernel function. The evolution of the entire particle system is determined by two sets of core equations—one for updating mass conservation, and the other for describing momentum transfer and force interactions. Mass conservation equation:
[0080]
[0081] Where ρ is density; t is time; and v represents velocity.
[0082] Momentum conservation equation:
[0083]
[0084] Where g represents external force; μ represents dynamic viscosity; and v represents velocity.
[0085] After deriving the momentum conservation equation, the following equation can be obtained.
[0086]
[0087] Among them, v i and f i These represent the velocity and acceleration of the particle with id = i, respectively. It is the acceleration generated by the pressure gradient; This represents the acceleration caused by viscous force; since no external force is applied, and The discrete calculation formula is as follows:
[0088]
[0089] Where m j Represents particle mass; P represents reference pressure; r i and r j Indicates the particle positions with id values of i and j; η represents dynamic viscosity; ρ i This represents the actual density during the particle relaxation process; This represents the target density value of the particles; n represents r. i The total number of particles within the region. The kernel function chosen is the Wendland Quintic kernel (C6) kernel, whose formula is as follows:
[0090]
[0091] in r represents the distance between two adjacent particles, h represents the local smoothing step size, obtained from background mesh interpolation; d represents the dimension. For 2D, For 3D,
[0092] The Adaptive Smooth Step Size (SPH) method is an improved strategy within the classic SPH framework. It enhances simulation accuracy and efficiency by dynamically adjusting the influence radius (step size) of each particle kernel function, while also reducing load imbalance. Under the infinite norm metric, particle relaxation using the SPH method results in an ideal quadrilateral particle distribution. After topological connection, a high-quality quadrilateral mesh can be generated, as shown in the following results. Figure 5 As shown. However, in actual engineering, since the total number of particles is an estimated value and numerical calculations inevitably contain errors, and the model boundary is an irregular boundary, it is difficult to generate a fully quadrilateral mesh; usually, a quadrilateral-dominated mesh is generated.
[0093] In one embodiment, particle domain search includes,
[0094] The particle neighborhood search speed has a crucial impact on the overall relaxation efficiency. This patent employs a method combining a uniform background grid and a hash function to achieve fast neighborhood search. First, an n×m uniform grid is constructed across the entire computational domain, with the grid cell size set to the maximum grid size h. max Then, the hash index of each particle is calculated based on its spatial coordinates, and each particle is mapped and stored in its corresponding grid cell. During neighborhood search, it is only necessary to traverse the grid cell containing the particle and the particles in its adjacent grid cells to quickly locate all neighboring particles that satisfy the search radius. The hash value of a grid point is calculated as follows:
[0095] Hash (i,j) =j*m+i
[0096] Here, (i,j) represents the position in Grid(n,m).
[0097] The formula for calculating the hash value of a particle is as follows:
[0098]
[0099] Where, x i and y i Represents particle r i The coordinate values.
[0100] Specifically, this includes particle relaxation within the boundary / computational domain, and the particle relaxation process is as follows:
[0101] 1. Calculate the hash value of each particle and register it to build a fast neighborhood search structure;
[0102] 2. Calculate the local density of each particle using the density calculation formula;
[0103] 3. Calculate the acceleration of each particle caused by the pressure gradient.
[0104] 4. Calculate the acceleration of each particle caused by viscous forces. When the velocity is less than the threshold, viscous force is ignored;
[0105] 5. Calculate the new time step based on the number of CFLs and the maximum speed;
[0106] 6. Update the particle position based on the total particle acceleration, interpolate the new position, and calculate its distance value. If the distance is positive, the new position is within the calculation domain; if the distance is negative, the new position is outside the calculation domain.
[0107] 7. Based on the convergence condition, determine whether the iteration meets the convergence condition. If the convergence condition is not met, continue the iteration.
[0108] During particle relaxation, the frame field direction of local particles is interpolated from the target direction field. For boundary particle relaxation, the influence on the particles is only considered from adjacent boundary particles. The acceleration experienced by the particles is also only considered from the acceleration caused by the pressure gradient. Since boundary particle movement can only occur on the boundary, only the tangential acceleration component is retained. After the particle position is updated, the particles need to be projected back to the boundary to ensure that the boundary shape does not change. Figure 6 The relaxed particle distribution shows that the particle distribution exhibits a quadrilateral shape.
[0109] In one embodiment, mesh generation is included. The particle distribution, after relaxation optimization, is already in an optimal state; only topological connections between the particles are needed to generate a high-quality mesh. For topological connections, this patent selects the constrained Delaunay triangulation algorithm, and the topological connection result is as follows: Figure 7 As shown.
[0110] The mesh generated by the CDT algorithm is a triangular mesh, from Figure 7 As can be seen, the triangular element shape is close to a right triangle; therefore, by simply transforming adjacent elements and merging elements that meet the quality requirements, quadrilateral-dominated mesh generation can be achieved. The quality of the transformed quadrilateral-dominated mesh decreases somewhat; therefore, a polygon Laplacian smoothing algorithm is used to smooth the mesh and improve its quality. Figure 8 This results in a quadrilateral-dominated mesh.
[0111] Specifically, the mesh generation method proposed in this invention demonstrates significant advantages over traditional Paving and Q-Morph algorithms in addressing the two key bottlenecks of complex geometry and improving parallel performance. The proposed quadrilateral-dominant mesh generation method is a global approach. It uses the SPH method to solve the fluid control equations for particle relaxation, achieving an ideal particle distribution for the target size field. Finally, topological connections are used to generate the mesh. The method proposed in this patent is insensitive to geometric complexity and offers better global mesh coverage.
[0112] The method proposed in this invention is based on a particle-based mesh generation method and employs an adaptive smoothing step size (SPH) method based on the infinite norm for particle relaxation. The SPH method is highly suitable for GPU parallelization.
[0113] While the invention has been described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the invention. Therefore, it should be understood that many modifications can be made to the exemplary embodiments, and other arrangements can be designed without departing from the spirit and scope of the invention as defined by the appended claims. It should be understood that different dependent claims and features described herein can be combined in ways different from those described in the original claims. It is also understood that features described in conjunction with individual embodiments can be used in other described embodiments.
Claims
1. A method for generating quadrilateral dominant meshes based on adaptive smooth step size SPH, characterized in that, Includes the following steps, Step S1: Read model data; normalize the module and generate background network, calculate features, including geometric features and user-defined features; Step S2, calculate the target field; the target field includes the target size field h. t Target density field ρ t Symbolic range field SDF and target direction field Dir t A uniform grid is used as the background grid to store the target field data; Step S3: Mark the background mesh cell region attributes to generate the initial particle distribution; Step S4: Perform particle relaxation calculation, which includes the particle distribution at the relaxation boundary and the particle distribution within the relaxation calculation domain. Step S5: Connect the particle topology relationships, transform the triangular mesh into a quadrilateral-dominant mesh, optimize the mesh quality, and output the network.
2. The quadrilateral dominant mesh generation method based on adaptive smooth step size SPH according to claim 1, characterized in that, In step S2, the size field h is calculated. t Specifically, this includes step S21, based on the maximum size h. max Parameters, initialize the size field; Step S22, calculate features based on adaptive angle parameters, and add feature dimensions to the size field; Step S23, based on the maximum size h max and minimum size h min Constraints, smooth size field; target density field ρ t and target size field h t The conversion can be performed directly, and the conversion relationship is as follows:
3. The quadrilateral dominant mesh generation method based on adaptive smooth step size SPH according to claim 1, characterized in that, The generation of the initial particle distribution in step S3 specifically includes... The initial particle distribution includes the initial particle distribution in the boundary region and the initial particle distribution within the computational domain; first, the region mass is calculated; then, the particle count is estimated; finally, random particle placement is performed within the region; the grid cell mass calculation formula is as follows: Where q (i,j) Represents a grid cell; The area of the grid cell; This represents the average density of the grid cells, which is the average value of the vertex densities obtained by interpolation in the target density field.
4. The quadrilateral dominant mesh generation method based on adaptive smooth step size SPH according to claim 1, characterized in that, It also includes a step of calculating the symbolic distance field (SDF), specifically: the symbolic distance field SDF represents the distance from any position in the background raster region to the boundary; with the model boundary as the zero isosurface, distances within the computational domain are positive, and distances outside the computational domain are negative; simultaneously, the symbolic distance field SDF can determine whether particles have moved outside the computational domain during particle relaxation; the symbolic distance field SDF is used to determine the region attributes of the raster cells: when all point distances of a raster cell are positive, the cell is marked as a cell within the computational domain; when all point distances of a raster cell are negative, the cell is marked as a cell outside the computational domain; the remaining cells are intersecting cells; the target direction field Dir... t Its main function is to control the generation direction of quadrilateral meshes, using the gradient of the signed distance field SDF as the target direction field Dir. t .
5. The quadrilateral dominant mesh generation method based on adaptive smooth step size SPH according to claim 1, characterized in that, The particle relaxation calculation in step S4 specifically includes using the infinite norm adaptive smooth step size SPH method, and the distance between particles is calculated using the following formula: ‖x2-x1‖ ∞ =max(|x2-x1|,|y2-y1|) Where x represents the particle's position; x and y represent coordinate values; The vector normalization formula under the infinite norm metric is as follows: The evolution of the entire particle system includes the mass conservation equation and the momentum conservation equation. After deriving the momentum conservation equation, the following equation can be obtained. Among them, v i and f i These represent the velocity and acceleration of the particle with id = i, respectively. It is the acceleration generated by the pressure gradient; This represents the acceleration caused by viscous force; since no external force is applied, and The discrete calculation formula is as follows: Where m j Represents particle mass; P represents reference pressure; r i and r j Indicates the particle positions with id values of i and j; η represents dynamic viscosity; ρ i This represents the actual density during the particle relaxation process; This represents the target density value of the particles; n represents r. i The total number of particles within the region; the kernel function formula is as follows: in r represents the distance between two adjacent particles, h represents the local smoothing step size, obtained from background mesh interpolation; d represents the dimension; for 2D, For 3D, 6. The method for generating quadrilateral dominant meshes based on adaptive smooth step size SPH according to claim 1, characterized in that, Step S4 further includes particle neighborhood search, which uses a combination of a uniform background grid and a hash function to achieve fast neighborhood search; firstly, an n×m uniform grid is constructed throughout the entire computational region, and the grid cell size is set to the maximum grid size h. max Then, the hash index of each particle is calculated based on its spatial coordinates, and each particle is mapped and stored in its corresponding grid cell. During neighborhood search, it is only necessary to traverse the grid cell containing the particle and the particles in adjacent grid cells to quickly locate all neighboring particles that satisfy the search radius. The hash value of the grid point is calculated as follows: Hash (i,j) =j*m+i Where (i,j) represents the position in Grid(n,m); the formula for calculating the hash value of a particle is as follows: Where, x i and y i Represents particle r i The coordinate values.
7. The method for generating quadrilateral dominant meshes based on adaptive smooth step size SPH according to claim 1, characterized in that, In step S4, the particle relaxation process is as follows: a) calculate the hash value of each particle and register it to construct a fast neighborhood search structure; b) calculate the local density of each particle according to the density calculation formula; c) calculate the acceleration of each particle caused by the pressure gradient. d. Calculate the acceleration of each particle caused by viscous forces. When the velocity is less than the threshold, viscous force is ignored; e. Calculate the new time step based on the CFL number and maximum velocity; f. Update the particle position based on the total particle acceleration, interpolate the new position, and calculate its distance value. If the distance is positive, the new position is within the computational domain; if the distance is negative, the new position is outside the computational domain; g. Determine whether the iteration meets the convergence condition based on the convergence condition. If the convergence condition is not met, continue the iteration.
8. A quadrilateral dominant mesh generation system based on adaptive smooth step size SPH, employing the method described in any one of claims 1-7, characterized in that, Including both host and device sides; The host executes step S1, reads model data, normalizes the module and generates the background network, and calculates features, including geometric features and user-defined features. Step S2, calculate the target field; the target field includes the size field h t Target density field ρ t Symbolic range field SDF and target direction field Dir t A uniform grid is used as the background grid to store the target field data; Step S3: Mark the background mesh cell region attributes to generate the initial particle distribution; Step S5: Connect the particle topology relationships, convert the triangular mesh into a quadrilateral-occupied mesh, optimize the mesh quality, and output the network; The device executes step S4 to perform particle relaxation calculation, which includes the particle distribution at the relaxation boundary and the particle distribution within the relaxation calculation domain.
Citation Information
Patent Citations
Aero-engine combustion chamber immersion boundary and grid processing modeling method
CN118296990A