Polyhedron Optimization Method Based on Mesh Quality Metric Characteristics

Through the multihedral optimization method based on the mesh quality measurement characteristics, the problem of insufficient mesh quality in the prior art is solved, and efficient optimization of mesh quality and improvement of numerical calculation accuracy are achieved.

CN114399611BActive Publication Date: 2025-05-06CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210055602.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-18
Publication Date
2025-05-06
Estimated Expiration
2042-01-18

AI Technical Summary

Technical Problem

The existing polyhedral mesh generation technology cannot effectively ensure the quality of the mesh, resulting in errors in numerical calculation results, affecting the accuracy of computational fluid mechanics and other analyses.

Method used

The multihedral optimization method based on the mesh quality measurement characteristics is adopted, and the mesh vertex coordinate coordinates are gradually optimized until the quality needs are met through global mesh division, center of mass coordinate calculation, mass measurement average calculation, internal quality condition judgment, expected coordinate calculation and distance reciprocal weighting method.

Benefits of technology

It effectively improves the quality level of the polyhedral mesh, reduces the cost of algorithms, improves the accuracy of numerical calculations, and is suitable for fields such as computational fluid mechanics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114399611B_ABST
    Figure CN114399611B_ABST
Patent Text Reader

Abstract

The present invention relates to a polyhedron optimization method based on mesh quality metric characteristics, which belongs to the field of mesh optimization and includes the following steps: obtaining all polyhedron mesh vertices to form a vertex sequence set; traversing the neighborhood polyhedron meshes of each vertex in the vertex sequence set in turn, and calculating the centroid coordinates of each neighborhood polyhedron mesh of the vertex; calculating the global polyhedron mesh quality metric average value; calculating the neighborhood mesh quality metric average value of the vertex, and using internal quality conditions to perform mesh quality judgment; calculating the expected coordinates of the vertex according to the mesh quality metric characteristics; using the inverse distance weighted method to calculate the actual coordinates of the vertex, and using the actual coordinates of the vertex to cover the corresponding vertex coordinates in the vertex sequence set until all vertices in the vertex sequence set are traversed. The present invention can not only reduce the algorithm time cost, but also effectively improve the mesh quality level, so that the mesh meets the practical application of computational fluid dynamics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of grid optimization and relates to a polyhedron optimization method based on grid quality measurement characteristics. Background Art

[0002] Three-dimensional mesh is an important processing object in computer graphics, computational fluid dynamics, etc. At present, common mesh types include hexahedral mesh, tetrahedral mesh, polyhedral mesh (with any number of vertices or faces), etc. Among them, polyhedral mesh takes up less storage space and has smaller diffusion errors. It is also supported by most numerical simulation software. However, the existing polyhedral mesh generation technology cannot well guarantee the quality of the generated mesh, which will bring errors to the numerical calculation results. These errors will have a significant impact on subsequent calculation processing (for example: finite element analysis, fluid dynamics analysis, etc.), so the optimization algorithm of polyhedral mesh is very necessary.

[0003] In the prior art, the classic mesh smoothing algorithms include Laplacian smoothing, Taubin smoothing, mean curvature method, etc., the core of which is to move the position of the internal node of the mesh to the body center of the polyhedron composed of coplanar nodes with the node. The Taubin algorithm introduces filters and weight coefficients on the basis of the Laplacian algorithm, which can suppress the deformation and shrinkage caused by the Laplace operator. The mean curvature law follows the principle that the uniform change of the curvature of the surface is smooth, which reduces the deformation of the mesh to a certain extent. For the above methods, many scholars have made a lot of optimization improvements on this basis. Although it will indirectly improve the quality of the computational fluid dynamics mesh, it is less for mesh optimization in computational fluid dynamics. That is to say, there are few smoothing optimization methods directly related to the quality of the computational fluid dynamics mesh, and it is difficult to quickly and effectively improve the accuracy of numerical calculations.

