A template reconstruction-based structure-dominant surface mesh quality optimization method
By using template reconstruction to detect and eliminate singular elements in quadrilateral meshes, the mesh topology is optimized, solving the problem of singular elements affecting mesh quality and enabling more efficient CFD engineering applications.
Patent Information
- Application Number
- CN202411896819.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-12-23
AI Technical Summary
Existing quadrilateral meshes contain singular elements in CFD projects, affecting mesh quality and the accuracy of numerical simulations. Furthermore, existing optimization methods rely on manual editing by users, increasing workload and yielding insignificant results.
A template-based reconstruction method is adopted to detect sharp feature edges by calculating the feature distance scalar field, construct and reconstruct the mesh topology in partitions, eliminate singular elements, retain sharp features, and optimize mesh quality.
It effectively reduces singular elements, increases the proportion of quadrilateral elements and regular vertices in the mesh, adapts to mesh size transitions, and meets the needs of CFD engineering.
Smart Images

Figure CN119863589B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer-aided design, specifically relating to a method for optimizing quadrilateral dominant surface meshes for CFD engineering applications. Background Technology
[0002] Quadrilateral meshes, due to the tensor product property of their elements, have become a popular choice for surface representation in shape modeling, texture synthesis, and numerical simulation. In recent decades, the field of engineering analysis has focused on quadrilateral mesh generation, resulting in two main categories of industrial technologies. The first involves manually dividing quadrilateral regions using semi-automatic methods, then generating standardized quadrilateral meshes to fill the regions according to user needs. This method is very time-consuming and mainly used for demanding numerical simulations such as CFD. The second method involves fully automated approaches, such as the front-leading method based on frame fields, to generate rectangular triangular meshes, followed by merging to obtain a quadrilateral-dominated mesh. However, this method contains a large number of irregular elements and lacks user control.
[0003] Furthermore, a large number of singular elements on quadrilateral-dominated meshes disrupt the symmetry of tensor products and make the mesh unstructured. In terms of numerical computation, these irregularities cause deformation in low curvature regions, thereby reducing the accuracy of finite element calculations and simulations. In other words, most existing mesh quality improvement measures are limited to local scope or inevitably rely on user intervention for editing, which not only increases the workload but also fails to significantly improve the overall optimization effect. Summary of the Invention
[0004] The purpose of this invention is to reduce the singular elements present in structure-dominant meshes while maintaining their sharp features. It provides a method for optimizing the quality of structure-dominant surface meshes based on template reconstruction. By comprehensively considering the characteristic structures of quadrilateral meshes and quadrilateral structure-dominant meshes, it uses a post-processing method based on replacing or removing unstructured elements (singular points or triangles) to improve the mesh topology quality, thus better meeting the needs of CFD engineering applications.
[0005] To address the aforementioned technical problems, this invention provides the following technical solution: a method for optimizing the quality of structure-dominant surface meshes based on template reconstruction, comprising the following steps:
[0006] Step 1: Calculate the characteristic distance scalar field for the input background quadrilateral dominant surface mesh;
[0007] Traverse each grid edge, detect and mark sharp feature edges according to the user-given dihedral angle threshold, take the vertices on the feature edges as source points, and calculate the feature distance at each vertex of the grid. The feature distance is calculated by solving the geodesic distance for each vertex using the thermal motion equation method, and the geodesic distance is used as the feature distance.
[0008] Step 2: Sort and prioritize the singular elements in the grid using feature distance, and construct partitions based on the selection results;
[0009] As a preferred approach, the general workflow of the partitioning algorithm includes:
[0010] Step 201: Prepare seed elements and set up 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: Set partition corner points;
[0015] Step 206: Partition expansion.
[0016] Step 3: After the partition is constructed, a polygon partition that meets the remeshing condition is obtained. The polygon partition includes: legal triangle, quadrilateral, pentagon or hexagon partition.
[0017] Preferably, the goal of partition remeshing is to re-divide the internal topology based on the given number of segments on each edge of the partition. For polygon partitions, it is only necessary to satisfy the following even-number edge condition:
[0018]
[0019] Among them, e i This represents the number of grid edges on the i-th partition edge. The above formula indicates that the number of grid edge segments on the boundary of the partition is even.
[0020] As a preferred approach, the partitioning process ensures the even-numbered edge condition holds. Therefore, considering an n-sided partition, a partition with a single internal singularity will insert an n-valent singularity within the partition. Connecting this singularity to a point on each edge of the partition divides each partition edge into two sub-edges. Based on regularity constraints, the left or right sub-edges of the other edge i must have the same number of segments s. i ;
[0021] Therefore, we can obtain the following formula:
[0022]
[0023] In the above and subsequent equations, all subscripts i are obtained by taking the modulus of n, because each edge of the polygon partition must be divided into two sub-edges. Therefore, we further assume e i >1.
[0024] Preferably, the following general property is obtained: that is, if a polygon partition is to be subdivided into minimum singular points, there must exist a positive integer s that satisfies the above formula. i The specific conditions for the above general properties on different polygon partitions include: the different polygon partitions include triangles, quadrilaterals, pentagons or hexagons;
[0025] In the case of triangular partitioning, i.e., when n = 3, where n is the number of sides of the polygon, the equation can be rewritten in matrix form:
[0026]
[0027] Inverting the matrix yields:
[0028]
[0029] Or it can be written in another form:
[0030]
[0031] Among them, to make s i If it is an integer, it needs to be ensured that the expression within the parentheses is even, which has already been guaranteed by the even-number edge condition. And to make s... i Since the integer is positive, the right-hand side of the equation must also be positive, thus yielding the following equation:
[0032]
[0033] Therefore, the specific condition for the general property on a triangular partition 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 side is less than the number of segments on the other two sides.
[0034] Preferably, for quadrilateral partitioning, a pure structure quadrilateral mesh partitioning without singular points can be constructed. When n=4, the equation is expressed as follows:
[0035]
[0036] The above matrix is nonsingular because the first two rows match the last two rows. Therefore, when e0 = e2 and e1 = e3, the linear system is s. i There are multiple solutions; otherwise, there is no solution. This condition implicitly includes the even-numbered edge condition, i.e., ∑e. i =2(e0+e1); because n=4, the "singular" points inside are actually regular points just like other vertices, and every valid positive integer s iBoth will produce the same partitioning result. Therefore, for a quadrilateral partition, it can only be subdivided into a quadrilateral grid partition without singularities when the number of segments on its opposite sides is equal.
[0037] Preferably, for the case of n=5, i.e., pentagonal partitioning, the equation is expressed as follows:
[0038]
[0039] Inverting the matrix yields:
[0040]
[0041] Another form is:
[0042]
[0043] Similarly, in order to make s i If it's an integer, we only need to ensure that the expression within the parentheses is even, which is already guaranteed by the even-number edge condition. And according to s... i Symbolic constraints (s) i >0) yields the following formula:
[0044]
[0045] In summary, for a pentagonal partition, the partition can be remeshed into a pure quadrilateral mesh with only one internal singularity if and only if the sum of the number of segments on any three consecutive partition edges is greater than the sum of the number of segments on the other two partition boundaries.
[0046] Preferably, for the case of n=6, i.e., hexagonal partitioning, the equation is expressed as follows:
[0047]
[0048] Inverting the matrix yields:
[0049]
[0050] Another form:
[0051]
[0052] Among them, for s i Integer constraints This can be transformed into a requirement e 0,2,4 The sum of and e 1,3,5 The sum is even, sign constraint (s) i If >0), then it is represented 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-numbered partition edge is less than the sum of the number of segments on the other two even-numbered partition edges (the same applies to odd-numbered partition edges), and the sum of the number of segments on both even-numbered and odd-numbered partition edges is even, this hexagonal partition can be remeshed into a pure quadrilateral mesh with only one internal singularity.
[0056] Preferably, when a complex partition of a re-grid is denoted 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 Therefore, the quadrilateral remeshization of the original input can be achieved by first remeshizing a smaller partition of the input (e'0,…,e'). n-1 The details are as follows:
[0059]
[0060] For the cropped portion, i.e., the portion closest to the partition edge e i For a quadrilateral grid with a fill rule, the trimming operation is performed iteratively until no further trimming is possible, i.e., for any number of segments e on any partition edge. i e i-1 and e i+1 At least one of them is 1, and the remaining part can be filled with a general topology template. For cases where there are multiple feasible solutions or multiple modes, the mode with the fewest singularities is selected for partitioning.
[0061] Step 4: Further perform partitioned topology construction on the parameter domain, remap the results obtained from partitioned remeshing onto the original mesh, and then merge the partitioned meshes;
[0062] Preferably, by performing partitioned topology construction on the parameter domain, a partition can be of arbitrarily complex shape, and it is guaranteed that it is always topologically homeomorphic to the disk.
[0063] Preferably, after partitioning the topology in the parameter domain to obtain the partitioned mesh in the physical domain, the geometric quality and topological quality of the mesh are checked, and poor re-mesh results are discarded. Different types of elements are uniformly measured by using average ratio quality; that is, illegal cells are avoided and the geometric quality of the re-mesh partition is guaranteed by using average ratio quality measurement and feature distance quality threshold.
[0064] Finally, the partitioned meshes are merged. For partitions that pass the validity check, the corresponding relationship is constructed by searching the fixed vertices of the partition boundary that overlap with the original model, and the partitions are merged back. The process of querying overlapping vertices is accelerated by using an octree.
[0065] Step 5: Post-process the optimized mesh.
[0066] Preferably, an octree is constructed using the original model as the background mesh, feature boundaries are marked, and then weighted Laplacian smoothing is performed.
[0067] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: The present invention finds convex partitions containing a certain number of singular elements, applies a quadrilateral mesh topology template, reconstructs the mesh topology within the partition according to the number of boundary segments of the partition, eliminates non-quadrilateral cells within the partition, reduces singular points, and increases the proportion of quadrilateral elements and regular vertices in the mesh. It can well preserve sharp features, adapt to mesh size transitions, and is suitable for situations where the quality of the original mesh cells is poor, thus well meeting the needs of CFD engineering applications. Attached Figure Description
[0068] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0069] In the attached diagram:
[0070] Figure 1 This is a flowchart of the steps of the present invention;
[0071] Figure 2 This is a schematic diagram of the input mesh preprocessing.
[0072] Figure 3 This is a diagram illustrating partition search / construction.
[0073] Figure 4 A schematic diagram of the template with the fewest singularities;
[0074] Figure 5 A diagram illustrating the cutting of complex templates;
[0075] Figure 6 This is a schematic diagram of partitioned grid remapping;
[0076] Figure 7 This is a schematic diagram of the average quality measurement;
[0077] Figure 8 This is a schematic diagram of the regrid quality inspection.
[0078] Figure 9 The result diagram of topology optimization for the aircraft model. Detailed Implementation
[0079] To enable those skilled in the art to better understand the present application, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0080] Please refer to the following first. Figure 1 , Figure 1 A flowchart illustrating a method for optimizing the quality of a structure-dominant surface mesh based on template reconstruction, as provided in this application embodiment, is shown below. Figure 1 As shown in the figure, the embodiment of this application provides a method for optimizing the quality of a structure-dominant surface mesh based on template reconstruction, which specifically includes steps 1-5, and these steps are described in detail below.
[0081] Step 1: Calculate the characteristic distance scalar field for the input background quadrilateral dominant surface mesh.
[0082] Traverse each grid edge, detect and mark sharp feature edges according to the user-given dihedral angle threshold, take the vertices on the feature edges as source points, and calculate the feature distance at each vertex of the grid. The feature distance is calculated by solving the geodesic distance for each vertex using the thermal motion equation method, and the geodesic distance is used as the feature distance.
[0083] The steps for calculating the feature distance are as follows:
[0084] Step 101: For a given time t, integrate the heat flow equation Discretizing the heat equation using the backward Euler method over a given time t requires solving only 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 Let ut be the thermal state at time t, and u0 be the thermal state at the initial time. Boundary conditions should also be considered.
[0087] id-tΔ)v t =0onM\γ,
[0088] v t =1onγ
[0089] γ is a subset of the manifold mesh that serves as the source, and here it represents the points on the feature edges.
[0090] Step 102: Temperature gradient After normalization and inversion, we obtain the unit vector field X along the geodesic:
[0091]
[0092] Step 103: Solve the Poisson equation to obtain the final distance φ between the points on the grid and the source point:
[0093]
[0094] It should be noted that, for each mesh face, the average feature distance at each vertex is calculated as the feature distance of the mesh face. The feature distance at the source point (i.e., the feature edge) is represented as 1, and the further away from the feature point, the closer it is to 0. Therefore, by performing the calculation according to the above feature distance calculation steps, we can obtain the following... Figure 2 The diagram shown is a schematic of the input mesh preprocessing. Figure 2 The results of the feature distance calculation described above in this invention are presented.
[0095] Step 2: Sort and prioritize the singular elements in the grid using feature distance, and construct partitions based on the selection results;
[0096] For ease of explanation in this application, it is first assumed that the input mesh is a manifold mesh and 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 that 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 interior edge, and an edge connecting only one cell is called a boundary edge. The vertex of a boundary edge is called a boundary vertex, otherwise it is called an interior vertex. Among them, interior vertices with a degree of 4 and boundary vertices with a degree of 2 are called regular vertices, otherwise they are called irregular vertices or singular vertices.
[0098] Specifically, this application only considers singularities with a valence of 3 or 5. Other high-valence singularities can be converted into 3 or 5-valence singularities using simple face-opening or face-closing atomic operations. Internal points with a valence of 2 are called double strings and need to be removed when they are discovered.
[0099] Definition 2: The degree of a cell is the number of points adjacent to that cell. A cell with a degree of 4 is a regular cell, and otherwise it is a singular cell.
[0100] Definition 3: A partition is a submesh 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 follows:
[0102]
[0103] in This indicates the number of adjacent cells outside the grid. If the vertex is on the grid boundary, add an α / 90° term to the right side of the equation, where α is the geometric exterior angle of the boundary, used to account for the absence of cells outside the grid.
[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 angle.
[0105] Proposition 1: The number of edges on the partition boundary is even.
[0106] Specifically, for locally isomorphic to R 2 A subset of a pure quadrilateral mesh, R 2 To represent a two-dimensional real space, the number of cells and edges must satisfy 4F = 2E. i +E b E i E is the number of boundary edges shared by two units. b It is the number of boundary edges that are adjacent to only one cell. Therefore, only if the number of boundary edges is even can the partition have a topology composed of pure quadrilateral grid cells.
[0107] Proposition 2: Only pairs of the same type of exotic elements can be eliminated.
[0108] In this application, the partition retopology process is divided into two processes: eliminating singular cells and reducing singular points. When eliminating singular cells, the partition should contain at least 2 singular cells; when reducing 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—one aimed at eliminating singular units and the other at reducing singularities—are largely the same, with only minor differences. The process is as follows: Figure 3 As shown.
[0110] Furthermore, through Figure 3 The general flow of the following partition construction algorithm is given:
[0111] Step 201: Prepare seed elements and set up priority queues;
[0112] Specifically, first, all singular elements in the grid are found, then the singular elements in the grid are sorted according to the feature distance and added to a priority queue. Users can choose to prioritize elements closer to the feature edge or elements farther 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 partitions are expanded by simply adopting a breadth-first search order. Since each partition needs at least two singular elements, the Dijkstra shortest path algorithm is used with the seed element as the source point to find a singular element that is topologically closest to the seed element. This shortest path is then used as a guide line to construct the initial partitions.
[0116] Step 204: Partition Repair;
[0117] Specifically, determine the topological exterior angle (TOA) of the boundary vertices of the current partition and calculate its value. When the topological exterior angle of a vertex is negative, recursively add the adjacent non-partition cells of that vertex 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: Set partition corner points;
[0119] Specifically, vertices of partition boundaries with topological exterior angles greater than 0 are set as partition corner points. A partition contains at least 3 corner points or at most 6 partition corner points. If there are more than 6 partition corner points, the 6 corner points with the largest geometric exterior angles are preferentially selected as partition corner points. Due to the special topological exterior angle calculation rules at mesh boundaries or sharp features, the corner point setting of partitions close to the boundary is not ideal, resulting in poor geometric quality in the partition remeshing result. 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 such boundary partitions, this application adopts a more conservative point selection strategy.
[0120] Furthermore, for partition boundary points that are not on the boundary or feature, vertices with positive topological exterior angles are still selected as partition corner points. A minimum geometric exterior angle threshold is set, and partition boundary vertices with an external geometric exterior angle greater than this 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 exterior angle threshold is lowered and candidate corner points are remarked until the number of candidate corner points plus 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] For example, when there are not enough singular elements in a partition or the result of remeshing the partition is unacceptable, the partition is expanded inward first: that is, the continuous boundary grid edges between adjacent partition boundary corners constitute a partition edge, and the partition edge with the smallest average feature distance is selected and pushed inward; for partitions far from the grid feature boundary, the maximum number of expansions is the number of times it reaches any feature boundary through breadth-first order, and the minimum number of expansions is 3; compared with the simple breadth-first strategy, the inward push strategy allows partitions close to the boundary to be expanded multiple times when remeshing fails or the result is poor, so as to explore the possibility of topology optimization as much as possible.
[0123] Step 3: After the partition is constructed, a valid triangle, quadrilateral, pentagon, or hexagon partition that meets the remeshing condition is obtained;
[0124] In this embodiment, after the partition search is completed, a valid triangle, quadrilateral, pentagon, or hexagon partition that satisfies the remeshing condition is obtained. The goal of partition remeshing is to re-divide the internal topology based on the given number of segments on each edge of the partition. For polygon partitions, the even number of edges condition shown below must be met:
[0125]
[0126] Among them, e i This represents the number of grid edges on the i-th partition edge. The above formula indicates that the number of grid edge segments on the boundary of the partition is even.
[0127] Furthermore, this partition can always be remeshed into a pure quadrilateral form, which is acceptable under the condition of reducing triangles. However, the overall goal also includes reducing singularities, so the remeshing result of the partition should produce as few singularities as possible.
[0128] Specifically, such as Figure 4 As shown, it is a schematic diagram of the minimum singularity template, and further describes the conditions that can minimize the singularities in the partitioned regrind result;
[0129] It should be noted that the partitioning process guarantees the even-number edge condition. Therefore, considering an n-sided partition, a partition with a single internal singularity will insert an n-valent singularity inside the partition. Connecting this singularity to a point on each edge of the partition divides 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, we can obtain the following formula:
[0131]
[0132] In the above and subsequent equations, all subscripts i are obtained by taking the modulus of n, because each edge of the polygon partition must be divided into two sub-edges. Therefore, we further assume e i >1.
[0133] Furthermore, we obtain the following general property: if we want to perform minimum singularity subdivision of a polygon partition, there must exist a positive integer s that satisfies the above equation. i The specific conditions for the above general properties on different polygon partitions include:
[0134] For the case of n=3, i.e., triangular partitioning, the equation is rewritten in matrix form:
[0135]
[0136] Inverting the matrix yields:
[0137]
[0138] Or it can be written in another form:
[0139]
[0140] Among them, to make s i If it's an integer, we only need to ensure that the expression inside the parentheses is even, which is already guaranteed by the even-number edge condition. However, to make s... i Since the integer is positive, we also need to ensure that the right-hand side is positive, thus yielding the following equation:
[0141]
[0142] In summary, a triangular partition can be remeshed into a pure quadrilateral grid 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. This condition can be regarded as a discrete version of the triangle inequality.
[0143] Specifically, for quadrilateral partitioning, a pure structured quadrilateral mesh partition without singularities can be constructed. When n=4, the equation is expressed as follows:
[0144]
[0145] The above matrix is nonsingular because the first two rows match the last two rows. Therefore, when e0 = e2 and e1 = e3, the linear system is s. i There are multiple solutions; otherwise, there is no solution. This condition implicitly includes the even-numbered edge condition, i.e., ∑e. i =2(e0+e1);
[0146] Furthermore, since n=4, the "singular" points inside are actually regular points just like the other vertices, and every valid positive integer s i They will all produce the same partitioning results;
[0147] In summary, a quadrilateral partition can only be subdivided into quadrilateral grid partitions without singularities if the number of segments on its opposite sides is equal.
[0148] Furthermore, for the case of n=5, i.e., pentagonal partitioning, the equation can be expressed as follows:
[0149]
[0150] Inverting the matrix yields:
[0151]
[0152] Another form is:
[0153]
[0154] Similarly, in order to make s i If it's an integer, we only need to ensure that the expression within the parentheses is even, which is already guaranteed by the even-number edge condition. And according to s... i Symbolic constraints 9s i >0) yields the following formula:
[0155]
[0156] In summary, for a pentagonal partition, the partition can be remeshed into a pure quadrilateral mesh with only one internal singularity if and only if the sum of the number of segments on any three consecutive partition edges is greater than the sum of the number of segments on the other two partition boundaries.
[0157] Furthermore, for the case of n=6, i.e., hexagonal partitioning, the equation can be expressed as follows:
[0158]
[0159] Inverting the matrix yields:
[0160]
[0161] Another form:
[0162]
[0163] Among them, for s i Integer constraints This can be transformed into a requirement e 0,2,4 The sum of and e 1,3,5The sum is even, sign constraint (s) i If >0), then it is represented 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-numbered partition edge is less than the sum of the number of segments on the other two even-numbered partition edges (the same applies to odd-numbered partition edges), and the sum of the number of segments on both even-numbered and odd-numbered partition edges is even, this hexagonal partition can be remeshed into a pure quadrilateral mesh with only one internal singularity.
[0167] It should be noted that in practice, the constructed partitions often cannot meet the requirements of remeshing a single singularity. Therefore, for mesh partitions that cannot be divided in this way, we first trim the mesh as much as possible, and then fill the trimmed parts with a general topology template. The trimming method for quadrilateral partitions is as follows: Figure 5 As shown;
[0168] Specifically, suppose a complex partition of a mesh to be re-grid 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 Therefore, the quadrilateral remeshization of the original input can be achieved by first remeshizing a smaller partition of the input (e'0,…,e'). n-1 The details are as follows:
[0171]
[0172] Furthermore, for the cropped portion, i.e., the portion closest to the partition edge e... i For a quadrilateral grid with a fill rule, the trimming operation is performed iteratively until no further trimming is possible, i.e., for any number of segments e on any partition edge. i e i-1 and e i+1 At least one of them is 1, and the remaining part can be filled with a general topology template. For cases where there are multiple feasible solutions or multiple modes, the mode with the fewest singularities is selected for partitioning.
[0173] Step 4: Further perform partitioned topology construction on the parameter domain, remap the results obtained from partitioned remeshing onto the original mesh, and then merge the partitioned meshes;
[0174] In this embodiment, the partitioning and remeshing process only determines the topological information, that is, the connectivity of the mesh. Directly constructing partitions on the original mesh is not only unsuitable for the case of three-dimensional curved surfaces, but even if only planar meshes are considered, it is difficult to handle vertex positions when the partition shape is relatively complex.
[0175] Therefore, it is necessary to remap the results obtained from partitioned remeshing back onto the original mesh, such as... Figure 6 As shown.
[0176] Furthermore, by constructing a partitioned topology over the parameter domain, a partition can be of arbitrarily complex shape, but it must always be homeomorphic to the disk topology. The specific operation method is as follows:
[0177] Step 401: First, generate the topological relation of the partition on the regular polygon template mesh (matching the partition shape) in the parameter domain, and use uniform weighted Laplacian smoothing to obtain the vertex positions of the parameter domain mesh to obtain the template mesh M. t ∈R 2 R 2 Represents the 2-dimensional real number space;
[0178] Step 402: Parametrically map the original partitions onto the template mesh of the parameter domain to obtain a partition mesh M with the same partition shape as the template mesh. p ∈R 2 Create the correspondence between the template mesh and the original mesh, including the corresponding triangles and centroid coordinates;
[0179] Step 403: Calculate the triangle index and barycenter coordinates of the parameter domain partition mesh where the parameter domain template mesh point is located, calculate the new coordinates of all vertices of the template mesh on the model, and reconstruct the partition mesh;
[0180] Step 404: Check the geometric and topological quality of the new partitioned mesh and the validity of its elements. If all template meshes meet the requirements, replace the original partitioned mesh and update the mesh data structure and priority queue.
[0181] Specifically, firstly, a topological relationship is generated in a regular polygon in the parameter domain that matches the number of partition edges. In order to map arbitrarily complex partitions onto the template mesh of the parameter domain, for each grid point on a boundary edge, the ratio of the distance from the vertex of the boundary edge to the corner point at one end of the boundary edge to the total length of the boundary edge is calculated and interpolated onto the corresponding boundary of the template mesh. After fixing the boundary points of the partition, the coordinates of the internal vertices in the parameter domain are calculated through 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 within regular polygons (the template mesh and the partitioned mesh), to map the partitioned mesh of the parameter domain back to the partitioned positions of the original mesh, we only need to find which partitioned mesh triangle the vertex of the parameter domain template mesh is located in, and then calculate the barycenter coordinates to obtain the position of the template mesh point on the original surface; by constructing an acceleration structure such as an AABB tree, we can accelerate the search for point v. t With M p Regarding the specific process of triangle intersection, however, for high-density mesh areas, distortion inevitably occurs when parameterizing to the background mesh of the parameter domain template, resulting in extremely small triangular elements. This leads to misalignment during intersection calculation due to accuracy issues, meaning that the vertices are not actually within the obtained triangles. Therefore, to solve this problem, the method for solving the barycenter coordinates is improved, as follows:
[0183] Requirement point v t In intersecting triangle T i ∈M p The coordinates of the centroid within the point v are used to resolve intersection errors caused by accuracy issues. t Not in T i Internally, considering that this situation often occurs when the mesh density is high and the partition parameterization distortion is large, the correct intersecting triangle should correspond to the obtained T. i Adjacent, therefore consider calculating Q as T i The closest to v t Find the centroid coordinates of Q, perform interpolation, and use them as v. t Projection point in the physical domain; given a triangle ABC and a point P, let Q represent the orthogonal projection of point P onto triangle ABC. If point P is inside ABC, then the projection point Q is point P itself; otherwise, Q must be located on one side of the triangle. We can first determine which Volonoi feature region of triangle ABC point P is located in, and then we only need to calculate the orthogonal projection of P onto the corresponding feature to obtain the position of point Q.
[0184] Furthermore, after obtaining the partitioned mesh in the physical domain, the geometric and topological quality of the mesh is checked, and poor re-mesh results are discarded. For the re-mesh 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 dominant meshes contain both triangular and quadrilateral elements. The average ratio quality is used to uniformly measure the different types of elements.
[0185] Among them, the average quality metric can be used to measure R. m The distance R from any simplex in the equation to the corresponding reference simplex. m Let R represent an m-dimensional real space, where the reference simplex depends on the element type, provided that R is considered. 2The triangular and quadrilateral elements within, let \(E := (p_1, \ldots, p |E| ) denote one of the elements, where \(|E|\) represents the number of its nodes \(p i \in \mathbb{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\times n\) matrix whose columns are \(p j - p i . If \(\det A i > 0\) for all \(i\in\{1, \ldots, |E|\}\), then the element is a valid element;
[0186] Specifically, for any element to be measured, compare the deviation of its nodal simplex from the reference nodal simplex. In the case of triangular elements, the nodal reference element is the element itself. As Figure 7 shown, find the mean value as the deviation of the element from the reference element. Define the average ratio quality of a valid element \(E\) as follows:
[0187]
[0188] \(0 < q(E)\leq 1\), \(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 elements closer to the feature boundary are more difficult to improve in quality through smoothing, the element quality is related to the feature distance, constructing a feature distance quality threshold to determine the lowest cell quality \(E thr :
[0189] E thr =\alpha+(1 - 2\alpha)\cdot x β , x\in[0, 1]
[0190] \(x\) represents the feature distance of the cell where it is located. \(\alpha\) and \(\beta\) are parameters available to the user, where \(0 < \alpha < 0.5\), \(0.5 < \beta < 1\) is a more appropriate range. Through the average ratio quality metric and the feature distance quality threshold, illegal cells can be simply avoided and the geometric quality of the remeshing partition can be ensured, as specifically Figure 8 shown.
[0191] Furthermore, topology quality checks are primarily effective when the goal is to reduce the number of singularities. Obviously, remeshing results with fewer singularities are always acceptable. However, if the number of singularities is not reduced through remeshing (the number of singularities remains the same), the average feature distance of the singularities is calculated. If it is smaller than the original average feature distance, then the remeshing result is accepted. This means that this remeshing "pushes" the singularities toward the principle feature boundary, making the singularity principle feature boundary also beneficial in the field of numerical computation.
[0192] In summary, the method of this application is divided into two cases: eliminating singular elements and reducing singular points. Geometric quality ensures that the optimized mesh will not contain low-quality or illegal cells, which is necessary for both cases. However, in the process of eliminating singular elements, as long as remeshing is possible, a partitioned mesh composed of pure quadrilaterals can be obtained. Therefore, topology quality checking is only applied to the optimization process aimed at reducing singular points.
[0193] Finally, the partition mesh is merged. Considering that the validity check may cause the partition re-meshing result to fail, the partition meshes in the process mentioned above are processed independently, that is, they have not yet been merged into the original model. For partitions that pass the validity check, the corresponding relationship is constructed by searching the fixed vertices of the partition boundary that overlap with the original model, and the partition is merged back. The process of querying overlapping vertices is accelerated by using an octree.
[0194] Step 5: Post-process the merged and optimized mesh;
[0195] In this embodiment, for efficiency reasons, smoothing will not be performed after each remeshing, but post-processing will be performed after optimization.
[0196] Furthermore, an octree is constructed using the original model as the background mesh, and feature boundaries are marked. Then, a weighted Laplacian smoothing is performed. Specifically, in each iteration, the entire mesh is traversed, the new positions of vertices on non-feature boundaries are recorded, and these positions are projected onto the background mesh as the final positions. This process is accelerated through parallel processing. At the end of each iteration, the vertex positions of the mesh are updated uniformly, and the maximum distance the vertex moves in this iteration is recorded. If the maximum movement distance is less than a set value, the iteration ends early. Figure 9 The results of topology optimization comparison of the aircraft model generated by this invention are presented.
[0197] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0198] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for optimizing the quality of structure-dominant surface meshes based on template reconstruction, characterized in that: The specific steps of this method include: Step 1: Calculate the feature distance scalar field for the dominant surface mesh of the background quadrilateral structure. The calculation of the feature distance scalar field is achieved by traversing each mesh edge, detecting and marking sharp feature edges according to the dihedral angle threshold given by the user, taking the vertices on the feature edges as source points, and calculating the feature distance at each vertex of the mesh. The feature distance is calculated by solving the geodesic distance for each vertex using the thermal motion equation method, and the geodesic distance is used as the feature distance. Step 2: Sort and prioritize the singular elements in the grid using feature distance, and construct partitions based on the selection results; Step 3: After the partitioning is completed, output the polygon partitions that meet the remeshing conditions. The polygon partitions include: valid triangles, quadrilaterals, pentagons or hexagons. For polygon partitioning, the following even-numbered edge condition must be met: , in, This represents the number of grid edges on the i-th partition edge. The above formula indicates that the number of grid edge segments on the boundary of the partition is even. Furthermore, since the partitioning process in step 2 guarantees the even-number edge condition, therefore, we should consider... A polygonal partition, a partition with a single internal singularity, will insert a [missing word] inside the partition. Given a singular point, connect this singular point to a point on each of the partitioning edges, dividing each partitioning edge into two sub-edges. Based on regularity constraints, the other edge... The left or right sub-edges must have the same number of segments. ; Therefore, we obtain the following formula: , Among them, all subscripts All of them are right This is obtained by taking the modulus, because each edge of a polygon partition must be divided into two sub-edges, therefore, a further assumption is made. ; This leads to the following general property: for a polygon partition to be subdivided into minimum singularities, there must exist positive integers that satisfy the above equation. The specific conditions for the above general properties differ on different polygon partitions; Step 4: Further perform partitioned topology construction on the parameter domain, remap the results obtained from partitioned remeshing onto the original mesh, and then merge the partitioned meshes; Step 5: Post-process the merged and optimized mesh.
2. The method for optimizing the quality of structure-dominant surface mesh based on template reconstruction according to claim 1, characterized in that: Step 2, partition construction, includes partition repair, setting partition corner points, and partition expansion.
3. The method for optimizing the quality of a structure-dominant surface mesh based on template reconstruction according to claim 2, characterized in that: The specific conditions for the general property differ depending on the polygon partitioning. The specific conditions for the general property on triangular partitioning are as follows: In the case of triangular partitioning, that is, when Where n is the number of sides of the polygon, the equation is rewritten in matrix form: , Inverting the matrix yields: , Or it can be written in another form: , Among them, to make If it is an integer, the expression within the parentheses must be even, which is already guaranteed by the even-number edge condition. However, to make... Since the integer is positive, the right-hand side of the equation must also be positive, thus yielding the following equation: , Therefore, the specific condition for the general property on a triangular partition is: a triangular partition is remeshed into a pure quadrilateral mesh with only one singular point if and only if the number of segments on each partition side is less than the number of segments on the other two sides.
4. The method for optimizing the quality of a structure-dominant surface mesh based on template reconstruction according to claim 3, characterized in that: The specific conditions for the general property differ depending on the polygon partitioning. The specific conditions for the general property on quadrilateral partitioning are as follows: In the case of quadrilateral partitioning, that is, when The equation can be expressed as follows: , when and Time-linear systems There are multiple solutions, otherwise there is no solution. This condition implicitly includes the even-number edge condition. ;because The "singular" points inside are regular points, and every other valid positive integer... Both will produce the same partitioning result. Therefore, the specific condition for the general property on quadrilateral partitioning is: it can be subdivided into quadrilateral grid partitions without singularities only when the number of segments on opposite sides is equal.
5. The method for optimizing the quality of a structure-dominant surface mesh based on template reconstruction according to claim 4, characterized in that: The specific conditions for the general property differ depending on the polygon partitioning. The specific conditions for the general property on the pentagonal partitioning are as follows: In the case of pentagonal partitioning, that is, when The equation can be expressed as follows: , Inverting the matrix yields: , Another form is: , In order to If it is an integer, it is necessary to ensure that the expression within the parentheses is even, which is already guaranteed by the even-number edge condition. And according to... Symbolic constraints The following formula is derived: , Therefore, the specific condition for the general property on a pentagonal partition is: the partition is remeshed into a pure quadrilateral mesh with only one internal singularity if and only if the sum of the number of segments on any three consecutive partition edges is greater than the sum of the number of segments on the other two partition boundaries.
6. The method for optimizing the quality of a structure-dominant surface mesh based on template reconstruction according to claim 5, characterized in that: The specific conditions for the general property differ depending on the polygon partitioning. The specific conditions for the general property on hexagonal partitioning are as follows: In the case of hexagonal partitioning, that is, when The equation can be expressed as follows: , Inverting the matrix yields: , Another form: , Among them, for Integer constraints Transformed into requirements sum and The sum is even, sign constraint This is represented as: , , Therefore, the specific condition for the general property on a hexagonal partition is: the sum of the number of segments on each even partition edge is even 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, and the number of segments on each odd partition edge is less than the sum of the number of segments on the other two odd partition edges. In this case, the hexagonal partition is remeshed into a pure quadrilateral mesh with only one internal singularity.
7. The method for optimizing the quality of a structure-dominant surface mesh based on template reconstruction according to claim 6, characterized in that: In step 4, after partitioning the topology in the parameter domain to obtain the partitioned mesh in the physical domain, the geometric quality of the re-mesh partition is guaranteed by the average ratio quality metric and the feature distance quality threshold.
Citation Information
Patent Citations
Topological directed graph-based quadrilateral grid feature-preserving re-division method
CN115512075A
Full-automatic quadrilateral mesh generation method based on region decomposition and template
CN116778109A