Full-automatic triangular prism boundary layer grid generation method based on double-target mapping
By introducing dual-objective mapping and rigid mapping energy equations into the traditional surface layer mesh generation algorithm, combined with isotropic auxiliary tetrahedral mesh, the problem of difficult to generate high-quality full-layer triangular mesh in three-dimensional space in traditional methods is solved, and global optimal grid quality and flexible algorithm design are achieved.
Patent Information
- Application Number
- CN202411870996.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-18
AI Technical Summary
Traditional surface layer grid generation algorithms are difficult to generate high-quality full-layer triangular prism grids in three-dimensional space, and there are problems such as poor normal generation quality, transition unit problems, and difficulty in filling grids after intersecting.
A robust full-layer triangular prism mesh generation method based on dual-objective mapping is adopted. By establishing a rigid mapping energy equation between discrete target triangular prism mesh and the initial triangular prism mesh, the grid deformation problem is transformed into a global optimal problem, and an isotropic auxiliary tetrahedral mesh is used to prevent self-intersecting.
The global optimal grid quality is achieved, the self-intersection problem is prevented, the algorithm flexibility is enhanced, the number of layers between adjacent grid cells is consistent, and the slit problem is effectively avoided.
Smart Images

Figure CN119888128A_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 the traditional boundary layer mesh generation algorithms, the most widely used method is the frontier layering method. This method is based on the idea of local greed and grows the boundary layer mesh in a layered manner according to user input. Once global intersection or low mesh quality occurs, the boundary layer mesh growth is stopped locally and the transition unit is filled. This algorithm is widely used in the industry because of its flexibility in local operations, algorithm robustness and ease of implementation. The boundary layer mesh generation modules of companies including Ansys and Siemens are based on this algorithm.
[0003] However, the traditional boundary layer mesh generation algorithm has problems such as poor normal generation quality and transition units. In three dimensions, it is still difficult to generate high-quality boundary layer triangular prism meshes. It is difficult to ensure that the boundary layer mesh generated by the classic frontier advancing algorithm is full-layer because its intersection is unknown. The algorithm designer needs to deal with how to fall back when an intersection occurs, which will make it difficult to fill in isotropic tetrahedrons. At the same time, the normals of the classic frontier advancing method are usually generated according to a local method, and the mesh quality is usually locally optimal.
[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0005] 1. The mesh quality of local methods is usually not globally optimal;
[0006] 2. The classical frontier progression method is difficult to handle the grid filling problem after intersection, and it is easy to have narrow gaps;
[0007] 3. The classical frontier layering method requires deleting the 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 grid formation 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 surface boundary condition and a surface triangular mesh with a far-field boundary condition, wherein the input surface triangular mesh is a closed solid surface image;
[0011] S2: Generate 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, and 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: According to the initial triangular prism grid and the discrete target triangular prism grid, taking the grid point coordinates in the initial triangular prism grid as variables, establishing a rigid mapping energy equation between the discrete target triangular prism grid and the initial triangular prism grid, and taking the derivative of the initial triangular prism grid point coordinates through the rigid mapping energy equation to obtain the equation extreme grid point coordinates;
[0014] S5: according to the coordinates of the initial triangular prism grid point and the coordinates of the equation extreme grid point, a linear detection method is used to determine the coordinates of the grid point in the two coordinates, so that the tetrahedral grid volume of the isotropic auxiliary tetrahedral grid under the coordinates of the grid point is positive;
[0015] S6: according to the generation parameters, if the rigid mapping energy equation has not converged, repeat S4-S5, and 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 by using the 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 solution 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 a discrete target triangular prism grid and an 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 self-intersection of the boundary layer mesh can be prevented robustly, 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 reserved layer grid, the problem of slits that are prone to occur 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. Compared with traditional methods, this method has higher average mesh quality.
[0025] This method innovatively introduces rigid mapping into hierarchical viscous mesh generation and uses auxiliary isotropic tetrahedral mesh technology to prevent negative elements. The introduction of these technologies makes it theoretically possible to guarantee high-quality full-layer viscous mesh generation of positive volumes under arbitrary inputs. At the same time, this application gives the generation of discrete target triangular prism meshes and rigid body transformation initial triangular prism meshes. In addition, by introducing adaptive vertical discretization of 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] Fig. 1 is a flow chart showing a method for fully automatic triangular prism boundary layer mesh generation 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] Fig. 3 is a schematic diagram of a triangular prism grid optimization operation according to an exemplary embodiment, showing four basic operations performed on a triangular prism grid.
[0031] Figure 4 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 5The diagram shows 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 The figure is a comparison diagram between a U-shaped prismatic boundary layer mesh generated by using the present invention and a pointwise generated mesh according to an exemplary embodiment.
[0034] Figure 7 The figure shows the mass distribution of a U-shaped prismatic boundary layer mesh and a pointwise generated mesh 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] Fig. 9 The same algorithm for triangular surface mesh generation is used in the wing-body assembly model to compare the complex corner details. The left panel shows the wing-body assembly mesh A, while the right panel shows the one generated by pointwise. The images from top to bottom represent corners 1 to 3, respectively. DETAILED DESCRIPTION
[0037] Here, exemplary embodiments will be described in detail. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0038] FIG1 is a flow chart of 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 surface boundary condition and a surface triangular mesh with a far-field boundary condition, wherein the input surface triangular mesh is a closed solid surface image;
[0040] S2: Generate 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, and 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: According to the initial triangular prism grid and the discrete target triangular prism grid, taking the grid point coordinates in the initial triangular prism grid as variables, establishing a rigid mapping energy equation between the discrete target triangular prism grid and the initial triangular prism grid, and taking the derivative of the initial triangular prism grid point coordinates through the rigid mapping energy equation to obtain the equation extreme grid point coordinates;
[0043] S5: according to the coordinates of the initial triangular prism grid point and the coordinates of the equation extreme grid point, a linear detection method is used to determine the coordinates of the grid point in the two coordinates, so that the tetrahedral grid volume of the isotropic auxiliary tetrahedral grid under the coordinates of the grid point is positive;
[0044] S6: according to the generation parameters, if the rigid mapping energy equation has not converged, repeat S4-S5, and 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 by using the 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 a discrete target triangular prism grid and an 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 self-intersection of the boundary layer mesh can be prevented robustly, 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 reserved layer grid, the problem of slits that are prone to occur 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. Compared with traditional methods, this method has higher average mesh quality.
[0053] This method innovatively introduces rigid mapping into hierarchical viscous mesh generation and uses auxiliary isotropic tetrahedral mesh technology to prevent negative elements. The introduction of these technologies makes it theoretically possible to guarantee high-quality full-layer viscous mesh generation of positive volumes under arbitrary inputs. At the same time, this application gives the generation of discrete target triangular prism meshes and rigid body transformation initial triangular prism meshes. In addition, by introducing adaptive vertical discretization of target triangular prism mesh adjustment and multi-normal configuration, the quality of the viscous mesh is significantly improved.
[0054] A fully automatic triangular prism boundary layer mesh generation method based on rigid mapping provided in an embodiment of the present invention can process three-dimensional models with complex corner points such as wing-fuselage combinations 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-fuselage combination 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 the specific implementation of S1: obtaining input surface triangular meshes, boundary conditions and generation parameters, classifying the surface triangular meshes according to the boundary conditions, and obtaining object surface boundary condition surface triangular meshes and far field boundary condition surface triangular meshes; 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, the closed surface triangular mesh is obtained by using the surface discretization method. The input surface triangular mesh must be valid. A valid input surface mesh is closed, does not have non-two-edge flow patterns, and cannot have self-intersections. Surface discretization is a necessary step in generating meshes. Triangulation discretization is conducive to the generation of triangular prism meshes in the later stage.
[0058] Taking the wing-body assembly as an example, a closed surface mesh of the surface of the wing-body assembly is obtained, and the surface mesh is discretized into triangles to obtain a closed surface triangle 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;
[0060] Specifically, a boundary condition is a property attached to the input surface triangle mesh. The boundary conditions are the object plane and the far field. The object plane usually refers to the simulation area where the fluid will stick to the surface of the object when passing through the object plane. The far field usually refers to the area of the principle object in the simulation. The boundary layer mesh will only be generated on the surface triangle mesh corresponding to the object plane boundary condition, and not on the surface triangle mesh corresponding to the far field boundary condition.
[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 according to the input surface triangular mesh, generation parameters and the surface triangular mesh under the object surface boundary condition; 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, and the bottom unit of the discrete target triangular prism mesh unit is recorded as the surface unit of the input surface triangular mesh, and 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 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: 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 surface triangular mesh, and 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 of the generation parameter is used as the growth step length 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 length to generate the grid, and a total of This step is designed to obtain a basic initial triangular prism grid.
[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 direction of the angle bisector of the normal direction of the mesh surface where each grid point is located is used as the growth normal of the boundary layer. Three times the total height of the boundary layer mesh input by the user is used as the growth step 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 length 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 mesh self-intersections
[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 will be compressed and the height of the grid will become smaller. When there is no self-intersection of the boundary layer grid in the initial triangular prism grid, it will stop. To ensure the quality of the grid, the initial triangular prism grid does not have self-intersection or negative grid volume.
[0075] Taking the wing-body assembly as an example, the initial triangular prism mesh generated in S31 is subjected to self-intersection detection and mesh quality detection. If the mesh has self-intersection or the mesh volume is negative, the growth step is reduced to one ten-thousandth, and the initial triangular prism mesh is regenerated. The self-intersection detection and mesh quality detection are performed again until there is no self-intersection of the boundary layer mesh in the initial triangular prism mesh.
[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) Surface triangular mesh with far-field boundary conditions.
[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, the Delaunay tetrahedron method is used to generate a full tetrahedral mesh. The advantage of this design is that during the mesh deformation process, the Delaunay tetrahedronized mesh always maintains a positive volume, which ensures that the boundary layer mesh has no self-intersection.
[0081] Taking the wing-body assembly as an example, the Delaunay tetrahedralization method is used to generate an isotropic auxiliary tetrahedral mesh between the initial triangular prism mesh and the far-field boundary condition surface triangle mesh.
[0082] In the specific implementation of S4: according to the initial triangular prism grid and the discrete target triangular prism grid, the grid point coordinates of the initial triangular prism grid are used as variables to establish a mapping energy equation between the discrete target triangular prism grid and the initial triangular prism grid, and obtain the extreme value point of the equation by deriving the mapping energy equation; this step may include the following sub-steps:
[0083] S41: segmenting the initial triangular prism grid and the discrete target triangular prism grid into tetrahedron grids, wherein the segmentation refers to segmenting 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 the methods. Figure 2 The method of dividing the triangular prism grid is shown. The twelve tetrahedrons overlap each other. The advantage of this is that we only need to keep the volume of the tetrahedron 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 in the tetrahedral grid, and the bottom unit of the initial triangular prism grid unit and the discrete target triangular prism grid unit is the same unit, and establishing a one-to-one correspondence between 12 tetrahedrons divided by the two;
[0087] Specifically, the initial triangular prism grid and the discrete target triangular prism grid have the same number of grids, both of which are 1 layer. The bottom unit of the discrete target triangular prism grid refers to the surface grid unit used in the lateral dimension calculation, while the bottom grid of the initial triangular prism grid refers to the surface grid unit where the first layer unit of the initial triangular prism grid is located. When the initial triangular prism grid unit and the target triangular prism grid unit have the same bottom unit and are in the same layer, the 12 tetrahedral grids respectively divided from the two triangular prism grid units are also one-to-one corresponding.
[0088] Taking the wing-body assembly as an example, the initial triangular prism grid and the 12 tetrahedrons divided into the discrete target triangular prism grid are located in the same layer and the bottom unit is the same unit, and a one-to-one correspondence is established.
[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, assume 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 and taking the Cartesian coordinates of the four points in f. Assume arrive The affine transformation of , the Jacobian matrix can be expressed as:
[0091]
[0092] For the auxiliary isotropic tetrahedral mesh, the present invention makes a one-to-one correspondence between it and a regular tetrahedron of the same volume. In this way, all tetrahedral meshes have their one-to-one corresponding discrete tetrahedral meshes.
[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. Assume that from each simplex , the mapping energy can be defined as:
[0096]
[0097] in is the distortion energy of each simplex. Slightly different from the application in parameterization or mesh deformation, the present invention does not require weight coefficients such as mesh area, because the mass of each unit of the boundary layer mesh can be considered to contribute equally to the simulation. This physical property determines that equal-weight equations are sufficient. R is the closest The rotation of represents the Frobenius norm. 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 Local / Global methods.
[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, becomes a linear equation, which can be obtained by solving a system of linear equations 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 initial triangular prism grid point coordinates and the equation extreme grid point coordinates, 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 under 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 grid points of the extreme values 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 Binary detection from 0 to 1 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, the tetrahedron volume may be negative. and Find the closest one among the lines between of ,this Two conditions must be met:
[0117] (1) The volumes of all tetrahedrons are positive;
[0118] (2) Energy value decreases;
[0119] The present invention uses the dichotomy 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 grid points of the extreme values 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, S4-S5 are repeated, and if the energy has converged, the initial triangular prism grid is retained as the intermediate triangular prism grid;
[0122] Specifically, the present invention uses a Local / Global iterative method. The Local / Global iterative method decomposes the global deformation energy optimization into local and global linear calculations, making it possible to optimize the global energy only by solving the linear system. The iteration is decomposed into two steps: S4 and S5, where S4 is a Local iteration and S5 is a 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 equations that minimize 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 has not converged, 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: according to the intermediate triangular prism grid and the generation parameters, the prism grid is reconstructed, and then the number of non-negative volume triangular prism units required by the generation parameters is generated between the bottom grid and the top grid by the Hermite interpolation algorithm to obtain the final triangular prism grid; specifically, the following sub-steps may be included:
[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 the triangular prism segmentation, triangular prism exchange, triangular prism folding and triangular prism vertex movement methods;
[0128] Specifically: define the bottom triangular face of the middle triangular prism as the bottom mesh, and the top triangular face as the top mesh, and perform mesh reconstruction through the following four operations:
[0129] Triangular prism segmentation ( Figure 3 (a) in Figure 1): When the combined length of the base and the corresponding top edge of a prism exceeds twice the required size, we try to insert a midpoint on both the long bottom and top edges. This point is then projected onto the coarse grid to maintain the shape integration of the fault grid, followed by topological area connectivity, dividing the two prism grids into four prisms.
[0130] Triangular prism exchange ( Figure 3 (b) in the figure): 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 prism are less than half of the desired size, we attempt to collapse the two prisms that share that edge.
[0132] Move the apex of the prism ( Figure 3 (d) in ): 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 middle triangular prism mesh, since there is only one layer of mesh, 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 the operations of triangular prism splitting, exchanging, folding, and vertex movement.
[0135] S72: generating a number of non-negative volume triangular prism units required according to the generation parameters between the bottom grid and the top grid by using a Hermite interpolation algorithm;
[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 intermediate triangular prism mesh is interpolated to generate the required number of non-negative volume triangular prism units according to the generation parameters.
[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, an Emilian interpolation curve is constructed between the top mesh vertices and the bottom mesh vertices, and 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 part 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 the isotropic tetrahedral mesh generation has sufficient space;
[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 makes a special design that the top layer of the boundary layer mesh, that is, the topmost layer, is used as a reserved layer to avoid narrow gaps. When generating isotropic tetrahedrons, the mesh of the reserved layer will be deleted to increase the gap. Obviously, at least two reserved layers of gap height will be retained between any boundary layer meshes. The present invention uses the control parameter To control the ratio of the reserved layer's height 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 reserved layer, the present invention generates an isotropic tetrahedral mesh to fill the remaining domain using the Delaunay tetrahedral method. Slightly different from the auxiliary isotropic tetrahedral mesh, the tetrahedral mesh will be appropriately encrypted so that the volume difference between adjacent tetrahedral units is less than 20%. Compared with the auxiliary isotropic tetrahedral mesh, its mesh volume is greatly increased, which may be more conducive to 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 triangle mesh.
[0145] The present invention will be further described below by way of examples:
[0146] Embodiment 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 the narrow gaps improves as the discretized target triangular prism mesh height decreases. Figure 6 shows the final quadrilateral boundary layer mesh, and the details of the gaps are shown in the two sub-figures at the bottom. The algorithm of the present invention can handle narrow gaps at the connections of different components.
[0148] Embodiment 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, which have 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 In order to facilitate comparison with pointwise, the present invention uses the mesh generation algorithm described in the present invention and the T-Rex technology used by pointwise. For the sake of fairness, the input method of the two methods is the same, and the surface mesh generation engine contained in the pointwise is used. Fig. 9 A comparison of three complex corners in a wing-body assembly model is illustrated, which are notoriously challenging for boundary layer mesh generation. Fig. 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 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 creates a conflict at the intersection of the wing and the wing. This comparison emphasizes the robustness of the mesh algorithm proposed in the present invention in handling complex x-geometry features where 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 algorithm discussed in the present invention and the mesh generated by T-Rex. As shown 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 behind, because this discrete mesh may be attributed to the compromise of the mesh structure quality, which is necessary to accommodate the genetic principle of the complex corner full-layer prismatic mesh structure.
[0150] Another interesting observation was noted, that when examining these worst quality tetrahedral meshes, the tetrahedral meshes generated using point lines were all located at the interface between the boundary layer mesh and the tetrahedral mesh, and especially 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 description and practicing the contents disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The description and examples are intended to be exemplary only, 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 precise structures that have been 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 surface boundary condition and a surface triangular mesh with a far-field boundary condition, wherein the input surface triangular mesh is a closed solid surface image; S2: Generate 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: According to the initial triangular prism grid and the discrete target triangular prism grid, taking the grid point coordinates in the initial triangular prism grid as variables, establishing a rigid mapping energy equation between the discrete target triangular prism grid and the initial triangular prism grid, and taking the derivative of the initial triangular prism grid point coordinates through the rigid mapping energy equation to obtain the equation extreme grid point coordinates; S5: according to the coordinates of the initial triangular prism grid point and the coordinates of the equation extreme grid point, a linear detection method is used to determine the coordinates of the grid point in the two coordinates, so that the tetrahedral grid volume of the isotropic auxiliary tetrahedral grid under the coordinates of the grid point is positive; S6: according to the generation parameters, if the rigid mapping energy equation has not converged, repeat S4-S5, and 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 by using the 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 The input surface triangular mesh, boundary conditions and generation parameters are obtained, and the surface triangular mesh is classified according to the boundary conditions to obtain the surface triangular mesh with object surface boundary conditions and the surface triangular mesh 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 meshes according to the boundary conditions to obtain surface triangular meshes with object surface boundary conditions and surface triangular meshes with far-field boundary conditions, wherein the boundary conditions are divided into two types: object surface and far-field.
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 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, and the bottom unit of the discrete target triangular prism mesh unit is recorded as the surface unit of the input surface triangular mesh, and the total number of generated layers is .
4. The method according to claim 1, characterized in that: 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 surface triangular mesh, and 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, specifically comprising: S31: on the object surface boundary condition curved triangle mesh, taking the average normal direction of each curved triangle where the mesh point is located as the growth normal direction, and using the height that is several times the total height of the boundary layer mesh according to the generation parameter as the growth step length to generate the initial triangular prism mesh, counting the number of generated layers as 1, and the bottom unit of the initial triangular prism mesh unit is recorded as the face unit of the input curved triangle 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, characterized in that According to the initial triangular prism grid and the discrete target triangular prism grid, the mapping energy equation of 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 point of the equation is obtained by deriving the mapping energy equation, which specifically includes: 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 of the triangular prism grid that can form a quadrilateral; 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 in the tetrahedral grid, and the bottom unit of the initial triangular prism grid unit and the discrete target triangular prism grid unit is the same unit, and establishing a one-to-one correspondence between the 12 tetrahedrons divided by the two; 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 discrete 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 equation extreme grid points, the grid point coordinates are determined using a linear detection method in the two coordinates so that the tetrahedral grid volumes of the isotropic auxiliary tetrahedral grid under the grid point coordinates are all positive, specifically including: S51: Based on the initial triangular prism grid point coordinates The coordinates of the grid points of the extreme values 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 Binary detection from 0 to 1 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 According to the intermediate triangular prism grid and the generation parameters, the prism grid is reconstructed, and then the number of non-negative volume triangular prism units required by the generation parameters is generated between the bottom grid and the top grid by the Hermite interpolation algorithm to obtain the final triangular prism grid, specifically including: 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 the triangular prism segmentation, triangular prism exchange, triangular prism folding and triangular prism vertex movement 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 parameter 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 reserved layer mesh, which is the outermost layer of the final triangular prism mesh, and refilling the remaining part 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 isotropic tetrahedral mesh generation; 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
Anisotropic boundary layer grid optimization method, device, equipment and medium
CN116882117A
Unstructured grid generation method and system
CN117745975A
Boundary layer mesh generation method based on anisotropic volume harmonic field
US20220414282A1
Cited By
Boundary-maintained thin-wall structure curved surface triangular mesh alignment method
CN121437804A
Thin-wall structure lamellar body grid generation method based on surface grid alignment
CN121458914A