[0004] In summary, how to make use of the characteristics of mesh quality measurement methods in computational fluid dynamics to avoid destroying the original mesh structure and ensure that the mesh quality is efficiently optimized is a key issue in three-dimensional polyhedral mesh smoothing in computational fluid dynamics. Summary of the invention

[0005] In view of this, an object of the present invention is to provide a polyhedron optimization method based on mesh quality metric characteristics, which is used to solve the polyhedron mesh quality optimization problem in computational fluid dynamics.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] A polyhedron optimization method based on mesh quality metric characteristics comprises the following steps:

[0008] S1: Use polyhedral meshes to globally mesh the three-dimensional model, and obtain all polyhedral mesh vertices to form a vertex sequence set;

[0009] S2: traverse the neighborhood polyhedral meshes of each vertex in the vertex sequence set in turn, and calculate the centroid coordinates of each neighborhood polyhedral mesh of the vertex;

[0010] S3: Calculate the average value of global polyhedral mesh quality metrics;

[0011] S4: traverse each vertex in the vertex sequence set in turn, calculate the average quality metric of the neighborhood mesh of each vertex, and use the internal quality condition to judge the mesh quality. If the condition is met, continue to step S4 and judge the next vertex until all vertices in the polyhedral mesh vertex sequence set are traversed, and then execute step S7; if not, continue to execute step S5;

[0012] S5: Calculate the expected coordinates of the vertex according to the centroid connection line of the vertex neighborhood polyhedron mesh and the mesh quality metric characteristics described in step S4;

[0013] S6: according to the coordinates of the vertex and the expected coordinates of the vertex, the actual coordinates of the vertex are calculated by using the inverse distance weighted method, and the actual coordinates of the vertex are used to cover the corresponding vertex coordinates in the vertex sequence set, and then return to step S4 to judge the next vertex until all the vertices in the vertex sequence set are traversed, and then step S7 is executed;

[0014] S7: Calculate the average value of the global polyhedral mesh quality metric and determine whether it meets the quality requirements. If not, return to step S2 for the next iteration. When the maximum number of iterations is reached, terminate the iteration and report an error. If it is satisfied, complete the smooth optimization of the three-dimensional polyhedral mesh model and output a new three-dimensional polyhedral mesh model.

[0015] Furthermore, the polyhedral mesh refers to a mesh with any number of vertices or faces.

[0016] Furthermore, the neighborhood polyhedral mesh of the vertex in step S2 specifically refers to a set of polyhedral meshes that share the vertex. The method for calculating the centroid coordinates of each neighborhood polyhedral mesh of the vertex is:

[0017] For each vertex neighborhood polyhedral mesh, let the volume of the k small tetrahedrons that make up the polyhedral mesh be V i The coordinates of the three-dimensional center point of the small tetrahedron are (x G ) i , where i = 1, 2, ..., k is the number of the small tetrahedron, and the total volume of the polyhedral mesh is V sum , the three-dimensional centroid coordinates of the polyhedron mesh are x c , then the centroid coordinate xc The calculation formula is:

[0018]

[0019] In the formula, the center point of the small tetrahedron (x G ) i The calculation formula is:

[0020]

[0021] where x ij Represents the j-th three-dimensional vertex coordinate of the i-th small tetrahedron, where j=1, 2,…, 4 is the vertex number of the small tetrahedron.

[0022] Further, the mesh quality metric used in calculating the average value of the global polyhedral mesh quality metric in step S3 includes the non-positive α N , distortion ψ, non-uniformity f x , all three are scalars, and their expressions are:

[0023]

[0024]

[0025]

[0026] In the formula, is the normal vector of the intersection of two adjacent polyhedral meshes, is the distance vector between the centroids of two adjacent polyhedral meshes, is the intersection point v where the centroid line of two adjacent polyhedral meshes intersects with the intersection surface sec The distance vector between the center of the intersection face, v sec is the three-dimensional coordinate, Represents the intersection point v where the centroid line of two adjacent polyhedral meshes intersects with the intersection surface sec The distance vector from the centroid of one of the adjacent polyhedral meshes, assuming the number of polyhedral meshes is c, They represent the average value of non-orthogonality, average value of distortion and average value of non-uniformity respectively. The calculation formula of the average value of polyhedral mesh quality metric is:

