A full-automatic triangular prism boundary layer grid generation method based on double-target mapping
Through a robust full-layer triangular prism grid generation method based on dual-objective mapping, the problems of uneven grid quality, self-intersection and narrow gaps in traditional methods are solved, and the global optimal grid quality and the consistency of the number of adjacent grid unit layers are achieved.
Patent Information
- Application Number
- CN202411870996.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-12-18
AI Technical Summary
Traditional boundary layer mesh generation algorithms have poor normal generation quality. It is difficult to generate high-quality boundary layer triangular prism meshes in three dimensions. The mesh quality of local methods is usually not globally optimal. It is difficult to handle the mesh filling problem after intersection, and narrow gaps are prone to appear. The number of layers between adjacent mesh units is usually different.
A robust full-layer triangular prism mesh generation method based on dual-objective mapping is adopted. By establishing a rigid mapping energy equation between the discrete target triangular prism mesh and the initial triangular prism mesh, an isotropic auxiliary tetrahedral mesh is used to prevent self-intersection, a retained layer mesh is introduced to solve the slit problem, and the mesh quality is optimized using the Hermite interpolation algorithm.
It achieves globally optimal grid quality, prevents self-intersection, ensures the same number of adjacent grid unit layers, improves the flexibility of grid generation and average grid quality, and solves the problems of uneven grid quality and slits in traditional methods.
Smart Images

