Structural dominant surface grid quality optimization method based on template reconstruction
Through the template reconstruction method, the quadrilateral dominant mesh is optimized, which solves the unstructured mesh caused by singular elements, and improves the calculation accuracy and applicability of the mesh in CFD engineering.
Patent Information
- Application Number
- CN202411896819.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The existing quadrilateral dominant mesh has singular elements in CFD engineering applications, which destroys the symmetry of the tensor product, leads to the unstructured mesh, and reduces the accuracy of finite element calculations and simulations.
The structural dominant surface mesh quality optimization method based on template reconstruction is adopted. By calculating the feature distance scalar field, detecting and marking sharp feature edges, sorting and prioritizing singular elements, partitioning and re-meshing, eliminating non-structural elements to improve the mesh topological quality.
It reduces the singular elements in the structural dominant mesh, maintains sharp features, improves the proportion of quadrilateral elements and regular vertices in the mesh, enhances the structureability and calculation accuracy of the mesh, and is suitable for CFD engineering applications.
Smart Images

Figure CN119863589A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer-aided design, and in particular relates to a quadrilateral-dominant surface mesh optimization method for CFD engineering application requirements. Background Art
[0002] Quadrilateral meshes have become a popular choice for surface representation in the fields of shape modeling, texture synthesis, and numerical simulation due to the tensor product properties of their units. In recent decades, the field of engineering analysis has been committed to the generation of quadrilateral meshes, resulting in two major types of industrial technologies. First, some semi-automatic auxiliary methods are used to manually divide quadrilateral regions, and then generate standardized quadrilateral meshes to fill the regions according to user needs. This method is very time-consuming and is mainly used for demanding numerical simulations such as CFD. Second, there are some fully automatic methods such as the frontier advancing method based on the frame field to generate rectangular triangular meshes, and then merge operations to obtain quadrilateral-dominated meshes. However, such methods have a large number of irregular elements and lack user control.
[0003] Moreover, a large number of singular elements destroy the symmetry of the tensor product on the quadrilateral-dominated grid and make the grid unstructured. In terms of numerical calculation, these irregular shapes cause deformation in low curvature areas, thereby reducing the accuracy of finite element calculations and simulations. That is, the existing measures to improve the quality of the grid are mostly confined to local areas, or inevitably rely on user intervention for editing, which not only increases the extra and complicated workload, but also makes it impossible to significantly improve the overall optimization effect. Summary of the invention
[0004] The purpose of the present invention is to reduce the singular elements existing in the structure-dominated mesh and keep its sharp features. A method for optimizing the mesh quality of the structure-dominated surface based on template reconstruction is provided. By comprehensively considering the characteristic structures of quadrilateral meshes and quadrilateral structure-dominated meshes, a post-processing method based on replacing or removing non-structural elements (singular points or triangles) to improve the mesh topology quality is adopted to better meet the needs of CFD engineering applications.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for optimizing the mesh quality of a structure-dominant surface based on template reconstruction, the specific steps of which include:
[0006] Step 1: Calculate the characteristic distance scalar field for the input background quadrilateral structure dominant surface grid;
[0007] Traverse each mesh edge, detect and mark sharp feature edges according to the dihedral angle threshold given by the user, use the vertices on the feature edges as source points, and calculate the feature distance on each vertex of the mesh; the calculation of the feature distance uses the method of thermal motion equation to solve the geodesic distance of each vertex, and the geodesic distance is used as the feature distance.
[0008] Step 2: Use feature distance to sort and prioritize the singular elements in the grid, and construct partitions based on the selection results;
[0009] Preferably, the general process method of the partition construction algorithm includes:
[0010] Step 201: Prepare seed elements and set priority queues;
[0011] Step 202: Select the singular element with the highest priority as the seed element for partition expansion;
[0012] Step 203: Expand the partition around the seed element;
[0013] Step 204: Partition repair;
[0014] Step 205: Setting partition corner points;
[0015] Step 206: Partition expansion.
[0016] Step 3: After the partition construction is completed, a polygonal partition that meets the regridding condition is obtained, and the polygonal partition includes: a legal triangle, quadrilateral, pentagon or hexagonal partition;
[0017] As a preference, the goal of partition remeshing is to re-mesh the internal topology according to the given number of segments on each edge of the partition. For polygonal partitions, only the even number of edge conditions as shown below need to be met:
[0018]
[0019] Among them, e i represents the number of mesh edges on the i-th partition edge. The above formula indicates that the number of mesh edges on the partition boundary is an even number.
[0020] As a preference, the partition construction process ensures the even-numbered edge condition. Therefore, considering n-gonal partitions, the partition with a single internal singular point will insert an n-valent singular point inside the partition, connect the singular point with the points on each edge of the partition, and divide each partition edge into two sub-edges. Based on the regularity constraint, the left or right sub-edges of the other edge i must have the same number of segments s. i ;
[0021] Therefore, the following formula can be obtained:
[0022]
[0023] In the above and following equations, all the subscripts i are obtained modulo n, because each edge of the polygon partition must be split into two sub-edges, so further assume that e i >1.
[0024] Preferably, the following general property is obtained: if the polygon partition is to be subdivided into the minimum singular point, there must be a positive integer s that satisfies the above formula i , the specific conditions of the above general properties on different polygonal partitions include: the different polygonal partitions include triangles, quadrilaterals, pentagons or hexagons;
[0025] In the case of a triangular partition, that is, when n=3, where n is the number of sides of the polygon, the equation is rewritten in matrix form:
[0026]
[0027] Inverting the matrix yields:
[0028]
[0029] Or written in another form:
[0030]
[0031] Among them, to make s i is an integer, we need to ensure that the expression in the brackets is an even number, which is already guaranteed by the even number side condition. i Is a positive number, and it is also necessary to ensure that the right side is a positive number, so the following formula is obtained:
[0032]
[0033] Therefore, the specific condition of the general property on triangular partitions is: a triangular partition can be remeshed into a pure quadrilateral mesh with only one singular point if and only if the number of segments on each partition edge is less than the number of segments on the other two edges.
[0034] Preferably, for quadrilateral partitioning, a pure structured quadrilateral mesh partition without singular points can be constructed. When n=4, the equation is expressed as follows:
[0035]
[0036] The above matrix is non-singular because the first two rows match the last two rows, so the linear system for s is i There are multiple solutions, otherwise there is no solution. This condition implicitly contains the even side condition, that is, ∑e i = 2(e0+e1); because n = 4, the "singular" points inside are actually regular points like other vertices, and every other valid positive integer s iThe same partitioning results will be produced. Therefore, for a quadrilateral partition, it can only be subdivided into quadrilateral mesh partitions without singular points when the number of segments on its opposite sides is equal.
[0037] Preferably, for n=5, that is, the case of pentagonal partition, the equation is expressed as follows:
[0038]
[0039] Inverting the matrix yields:
[0040]
[0041] Another form is:
[0042]
[0043] Likewise, in order to make s i is an integer, we only need to ensure that the expression in the brackets is an even number, which is already guaranteed by the even side condition. i The symbol constraint (s i >0) can be derived as follows:
[0044]
[0045] In summary, for a pentagonal partition, if and only if the sum of the number of segments of any three consecutive partition edges is greater than the sum of the number of partition boundary segments of the other two sides, the partition can be remeshed into a pure quadrilateral mesh with only one internal singular point.
[0046] Preferably, for n=6, that is, the case of hexagonal partitioning, the equation is expressed as follows:
[0047]
[0048] Inverting the matrix yields:
[0049]
[0050] Another form:
[0051]
[0052] Among them, i Integer constraints Can be converted into requirements 0,2,4 The sum of 1,3,5 The sum is an even number, the sign constraint (s i >0) is expressed as:
[0053] j = (i + 3) mod 6
[0054]
[0055] In summary, for a hexagonal partition, if and only if the number of segments on each even partition edge is less than the sum of the number of segments on the other two even partition edges (same for odd partition edges), and the sum of the number of segments on the even partition edges and the odd partition edges is an even number, this hexagonal partition can be remeshed into a pure quadrilateral mesh with only one internal singular point.
[0056] Preferably, when a complex partition of a grid to be re-meshed is recorded as (e0,…,e n-1 ), and satisfy the following formula:
[0057]
[0058] Select an edge e that meets the conditions i And define d = min(e i-1 ,e i+1 )-1, so the original input quadrilateral remeshing can be achieved by first remeshing a smaller partition input (e'0,…,e' n-1 ) are as follows:
[0059]
[0060] For the cropped part, that is, close to the partition edge e i Filling a regular quadrilateral grid, the pruning operation is performed iteratively until it is no longer possible to prune, that is, for any partition edge, the number of segments e i , e i-1 and e i+1 At least one of them is 1, and the rest can be filled with the general topological template. For the situation where there are multiple feasible solutions or multiple modes are applicable, the mode with the least singular points is selected for subdivision.
[0061] Step 4: Further perform partition topology construction on the parameter domain, remap the results obtained by partition regridding to the original grid, and then merge the partition grids;
[0062] Preferably, by constructing the partition topology on the parameter domain, a partition is allowed to be of arbitrarily complex shape and is guaranteed to always be homeomorphic to the disk topology;
[0063] Preferably, after the partition topology is constructed on the parameter domain to obtain the partitioned mesh on the physical domain, the geometric quality and topological quality of the mesh are checked, and the poor re-meshing results are discarded, and different types of elements are uniformly measured by using the average ratio quality; that is, the average ratio quality metric and the characteristic distance quality threshold are used to avoid illegal cells and ensure the geometric quality of the re-meshed partitions;
[0064] Finally, the partitioned meshes are merged. For the partitions that pass the validity check, the corresponding relationship is established by searching for the overlapped parts of the fixed vertices on the partition boundary with the original model, and the partitions are merged back. The octree is used to accelerate the process of querying the overlapping vertices.
[0065] Step 5: Post-process the optimized mesh.
[0066] Preferably, an octree is constructed by taking the original model as the background mesh, marking the feature boundaries, and then performing weighted Laplace smoothing.
[0067] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: the present invention seeks convex partitions containing a certain number of singular elements, applies a quadrilateral mesh topology template, reconstructs the mesh topology structure within the partition according to the number of boundary segments of the partition, eliminates non-quadrilateral units within the partition, reduces singular points, and increases the proportion of quadrilateral elements and regular vertices in the mesh. It can well retain sharp features, adapt to mesh size transitions, and is suitable for situations where the quality of the original mesh units is poor, and can well meet the needs of CFD engineering applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0069] In the attached picture:
[0070] Figure 1 is a flow chart of the steps of the present invention;
[0071] Figure 2 Schematic diagram of input grid preprocessing;
[0072] Figure 3 Search / construct schematics for partitions;
[0073] Figure 4 This is a schematic diagram of the template with the least singular points;
[0074] Figure 5 Cutting diagram for complex templates;
[0075] Figure 6 It is a schematic diagram of partition grid remapping;
[0076] Figure 7 is a schematic diagram of average quality measurement;
[0077] Figure 8 This is a schematic diagram of the re-gridding quality check;
[0078] Fig. 9 This is the topology optimization result diagram of the aircraft model. DETAILED DESCRIPTION
[0079] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0080] First see Figure 1 , Figure 1 A schematic diagram of a flow chart of a method for optimizing the quality of a structure-dominant surface mesh based on template reconstruction provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, an embodiment of the present application provides a method for optimizing the mesh quality of a structure-dominant surface based on template reconstruction, which specifically includes steps 1-5. These steps are described in detail below.
[0081] Step 1: Calculate the characteristic distance scalar field for the input background quadrilateral structure dominant surface mesh
[0082] Traverse each mesh edge, detect and mark sharp feature edges according to the dihedral angle threshold given by the user, use the vertices on the feature edges as source points, and calculate the feature distance on each vertex of the mesh; the calculation of the feature distance uses the method of thermal motion equation to solve the geodesic distance of each vertex, and the geodesic distance is used as the feature distance.
[0083] The calculation steps of feature distance are as follows:
[0084] Step 101: For a given period of time t, integrate the heat flow equation To time discretize the heat equation using the backward Euler method at a given time t, one only needs to solve a linear equation:
[0085] id-tΔ)u t =u0
[0086] Where id is the identity matrix, t is the time interval, Δ is the discrete Laplace operator, and u t is the thermal state at time t, u0 is the thermal state at the initial time, and the boundary conditions are considered:
[0087] id-tΔ)v t =0onM\γ,
[0088] v t =1onγ
[0089] γ is a subset of the manifold mesh used as the source, which here represents the points on the feature edge.
[0090] Step 102: Temperature Gradient Normalizing and negating it gives the unit vector field X pointing along the geodesic line:
[0091]
[0092] Step 103: Solve the Poisson equation to obtain the final distance φ from the point on the grid to the source point:
[0093]
[0094] It should be noted that for each mesh surface, the average characteristic distance of each vertex is calculated as the characteristic distance of the mesh surface. The characteristic distance is represented as 1 at the source point, that is, the point on the characteristic edge, and the farther away from the characteristic point, the closer to 0. Therefore, according to the above steps of characteristic distance calculation, the following can be obtained: Figure 2 The input grid preprocessing diagram shown is Figure 2 The result of the feature distance calculation of the present invention is shown.
[0095] Step 2: Use feature distance to sort and prioritize the singular elements in the grid, and construct partitions based on the selection results;
[0096] For the convenience of explanation in this application, it is first assumed that the input mesh is a manifold mesh and is isomorphic to an orientable two-dimensional surface, and the following basic definitions and propositions are given:
[0097] Definition 1: The degree of a vertex is the number of edges adjacent to the vertex. The neighborhood of a vertex refers to the set of cells and edges connected to it. The neighborhood of an edge refers to the set of cells connected to it. An edge connecting two cells is called an internal edge, and an edge connecting only one cell is called a boundary edge. The vertices of boundary edges are called boundary points, otherwise they are called internal points. Among them, internal points with a degree of 4 and boundary points with a degree of 2 are called regular points, otherwise they are called irregular vertices or singular points.
[0098] Specifically, only singular points with a valence of 3 or 5 are considered in this application. Other high-valence singular points can be converted into valence 3 or 5 singular points using simple surface opening or surface closing atomic operations. Internal points with a valence of 2 are called double chords and need to be removed when discovered.
[0099] Definition 2: The degree of a cell is the number of points adjacent to the cell. A cell with a degree of 4 is a regular cell, otherwise it is a singular cell.
[0100] Definition 3: A partition is a sub-mesh that is topologically homeomorphic to the disk.
[0101] Definition 4: The topological exterior angle (TOA) of a vertex on a partition boundary is defined as:
[0102]
[0103] in It represents the number of cells outside the partition adjacent to the vertex. If the vertex is on the boundary of the mesh, add an α / 90° term to the right side of the equation. α is the geometric exterior angle of the boundary to take into account the missing cells outside the mesh.
[0104] Definition 5: If the TOA of a vertex on the partition boundary is greater than or equal to 1, then the vertex is a convex corner.
[0105] Proposition 1: The number of edges on the partition boundary is even.
[0106] Specifically, for a local isomorphism to R 2 A pure quadrilateral mesh subset of R 2 To represent a two-dimensional real space, the number of cells and edges must satisfy 4F = 2E i +E b , where E i is the number of boundary edges shared by two cells, E b is the number of boundary edges that are adjacent to only one unit. Therefore, only when the number of boundary edges is an even number can the partition have a topological structure composed of pure four-sided grid units.
[0107] Proposition 2: Only pairs of the same type of singular elements can be eliminated.
[0108] In this application, the partition retopology process is divided into two processes: one is to eliminate singular units and the other is to reduce singular points. When the goal is to eliminate singular units, the partition should contain at least 2 singular units; when the goal is to reduce singular points, the partition should contain at least 3 singular points.
[0109] It should be noted that based on the above definitions and propositions, the two processes of eliminating singular units and reducing singular points are roughly the same, with only a few differences. The process is as follows Figure 3 shown.
[0110] Further, through Figure 3 The following general process of the partition construction algorithm is given:
[0111] Step 201: Prepare seed elements and set priority queues;
[0112] Specifically, all singular elements in the grid are first found, then the singular elements in the grid are sorted according to the feature distance and added to the priority queue. The user can choose to give priority to elements close to the feature edge or elements far away from the feature.
[0113] Step 202: Select the singular element with the highest priority as the seed element for partition expansion;
[0114] Step 203: Expand the partition around the seed element;
[0115] Specifically, the partition is expanded by simply taking the order of breadth-first search. Since at least two singular elements are required in the partition, the seed element is used as the source point and the Dijkstra shortest path algorithm is used to find a singular element that is topologically closest to the seed element. This shortest path is used as a guide to construct the initial partition.
[0116] Step 204: Partition repair;
[0117] Specifically, the topological exterior angle (TOA) of the boundary vertex of the current partition is determined and its topological exterior angle value is calculated. When the topological exterior angle of the vertex is negative, the outer partition cells adjacent to the vertex are recursively added to the partition until the partition becomes a convex partition, that is, the topological exterior angles of all partition boundary vertices are non-negative.
[0118] Step 205: Setting partition corner points;
[0119] Specifically, the partition boundary vertices with topological external angles greater than 0 will be set as partition corner points. The partition contains at least 3 corner points or at most 6 partition corner points. In the case of more than 6 partition corner points, the 6 corner points with the largest geometric external angles are preferentially selected as partition corner points. Due to the special topological external angle calculation rules at the mesh boundary or sharp features, the partitions close to the boundary are not ideal when setting corner points, which leads to poor geometric quality in the partition regridding results. However, due to the requirement of preserving features, it is difficult to improve the geometric quality of cells close to features or boundaries through post-processing. Therefore, for this kind of boundary partition, a more conservative point selection strategy is adopted in this application for setting;
[0120] Furthermore, for partition boundary points that are not on the boundary or features, vertices with positive topological external angles are still selected as partition corner points, and a minimum geometric external angle threshold is set. Partition boundary vertices on the partition boundary that are greater than the geometric external angle threshold are marked as candidate partition corner points. If the number of internal partition boundary corner points plus the number of candidate boundary corner points is less than 3, the geometric external angle threshold is lowered and the candidate corner points are re-marked until the number of candidate corner points plus the number of internal partition boundary corner points is greater than 3. All combinations of candidate corner points and internal partition corner points are tried, and the combination closest to a regular polygon is selected as the corner point of this partition.
[0121] Step 206: Partition expansion.
[0122] Exemplarily, when there are not enough singular elements in a partition or the result of the partition remeshing is not acceptable, the partition is expanded inward first: that is, the continuous boundary mesh edges between adjacent partition boundary corner points constitute a partition edge, and the partition edge with the smallest average feature distance is selected and pushed inward; for partitions far away from the grid feature boundary, the maximum number of expansions is the number of times it touches any feature boundary through the breadth-first order, and the minimum number of expansions is 3 times; compared with the simple breadth-first strategy, the inward push strategy allows partitions close to the boundary to undergo multiple partition expansions when remeshing fails or the results are poor, so as to explore the possibility of topology optimization as much as possible.
[0123] Step 3: After the partition is constructed, a legal triangle, quadrilateral, pentagon or hexagon partition that meets the regridding condition is obtained;
[0124] In this embodiment, after the partition search is completed, a legal triangle, quadrilateral, pentagon or hexagon partition that meets the re-meshing condition is obtained; the goal of partition re-meshing is to re-divide the internal topological structure according to the given number of segments on each edge of the partition, and for polygonal partitions, as long as the even number of edges condition as shown below is met:
[0125]
[0126] Among them, e i represents the number of mesh edges on the i-th partition edge. The above formula indicates that the number of mesh edges on the partition boundary is an even number.
[0127] Furthermore, this partition can always be remeshed into pure quadrilaterals, which is acceptable under the condition of reducing triangles. However, the overall goal also includes reducing singular points, so the remeshing result of the partition should produce as few singular points as possible.
[0128] Specifically, Figure 4 As shown, it is a schematic diagram of the minimum singular point template, and further describes the conditions that can minimize the singular points in the partition re-gridding result;
[0129] It should be noted that the partition construction process ensures the even-numbered edge condition. Therefore, considering an n-gonal partition, a partition with a single internal singular point will insert an n-valent singular point inside the partition, connect the singular point with the points on each edge of the partition, and divide each partition edge into two sub-edges. Based on the regularity constraint, the left or right sub-edges of the other edge i must have the same number of segments s. i ;
[0130] Therefore, the following formula can be obtained:
[0131]
[0132] In the above and following equations, all the subscripts i are obtained modulo n, because each edge of the polygon partition must be split into two sub-edges, so further assume that e i >1.
[0133] Furthermore, the following general property is obtained: if the polygon partition is to be subdivided into the minimum singular point, there must be a positive integer s that satisfies the above formula i , the specific conditions of the above general properties on different polygonal partitions include:
[0134] For n = 3, i.e. the case of triangular partitioning, rewrite the equation into matrix form:
[0135]
[0136] Inverting the matrix yields:
[0137]
[0138] Or written in another form:
[0139]
[0140] Among them, to make s i is an integer, we only need to ensure that the expression in the brackets is an even number, which is already guaranteed by the even side condition. i is a positive number, and similarly, we need to ensure that the right-hand side is a positive number, so we get the following formula:
[0141]
[0142] In summary, a triangular partition can be remeshed into a pure quadrilateral mesh with only one singular point if and only if the number of segments on each partition edge is less than the number of segments on the other two sides. This condition can be seen as a discrete version of the triangle inequality.
[0143] Specifically, for quadrilateral partitions, a pure structured quadrilateral mesh partition without singular points can be constructed. When n = 4, the equation is expressed as follows:
[0144]
[0145] The above matrix is non-singular because the first two rows match the last two rows, so the linear system for s is i There are multiple solutions, otherwise there is no solution. This condition implicitly contains the even side condition, that is, ∑e i =2(e0+e1);
[0146] Furthermore, because n = 4, the "singular" points in the interior are actually regular points like other vertices, and every other valid positive integer s i will produce the same partitioning results;
[0147] In summary, for a quadrilateral partition, it can only be subdivided into quadrilateral mesh partitions without singular points when the number of segments on its opposite sides is equal.
[0148] Furthermore, for n=5, that is, the case of pentagonal partition, the equation is expressed as follows:
[0149]
[0150] Inverting the matrix yields:
[0151]
[0152] Another form is:
[0153]
[0154] Likewise, in order to make s i is an integer, we only need to ensure that the expression in the brackets is an even number, which is already guaranteed by the even side condition. i The symbol constraint 9s i >0) can be derived as follows:
[0155]
[0156] In summary, for a pentagonal partition, if and only if the sum of the number of segments of any three consecutive partition edges is greater than the sum of the number of partition boundary segments of the other two sides, the partition can be remeshed into a pure quadrilateral mesh with only one internal singular point.
[0157] Furthermore, for n=6, that is, the case of hexagonal partitioning, the equation is expressed as follows:
[0158]
[0159] Inverting the matrix yields:
[0160]
[0161] Another form:
[0162]
[0163] Among them, i Integer constraints Can be converted into requirements 0,2,4 The sum of 1,3,5The sum is an even number, the sign constraint (s i >0) is expressed as:
[0164] j = (i + 3) mod 6
[0165]
[0166] In summary, for a hexagonal partition, if and only if the number of segments on each even partition edge is less than the sum of the number of segments on the other two even partition edges (same for odd partition edges), and the sum of the number of segments on the even partition edges and the odd partition edges is an even number, this hexagonal partition can be remeshed into a pure quadrilateral mesh with only one internal singular point.
[0167] It should be noted that the partitions constructed in practice often cannot meet the requirements of single singular point regridding. Therefore, for the mesh partitions that cannot be divided in this way, we first trim the mesh as much as possible and fill the trimmed parts with a general topological template. The trimming method of the quadrilateral partition is as follows: Figure 5 As shown;
[0168] Specifically, suppose a complex partition of a grid to be re-meshed is denoted as (e0,…,e n-1 ), and satisfy the following formula:
[0169]
[0170] Select an edge e that meets the conditions i And define d = min(e i-1 ,e i+1 )-1, so the original input quadrilateral remeshing can be achieved by first remeshing a smaller partition input (e'0,…,e' n-1 ) are as follows:
[0171]
[0172] Furthermore, for the cropped part, that is, close to the partition edge e i Filling a regular quadrilateral grid, the pruning operation is performed iteratively until it is no longer possible to prune, that is, for any partition edge, the number of segments e i , e i-1 and e i+1 At least one of them is 1, and the rest can be filled with the general topological template. For the situation where there are multiple feasible solutions or multiple modes are applicable, the mode with the least singular points is selected for subdivision.
[0173] Step 4: Further perform partition topology construction on the parameter domain, remap the results obtained by partition regridding to the original grid, and then merge the partition grids;
[0174] In this embodiment, the partition and re-mesh process only determines the topological information, that is, the connectivity of the mesh. Directly constructing partitions on the original mesh is not only not applicable to the case of three-dimensional surfaces, but even if only plane meshes are considered, it is difficult to handle vertex positions when the partition shape is more complex;
[0175] Therefore, it is necessary to remap the results obtained by partitioning and regridding onto the original grid, such as Figure 6 shown.
[0176] Furthermore, by constructing the partition topology on the parameter domain, a partition can be of any complex shape, but it must be guaranteed to be homeomorphic to the disk topology. The specific operation method is as follows:
[0177] Step 401: First, generate the topological relationship of the partition on the regular polygon template mesh of the parameter domain (matching the partition shape), use uniform weighted Laplace smoothing to obtain the vertex positions of the parameter domain mesh to obtain the template mesh M t ∈R 2 , R 2 Represents 2-dimensional real number space;
[0178] Step 402: Map the original partition to the template grid of the parameter domain through parameterization to obtain a partition grid M with the same partition shape as the template grid. p ∈R 2 , create the correspondence between the template mesh and the original mesh, the corresponding triangles and the centroid coordinates;
[0179] Step 403: Calculate the triangle index and centroid coordinates of the parameter domain partition grid where the parameter domain template grid point is located, calculate the new coordinates of all vertices of the template grid on the model, and reconstruct the partition grid;
[0180] Step 404: Check the geometric quality and topological quality of the new partitioned mesh and the legality of the elements. If all template meshes meet the requirements, replace the original partitioned meshes, and update the mesh data structure and priority queue.
[0181] Specifically, firstly, a topological relationship is generated in a regular polygon of the parameter domain that matches the number of partition edges. In order to map any complex partition to the template mesh of the parameter domain, for each grid point on a boundary edge, the ratio of the distance from the boundary vertex to the corner point at one end of the boundary edge to the total length of the boundary edge is calculated, and then interpolated to the corresponding boundary of the template mesh. After fixing the boundary points of the partition, the coordinates of the internal vertices on the parameter domain are calculated through the least squares conformal mapping to obtain a partition mesh with the same shape as the template mesh of the parameter domain.
[0182] Furthermore, now that we have two meshes in regular polygons (template mesh and partition mesh), in order to map the partition mesh of the parameter domain back to the partition position of the original mesh, we only need to find which partition mesh triangle the vertex of the template mesh of the parameter domain is located in, and then calculate the centroid coordinates to get the position of the template mesh point on the original surface; by constructing an acceleration structure such as an AABB tree to accelerate the search for point v t With M p The specific process of triangle intersection is shown above. However, for partitions with high mesh density, distortion is inevitable when parameterized to the parameter domain template background mesh, resulting in extremely small triangular units, which leads to misalignment due to precision problems when finding the intersection, that is, the vertex is not actually in the obtained triangle. Therefore, in order to solve this problem, the method for solving the barycentric coordinates is improved, as follows:
[0183] Required point v t In the intersecting triangle T i ∈M p The center of gravity coordinates in the point v are used to solve the intersection error caused by the accuracy problem. t Not in T i Considering that this situation often occurs when the mesh density is high and the partition parameterization is distorted, the correct intersection triangle should be consistent with the obtained T i adjacent, so consider calculating Q as T i The closest to v t Point, find the centroid coordinates of Q, interpolate, as v t Projection point on the physical domain; given a triangle ABC and a point P, let Q represent the orthogonal projection of point P on triangle ABC. If point P is inside ABC, then the projection point Q is point P itself; otherwise, Q must be on an edge of the triangle. You can first determine which Voronoi feature area of triangle ABC point P is located in, and then you only need to calculate the orthogonal projection of P on the corresponding feature to obtain the position of point Q.
[0184] Furthermore, after obtaining the partitioned mesh on the physical domain, the geometric quality and topological quality of the mesh are checked, and the poor re-meshing results are discarded. For the re-meshed results, it is hoped that the minimum geometric quality can be guaranteed so that it can be improved by means of smoothing after the topology optimization is completed. Most quadrilateral-dominated meshes contain both triangles and quadrilaterals. Different types of elements are uniformly measured by using the average ratio quality;
[0185] Among them, the average quality metric can be used to measure R m The distance from any simplex in to the corresponding reference simplex, R m represents an m-dimensional real space, where the reference simplex depends on the element type, as long as R is considered 2The triangular and quadrilateral elements, let E := (p1, …, p |E| ) denote one of the elements, where |E| represents the number of its nodes p i ∈R n , n = 2, and each p i and the n other element nodes p j connected to it define a simplex. Let A i denote the n×n matrix whose columns are p j - p i . If for all i ∈ {1, …, |E|}, detA i > 0, then the element is a valid element;
[0186] Specifically, for any element to be measured, compare the deviation between its nodal simplex and the reference nodal simplex. In the case of triangular elements, the nodal reference element is the element itself. As Figure 7 shown, calculate the mean value as the deviation between the element and the reference element. Define the average ratio quality of the valid element E as follows:
[0187]
[0188] 0 < q(E) ≤ 1, where q(E) = 1 indicates that the element is a regular element, i.e., it is exactly the same as the reference element. The smaller the quality number, the lower the quality. Considering that the elements closer to the feature boundary are more difficult to improve in quality through smoothing, the element quality is related to the feature distance to construct a feature distance quality threshold to determine the lowest element quality E thr :
[0189] E thr = α + (1 - 2α)·x β , x ∈ [0, 1]
[0190] x represents the feature distance of the element where it is located. α and β are parameters available to the user, and a more appropriate range is 0 < α < 0.5, 0.5 < β < 1. Through the average ratio quality metric and the feature distance quality threshold, illegal elements can be simply avoided and the geometric quality of the remeshed partition can be guaranteed, as specifically Figure 8 shown.
[0191] Furthermore, the topology quality check is mainly effective when the goal is to reduce the number of singular points. Obviously, the remeshing result with fewer singular points is always acceptable, but when the number of singular points is not reduced by remeshing (the number of singular points remains unchanged), the average characteristic distance of the singular points is calculated. If it is smaller than the original tie characteristic distance, the remeshing result is accepted, which means that this remeshing "pushes" the singular points in the direction of the principle characteristic boundary, which is also beneficial in the field of numerical calculation.
[0192] In summary, the method of the present application is divided into two cases: one is to eliminate singular elements and the other is to reduce singular points. Geometric quality ensures that the optimized mesh will not have low-quality or illegal units, which is necessary for both cases. In the process of eliminating singular elements, as long as re-gridding can be performed, a partitioned mesh composed of pure quadrilaterals can be obtained. Therefore, topological quality checks are only used in the optimization process with the goal of reducing singular points.
[0193] Finally, the partitioned meshes are merged. Taking into account the possibility that the validity check may cause the partition re-meshing result to fail, the partitioned meshes in the process mentioned above are processed independently, that is, they have not been merged into the original model. For the partitions that pass the validity check, the fixed vertices on the partition boundary are searched for the parts that overlap with the original model, and the corresponding relationship is established. The partitions are merged back, and the octree is used to accelerate the process of querying overlapping vertices.
[0194] Step 5: Post-process the merged and optimized mesh;
[0195] In this embodiment, for efficiency considerations, smoothing is not performed after each re-meshing, but post-processing is performed after the optimization is completed;
[0196] Furthermore, an octree is constructed with the original model as the background mesh, and the feature boundaries are marked, and then weighted Laplace smoothing is performed. Specifically, in each iteration, the entire mesh is traversed, the new positions of the vertices on the non-feature boundaries are recorded, and they are projected onto the background mesh as the final positions. This process is accelerated by parallel processing. At the end of each iteration, the vertex positions of the mesh are uniformly updated, and the maximum distance of vertex movement in this iteration is recorded. If the maximum moving distance is less than the set value, the iteration is terminated early. Fig. 9 The comparison results of topology optimization of the aircraft model generated by the present invention are shown.
[0197] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0198] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for optimizing the mesh quality of a structure-dominant surface based on template reconstruction, characterized in that: The specific steps of the method include: Step 1: Calculate the characteristic distance scalar field for the input background quadrilateral structure dominant surface grid; Step 2: Use feature distance to sort and prioritize the singular elements in the grid, and construct partitions based on the selection results; Step 3: After the partition construction is completed, the polygonal partitions that meet the regridding conditions are output, and the polygonal partitions include: legal triangle, quadrilateral, pentagon or hexagonal partitions; Step 4: Further perform partition topology construction on the parameter domain, remap the results obtained by partition regridding to the original grid, and then merge the partition grids; Step 5: Post-process the merged optimized mesh.
2. The method for optimizing the mesh quality of a structure-dominant surface based on template reconstruction according to claim 1, characterized in that: In step 1, the characteristic distance scalar field is calculated by traversing each mesh edge, detecting and marking sharp characteristic edges according to the dihedral angle threshold given by the user, taking the vertices on the characteristic edges as source points, and calculating the characteristic distance on each vertex of the mesh. The characteristic distance is calculated by solving the geodesic distance of each vertex using the method of the thermal motion equation, and the geodesic distance is used as the characteristic distance.
3. The method for optimizing the mesh quality of a structure-dominant surface based on template reconstruction according to claim 1, characterized in that: The partition construction in step 2 includes partition repair, partition corner point setting and partition expansion.
4. The method for optimizing the mesh quality of a structure-dominant surface based on template reconstruction according to claim 1, characterized in that: In step 3, for polygon partitioning, the even-numbered edge condition shown below needs to be met: Among them, e i represents the number of mesh edges on the i-th partition edge. The above formula indicates that the number of mesh edges on the partition boundary is an even number. And because the partition construction process in step 2 ensures the even edge condition, considering the n-gon partition, the partition with a single internal singular point will insert an n-valent singular point inside the partition, connect the singular point with the points on each edge of the partition, and divide each partition edge into two sub-edges. Based on the regularity constraint, the left or right sub-edges of the other edge i must have the same number of segments s i ; Therefore, the following formula can be obtained: In the above and following equations, all the subscripts i are obtained modulo n, because each edge of the polygon partition must be split into two sub-edges, so further assume that e i >1; The following general property is obtained: when the polygon partition is to be subdivided into the minimum singular point, there must be a positive integer s that satisfies the above formula i , and the specific conditions of this general property are different on different polygonal partitions.
5. The method for optimizing the mesh quality of a structure-dominant surface based on template reconstruction according to claim 4, characterized in that: The specific conditions of the general property on different polygonal partitions are different. The specific conditions of the general property on triangular partitions are: In the case of a triangular partition, that is, when n=3, where n is the number of sides of the polygon, the equation is rewritten in matrix form: Inverting the matrix yields: Or written in another form: Among them, to make s i is an integer, we need to ensure that the expression in the brackets is an even number, which is already guaranteed by the even number side condition. i Is a positive number, and it is also necessary to ensure that the right side is a positive number, so the following formula is obtained: Therefore, the specific condition of the general property on triangular partitions is: a triangular partition can be remeshed into a pure quadrilateral mesh with only one singular point if and only if the number of segments on each partition edge is less than the number of segments on the other two edges.
6. The method for optimizing the mesh quality of a structure-dominant surface based on template reconstruction according to claim 4, characterized in that: The specific conditions of the general property on different polygonal partitions are different. The specific conditions of the general property on quadrilateral partitions are: In the case of quadrilateral partitioning, that is, when n = 4, the equation is expressed as follows: When e0=e2 and e1=e3, the linear system is i There are multiple solutions, otherwise there is no solution. This condition implicitly contains the even side condition, that is, ∑e i =2(e0+e1); because n=4, the internal "singular" points and other vertices are regular points, and every other valid positive integer s i The same partitioning results will be produced. Therefore, the specific conditions for the general properties on the quadrilateral partition are: only when the number of segments on its opposite sides is equal can it be subdivided into quadrilateral mesh partitions without singular points.
7. The method for optimizing the mesh quality of a structure-dominant surface based on template reconstruction according to claim 4, characterized in that: The specific conditions of the general property on different polygonal partitions are different. The specific conditions of the general property on pentagonal partitions are: In the case of pentagonal partition, that is, when n = 5, the equation is expressed as follows: Inverting the matrix yields: Another form is: In order to make i is an integer, we need to ensure that the expression in the brackets is an even number, which is already guaranteed by the even number side condition. i The symbol constraint (s i >0) can be derived as follows: Therefore, the specific condition for the general property on the pentagonal partition is: if and only if the sum of the number of segments of any three consecutive partition edges is greater than the sum of the number of partition boundary segments on the other two sides, this partition can be remeshed into a pure quadrilateral mesh with only one internal singular point.
8. The method for optimizing the mesh quality of a structure-dominant surface based on template reconstruction according to claim 4, characterized in that: The specific conditions of the general property on different polygonal partitions are different. The specific conditions of the general property on hexagonal partitions are: In the case of hexagonal partitioning, that is, when n = 6, the equation is expressed as follows: Inverting the matrix yields: Another form: Among them, i Integer constraints Can be converted into requirements 0,2,4 The sum of 1,3,5 The sum is an even number, the sign constraint (s i >0) is expressed as: j=(i+3)mod6 Therefore, the specific conditions of the general property on hexagonal partitions are: if and only if the number of segments of each even partition edge is less than the sum of the number of segments of the other two even partition edges, and the number of segments of each odd partition edge is less than the sum of the number of segments of the other two odd partition edges, the sum of the number of segments on the even partition edges and the odd partition edges is even, the hexagonal partition can be remeshed into a pure quadrilateral mesh with only one internal singular point.
9. The method for optimizing the mesh quality of a structure-dominant surface based on template reconstruction according to claim 1, characterized in that: In step 4, after the partition topology is constructed on the parameter domain to obtain the partitioned mesh on the physical domain, the geometric quality of the re-meshed partition is ensured by the average ratio quality metric and the feature distance quality threshold.
Citation Information
Patent Citations
A woven grid mark and direction calibration optimization method and device
CN109685844A
Topological directed graph-based quadrilateral grid feature-preserving re-division method
CN115512075A
Method for refining quadrilateral mesh in quadrilateral block
CN116109794A
Full-automatic quadrilateral mesh generation method based on region decomposition and template
CN116778109A
Quadrilateral mesh generation method and device based on hybrid mesh topology
CN118247464A