[0027]

[0028] The global polyhedral mesh specifically refers to all the polyhedral meshes contained in the three-dimensional model. For the above formula, if the number of global polyhedral meshes is a, then c=a is set when calculating the average value of the global polyhedral mesh quality metric; if the number of neighborhood polyhedral meshes of a vertex is b, then c=b is set when calculating the average value of the vertex neighborhood polyhedral mesh quality metric; the global polyhedral mesh quality metric average is calculated for all the polyhedral meshes contained in the model, while the vertex neighborhood polyhedral mesh quality metric average is calculated for the polyhedral meshes that share the vertex.

[0029] Further, the specific content of the internal quality condition described in step S4 is: the judged vertex is a vertex of the external polyhedral mesh of the model, or there is any vertex whose neighborhood polyhedral mesh quality metric average value is better than the corresponding global polyhedral mesh quality metric average value, that is, the non-orthogonality average value and the distortion average value of the neighborhood polyhedral mesh are lower than the non-orthogonality average value and the distortion average value of the global polyhedral mesh, respectively, and the neighborhood polyhedral mesh non-uniformity average value is higher than the global polyhedral mesh non-uniformity average value; the external polyhedral mesh vertex of the model refers to a vertex on the boundary surface, edge or corner point of the three-dimensional model.

[0030] Further, the specific steps of calculating the expected coordinates of the vertices described in step S5 are:

[0031] S51: Connect the centroids of adjacent meshes in the neighborhood polyhedron mesh of the vertex in step S4, and the connecting line intersects the adjacent mesh intersection at a point v sec , let the coordinates of the three-dimensional centroids of adjacent grids be x P and x N , the normal vector of the adjacent mesh intersection is norm, and the three-dimensional center coordinate of the adjacent mesh intersection is x f , then the intersection point v sec The calculation formula is:

[0032]

[0033] In the formula, is the direction vector, and its calculation formula is:

[0034]

[0035] S52: According to the intersection point v sec To the center x f The distance vector of the vertex movement for:

[0036]

[0037] In the formula, w secis the scalar weight coefficient, is the distance weight from the vertex to the center of the face, and the final three-dimensional coordinate v of the point m for:

[0038]

[0039] S53: According to the three-dimensional projection formula, the coordinate position v of the point m Project onto the perpendicular bisector of the centroid line to get the three-dimensional expected coordinate v t , the calculation formula for this point is:

[0040]

[0041] In the formula, w t is the scalar weight coefficient of the projection, o(x o ,y o ,z o ) represents the midpoint of the line connecting the centroids,

[0042] Further, the inverse distance weighted method described in step S6 is specifically:

[0043] Assume that the three-dimensional vertex coordinates in step S4 are v, the number of neighborhood polyhedral meshes of v is n, where i=1, 2, ..., n is the neighborhood polyhedral mesh number, then the actual three-dimensional coordinate v′ to which the current vertex v is finally moved is:

[0044]

[0045] Where λ is the relaxation coefficient, w i is a scalar weight coefficient, which is the inverse of the distance from the vertex to the centroid of the neighborhood grid.

[0046] Furthermore, the quality requirements described in step S7 specifically include: the average values ​​of various global polyhedral mesh quality metrics after the current iteration are better than the corresponding average values ​​of global polyhedral mesh quality metrics after the previous iteration, that is, the average non-orthogonality and average distortion in the global polyhedral mesh quality metrics after the iteration are lower than the average non-orthogonality and average distortion at the initial moment of the iteration, and the average non-uniformity is higher than the average non-uniformity at the initial moment of the iteration, while satisfying the requirement of not exceeding a maximum number of iterations M times.