Figure CN119888128B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of grid generation, and in particular to a fully automatic triangular prism boundary layer grid generation method based on dual-objective mapping. Background Art
[0002] Among traditional boundary layer mesh generation algorithms, the most widely used is the frontier layering method. This method, based on the principle of local greed, grows the boundary layer mesh in layers according to user input. If global intersection or low mesh quality occurs, boundary layer mesh growth is stopped locally and transition cells are filled. This algorithm is widely used in industry due to its flexibility in local operations, robustness, and ease of implementation. Boundary layer mesh generation modules from companies such as Ansys and Siemens are based on this algorithm.
[0003] However, traditional boundary layer mesh generation algorithms suffer from issues such as poor normal generation quality and the presence of transitional elements. Generating high-quality boundary layer triangular prism meshes in three dimensions remains challenging. Using the classic frontier advancing method, it's difficult to guarantee a full-layer boundary layer mesh, as intersections are unknown. Algorithm designers must carefully manage fallbacks when intersections occur, which can complicate isotropic tetrahedral packing. Furthermore, the normals of classic frontier advancing methods are typically generated locally, resulting in a locally optimized mesh quality.
[0004] In the process of implementing the present invention, the inventors discovered that the prior art has at least the following problems:
[0005] 1. The mesh quality of local methods is usually not globally optimal;
[0006] 2. The classic frontier progression method has difficulty handling the grid filling problem after intersection, and is prone to narrow gaps;
[0007] 3. The classical frontier layering method requires deleting intersecting grids, and the number of layers between adjacent grid cells is usually different. Summary of the Invention
[0008] Based on the above problems, an embodiment of the present application provides a robust full-layer triangular prism grid generation method based on dual-objective mapping.
[0009] According to an embodiment of the present application, a robust full-layer triangular prism meshing method based on dual-objective mapping is provided, comprising:
[0010] S1: Obtaining an input surface triangular mesh, boundary conditions, and generation parameters, and classifying the surface triangular mesh according to the boundary conditions to obtain a surface triangular mesh with an object boundary condition and a surface triangular mesh with a far-field boundary condition, wherein the input surface triangular mesh is a closed solid surface graph;
[0011] S2: generating a discrete target triangular prism mesh according to the input surface triangular mesh, generation parameters and the surface triangular mesh under the object surface boundary condition;
[0012] S3: generating an initial triangular prism mesh on the object surface boundary condition surface mesh according to the input surface triangular mesh, boundary conditions and generation parameters; after generating the initial triangular prism mesh, generating an isotropic auxiliary tetrahedral mesh between the initial triangular prism mesh and the far-field boundary condition surface triangular mesh;
[0013] S4: Based on the initial triangular prism grid and the discrete target triangular prism grid, a rigid mapping energy equation is established between the discrete target triangular prism grid and the initial triangular prism grid, with the grid point coordinates in the initial triangular prism grid as variables, and the coordinates of the extreme grid points of the equation are derived by taking the derivative of the rigid mapping energy equation with respect to the initial triangular prism grid point coordinates;
[0014] S5: determining the coordinates of the grid points using a linear probing method based on the coordinates of the initial triangular prism grid points and the coordinates of the extreme value grid points of the equation, so that the tetrahedral grid volumes of the isotropic auxiliary tetrahedral grid at the coordinates of the grid points are all positive;
[0015] S6: According to the generation parameters, if the rigid mapping energy equation has not converged, repeat S4-S5; if the energy has converged, retain the initial triangular prism grid as the intermediate triangular prism grid;
[0016] S7: reconstructing the prism grid according to the intermediate triangular prism grid and the generation parameters, and then generating a number of non-negative volume triangular prism units required by the generation parameters between the bottom grid and the top grid using a Hermite interpolation algorithm to obtain a final triangular prism grid;
[0017] S8: deleting the reserved layer mesh, which is the outermost layer of the final triangular prism mesh, and refilling the remaining part with an isotropic auxiliary tetrahedral mesh.
[0018] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:
[0019] It can be seen from the above embodiments that the present application transforms the grid deformation problem into a global optimal problem by establishing a rigid mapping energy equation between the discrete target triangular prism grid and the initial triangular prism grid, thereby solving the problem that the grid quality of local methods is usually not globally optimal.
[0020] By using the isotropic auxiliary tetrahedron, the boundary layer mesh can be robustly prevented from self-intersection, thereby solving the self-intersection problem.
[0021] The discrete target triangular prism grid method is proposed for the first time, which greatly enhances the flexibility of the algorithm. Users can guide the algorithm generation by customizing the shape and size of the discrete target triangular prism grid.
[0022] In the present invention, only the coordinates of the grid points are moved, and no topological operation is involved. Therefore, the number of layers between adjacent grid units is strictly the same, which solves the problem that the number of layers between traditional adjacent grid units is usually different.
[0023] By introducing the retained layer grid, the problem of slits easily appearing in the existing method is solved, and it can effectively ensure that the slits after the boundary layer grid is generated will not be too large.
[0024] For the first time, a rigid mapping method is proposed to generate boundary layer meshes. This method has higher average mesh quality than traditional methods.
[0025] This method innovatively introduces rigid mapping into layered viscous mesh generation and uses auxiliary isotropic tetrahedral meshing techniques to prevent negative elements. The introduction of these techniques theoretically allows for high-quality full-layer viscous mesh generation with guaranteed positive volumes under arbitrary input. Furthermore, this application presents the generation of a discretized target triangular prism mesh and a rigid-body transformed initial triangular prism mesh. Furthermore, by introducing adaptive vertical discretization of the target triangular prism mesh adjustment and multi-normal configuration, the quality of the viscous mesh is significantly improved.
[0026] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0028] FIG1 is a flow chart showing a method for generating a fully automatic triangular prism boundary layer mesh based on rigid mapping according to an exemplary embodiment.
[0029] Fig. 2 is a schematic diagram showing decomposition of a triangular prism grid according to an exemplary embodiment.
[0030] FIG3 is a schematic diagram of a triangular prism grid optimization operation according to an exemplary embodiment, showing four basic operations performed on the triangular prism grid.
[0031] Figure 4 3 is a schematic diagram of a retained layer grid according to an exemplary embodiment, showing examples of retained layer sizes under different β=0.1 and β=0.2 and the grid preservation effect in a three-dimensional image.
[0032] Figure 51 is a diagram showing a U-shaped initial triangular prism mesh and an auxiliary isotropic tetrahedron mesh at different iteration numbers according to an exemplary embodiment.
[0033] Figure 6 FIG. 1 is a comparison diagram between a U-shaped prismatic boundary layer mesh generated using the present invention and a pointwise generated mesh according to an exemplary embodiment.
[0034] Figure 7 FIG. 1 shows the mass distribution of a U-shaped prismatic boundary layer grid and a pointwise generated grid according to an exemplary embodiment.
[0035] Figure 8 The surface mesh of the wing-body assembly with complex corner and edge details (left); a cut view of the prismatic / tetrahedral hybrid wing-body assembly mesh A (right).
[0036] Figure 9 This image shows a comparison of complex corner details in a wing-body assembly model, using the same triangular surface mesh generation algorithm. The left panel shows wing-body assembly mesh A, while the right panel shows the one generated using pointwise meshing. The images from top to bottom represent corners 1 through 3, respectively. DETAILED DESCRIPTION
[0037] The exemplary embodiments are described in detail herein. In the following description, when referring to the accompanying drawings, identical numbers in different drawings represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0038] FIG1 is a flow chart showing a method for generating a fully automatic triangular prism boundary layer mesh based on rigid mapping according to an exemplary embodiment. The method may include the following steps:
[0039] S1: Obtaining an input surface triangular mesh, boundary conditions, and generation parameters, and classifying the surface triangular mesh according to the boundary conditions to obtain a surface triangular mesh with an object boundary condition and a surface triangular mesh with a far-field boundary condition, wherein the input surface triangular mesh is a closed solid surface graph;
[0040] S2: generating a discrete target triangular prism mesh according to the input surface triangular mesh, generation parameters and the surface triangular mesh under the object surface boundary condition;
[0041] S3: generating an initial triangular prism mesh on the object surface boundary condition surface mesh according to the input surface triangular mesh, boundary conditions and generation parameters; after generating the initial triangular prism mesh, generating an isotropic auxiliary tetrahedral mesh between the initial triangular prism mesh and the far-field boundary condition surface triangular mesh;
[0042] S4: Based on the initial triangular prism grid and the discrete target triangular prism grid, a rigid mapping energy equation is established between the discrete target triangular prism grid and the initial triangular prism grid, with the grid point coordinates in the initial triangular prism grid as variables, and the coordinates of the extreme grid points of the equation are derived by taking the derivative of the rigid mapping energy equation with respect to the initial triangular prism grid point coordinates;
[0043] S5: determining the coordinates of the grid points using a linear probing method based on the coordinates of the initial triangular prism grid points and the coordinates of the extreme value grid points of the equation, so that the tetrahedral grid volumes of the isotropic auxiliary tetrahedral grid at the coordinates of the grid points are all positive;
[0044] S6: According to the generation parameters, if the rigid mapping energy equation has not converged, repeat S4-S5; if the energy has converged, retain the initial triangular prism grid as the intermediate triangular prism grid;
[0045] S7: reconstructing the prism grid according to the intermediate triangular prism grid and the generation parameters, and then generating a number of non-negative volume triangular prism units required by the generation parameters between the bottom grid and the top grid using a Hermite interpolation algorithm to obtain a final triangular prism grid;
[0046] S8: deleting the reserved layer mesh, which is the outermost layer of the final triangular prism mesh, and refilling the remaining part with an isotropic auxiliary tetrahedral mesh.
[0047] It can be seen from the above embodiments that the present application transforms the grid deformation problem into a global optimal problem by establishing a rigid mapping energy equation between the discrete target triangular prism grid and the initial triangular prism grid, thereby solving the problem that the grid quality of local methods is usually not globally optimal.
[0048] By using the isotropic auxiliary tetrahedron, the boundary layer mesh can be robustly prevented from self-intersection, thereby solving the self-intersection problem.
[0049] The discrete target triangular prism grid method is proposed for the first time, which greatly enhances the flexibility of the algorithm. Users can guide the algorithm generation by customizing the shape and size of the discrete target triangular prism grid.
[0050] In the present invention, only the coordinates of the grid points are moved, and no topological operation is involved. Therefore, the number of layers between adjacent grid units is strictly the same, which solves the problem that the number of layers between traditional adjacent grid units is usually different.
[0051] By introducing the retained layer grid, the problem of slits easily appearing in the existing method is solved, and it can effectively ensure that the slits after the boundary layer grid is generated will not be too large.
[0052] For the first time, a rigid mapping method is proposed to generate boundary layer meshes. This method has higher average mesh quality than traditional methods.
[0053] This method innovatively introduces rigid mapping into layered viscous mesh generation and uses auxiliary isotropic tetrahedral meshing techniques to prevent negative elements. The introduction of these techniques theoretically allows for high-quality full-layer viscous mesh generation with guaranteed positive volumes under arbitrary input. Furthermore, this application presents the generation of a discretized target triangular prism mesh and a rigid-body transformed initial triangular prism mesh. Furthermore, by introducing adaptive vertical discretization of the target triangular prism mesh adjustment and multi-normal configuration, the quality of the viscous mesh is significantly improved.
[0054] An embodiment of the present invention provides a fully automatic triangular prism boundary layer mesh generation method based on rigid mapping, which can process three-dimensional models with complex corner points such as wing-body assemblies and U-shaped boxes to form a triangular prism boundary layer mesh that ensures that the mesh volume is positive. The following takes a wing-body assembly as an example to explain the method of the present application in detail. The remaining three-dimensional models will not be described one by one here.
[0055] In a specific implementation of S1: obtaining an input surface triangular mesh, boundary conditions, and generation parameters, classifying the surface triangular mesh according to the boundary conditions, and obtaining a surface triangular mesh with object boundary conditions and a surface triangular mesh with far-field boundary conditions; this step may include the following sub-steps:
[0056] S11: Obtain an input surface triangle mesh, where the input surface triangle mesh is a closed solid surface graph;
[0057] Specifically, a closed surface triangular mesh is generated using a surface discretization method. The input surface triangular mesh must be valid. A valid input surface mesh is closed, has no non-two-edge flow patterns, and cannot have self-intersections. Surface discretization is a necessary step in mesh generation, and triangulation facilitates the subsequent generation of a triangular prism mesh.
[0058] Taking the wing-body assembly as an example, a closed surface mesh of the wing-body assembly surface is obtained, and the surface mesh is discretized into triangles to obtain a closed surface triangular mesh.
[0059] S12: Classifying the input surface triangular mesh according to the boundary conditions to obtain a surface triangular mesh with an object surface boundary condition and a surface triangular mesh with a far-field boundary condition, wherein the boundary conditions are divided into two types: object surface and far-field boundary conditions;
[0060] Specifically, boundary conditions are properties attached to the input surface triangle mesh. Boundary conditions are the object plane and the far field. The object plane typically refers to the simulation region where fluid passing through the object will adhere to the object's surface. The far field typically refers to the region of the actual object in the simulation. Boundary layer meshes are generated only on the surface triangle mesh corresponding to the object plane boundary conditions, not on the surface triangle mesh corresponding to the far field boundary conditions.
[0061] Taking the wing-body assembly as an example, according to the boundary conditions input by the user, the curved triangular mesh on the surface of the wing-body assembly is set as the object surface mesh, and the curved triangular mesh in the distance is set as the remote mesh.
[0062] In a specific implementation of S2: generating a discrete target triangular prism mesh based on the input surface triangular mesh, generation parameters, and the object surface boundary condition surface triangular mesh; this step may include the following sub-steps:
[0063] S21: For each surface unit of the object surface boundary condition surface triangular mesh, a multiple of the total height of the boundary layer mesh according to the generation parameter is used as the height of the triangular prism mesh, and the area of the input surface triangular mesh is used as the size of the base triangle to generate discrete target triangular prism mesh units. The bottom unit of the discrete target triangular prism mesh unit is recorded as the surface unit of the input surface triangular mesh. The total number of generated layers is .
[0064] Specifically, the discrete target triangular prism mesh is a set of ideal quadrilateral meshes, which defines the final target of the initial triangular prism mesh in the rigid mapping iteration. Therefore, the design of the discrete target triangular prism mesh will directly determine the effect of the final mesh. The base triangle size of the discrete target triangular prism mesh and the height of the prism mesh are defined as the horizontal size and vertical size respectively. The horizontal size is The vertical dimension H is determined by the surface area of the corresponding input surface triangle mesh, while the vertical dimension H is determined by the height of the triangular prism mesh.
[0065] Taking the wing-body assembly as an example, the triangles of the triangular mesh of the wing-body assembly surface are used as the base, and three times the total height of the boundary layer mesh of the user-generated parameters are used as the target triangular prism mesh unit for the high generation discretization of the triangular prism mesh, and a total layer is generated.
[0066] In a specific implementation of S3: based on the input surface triangular mesh, boundary conditions, and generation parameters, an initial triangular prism mesh is generated on the object plane boundary condition surface triangular mesh; after the initial triangular prism mesh is generated, an isotropic auxiliary tetrahedral mesh is generated between the initial triangular prism mesh and the far-field boundary condition surface triangular mesh; this step may include the following sub-steps:
[0067] S31: On the object surface boundary condition curved triangle mesh, the average normal direction of each curved triangle where the mesh point is located is used as the growth normal direction, and the height of three times the total height of the boundary layer mesh according to the generation parameters is used as the growth step to generate the initial triangular prism mesh, and the total number of generated layers is , the bottom unit of the initial triangular prism grid unit is recorded as the surface unit of the input surface triangular grid;
[0068] Specifically, for each grid point, the grid point belongs to one or more grid surfaces. Because the curved triangular grid is a closed curved grid, the present invention can determine the direction of boundary layer growth. The direction of the angle bisector of the normal direction of the grid surface where each grid point is located in the boundary layer growth space is used as the normal direction, and the height of three times the total height of the boundary layer grid according to the generation parameters is used as the growth step to generate the grid. A total of The purpose of this step is to obtain a basic initial triangular prism mesh.
[0069] Taking the wing-body assembly as an example, for the grid points of the triangular mesh on the curved surface of the wing-body assembly model, the angle bisector direction of the normal direction of the mesh surface where each grid point is located is used as the growth normal direction of the boundary layer. Three times the total height of the boundary layer mesh input by the user is used as the growth step size to generate the initial triangular prism mesh, and a total of 1 layer is generated.
[0070] S32: performing self-intersection detection and mesh quality detection on the initial triangular prism mesh. If the mesh has self-intersection or the mesh volume is negative, reducing the growth step size and regenerating the initial triangular prism mesh.
[0071] Specifically, the growth step size is continuously reduced until the initial triangular prism grid does not have self-intersection. In general, it can be divided into:
[0072] (1) Detecting grid self-intersection
[0073] (2) If the mesh has self-intersection, compress the growth step, regenerate the mesh, and repeat (1).
[0074] After several iterations, the growth step size is compressed, and the mesh height becomes smaller. The growth stops when there are no boundary layer mesh self-intersections in the initial triangular prism mesh. To ensure mesh quality, the initial triangular prism mesh must not have self-intersections or negative mesh volumes.
[0075] Taking the wing-body assembly as an example, the initial triangular prism mesh generated in S31 is tested for self-intersection and quality. If the mesh self-intersects or has a negative mesh volume, the growth step size is reduced to 1 / 10,000, and the initial triangular prism mesh is regenerated. The self-intersection and quality checks are repeated until the initial triangular prism mesh contains no boundary layer self-intersections.
[0076] S33: Generate the isotropic auxiliary tetrahedral mesh between the initial triangular prism mesh and the far-field boundary condition surface triangular mesh using the Delaunay tetrahedralization method.
[0077] Specifically, generating a tetrahedral mesh using the Delaunay tetrahedralization method requires two boundaries:
[0078] (1) Far-field boundary condition surface triangular mesh.
[0079] (2) The outermost surface grid of the initial boundary layer grid, that is, the collection of the top surfaces of the first triangular prism grid.
[0080] Between the two boundaries, a full tetrahedral mesh is generated using the Delaunay tetrahedronization method. The advantage of this design is that the Delaunay tetrahedronized mesh always maintains a positive volume during mesh deformation, which ensures that the boundary layer mesh has no self-intersections.
[0081] Taking the wing-body assembly as an example, the Delaunay tetrahedronization method is used to generate an isotropic auxiliary tetrahedral mesh between the initial triangular prism mesh and the far-field boundary condition surface triangular mesh.
[0082] In a specific implementation of S4: based on the initial triangular prism grid and the discrete target triangular prism grid, a mapping energy equation between the discrete target triangular prism grid and the initial triangular prism grid is established with the grid point coordinates of the initial triangular prism grid as variables, and the extreme value points of the equation are obtained by differentiating the mapping energy equation; this step may include the following sub-steps:
[0083] S41: dividing the initial triangular prism grid and the discrete target triangular prism grid into tetrahedron grids, wherein the dividing refers to dividing the initial triangular prism grid and the discrete target triangular prism grid into 12 tetrahedrons according to four points of the triangular prism grid that can form a tetrahedron;
[0084] Specifically, both the initial triangular prism grid and the discrete target triangular prism grid have six points. There are 12 ways to select four non-coplanar points from the six points. The triangular prism grid can be divided into 12 tetrahedrons according to these methods. Figure 2 This shows how to split a triangular prism grid. The twelve tetrahedrons overlap with each other. The advantage of this is that we only need to keep the volume of the tetrahedrons positive to ensure that the volume of the final triangular prism grid is positive.
[0085] Taking the wing-body assembly as an example, according to the method described in S41, the initial triangular prism grid and the discrete target triangular prism grid are divided into 12 tetrahedrons.
[0086] S42: establishing a one-to-one correspondence between the initial triangular prism grid and the discrete target triangular prism grid as a tetrahedral grid, wherein the initial triangular prism grid and the discrete target triangular prism grid are located in the same layer of the tetrahedral grid, and the bottom unit of the initial triangular prism grid unit and the bottom unit of the discrete target triangular prism grid unit are the same unit, and establishing a one-to-one correspondence between the 12 tetrahedrons divided by the initial triangular prism grid and the discrete target triangular prism grid;
[0087] Specifically, the initial triangular prism grid and the discrete target triangular prism grid have the same number of grid cells, both of which are 1 layer. The bottom cell of the discrete target triangular prism grid refers to the surface grid cell used in the lateral dimension calculation, while the bottom cell of the initial triangular prism grid refers to the surface grid cell where the first layer cell of the initial triangular prism grid is located. When the initial triangular prism grid cell and the target triangular prism grid cell have the same bottom cell and are in the same layer, the 12 tetrahedral grid cells divided from the two triangular prism grid cells also correspond one to one.
[0088] Taking the wing-body assembly as an example, a one-to-one correspondence is established between the initial triangular prism grid and the 12 tetrahedrons divided into the discrete target triangular prism grid, which are located in the same layer and have the same bottom unit.
[0089] S43: For the tetrahedron in the initial triangular prism grid unit and the tetrahedron in the discrete target triangular prism grid unit, calculate the tetrahedron deformation Jacobian matrix by derivation ;
[0090] Specifically, for any one-to-one tetrahedron correspondence, assuming that the tetrahedron in the initial triangular prism grid unit is , the tetrahedron in the tetrahedron of the discrete target triangular prism grid unit is , for The matrix obtained by taking the Cartesian coordinates of the four points in f and derivatizing them with respect to the Cartesian coordinates of the four points in f. arrive The affine transformation of , the Jacobian matrix can be expressed as:
[0091]
[0092] For the auxiliary isotropic tetrahedral grid, the present invention makes a one-to-one correspondence between it and a regular tetrahedron of the same volume. In this way, all tetrahedral grids have their one-to-one corresponding discrete tetrahedral grids.
[0093] S44: Use the singular value decomposition method to decompose the Jacobian matrix J into ;
[0094] S45: Calculate the rotation matrix , and define the energy equation as , where W is the proxy matrix and the subscript F is the F-norm;
[0095] Specifically, the definition of rigid distortion energy has been extensively studied in the field of mesh deformation and surface parameterization. , the mapping energy can be defined as:
[0096]
[0097] in is the distortion energy of each simplex. Slightly different from the application of parameterization or mesh deformation, the present invention does not require weight coefficients such as mesh area, because the contribution of the mass of each unit of the boundary layer mesh to the simulation can be considered equal. This physical property determines that an equation with equal weight is sufficient. R is the closest The rotation of The idea of finding the closest rotation R is that if the present invention uses SVD decomposition , represents the rotation matrix, and represents the scaling matrix, and the values on its diagonal reflect the scaling ratios in the directions of different eigenvectors. An advantage of this energy is that it can be solved in linear time via the Local / Global method.
[0098] Here the W matrix is the proxy matrix:
[0099]
[0100] in is the symmetric Dirichlet energy, which is a rigid mapping distortion energy form:
[0101]
[0102] In order to ensure that the area of the auxiliary tetrahedron mesh is positive, the present invention makes certain corrections to the equation in the implementation. In fact, the equation solved by the present invention is a modified equation that takes into account the auxiliary isotropic tetrahedron. It is widely used to solve the global intersection problem of mesh deformation. As long as the volume of the isotropic auxiliary tetrahedron is greater than 0, the final mesh will not have self-intersection.
[0103]
[0104]
[0105] .
[0106] in is the mapping of the isotropic auxiliary grid to the isotropic regular tetrahedron, It is a very small value, the default value is 1e-7. A(·) is the area.
[0107] S46: Use The grid point coordinates in the initial triangular prism grid are differentiated to obtain the extreme value points of the energy equation.
[0108] Specifically, in the energy equation In the present invention, if an iterative method is used, J can be set as an unknown quantity, that is, at the kth iteration, W and R are calculated in advance, so that the equation is the F norm of J, which is recorded as:
[0109]
[0110] The energy equation is then A quadratic equation, after differentiation, is a linear equation, which can be obtained by solving the linear equation system The extreme point of .
[0111] Taking the wing-body assembly as an example, during steps S43-S46, the tetrahedron of the initial triangular prism mesh and the tetrahedron of the discrete target triangular prism mesh are differentiated to calculate the tetrahedron Jacobian matrix J, and the differentiation is iterated.
[0112] In a specific implementation of S5: according to the coordinates of the initial triangular prism grid point and the coordinates of the equation extreme value grid point, the grid point coordinates are determined using a linear detection method in the two coordinates, so that the tetrahedral grid volume of the isotropic auxiliary tetrahedral grid at the grid point coordinates is positive; this step may include the following sub-steps:
[0113] S51: Based on the initial triangular prism grid point coordinates The coordinates of the extreme grid points of the equation , calculate the direction vector from the coordinates of the initial triangular prism grid point to the coordinates of the extreme grid point of the equation ;
[0114] Specifically, is linearly related to the coordinates of the initial triangular prism grid points, so the solution is At the same time, the coordinates of the extreme points of the equation are also solved The present invention assumes that the coordinates of the last iteration are , then subtract to get the direction vector.
[0115] S52: Iterative triangular prism grid point coordinates are defined as , using the dichotomy method From 0 to 1, the binary detection is used to find the largest , so that if used Instead of grid point coordinates, the volumes of the tetrahedrons decomposed from the initial triangular prism grid are all positive.
[0116] Specifically, if you directly use As the new coordinates, it is possible that the volume of the tetrahedron is negative. and Find the closest one among the connections between of ,this Two conditions must be met:
[0117] (1) The volume of all tetrahedrons is positive;
[0118] (2) Decreased energy value;
[0119] The present invention uses the bisection method to solve the corresponding point coordinates.
[0120] Taking the wing-body assembly as an example, according to the initial triangular prism grid point coordinates The coordinates of the extreme grid points of the equation , subtract the two to get the direction vector , iterative triangular prism grid point coordinates , use the binary search method to find the largest , so that if we use Instead of grid point coordinates, the volumes of the tetrahedrons decomposed from the initial triangular prism grid are all positive.
[0121] In a specific implementation of S6: according to the generation parameters, if the rigid mapping energy equation has not converged, repeating S4-S5, and if the energy has converged, retaining the initial triangular prism grid as the intermediate triangular prism grid;
[0122] Specifically, the present invention uses a local / global iteration method. This method decomposes the global deformation energy optimization into local and global linear calculations, making it possible to optimize the global energy by solving only the linear system. The iteration is decomposed into two steps: S4 and S5, where S4 is the local iteration and S5 is the global iteration.
[0123] (1) Local iteration: Calculate the rotation matrix closest to the tetrahedron f U and V are the first and third parts of the Jacobian SVD decomposition) and the surrogate matrix W.
[0124] (1) Global Iteration: Solve the global linear equation that minimizes the rigid distortion energy. Use linear search to find the coordinates of the positive-preserving area close to the optimal solution.
[0125] Taking the wing-body assembly as an example, if the rigid mapping energy equation does not converge, S4-S5 are repeated to iterate the initial triangular prism grid until the initial triangular prism grid converges, and the initial triangular prism grid is retained as the intermediate triangular prism grid.
[0126] In the specific practice of S7: reconstructing the prism grid according to the intermediate triangular prism grid and the generation parameters, and then generating a number of non-negative volume triangular prism units required by the generation parameters between the bottom grid and the top grid using the Hermite interpolation algorithm to obtain a final triangular prism grid; this may specifically include the following sub-steps:
[0127] S71: The bottom triangular faces of all prisms are defined as the bottom mesh, and the top triangular faces are defined as the top mesh. The mesh quality is optimized and reconstructed through triangular prism splitting, triangular prism swapping, triangular prism folding, and triangular prism vertex moving methods.
[0128] Specifically, the bottom triangular face of the middle triangular prism is defined as the bottom mesh, and the top triangular face is defined as the top mesh. The mesh is reconstructed through the following four operations:
[0129] Triangular prism segmentation ( Figure 3 (a) in the figure): When the combined length of the base and corresponding top edge of a triangular prism exceeds twice the required size, we try inserting a midpoint between the long bottom and top edges. This point is then projected onto the coarse mesh to maintain the shape conformity of the fault mesh, followed by topological region connection, dividing the two triangular prism meshes into four triangular prisms.
[0130] Triangular prism exchange ( Figure 3 (b) in Figure 1): Two adjacent triangular prisms can exchange faces to form two new triangular prisms.
[0131] Triangular prism folding ( Figure 3 (c) in Figure 1): When the base and corresponding top edge of a triangular prism are less than half of the desired size, we try to collapse the two triangular prisms that share that edge.
[0132] Triangular prism vertex movement ( Figure 3 (d) in Figure 2): For a vertex in a triangular prism, its position is recalculated based on the surface triangle shared by the vertex.
[0133] The advantage of doing this is that the mesh quality can be optimized, ensuring that the volume of the triangular prism mesh is positive, there is no self-intersection, and the shape integrity is maintained.
[0134] Taking the wing-body assembly as an example, for the intermediate triangular prism mesh, since there is only one mesh layer, the bottom triangle is defined as the bottom volume, and the top triangular face is defined as the top mesh. The triangular prism mesh is reconstructed through triangular prism splitting, swapping, folding, and vertex movement.
[0135] S72: generating, by a Hermite interpolation algorithm, a number of non-negative volume triangular prism units required according to the generation parameters between the bottom grid and the top grid;
[0136] Specifically: given the growth ratio required by the bottom mesh vertices, a Hermite interpolation curve is constructed between the top mesh vertices and the bottom mesh vertices as an equation, and the non-negative volume triangular prism units required by the generation parameters are generated by interpolation in the middle triangular prism mesh.
[0137] Taking the wing-body assembly as an example, the required growth ratio of the bottom mesh vertices is determined according to the number of boundary layers in the user-generated parameters, and an Emilian interpolation curve is constructed between the top mesh vertices and the bottom mesh vertices. According to the curve function, the middle triangular prism mesh is interpolated to generate the number of non-negative volume triangular prism units required by the generation parameters.
[0138] In a specific implementation of S8: deleting the reserved layer mesh, which is the outermost layer of the final triangular prism mesh, and refilling the remaining portion with an isotropic auxiliary tetrahedral mesh; this step may include the following sub-steps:
[0139] S81: After completing S7, deleting the outermost layer of the final triangular prism mesh to ensure that there is enough space for generating an isotropic tetrahedral mesh;
[0140] Specifically, in general, a common problem with boundary layer meshes using the frontier layering method is that the gaps left by the anisotropic mesh after generation are too small, making it difficult to generate a high-quality isotropic mesh in the remaining space. Therefore, the present invention has made a special design. The top layer of the boundary layer mesh, that is, the uppermost layer, is used as a retention layer to avoid narrow gaps. When generating isotropic tetrahedrons, the mesh of the retention layer will be deleted to increase the gap. Obviously, a gap height of at least two retention layers will be retained between any boundary layer meshes. The present invention uses the control parameter To control the ratio of the height of the reserved layer to the default height. Figure 4 Shows =0.1 and = 2. The advantage of this is that it provides enough gaps to ensure high-quality isotropic mesh generation.
[0141] Taking the wing-body assembly as an example, the outermost layer of the final triangular prism grid is deleted.
[0142] S82: Generate an isotropic tetrahedral mesh in the final triangular prism mesh and the far-field boundary condition surface triangular mesh using a Delaunay tetrahedralization method.
[0143] Specifically, after removing the retained layer, the present invention uses Delaunay tetrahedralization to generate an isotropic tetrahedral mesh to fill the remaining domain. Slightly different from the auxiliary isotropic tetrahedral mesh, this mesh is appropriately densified so that the volume difference between adjacent tetrahedral elements is less than 20%. Compared to the auxiliary isotropic tetrahedral mesh, this mesh size is significantly increased, potentially making it more advantageous for simulation calculations.
[0144] Taking the wing-body assembly as an example, after deleting the retained layer triangular prism mesh, the Delaunay tetrahedralization method is used to generate an isotropic tetrahedral mesh between the final triangular prism mesh and the remote boundary condition surface triangular mesh.
[0145] The present invention will be further described below by way of examples:
[0146] Example 1:
[0147] In this embodiment, in order to verify the method of the present application, a complex configuration of a three-dimensional U-shape was tested. Figure 5The initial triangular prism mesh and the discretized target triangular prism mesh at different iteration numbers are shown. In this example, after 100 iterations, the mesh quality at narrow gaps improves as the discretized target triangular prism mesh height decreases. Figure 6 shows the final quadrilateral boundary layer mesh, with gap details shown in the two bottom subfigures. The proposed algorithm can handle narrow gaps at the junctions of different components.
[0148] Example 2:
[0149] The surface mesh of the wing-body assembly model is as follows: Figure 8 As shown. This initial surface mesh contains 61,906 mesh points and 123,816 triangular mesh elements. In the input parameters of the wing-body assembly Mesh A, the initial layer height weight is 0.00119, the number of layers is configured as 40, and the desired height of the boundary layer mesh is set to 20. This model is known for generating prismatic meshes with three complex corners: Corner 1 is located at the junction of the engine top and the wing, that is, Figure 8 The middle A frame part; Corner 2 is located at the intersection of the engine and tail, hidden under the wing, that is, Figure 8 The middle B frame part; corner 3 is the intersection of the wing and the fuselage, that is Figure 8 The C-boxed area. To facilitate comparison with Pointwise, this paper uses the mesh generation algorithm described in this paper and the T-Rex technique used by Pointwise. For fairness, both methods use the same input method and the surface mesh generation engine included in Pointwise. Figure 9 A comparison of three complex corners in a wing-body assembly model is illustrated, which are notoriously challenging for boundary layer mesh generation. Figure 9 The left side shows the mesh generated by the algorithm presented in the present invention, while the right side shows the mesh generated by pointwise. It is clear that the algorithm presented in the present invention achieves a more complete prismatic mesh generation at these complex corners. This is particularly evident at the third complex corner, where the T-Rex technique produces a conflict at the intersection of the wings and the wings. This comparison emphasizes the robustness of the mesh algorithm proposed in the present invention in handling complex x-geometric features that traditional methods may make mistakes. In order to evaluate the mesh quality, we use the metrics under the "Inspect" menu in the pointwise diagram to evaluate and record the worst mesh quality produced by the meshes generated by the algorithm discussed in the present invention and T-Rex. As shown in Figure 7 As shown, except for the maximum cell non-orthogonality metric, the mesh quality of the prism + pyramid mesh generated by the method of the present invention is slightly inferior. The reason is that this discrete mesh may be attributed to the compromise of the mesh structure quality, which is required to accommodate the genetic principle of the complex corner full-layer prismatic mesh structure.
[0150] Another interesting observation is that when examining these worst quality tetrahedral meshes, the tetrahedral meshes generated using point lines are all located at the interface between the boundary layer mesh and the tetrahedral mesh, and particularly near the three complex corners mentioned above.
[0151] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the contents disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered merely as exemplary, and the true scope and spirit of the present application are indicated by the claims.
[0152] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A fully automatic triangular prism boundary layer mesh generation method based on dual-objective mapping, characterized in that: include: S1: Obtaining an input surface triangular mesh, boundary conditions, and generation parameters, and classifying the surface triangular mesh according to the boundary conditions to obtain a surface triangular mesh with an object boundary condition and a surface triangular mesh with a far-field boundary condition, wherein the input surface triangular mesh is a closed solid surface graph; S2: generating a discrete target triangular prism mesh according to the input surface triangular mesh, generation parameters and the surface triangular mesh under the object surface boundary condition; S3: generating an initial triangular prism mesh on the object surface boundary condition surface mesh according to the input surface triangular mesh, boundary conditions and generation parameters, and generating an isotropic auxiliary tetrahedral mesh between the initial triangular prism mesh and the far-field boundary condition surface triangular mesh; S4: Based on the initial triangular prism grid and the discrete target triangular prism grid, a rigid mapping energy equation is established between the discrete target triangular prism grid and the initial triangular prism grid, with the grid point coordinates in the initial triangular prism grid as variables, and the coordinates of the extreme grid points of the equation are derived by taking the derivative of the rigid mapping energy equation with respect to the initial triangular prism grid point coordinates; S5: determining the coordinates of the grid points using a linear probing method based on the coordinates of the initial triangular prism grid points and the coordinates of the extreme value grid points of the equation, so that the tetrahedral grid volumes of the isotropic auxiliary tetrahedral grid at the coordinates of the grid points are all positive; S6: According to the generation parameters, if the rigid mapping energy equation has not converged, repeat S4-S5; if the energy has converged, retain the initial triangular prism grid as the intermediate triangular prism grid; S7: reconstructing the prism grid according to the intermediate triangular prism grid and the generation parameters, and then generating a number of non-negative volume triangular prism units required by the generation parameters between the bottom grid and the top grid using a Hermite interpolation algorithm to obtain a final triangular prism grid; S8: deleting the reserved layer mesh, which is the outermost layer of the final triangular prism mesh, and refilling the remaining part with an isotropic auxiliary tetrahedral mesh.
2. The method according to claim 1, characterized in that Obtaining input surface triangular meshes, boundary conditions, and generation parameters, classifying the surface triangular meshes according to the boundary conditions, and obtaining surface triangular meshes with object boundary conditions and surface triangular meshes with far-field boundary conditions, specifically including: S11: Obtain an input surface triangle mesh, where the input surface triangle mesh is a closed solid surface graph; S12: Classifying the input surface triangular mesh according to the boundary conditions to obtain a surface triangular mesh with an object surface boundary condition and a surface triangular mesh with a far-field boundary condition, wherein the boundary conditions are divided into two types: object surface and far-field boundary conditions.
3. The method according to claim 1, characterized in that Generating a discrete target triangular prism mesh according to the input surface triangular mesh, generation parameters and the surface triangular mesh under the object surface boundary condition, specifically comprising: For each surface unit of the object surface boundary condition surface triangular mesh, three times the total height of the boundary layer mesh according to the generation parameters is used as the height of the triangular prism mesh, and the area of the input surface triangular mesh is used as the size of the base triangle to generate discrete target triangular prism mesh units. The bottom unit of the discrete target triangular prism mesh unit is recorded as the surface unit of the input surface triangular mesh. The total number of generated layers is .
4. The method according to claim 1, wherein According to the input surface triangular mesh, boundary conditions and generation parameters, an initial triangular prism mesh is generated on the object surface boundary condition triangular mesh. After the initial triangular prism mesh is generated, an isotropic auxiliary tetrahedral mesh is generated between the initial triangular prism mesh and the far-field boundary condition triangular mesh. Specifically, the method includes: S31: On the object plane boundary condition curved surface triangular mesh, taking the average normal of each curved surface triangle where the mesh point is located as the growth normal, and using a height that is multiple times the total height of the boundary layer mesh according to the generation parameter as the growth step to generate the initial triangular prism mesh, counting the number of generation layers as 1, and recording the bottom unit of the initial triangular prism mesh unit as the face unit of the input curved surface triangular mesh; S32: performing self-intersection detection and mesh quality detection on the initial triangular prism mesh; if the mesh has self-intersection or the mesh volume is negative, reducing the growth step size and regenerating the initial triangular prism mesh; S33: Generate the isotropic auxiliary tetrahedral mesh between the initial triangular prism mesh and the far-field boundary condition surface triangular mesh using the Delaunay tetrahedralization method.
5. The method according to claim 1, wherein According to the initial triangular prism grid and the discrete target triangular prism grid, a mapping energy equation between the discrete target triangular prism grid and the initial triangular prism grid is established with the grid point coordinates of the initial triangular prism grid as variables, and the extreme value points of the equation are obtained by differentiating the mapping energy equation, specifically including: S41: dividing the initial triangular prism grid and the discrete target triangular prism grid into tetrahedral grids, wherein the dividing refers to dividing the initial triangular prism grid and the discrete target triangular prism grid into 12 tetrahedrons according to four points that can form a quadrilateral in the triangular prism grid; S42: establishing a one-to-one correspondence between the initial triangular prism grid and the discrete target triangular prism grid as a tetrahedral grid, wherein the initial triangular prism grid and the discrete target triangular prism grid are located in the same layer of the tetrahedral grid, and the bottom unit of the initial triangular prism grid unit and the bottom unit of the discrete target triangular prism grid unit are the same unit, and establishing a one-to-one correspondence between the 12 tetrahedrons divided by the initial triangular prism grid and the discrete target triangular prism grid; S43: For the tetrahedron in the initial triangular prism grid unit The tetrahedron deformation Jacobian matrix is calculated by taking the derivative of the tetrahedron in the target triangular prism grid unit. ; S44: Use the singular value decomposition method to decompose the Jacobian matrix J into ; S45: Calculate the rotation matrix , and define the energy equation as , where W is the proxy matrix and the subscript F is the F-norm; S46: Use The grid point coordinates in the initial triangular prism grid are differentiated to obtain the extreme value points of the energy equation.
6. The method according to claim 1, characterized in that According to the coordinates of the initial triangular prism grid points and the coordinates of the extreme value grid points of the equation, the grid point coordinates are determined using a linear detection method in the two coordinates so that the tetrahedral grid volume of the isotropic auxiliary tetrahedral grid at the grid point coordinates is positive, specifically including: S51: Based on the initial triangular prism grid point coordinates The coordinates of the extreme grid points of the equation , calculate the direction vector from the coordinates of the initial triangular prism grid point to the coordinates of the extreme grid point of the equation ; S52: Iterative triangular prism grid point coordinates are defined as , using the dichotomy method From 0 to 1, the binary detection is used to find the largest , so that if used Instead of grid point coordinates, the volumes of the tetrahedrons decomposed from the initial triangular prism grid are all positive.
7. The method according to claim 1, characterized in that Reconstructing the prism grid according to the intermediate triangular prism grid and the generation parameters, and then generating a number of non-negative volume triangular prism units required by the generation parameters between the bottom grid and the top grid using the Hermite interpolation algorithm to obtain a final triangular prism grid, specifically comprising: S71: The bottom triangular faces of all prisms are defined as the bottom mesh, and the top triangular faces are defined as the top mesh. The mesh quality is optimized and reconstructed through triangular prism splitting, triangular prism swapping, triangular prism folding, and triangular prism vertex moving methods. S72: Through the Hermite interpolation algorithm, a Hermite curve is generated between the bottom grid and the top grid according to the growth step size in the generation parameters as an equation, the coordinates of the vertices of the triangular prism grid are determined by the parameter interpolation of the Hermite algorithm, and the required number of non-negative volume triangular prism units are generated to obtain the final triangular prism grid.
8. The method according to claim 1, characterized in that Deleting the retained layer mesh, which is the outermost layer of the final triangular prism mesh, and refilling the remaining portion with the isotropic auxiliary tetrahedral mesh, specifically includes: S81: deleting the outermost layer of the final triangular prism mesh to ensure that there is enough space for generating an isotropic tetrahedral mesh; S82: Generate an isotropic tetrahedral mesh in the final triangular prism mesh and the far-field boundary condition surface triangular mesh using a Delaunay tetrahedralization method.
Citation Information
Patent Citations
Viscous boundary flow field numerical simulation-oriented boundary layer grid generation method
CN115758938A
Full-automatic quadrilateral boundary layer grid generation method based on rigid mapping
CN116563490A