[0047] The beneficial effects of the present invention are as follows: the present invention provides a polyhedron optimization method based on mesh quality measurement characteristics, combines mesh quality measurement characteristics and the Laplacian method principle to optimize the mesh, makes the mesh conform to the practical application of computational fluid dynamics, can effectively improve the mesh quality level and reduce the algorithm time cost.

[0048] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0050] Figure 1 A flow chart of the polyhedron optimization method based on mesh quality metric characteristics according to the present invention;

[0051] Figure 2 A three-dimensional square cavity polyhedron mesh model diagram of an embodiment of the present invention;

[0052] Figure 3 Schematic diagram of mesh quality measurement of the method of the present invention;

[0053] Figure 4 A diagram showing the vertex movement process of the method of the present invention; Figure 4 (a) is the overall structure diagram; Figure 4 (b) is the local graph of the centroid connection line;

[0054] Figure 5 This is a cross-sectional view of a three-dimensional square cavity polyhedron mesh model before smoothing according to an embodiment of the present invention;

[0055] Figure 6 This is a cross-sectional view of a smoothed three-dimensional square cavity polyhedron mesh model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0057] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0058] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0059] Embodiment: In a polyhedral mesh model, the Laplacian method and the method of the present invention are used to optimize the mesh respectively, and the efficiency of the algorithm is tested by comparing the quality of the original mesh and the mesh optimized by each method as well as the algorithm time cost.

[0060] In this example, assuming that a three-dimensional square cavity polyhedron mesh model needs to be optimized, we propose a "polyhedron optimization method based on mesh quality measurement characteristics".

[0061] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0062] like Figure 1 As shown, the steps of the present invention are as follows:

[0063] S1: Figure 2 As shown, the three-dimensional model is globally meshed using a polyhedral mesh, and all polyhedral mesh vertices are obtained to form a vertex sequence set;

[0064] The polyhedral mesh is a mesh with any number of vertices or faces. Figure 2 The schematic diagram of the three-dimensional square cavity polyhedron mesh model is shown. The number of meshes in the model is about 740,000 and the number of vertices is 1.14 million. Each vertex has a number. In the specific implementation process, the vertices of the entire mesh model are numbered counterclockwise, and after all the vertices inside the model are numbered, the vertices on the surface of the model are numbered. When traversing, each vertex will be traversed in the order of the number.

[0065] S2: traverse the neighborhood polyhedral meshes of each vertex in the vertex sequence set in turn, and calculate the centroid coordinates of each neighborhood polyhedral mesh of the vertex;

[0066] The vertex neighborhood polyhedral mesh specifically refers to the set of polyhedral meshes that share the vertex. The method for calculating the centroid coordinates of each vertex neighborhood polyhedral mesh is:

[0067] For each vertex neighborhood polyhedral mesh, let the volume of the k small tetrahedrons that make up the polyhedral mesh be V i The coordinates of the three-dimensional center point of the small tetrahedron are (x G ) i , where i = 1, 2, ..., k is the number of the small tetrahedron, and the total volume of the polyhedral mesh is V sum , the three-dimensional centroid coordinates of the polyhedron mesh are x c , then the centroid coordinate x c The calculation formula is:

[0068]

[0069] In the formula, the center point of the small tetrahedron (x G ) i The calculation formula is:

[0070]

[0071] where x ij Represents the j-th three-dimensional vertex coordinate of the i-th small tetrahedron, where j=1, 2,…, 4 is the vertex number of the small tetrahedron.

[0072] S3: Combination Figure 3 , calculate the global average of polyhedral mesh quality metrics;

[0073] The mesh quality metrics used to calculate the average value of polyhedral mesh quality metrics are non-orthogonality, distortion, and non-uniformity. All three are scalars. Let non-orthogonality be α N , the distortion is ψ, and the non-uniformity is f x , the expressions of the three are:

[0074]

[0075]

[0076]

[0077] In the formula, is the normal vector of the intersection of two adjacent polyhedral meshes, is the distance vector between the centroids of two adjacent polyhedral meshes, is the intersection point v where the centroid line of two adjacent polyhedral meshes intersects with the intersection surfacesec The distance vector between the center of the intersection face, v sec is the three-dimensional coordinate, Represents the intersection point v where the centroid line of two adjacent polyhedral meshes intersects with the intersection surface sec The distance vector from the centroid of one of the adjacent polyhedral meshes, assuming the number of polyhedral meshes is c, They represent the average value of non-orthogonality, average value of distortion and average value of non-uniformity respectively. The calculation formula of the average value of polyhedral mesh quality metric is:

[0078]

[0079] The global polyhedral mesh specifically refers to all the polyhedral meshes contained in the 3D model. In this example, the number of global polyhedral meshes is 1.14 million. When calculating the average value of the global polyhedral mesh quality metric, let c = 114 × 10 4 That’s it; if the number of neighborhood polyhedral meshes of a vertex is 5 or 6, then c=5 or c=6 can be set when calculating the average quality metric of the vertex neighborhood polyhedral meshes; the average quality metric of the global polyhedral meshes is calculated for all the polyhedral meshes contained in the model, while the average quality metric of the vertex neighborhood polyhedral meshes is calculated for the polyhedral meshes that share the vertex.

[0080] Assuming that the influence of other mesh quality factors is excluded, the mesh quality is optimal when the non-orthogonality and distortion are close to 0 and the non-uniformity is close to 0.5. Figure 3 As shown, The smaller the value, the better the distortion; N It is the angle between the center line and the normal vector of the intersection surface. The smaller the angle, the better the non-orthogonality. The centroid line of adjacent grids is divided into two line segments by their intersection surface. The closer the lengths of these two line segments are, the better the non-uniformity.

[0081] S4: traverse each vertex in the vertex sequence set in turn, calculate the average value of the neighborhood mesh quality metric of the vertex, and use the internal quality condition to judge the mesh quality. If the condition is met, continue to step S4 and judge the next vertex until all vertices in the polyhedral mesh vertex sequence set are traversed, and then execute step S7; if not, continue to execute step S5;

[0082] The specific contents of internal quality conditions are:

[0083] The vertex is a polyhedral mesh vertex outside the model or there is any vertex whose neighborhood polyhedral mesh quality metric average value is better than the corresponding global polyhedral mesh quality metric average value, that is, the non-orthogonality average value and the distortion average value of the neighborhood polyhedral mesh are lower than the non-orthogonality average value and the distortion average value of the global polyhedral mesh, respectively, and the neighborhood polyhedral mesh non-uniformity average value is higher than the global polyhedral mesh non-uniformity average value; in this example, the model external polyhedral mesh vertex refers to the vertices on 6 boundary faces, 8 edges or 8 corner points.

[0084] S5: Combination Figure 4 , calculating the expected coordinates of the vertex according to the centroid connection of the vertex neighborhood polyhedron mesh and the mesh quality metric characteristics described in step S4;

[0085] S501: Connect the centroids of adjacent meshes in the neighborhood polyhedron mesh of the vertex in step S4, and the connecting line intersects the intersection surface of the adjacent mesh at a point v sec , let the coordinates of the three-dimensional centroids of adjacent grids be x P and x N , the normal vector of the adjacent mesh intersection is norm, and the three-dimensional center coordinate of the adjacent mesh intersection is x f , then the intersection point v sec The calculation formula is:

[0086]

[0087] In the formula, is the direction vector, and its calculation formula is:

[0088]

[0089] S502: Figure 4 As shown in (a), when considering the method of moving the vertex, in order to make the intersection point v sec Become the face center and find the new vertex coordinates v m , so that the center of the face f moves to v sec Coordinates, so that the distortion reaches the optimal value. According to the intersection point v sec To the center x f The distance vector of the vertex movement for

[0090]

[0091] In the formula, w sec is the scalar weight coefficient, is the distance weight from the vertex to the face center, and finally the new vertex coordinate v is obtained. m for

[0092]

[0093] S503: Figure 4 As shown in (b), the new vertex coordinates v m Projection to the centroid line The perpendicular bisector S c On the top, we get the three-dimensional expected coordinates v t , so that the intersection surface S f With perpendicular bisector S c coincide, so that the centroids are connected Intersection S f Vertical and intersected by surface S f Bisection, ultimately optimizing the mesh distortion while optimizing the non-orthogonality and non-uniformity. According to the three-dimensional projection formula, v t The calculation formula is:

[0094]

[0095] In the formula, w t is the scalar weight coefficient of the projection, the preferred value range is 0.8 to 0.9, and this example takes 0.9. o ,y o ,z o ) represents the midpoint of the line connecting the centroids,

[0096] S6: according to the coordinates of the vertex in step S4 and the expected coordinates of the vertex, the actual coordinates of the vertex are calculated by using the inverse distance weighted method, and the actual coordinates of the vertex are used to cover the corresponding vertex coordinates in the vertex sequence set, and then return to step S4 to judge the next vertex until all the vertices in the vertex sequence set are traversed, and then step S7 is executed;

[0097] The inverse distance weighted method is as follows:

[0098] Assume that the three-dimensional vertex coordinates in step S4 are v, the number of neighborhood polyhedral meshes of v is n, where i=1, 2, ..., n is the neighborhood polyhedral mesh number, then the actual three-dimensional coordinate v' to which the current vertex v is finally moved is:

[0099]

[0100] In the formula, λ is the relaxation coefficient, λ is 0.19, w i is a scalar weight coefficient, which is the inverse of the distance from the vertex to the centroid of the neighborhood grid.

[0101] S7: Calculate the average value of the global polyhedral mesh quality metric and determine whether it meets the quality requirements. If not, return to S2 for the next iteration. When the maximum number of iterations is reached, the iteration is terminated and an error is reported. If it is satisfied, the smooth optimization of the three-dimensional polyhedral mesh model is completed and a new three-dimensional polyhedral mesh model is output.

[0102] The quality requirement specifically means that the average values ​​of various global polyhedral mesh quality metrics after the current iteration are better than the corresponding average values ​​of global polyhedral mesh quality metrics after the previous iteration, that is, the average non-orthogonality and average distortion in the global polyhedral mesh quality metrics after the iteration are lower than the average non-orthogonality and average distortion at the initial moment of the iteration, and the average non-uniformity is higher than the average non-uniformity at the initial moment of the iteration. At the same time, it should not exceed the maximum number of iterations M, where M is 1000.

[0103] In the Laplacian algorithm, the mesh vertex v i Move smoothly to the adjacent vertex v with the same plane j The average position of the moving offset Where n is v i The number of adjacent vertices, w j Used to measure adjacent vertices v j The simplest form of weight in smooth movement is to use the same weight, that is, w j =1 / n. The advantage of the Laplacian algorithm is that it has a small amount of calculation and a fast calculation speed. However, since this method improves the quality by making the grid more uniform, the orthogonality and distortion improved by each iteration are small, and multiple iterations are required to achieve the ideal effect, and the degree of improvement in grid quality is limited. The method of the present invention directly starts from the grid quality characteristics, takes the optimization of grid quality as the first standard, improves the grid quality optimization efficiency of each iteration, and then quickly and directly and effectively optimizes the grid quality related to computational fluid dynamics.

[0104] Figure 5 and Figure 6 The cross-sectional views at the center positions in the front and rear x-axis directions of the grid model are respectively optimized using the method of the present invention. Figure 5 The mesh quality in the model is poor, which may affect the calculation accuracy. The original mesh model is smoothly optimized by using the polyhedron optimization algorithm based on the mesh quality measurement characteristics. The cross-sectional view is as follows: Figure 6 As shown, it can be seen that the optimization method is mainly achieved by moving mesh vertices. The results of the average values ​​of the global polyhedral mesh quality metrics of the original mesh and the mesh optimized by the Laplacian method and the method of the present invention are shown in Table 1. By comparison, it can be seen that compared with the Laplacian method, the method of the present invention more significantly improves the mesh quality metrics, which helps to improve the accuracy and calculation precision of subsequent calculations. In addition, the method of the present invention has fewer iterations than the Laplacian method, and the time cost is also less than 1 / 2 of the original.

[0105] Table 1

[0106]

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A polyhedron optimization method based on mesh quality metric characteristics, characterized by: The steps include: S1: Use polyhedral meshes to globally mesh the three-dimensional model, and obtain all polyhedral mesh vertices to form a vertex sequence set; S2: traverse the neighborhood polyhedral meshes of each vertex in the vertex sequence set in turn, and calculate the centroid coordinates of each neighborhood polyhedral mesh of the vertex; S3: Calculate the average value of global polyhedral mesh quality metrics; S4: traverse each vertex in the vertex sequence set in turn, calculate the average quality metric of the neighborhood mesh of each vertex, and use the internal quality condition to judge the mesh quality. If the condition is met, continue to step S4 and judge the next vertex until all vertices in the polyhedral mesh vertex sequence set are traversed, and then execute step S7; if not, continue to execute step S5; S5: Calculate the expected coordinates of the vertex according to the centroid connection line of the vertex neighborhood polyhedron mesh and the mesh quality metric characteristics described in step S4; S6: according to the coordinates of the vertex and the expected coordinates of the vertex, the actual coordinates of the vertex are calculated by using the inverse distance weighted method, and the actual coordinates of the vertex are used to cover the corresponding vertex coordinates in the vertex sequence set, and then return to step S4 to judge the next vertex until all the vertices in the vertex sequence set are traversed, and then step S7 is executed; S7: Calculate the average value of the global polyhedral mesh quality metric and determine whether it meets the quality requirements. If not, return to step S2 for the next iteration. When the maximum number of iterations is reached, terminate the iteration and report an error. If it is satisfied, complete the smooth optimization of the three-dimensional polyhedral mesh model and output a new three-dimensional polyhedral mesh model.

2. The polyhedron optimization method based on mesh quality metric characteristics according to claim 1, characterized in that: The polyhedral mesh is a mesh with any number of vertices or faces.

3. The polyhedron optimization method based on mesh quality metric characteristics according to claim 1, characterized in that: The neighborhood polyhedral mesh of the vertex in step S2 specifically refers to a set of polyhedral meshes that share the vertex. The method for calculating the centroid coordinates of each neighborhood polyhedral mesh of the vertex is: For each vertex neighborhood polyhedral mesh, let the volume of the k small tetrahedrons that make up the polyhedral mesh be V i The coordinates of the three-dimensional center point of the small tetrahedron are (x G ) i , where i = 1, 2, ..., k is the number of the small tetrahedron, and the total volume of the polyhedral mesh is V sum , the three-dimensional centroid coordinates of the polyhedron mesh are x c , then the centroid coordinate x c The calculation formula is: In the formula, the center point of the small tetrahedron (x G ) i The calculation formula is: where x ij Represents the j-th three-dimensional vertex coordinate of the i-th small tetrahedron, where j=1, 2, ..., 4 is the vertex number of the small tetrahedron.

4. The polyhedron optimization method based on mesh quality metric characteristics according to claim 1, characterized in that: The mesh quality metric used in calculating the average value of the global polyhedral mesh quality metric in step S3 includes the non-positive α N , distortion ψ, non-uniformity f x , all three are scalars, and their expressions are: In the formula, is the normal vector of the intersection of two adjacent polyhedral meshes, is the distance vector between the centroids of two adjacent polyhedral meshes, is the intersection point v where the centroid line of two adjacent polyhedral meshes intersects with the intersection surface sec The distance vector between the center of the intersection face, v sec is the three-dimensional coordinate, Represents the intersection point v where the centroid line of two adjacent polyhedral meshes intersects with the intersection surface sec The distance vector from the centroid of one of the adjacent polyhedral meshes, assuming the number of polyhedral meshes is c, They represent the average value of non-orthogonality, average value of distortion and average value of non-uniformity respectively. The calculation formula of the average value of polyhedral mesh quality metric is: The global polyhedral mesh specifically refers to all the polyhedral meshes contained in the three-dimensional model. For the above formula, if the number of global polyhedral meshes is a, then c=a is set when calculating the average value of the global polyhedral mesh quality metric; if the number of neighborhood polyhedral meshes of a vertex is b, then c=b is set when calculating the average value of the vertex neighborhood polyhedral mesh quality metric.

5. The polyhedron optimization method based on mesh quality metric characteristics according to claim 1, characterized in that: The specific content of the internal quality condition described in step S4 is: the judged vertex is a vertex of the external polyhedral mesh of the model, or there is any vertex whose neighborhood polyhedral mesh quality metric average value is better than the corresponding global polyhedral mesh quality metric average value, that is, the non-orthogonality average value and the distortion average value of the neighborhood polyhedral mesh are lower than the non-orthogonality average value and the distortion average value of the global polyhedral mesh respectively, and the neighborhood polyhedral mesh non-uniformity average value is higher than the global polyhedral mesh non-uniformity average value; the external polyhedral mesh vertex of the model refers to the vertex on the boundary surface, edge or corner point of the three-dimensional model.

6. The polyhedron optimization method based on mesh quality metric characteristics according to claim 1, characterized in that: The specific steps of calculating the expected coordinates of the vertices described in step S5 are: S51: Connect the centroids of adjacent meshes in the neighborhood polyhedron mesh of the vertex in step S4, and the connecting line intersects the adjacent mesh intersection at a point v sec , let the coordinates of the three-dimensional centroids of adjacent grids be x P and x N , the normal vector of the adjacent mesh intersection is norm, and the three-dimensional center coordinate of the adjacent mesh intersection is x f , then the intersection point v sec The calculation formula is: In the formula, is the direction vector, and its calculation formula is: S52: According to the intersection point v sec To the center x f The distance vector of the vertex movement for: In the formula, w sec is the scalar weight coefficient, is the distance weight from the vertex to the center of the face, and the final three-dimensional coordinate v of the point m for: S53: According to the three-dimensional projection formula, the coordinate position v of the point m Project onto the perpendicular bisector of the centroid line to get the three-dimensional expected coordinate v t , the calculation formula for this point is: In the formula, w t is the scalar weight coefficient of the projection, o(x o ,y o ,z o ) represents the midpoint of the line connecting the centroids, 7. The polyhedron optimization method based on mesh quality metric characteristics according to claim 1, characterized in that: The inverse distance weighting method described in step S6 is specifically: Assume that the three-dimensional vertex coordinates in step S4 are v, the number of neighborhood polyhedral meshes of v is n, where i=1, 2, ..., n is the neighborhood polyhedral mesh number, then the actual three-dimensional coordinate v′ to which the current vertex v is finally moved is: Where λ is the relaxation coefficient, w i is a scalar weight coefficient, which is the inverse of the distance from the vertex to the centroid of the neighborhood grid.

8. The polyhedron optimization method based on mesh quality metric characteristics according to claim 1, characterized in that: The quality requirements described in step S7 specifically include: the average values ​​of various global polyhedral mesh quality metrics after the current iteration are better than the corresponding average values ​​of global polyhedral mesh quality metrics after the previous iteration, that is, the average non-orthogonality and average distortion in the global polyhedral mesh quality metrics after the iteration are lower than the average non-orthogonality and average distortion at the initial moment of the iteration, and the average non-uniformity is higher than the average non-uniformity at the initial moment of the iteration, while satisfying the requirement of not exceeding a maximum number of iterations M.