A mesh quality adjustment method and system based on geometry optimization and topology optimization
Through geometric optimization and topological optimization methods, the problem of poor grid quality in numerical simulation analysis is solved, the uniformity and stability of the grid are improved, and the needs of high-precision numerical simulation and engineering applications are met.
Patent Information
- Application Number
- CN202411262378.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-10
AI Technical Summary
The prior art is difficult to effectively adjust the grid quality in numerical simulation analysis, resulting in poor grid quality, affecting the accuracy and calculation stability of the analysis results, and it is difficult to meet the needs of engineering applications.
Using a method based on geometric optimization and topological optimization, we can obtain models, grid preprocessing models, grid quality optimization models and grid degree value adjustment models by creating grids, repair grid geometry information, and conduct them for problem nodes and polygonal units. Refine adjustments to improve the overall quality of the grid.
It significantly improves the uniformity and stability of the grid, ensures the accuracy and efficiency of numerical calculations, and meets the needs of high-precision numerical simulation and engineering applications.
Smart Images

Figure CN118779939B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a mesh quality adjustment method and system based on geometric optimization and topological optimization, and belongs to the technical field of mesh analysis and processing. Background Art
[0002] In the existing numerical simulation analysis process, it is generally necessary to import the CAD model into the computer-aided engineering (CAE) software, and then the computer-aided engineering (CAE) software will perform a series of pre-processing operations such as mid-surface extraction to automatically generate the initial finite element mesh. However, in the initial finite element mesh, there will be a large number of units that do not meet the quality standards. The existence of these units will lead to poor mesh quality and affect the stability and accuracy of numerical calculations.
[0003] Furthermore, a Chinese patent (publication number: CN113792459B) discloses a mesh smoothing optimization method and device for a finite element triangular mesh. First, the triangular mesh units are regarded as independent mesh units that are not connected to each other. The positions of the three nodes of the triangle are adjusted by regular point guidance to achieve mesh smoothing of a single independent mesh unit. Then, these separated independent mesh units after smoothing optimization are assembled into a complete mesh network.
[0004] The above scheme mainly involves the smoothing optimization of the finite element mesh, but still does not disclose how to adjust the mesh quality. If the mesh quality is poor, it will be difficult to accurately capture the geometric details of the component to be analyzed, thus affecting the accuracy of the analysis results; at the same time, poor mesh quality will lead to convergence difficulties and reduce the stability and accuracy of numerical calculations, resulting in low calculation efficiency. Therefore, if the mesh quality is not adjusted, it will be difficult to meet the actual needs of engineering applications.
[0005] The information disclosed in this Background Art is only for understanding the background of the inventive concept and therefore it may include information that does not constitute the prior art. Summary of the invention
[0006] In response to the above problem or one of the above problems, an object of the present invention is to provide a mesh quality adjustment method and system based on geometric optimization and topological optimization, by creating a mesh acquisition model, a mesh preprocessing model, a mesh quality optimization model, and a mesh degree value adjustment model, and using geometric optimization to repair the mesh geometry information and ensure the mesh geometry integrity; then through topological optimization, fine-tuning is performed on the problem nodes and polygonal units in the mesh, thereby significantly improving the overall quality of the mesh, thereby being able to accurately capture the geometric details of the simulation object, effectively improving the uniformity and stability of the mesh, making numerical calculations more stable and accurate, and having high computational efficiency, while meeting the needs of high-precision numerical simulations and the actual needs of engineering applications.
[0007] In response to the above problem or one of the above problems, the second purpose of the present invention is to provide a mesh quality adjustment method and system based on geometric optimization and topological optimization, which organically combines geometric optimization and topological optimization, effectively improves the mesh optimization quality, and at the same time can greatly improve the mesh optimization efficiency, and can effectively solve the problems of insufficient local mesh quality and poor mesh quality in the prior art.
[0008] To achieve one of the above purposes, the first technical solution of the present invention is:
[0009] A mesh quality adjustment method based on geometry optimization and topology optimization includes the following steps:
[0010] Step 1, using the previously created mesh acquisition model, processing the mesh information of a simulation object to obtain an initial mesh file;
[0011] Step 2, preprocessing the initial mesh file through the mesh preprocessing model created in advance to obtain a mesh smoothing file;
[0012] Step 3, using the mesh quality optimization model created in advance, based on the mesh quality, the mesh smoothing file is geometrically optimized to obtain a mesh geometry optimization file;
[0013] Step 4: Based on the mesh degree value created in advance, the model is adjusted. According to the node degree value, the mesh geometry optimization file is topologically optimized to obtain the mesh quality adjustment file, thus completing the mesh quality adjustment based on geometry optimization and topology optimization.
[0014] After continuous exploration and experimentation, the present invention creates a mesh acquisition model, a mesh preprocessing model, a mesh quality optimization model, and a mesh degree value adjustment model, and utilizes geometric optimization to repair mesh geometric information and ensure mesh geometric integrity; then, through topology optimization, fine adjustments are made to problem nodes and polygonal units in the mesh, thereby significantly improving the overall quality of the mesh, making it possible to accurately capture the geometric details of the simulation object, effectively improving the uniformity and stability of the mesh, making numerical calculations more stable and accurate, and having high computational efficiency, while meeting the needs of high-precision numerical simulations and the actual needs of engineering applications.
[0015] Furthermore, the present invention organically combines geometric optimization and topological optimization, effectively improving the mesh optimization quality, while greatly improving the mesh optimization efficiency, and effectively solving the problems of insufficient local mesh quality and poor mesh quality in the prior art.
[0016] As the preferred technical measures:
[0017] Step 1: Use the previously created mesh acquisition model to process the mesh information of a simulation object to obtain the initial mesh file as follows:
[0018] Step 11, obtaining a finite element mesh of a simulation object based on computer-aided engineering software;
[0019] Step 12, processing the finite element mesh to generate a simulation digital model of a simulation object;
[0020] Step 13, obtaining grid information based on the simulation digital model;
[0021] Step 14: Based on the mesh information, an initial mesh file is obtained, wherein the initial mesh file at least includes a plurality of nodes and polygonal units.
[0022] As the preferred technical measures:
[0023] Step 2: Preprocess the initial mesh file using the mesh preprocessing model created earlier to obtain a mesh smoothing file as follows:
[0024] Step 21, starting from the first node of the initial grid file, obtain the number of adjacent units of each node;
[0025] Step 22, based on the number of adjacent units, determine the free nodes and boundary nodes, delete the free nodes, and obtain the grid node data; the judgment criteria are as follows:
[0026] A node with 0 adjacent units is a free node, a node with 1 adjacent unit is a boundary node, and a node with more than 1 adjacent unit is an internal node;
[0027] Step 23, according to the mesh information and connection relationship, high-pass and low-pass filters are alternately applied to smooth the mesh node data to obtain a mesh smoothing file.
[0028] As the preferred technical measures:
[0029] Step 3: Use the mesh quality optimization model created in advance to perform geometry optimization on the mesh smoothing file based on the mesh quality. The method for obtaining the mesh geometry optimization file is as follows:
[0030] Step 31, extracting geometric key points according to the mesh smoothing file;
[0031] Step 32, based on the geometric key points, extracting geometric edges related to each geometric key point, and obtaining the number of geometric edges related to each geometric key point;
[0032] Step 33, classifying the geometric key points according to the number of geometric edges, when there is only one geometric edge corresponding to the geometric key point, taking the geometric key point as a breakpoint and obtaining breakpoint data;
[0033] Step 34, setting a new geometric edge based on the breakpoint data, and calculating the mesh quality associated with the new geometric edge;
[0034] Step 35, judging whether to retain the new geometric edge according to the mesh quality, and determining the geometric repair data;
[0035] Step 36, based on the geometry repair data, repair the geometry edges in the mesh smoothing file to obtain a mesh geometry optimization file.
[0036] As the preferred technical measures:
[0037] Step 34, based on the breakpoint data, sets a new geometric edge and calculates the mesh quality associated with the new geometric edge as follows:
[0038] Step 341, calculate the distance between each breakpoint and the other breakpoints, group the breakpoints whose distance is less than a threshold into one group, and obtain grouped data; the threshold is 1.5 times the set maximum grid length.
[0039] Step 342, based on the grouping data, determine the number of breakpoints in each group. When a group has only one breakpoint, delete the geometric edge corresponding to the breakpoint; when a group has two breakpoints, connect the two breakpoints to form a new geometric edge;
[0040] Step 343, using a mesh quality metric algorithm to calculate the corresponding mesh quality for the new geometric edge.
[0041] As the preferred technical measures:
[0042] Step 343, for the new geometric edge, a mesh quality metric algorithm is used to calculate the corresponding mesh quality as follows:
[0043] Step 3431, obtaining a polygon consisting of a new geometric edge and adjacent geometric edges;
[0044] Step 3432, calculating a hybrid metric value of the mesh quality based on the area, number of edges and edge length of the polygon;
[0045] When the polygon is a triangle, the area of the triangle is calculated using Heron's formula based on the semi-perimeter of the triangle and the side length of the triangle;
[0046] When the polygon is a quadrilateral, the area of the quadrilateral is composed of the areas of the two triangles;
[0047] Step 35, judging whether to keep the new geometric edge according to the mesh quality, and determining the method of geometric repair data is as follows:
[0048] Step 351, obtaining a hybrid metric value of mesh quality associated with the new geometric edge;
[0049] Step 352, comparing the hybrid metric value of the mesh quality with the mesh quality threshold, and when the hybrid metric value of the mesh quality is greater than the mesh quality threshold, performing a reservation operation on the new geometric edge to obtain geometric edge reservation information;
[0050] When the mixed metric value of the mesh quality is less than or equal to the mesh quality threshold, a deletion operation is performed on the new geometric edge to obtain geometric edge deletion information; the mesh quality threshold includes a length threshold, an angle threshold, and a warping threshold.
[0051] The length threshold ranges from 2 to 8 mm, the angle threshold ranges from 20 to 120 degrees, and the warp threshold is 15 degrees.
[0052] Step 353: Aggregating the geometric edge preservation information and the geometric edge deletion information to obtain geometric repair data.
[0053] As the preferred technical measures:
[0054] Step 4: Based on the mesh degree value adjustment model created in advance, the mesh geometry optimization file is topologically optimized according to the node degree value. The method for obtaining the mesh quality adjustment file is as follows:
[0055] Step 41, traversing the mesh geometry optimization file in units of facets, calculating the degree value of each node in a loop, and obtaining node degree value data; the degree value is the number of geometric edges directly connected to the node;
[0056] Step 42, according to the node degree data, for different mesh conditions, set a corresponding repair strategy; the repair strategy at least includes connectivity optimization, shape optimization and mesh smoothing optimization;
[0057] Step 43, according to the repair strategy, topology optimization is performed on the nodes in the mesh geometry optimization file to obtain a mesh quality adjustment file.
[0058] As the preferred technical measures:
[0059] Connectivity optimization includes internal unit optimization, diamond unit optimization and unit optimization;
[0060] Internal unit optimization, including the following:
[0061] Delete the node with degree value 2. When there is an internal node e with degree value 2 in the quadrilateral unit abcd, the quadrilateral unit abcd is divided into two parts, and then the internal node e is deleted to obtain a new quadrilateral unit abcd.
[0062] Diamond element optimization, including the following:
[0063] When the degree values of node a and node c in the quadrilateral element abcd are both greater than or equal to 4, and the degree values of node b and node d are equal to 3, node b is glued to node d and the diamond element is eliminated;
[0064] Unit optimization, including the following:
[0065] Increase the number of grid cells to reduce the number of irregular nodes;
[0066] or / and, shape optimization includes unit angle optimization and size optimization;
[0067] Unit angle optimization, including the following:
[0068] Calculate the angle of each node and obtain the nodes whose angle is greater than 180 degrees;
[0069] Based on the node, a first unit where the node is located and a first geometric edge opposite to the node are obtained;
[0070] According to the first geometric edge, determining whether there is a second unit that is collinear with the first geometric edge;
[0071] When the second unit exists, the first unit and the second unit are deleted, and hexagonal connection processing is performed;
[0072] When the second unit does not exist, the unit angle optimization is terminated;
[0073] Size optimization, including the following:
[0074] When the length of a geometric edge exceeds the edge length threshold, the ratio of the longest geometric edge to the shortest geometric edge is calculated. If the ratio is greater than the segmentation threshold, the two adjacent vertices are connected. The ratio of the longest geometric edge to the shortest geometric edge is calculated again. If the ratio is still greater than the segmentation threshold, the grid area where the geometric edge is located is divided into several quadrilateral units. The edge length threshold ranges from 2 to 8 mm, and the segmentation threshold is 2.5.
[0075] Or / and, mesh smoothing optimization is used to ensure that the topological relationship of the nodes remains unchanged and improve the quality of the mesh by changing the position of the nodes. The method is as follows:
[0076] Step 421, select a node, set convergence accuracy and number of iterations;
[0077] According to the nodes and Taylor's formula, establish the objective function and set the search direction;
[0078] Step 422, based on the objective function and the search direction, the gradient at the node is calculated, and the iteration is stopped when the absolute value of the gradient is less than the convergence precision;
[0079] Step 423, determining the optimal step length according to the gradient so that the target value calculated by the objective function is minimized;
[0080] Step 424, changing the node position according to the optimal step length.
[0081] To achieve one of the above purposes, the second technical solution of the present invention is:
[0082] A mesh quality adjustment method based on geometry optimization and topology optimization, including the following:
[0083] Process the mesh information of a simulation object to obtain an initial mesh file;
[0084] Preprocess the initial mesh file to obtain a mesh smoothing file;
[0085] Through geometric optimization processing and based on the mesh quality, the geometric edges in the mesh smoothing file are repaired to obtain a mesh geometry optimization file;
[0086] Through topology optimization processing and according to the node degree value, the nodes and polygonal units in the mesh geometry optimization file are adjusted to obtain the mesh quality adjustment file, thereby completing the mesh quality adjustment based on geometry optimization and topology optimization.
[0087] The present invention organically combines geometric optimization and topological optimization, effectively improves the mesh optimization quality, and can greatly improve the mesh optimization efficiency, and can effectively solve the problems of insufficient local mesh quality and poor mesh quality in the prior art.
[0088] To achieve one of the above purposes, the third technical solution of the present invention is:
[0089] A mesh quality adjustment system based on geometry optimization and topology optimization, comprising a computer-readable storage medium;
[0090] The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned mesh quality adjustment method based on geometric optimization and topology optimization.
[0091] Compared with the prior art solutions, the present invention has the following beneficial effects:
[0092] After continuous exploration and experimentation, the present invention creates a mesh acquisition model, a mesh preprocessing model, a mesh quality optimization model, and a mesh degree value adjustment model, and utilizes geometric optimization to repair mesh geometric information and ensure mesh geometric integrity; then, through topology optimization, fine adjustments are made to problem nodes and polygonal units in the mesh, thereby significantly improving the overall quality of the mesh, making it possible to accurately capture the geometric details of the simulation object, effectively improving the uniformity and stability of the mesh, making numerical calculations more stable and accurate, and having high computational efficiency, while meeting the needs of high-precision numerical simulations and the actual needs of engineering applications.
[0093] Furthermore, the present invention organically combines geometric optimization and topological optimization, effectively improving the mesh optimization quality, while greatly improving the mesh optimization efficiency, and effectively solving the problems of insufficient local mesh quality and poor mesh quality in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] Figure 1 It is a schematic diagram of a first flow chart of the grid quality adjustment method of the present invention;
[0095] Figure 2 A second flow chart of the grid quality adjustment method of the present invention;
[0096] Figure 3 A schematic diagram of deleting a geometric edge according to the present invention;
[0097] Figure 4 A schematic diagram of internal unit optimization for the present invention;
[0098] Figure 5 A schematic diagram of the diamond unit optimization for the present invention;
[0099] Figure 6 A schematic diagram for unit optimization of the present invention;
[0100] Figure 7 A schematic diagram of unit angle optimization for the present invention;
[0101] Figure 8 A first schematic diagram for size optimization of the present invention;
[0102] Fig. 9 A second schematic diagram for size optimization for the present invention;
[0103] Fig.10 This is a first schematic diagram of the breakpoint distribution of the present invention;
[0104] Fig.11 A second schematic diagram of the breakpoint distribution of the present invention;
[0105] Fig.12 Another schematic diagram of deleting geometric edges according to the present invention. DETAILED DESCRIPTION
[0106] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0107] On the contrary, the present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention as defined by the claims. Further, in order to make the public have a better understanding of the present invention, some specific details are described in detail in the following detailed description of the present invention. Those skilled in the art can fully understand the present invention without the description of these details.
[0108] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention pertains. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "or / and" as used herein includes any and all combinations of one or more of the associated listed items.
[0109] like Figure 1 As shown, the first specific embodiment of the mesh quality adjustment method based on geometric optimization and topology optimization of the present invention is:
[0110] A mesh quality adjustment method based on geometry optimization and topology optimization includes the following steps:
[0111] Step 1, using the previously created mesh acquisition model, processing the mesh information of a simulation object to obtain an initial mesh file;
[0112] Step 2, preprocessing the initial mesh file through the mesh preprocessing model created in advance to obtain a mesh smoothing file;
[0113] Step 3, using the mesh quality optimization model created in advance, based on the mesh quality, the mesh smoothing file is geometrically optimized to obtain a mesh geometry optimization file;
[0114] Step 4: Based on the mesh degree value created in advance, the model is adjusted. According to the node degree value, the mesh geometry optimization file is topologically optimized to obtain the mesh quality adjustment file, thus completing the mesh quality adjustment based on geometry optimization and topology optimization.
[0115] A simulation object may be a component, a product, a machine, or an appliance.
[0116] like Figure 2-Figure 12As shown, the second specific embodiment of the mesh quality adjustment method based on geometric optimization and topology optimization of the present invention is:
[0117] A mesh quality adjustment method based on geometry optimization and topology optimization includes the following steps:
[0118] S1: Obtain the finite element mesh of the part from the computer-aided engineering (CAE) software, generate a finite element model of the part, obtain mesh information, and obtain an initial mesh file based on the mesh information. The mesh information at least includes the distribution of nodes and units.
[0119] Computer-aided engineering (CAE) software is an enterprise-level CAE platform such as HyperWorks or Ansys, which can mesh a 2D model or 3D model of a part to obtain a finite element mesh.
[0120] S2: Preprocessing of the initial grid file, which includes the following:
[0121] Start searching from the first node n=1, and distinguish between free nodes and boundary nodes based on the number of adjacent units. A free node is one with 0 adjacent units, a boundary node is one with 1 adjacent unit, and a node shared by two or more adjacent units is an internal node. After screening, delete the free nodes.
[0122] S3: According to the initial mesh V and the connection relationship F, the mesh is gradually smoothed by applying high-pass and low-pass filters alternately multiple times, thereby obtaining a mesh smoothing file.
[0123] S4: Perform geometry optimization on the mesh smoothing file. The algorithm steps of geometry optimization are as follows:
[0124] Step 1. Extract geometric key points.
[0125] Step 2. Extract the geometric edges directly connected to each geometric key point.
[0126] Step 3. Classify the geometric key points according to the number of extracted geometric edges. If there is only one geometric edge corresponding to the geometric key point, the geometric key point is called a breakpoint.
[0127] Step 4: Perform geometry optimization operations, which include the following:
[0128] Calculate the distance between each breakpoint and other breakpoints, and group the breakpoints whose distance is less than the threshold into a group. The distance calculation formula is as follows:
[0129]
[0130] in, For breakpoint 1, is the horizontal coordinate of breakpoint 1, is the vertical coordinate of breakpoint 1, is the vertical coordinate of breakpoint 1; For breakpoint 2, is the horizontal coordinate of breakpoint 2, is the vertical coordinate of breakpoint 2, is the vertical coordinate of breakpoint 2.
[0131] If the group has only one breakpoint, it means that the geometric edge corresponding to the breakpoint needs to be deleted. Figure 3 , Figure 3 The green lines in the represent geometric edges.
[0132] If the group has two breakpoints, it means that the two breakpoints need to be connected to form a new geometric edge. Since the new geometric edge may be too close to other geometric edges, resulting in poor mesh quality, the mesh quality metric algorithm is used to determine whether a new geometric edge is needed. Based on the judgment result, the mesh smoothing file is repaired to obtain a mesh geometry optimization file.
[0133] In this embodiment, the hybrid metric value of the grid quality The calculation formula is as follows:
[0134]
[0135] in, is the area of the polygonal mesh, is the side length of the polygonal mesh; when the polygonal mesh is a triangular mesh unit, n=3; when the polygonal mesh is a quadrilateral mesh unit, n=4.
[0136] Area of a triangle mesh The Heron formula is used to solve the problem. The calculation formula is as follows:
[0137]
[0138] in, is the semiperimeter of the triangle, , , are the three side lengths of the triangle respectively.
[0139] Area of a quadrilateral It can be composed of the areas of two triangles, and the calculation formula is as follows:
[0140]
[0141] in, is the area of the first triangle, is the area of the second triangle.
[0142] A hybrid measure of mesh quality The definition of derives that for a quadrilateral mesh, the mixed metric value is The maximum value of is 0.25, and for triangular meshes, the mixed metric value The maximum value of is 0.14433756. The larger the value, the better the quality of the mesh.
[0143] S6: Traverse the entire mesh geometry optimization file in units of facets. In the loop, calculate the degree value of the visualized node to optimize the mesh topology, thereby obtaining a mesh quality adjustment file. Topology optimization adopts corresponding repair strategies for different mesh conditions, which mainly include connectivity optimization, shape optimization, and smoothing optimization.
[0144] In this embodiment, connectivity optimization includes internal unit optimization, diamond unit optimization and unit optimization.
[0145] Internal unit optimization, including the following:
[0146] To delete internal nodes with a degree of 2, see Figure 4 If there is an internal node e with a degree value of 2 in the quadrilateral unit abcd, then the quadrilateral unit abcd is divided into two parts, abed and bcde. Deleting the internal node e can obtain a new quadrilateral unit abcd.
[0147] Diamond element optimization, including the following:
[0148] See also Figure 5 If the degree values of nodes a and c of the quadrilateral element abcd are greater than or equal to 4, and the degree values of nodes b and d are equal to 3, then node b and node d are glued together and the diamond element is eliminated.
[0149] Unit optimization, including the following:
[0150] See also Figure 6 ,By increasing the grid unit c, the number of irregular nodes can be reduced and the topological structure can be optimized.
[0151] In this embodiment, shape optimization includes unit angle optimization and size optimization.
[0152] Unit angle optimization, including the following:
[0153] See also Figure 7 , mark the nodes in unit k1 with angles greater than 180° as o. Determine whether unit k2 exists. If so, determine whether the geometric edge bc is a common edge of unit k2. If the geometric edge bc is a common edge, find the unit k2 number, delete units k1 and k2, and then perform hexagonal connection processing.
[0154] Size optimization, including the following:
[0155] See also Figure 8 , Fig. 9 ,When the length of the geometric edge does not meet the quality file requirements, solve the ratio of the longest side to the shortest side. If the ratio is greater than 2.5, connect the other two vertices and solve again. If the ratio is still greater than 2.5, optimize the area into 3 quadrilateral units.
[0156] In this embodiment, the mesh smoothing optimization ensures that the topological relationship of the nodes remains unchanged and improves the quality of the mesh by changing the positions of the nodes, which includes the following:
[0157] Select Node , establish the objective function about computing node position , and set the direction in which the node descends fastest as the search direction , Taylor's formula gives the objective function The calculation formula is as follows:
[0158]
[0159] in, is a node; For Node o(x) represents a high-order infinitesimal quantity, which is used to describe the error between the approximate value and the true value of a function near a certain point. is the optimal step length; To search for direction.
[0160] when When , the objective function decreases fastest, and the specific processing steps are as follows:
[0161] Step 1: Select the node , set the convergence accuracy and the number of iterations k;
[0162] Step 2: Compute nodes The gradient at , when the absolute value of the gradient is less than Stop iteration when
[0163] Step 3: Take the optimal step length Make ;
[0164] Step 4, perform k iterations of optimization on steps 2 and 3. When the accuracy requirement is met, the iteration optimization is terminated to obtain the optimal solution, that is, the optimal position of the node is calculated, and the position of the node is adjusted according to the optimal solution.
[0165] S7: Finally, the optimized high-quality mesh quality adjustment file is output for subsequent processing.
[0166] like Fig.10 , Fig.11 , Fig.12 , a specific embodiment of applying the present invention to adjust the mesh quality of a certain CAD model:
[0167] The method for adjusting the mesh quality of a CAD model by using the present invention comprises the following steps:
[0168] The first step is to perform initial mesh division, which includes the following:
[0169] After the CAD model is imported into the computer-aided engineering (CAE) software, a series of pre-processing operations such as mid-surface extraction are performed. The computer-aided engineering (CAE) software generates an initial finite element mesh, which contains 1,694,871 quadrilateral elements, 85,562 triangular elements, and 4,447 elements that do not meet the quality standards. The presence of these elements indicates that the mesh quality is poor and is not suitable for finite element analysis.
[0170] The second step is to use the previously created mesh acquisition model to process the initial finite element mesh of the CAD model to obtain the initial mesh file, which includes the following:
[0171] After the initial meshing is completed, the initial finite element mesh is read to obtain the mesh information, which includes 1808573 mesh nodes, 1780443 unit information, 125706 face information, 158477 geometric key points and 562856 geometric edges; then the initial mesh file is constructed based on the mesh information.
[0172] The third step is to preprocess the initial mesh file through the mesh preprocessing model created in advance to obtain a mesh smoothing file, which includes the following contents:
[0173] After obtaining the initial grid file information, start searching from the first node n=1, and distinguish free nodes and boundary nodes according to the number of adjacent units. After completing the screening, delete all free nodes to obtain a grid smooth file.
[0174] The fourth step is to use the mesh quality optimization model created in advance to perform geometry optimization on the mesh smoothing file based on the mesh quality to obtain a mesh geometry optimization file, which includes the following contents:
[0175] According to the mesh smoothing file, the mesh face is used as the basic unit to analyze the geometric information of the mesh one by one. First, all geometric key points are extracted, and the geometric edges directly connected to each geometric key point are extracted. Then the geometric key points are classified according to the number of geometric edges. If a geometric key point only corresponds to one geometric edge, it is called a breakpoint. Fig.10 p1, p2 and Fig.11 Q1, q2, q3, and q4 are all breakpoints.
[0176] Calculate the distance between each breakpoint and other breakpoints, and group the breakpoints whose distance is less than the threshold into a group. If there is only one breakpoint in the group, it means that the geometric edge corresponding to the breakpoint needs to be deleted, such as Fig.10 As shown in the figure, the distance between breakpoint a and breakpoint b is too large, exceeding the threshold requirement, so we choose to delete the two geometric edges corresponding to the breakpoints. Fig.12 .
[0177] If the group has two breakpoints, it means that the two breakpoints need to be connected to form a new geometric edge. Fig.11 As shown, by judging the distance, the breakpoints can be divided into two groups: q1, q2 and q3, q4. The geometric edge closure process is completed by connecting the two groups of breakpoints.
[0178] Since the new geometric edges may be too close to other geometric edges, it is impossible to generate a mesh that meets the requirements between the geometric edges that are too close. Therefore, the mesh quality metric algorithm is used to determine whether a new geometric edge is needed, so that repair data can be obtained. Based on the repair data, after the geometric edges are repaired, the mesh smoothing optimization algorithm is used to further improve the mesh quality, and then the mesh geometry optimization file is obtained. Therefore, by optimizing the geometric edges, the constraint effect of the mesh flow can be effectively improved, which provides a basis for improving the mesh quality.
[0179] The fifth step is to adjust the mesh degree value model created in advance, perform topology optimization on the mesh geometry optimization file according to the node degree value, and obtain the mesh quality adjustment file, which includes the following contents:
[0180] After completing the mesh geometry optimization, collect the degree values of each node in the mesh geometry optimization file, and start the optimization with the face as the minimum unit for traversal. Topology optimization uses different repair strategies to adapt to different mesh conditions, mainly including connectivity optimization, shape optimization and smoothing optimization.
[0181] After completing the connectivity optimization and shape optimization, the mesh smoothing optimization algorithm is used again to further improve the mesh quality, thereby obtaining a mesh quality adjustment file. The mesh smoothing optimization of the present invention mainly ensures that the topological relationship of the nodes remains unchanged and improves the quality of the mesh by changing the node positions.
[0182] Step 6: Output the optimized mesh quality adjustment file to complete the mesh quality adjustment based on geometry optimization and topology optimization.
[0183] Therefore, the present invention can perform secondary optimization on the initial mesh file generated by computer-aided engineering (CAE) software. First, the initial mesh file is geometrically repaired, and then the mesh that does not meet the quality requirements is optimized through the topology optimization method, thereby achieving fast and high-quality mesh optimization. The solution is detailed and feasible.
[0184] An embodiment of a device applying the method of the present invention:
[0185] An electronic device comprising:
[0186] one or more processors;
[0187] A storage device for storing one or more programs;
[0188] When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned mesh quality adjustment method based on geometric optimization and topology optimization.
[0189] A system embodiment using the method of the present invention:
[0190] A mesh quality adjustment system based on geometry optimization and topology optimization includes a computer-readable storage medium.
[0191] A computer program is stored on a computer-readable storage medium, and when the program is executed by a processor, the above-mentioned mesh quality adjustment method based on geometric optimization and topology optimization is implemented.
[0192] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, and computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0193] The present application is described by flowcharts or / and block diagrams of the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each process or / and block in the flowchart or / and block diagram and the combination of the processes or / and blocks in the flowchart or / and block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart or / and block diagram. Figure 1 Process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0194] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 Process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 Process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0196] The model in this application is an object that objectively describes the morphological structure with the help of physical or virtual representation. The object is not equal to the object and is not limited to physical and virtual. It can be a data processing function, software program, processing mode, usage method, operation method, workflow, application process, electronic hardware, circuit module, processing system, system imitation or simulation object.
[0197] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field can still modify or replace the specific implementation methods of the present invention with equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A mesh quality adjustment method based on geometric optimization and topology optimization, characterized in that: The following steps are involved: Step 1, using the previously created mesh acquisition model, processing the mesh information of a simulation object to obtain an initial mesh file; The method to obtain the initial grid file is as follows: Step 11, obtaining a finite element mesh of a simulation object based on computer-aided engineering software; Step 12, processing the finite element mesh to generate a simulation digital model of a simulation object; Step 13, obtaining grid information based on the simulation digital model; Step 14, obtaining an initial mesh file based on the mesh information, wherein the initial mesh file at least includes a plurality of nodes and polygonal units; Step 2, preprocessing the initial mesh file through the mesh preprocessing model created in advance to obtain a mesh smoothing file; The method to obtain the mesh smoothing file is as follows: Step 21, starting from the first node of the initial grid file, obtain the number of adjacent units of each node; Step 22, based on the number of adjacent units, determine the free nodes and boundary nodes, delete the free nodes, and obtain the grid node data; the judgment criteria are as follows: A node with 0 adjacent units is a free node, a node with 1 adjacent unit is a boundary node, and a node with more than 1 adjacent unit is an internal node; Step 23, according to the mesh information and connection relationship, high-pass and low-pass filters are alternately applied to smooth the mesh node data to obtain a mesh smoothing file; Step 3, using the mesh quality optimization model created in advance, based on the mesh quality, the mesh smoothing file is geometrically optimized to obtain a mesh geometry optimization file; The method to obtain the mesh geometry optimization file is as follows: Step 31, extracting geometric key points according to the mesh smoothing file; Step 32, based on the geometric key points, extracting geometric edges related to each geometric key point, and obtaining the number of geometric edges related to each geometric key point; Step 33, classifying the geometric key points according to the number of geometric edges, when there is only one geometric edge corresponding to the geometric key point, taking the geometric key point as a breakpoint and obtaining breakpoint data; Step 34, setting a new geometric edge based on the breakpoint data, and calculating the mesh quality associated with the new geometric edge; Step 35, judging whether to retain the new geometric edge according to the mesh quality, and determining the geometric repair data; Step 36, based on the geometry repair data, repair the geometry edges in the mesh smoothing file to obtain a mesh geometry optimization file; Step 4: Based on the mesh degree value adjustment model created in advance, the mesh geometry optimization file is topologically optimized according to the node degree value to obtain a mesh quality adjustment file, thus completing the mesh quality adjustment based on geometry optimization and topology optimization. The method to obtain the mesh quality adjustment file is as follows: Step 41, traversing the mesh geometry optimization file in units of facets, calculating the degree value of each node in a loop, and obtaining node degree value data; the degree value is the number of geometric edges directly connected to the node; Step 42, according to the node degree data, set corresponding repair strategies for different grid conditions; The repair strategy includes at least connectivity optimization, shape optimization and mesh smoothing optimization; Step 43, according to the repair strategy, topology optimization is performed on the nodes in the mesh geometry optimization file to obtain a mesh quality adjustment file.
2. A mesh quality adjustment method based on geometric optimization and topology optimization as claimed in claim 1, characterized in that: Step 34, based on the breakpoint data, sets a new geometric edge and calculates the mesh quality associated with the new geometric edge as follows: Step 341, calculating the distance between each breakpoint and the other breakpoints, and grouping the breakpoints whose distance is less than a threshold into a group to obtain grouped data; Step 342, based on the grouping data, determine the number of breakpoints in each group. When a group has only one breakpoint, delete the geometric edge corresponding to the breakpoint; when a group has two breakpoints, connect the two breakpoints to form a new geometric edge; Step 343, using a mesh quality metric algorithm to calculate the corresponding mesh quality for the new geometric edge.
3. A mesh quality adjustment method based on geometric optimization and topology optimization as claimed in claim 2, characterized in that: Step 343, for the new geometric edge, a mesh quality metric algorithm is used to calculate the corresponding mesh quality as follows: Step 3431, obtaining a polygon consisting of a new geometric edge and adjacent geometric edges; Step 3432, calculating a hybrid metric value of the mesh quality based on the area, number of edges and edge length of the polygon; When the polygon is a triangle, the area of the triangle is calculated using Heron's formula based on the semi-perimeter of the triangle and the side length of the triangle; When the polygon is a quadrilateral, the area of the quadrilateral is composed of the areas of the two triangles; Step 35, judging whether to keep the new geometric edge according to the mesh quality, and determining the method of geometric repair data is as follows: Step 351, obtaining a hybrid metric value of mesh quality associated with the new geometric edge; Step 352, comparing the hybrid metric value of the mesh quality with the mesh quality threshold, and when the hybrid metric value of the mesh quality is greater than the mesh quality threshold, performing a reservation operation on the new geometric edge to obtain geometric edge reservation information; When the mixed metric value of the mesh quality is less than or equal to the mesh quality threshold, a deletion operation is performed on the new geometric edge to obtain geometric edge deletion information; Step 353: Aggregating the geometric edge preservation information and the geometric edge deletion information to obtain geometric repair data.
4. A mesh quality adjustment method based on geometric optimization and topology optimization as claimed in claim 3, characterized in that: Connectivity optimization includes internal unit optimization, diamond unit optimization and unit optimization; Internal unit optimization, including the following: Delete the node with degree value 2. When there is an internal node e with degree value 2 in the quadrilateral unit abcd, the quadrilateral unit abcd is divided into two parts, and then the internal node e is deleted to obtain a new quadrilateral unit abcd. Diamond element optimization, including the following: When the degree values of node a and node c in the quadrilateral element abcd are both greater than or equal to 4, and the degree values of node b and node d are equal to 3, node b is glued to node d and the diamond element is eliminated; Unit optimization, including the following: Increase the number of grid units to reduce the number of irregular nodes; or / and, shape optimization includes unit angle optimization and size optimization; Unit angle optimization, including the following: Calculate the angle of each node and obtain the nodes whose angle is greater than 180 degrees; Based on the node, a first unit where the node is located and a first geometric edge opposite to the node are obtained; According to the first geometric edge, determining whether there is a second unit that is collinear with the first geometric edge; When the second unit exists, the first unit and the second unit are deleted, and hexagonal connection processing is performed; When the second unit does not exist, the unit angle optimization is terminated; Size optimization, including the following: When the length of a geometric edge exceeds the edge length threshold, the ratio of the longest geometric edge to the shortest geometric edge is calculated. If the ratio is greater than the segmentation threshold, the two adjacent vertices are connected. The ratio of the longest geometric edge to the shortest geometric edge is calculated again. If the ratio is still greater than the segmentation threshold, the grid area where the geometric edge is located is divided into several quadrilateral units. Or / and, mesh smoothing optimization is used to ensure that the topological relationship of the nodes remains unchanged and improve the quality of the mesh by changing the position of the nodes. The method is as follows: Step 421, select a node, set convergence accuracy and number of iterations; According to the nodes and Taylor's formula, establish the objective function and set the search direction; Step 422, based on the objective function and the search direction, the gradient at the node is calculated, and the iteration is stopped when the absolute value of the gradient is less than the convergence precision; Step 423, determining the optimal step length according to the gradient so that the target value calculated by the objective function is minimized; Step 424, changing the node position according to the optimal step length.
5. A mesh quality adjustment method based on geometric optimization and topology optimization, characterized in that: Includes the following: Process the mesh information of a simulation object to obtain an initial mesh file; The method to obtain the initial grid file is as follows: Step 11, obtaining a finite element mesh of a simulation object based on computer-aided engineering software; Step 12, processing the finite element mesh to generate a simulation digital model of a simulation object; Step 13, obtaining grid information based on the simulation digital model; Step 14, obtaining an initial mesh file based on the mesh information, wherein the initial mesh file at least includes a plurality of nodes and polygonal units; Preprocess the initial mesh file to obtain a mesh smoothing file; The method to obtain the mesh smoothing file is as follows: Step 21, starting from the first node of the initial grid file, obtain the number of adjacent units of each node; Step 22, based on the number of adjacent units, determine the free nodes and boundary nodes, delete the free nodes, and obtain the grid node data; the judgment criteria are as follows: A node with 0 adjacent units is a free node, a node with 1 adjacent unit is a boundary node, and a node with more than 1 adjacent unit is an internal node; Step 23, according to the mesh information and connection relationship, high-pass and low-pass filters are alternately applied to smooth the mesh node data to obtain a mesh smoothing file; Through geometric optimization processing and based on the mesh quality, the geometric edges in the mesh smoothing file are repaired to obtain a mesh geometry optimization file; The method to obtain the mesh geometry optimization file is as follows: Step 31, extracting geometric key points according to the mesh smoothing file; Step 32, based on the geometric key points, extracting geometric edges related to each geometric key point, and obtaining the number of geometric edges related to each geometric key point; Step 33, classifying the geometric key points according to the number of geometric edges, when there is only one geometric edge corresponding to the geometric key point, taking the geometric key point as a breakpoint and obtaining breakpoint data; Step 34, setting a new geometric edge based on the breakpoint data, and calculating the mesh quality associated with the new geometric edge; Step 35, judging whether to retain the new geometric edge according to the mesh quality, and determining the geometric repair data; Step 36, based on the geometry repair data, repair the geometry edges in the mesh smoothing file to obtain a mesh geometry optimization file; Through topology optimization processing and according to the node degree value, the nodes and polygonal units in the mesh geometry optimization file are adjusted to obtain the mesh quality adjustment file, thus completing the mesh quality adjustment based on geometry optimization and topology optimization; The method to obtain the mesh quality adjustment file is as follows: Step 41, traversing the mesh geometry optimization file in units of facets, calculating the degree value of each node in a loop, and obtaining node degree value data; the degree value is the number of geometric edges directly connected to the node; Step 42, according to the node degree data, set corresponding repair strategies for different grid conditions; The repair strategy includes at least connectivity optimization, shape optimization and mesh smoothing optimization; Step 43, according to the repair strategy, topology optimization is performed on the nodes in the mesh geometry optimization file to obtain a mesh quality adjustment file.
6. A mesh quality adjustment system based on geometric optimization and topology optimization, characterized in that: comprising a computer readable storage medium; The computer-readable storage medium stores a computer program, which, when executed by a processor, implements a mesh quality adjustment method based on geometric optimization and topology optimization as described in any one of claims 1 to 5.
Citation Information
Patent Citations
A method and apparatus for mesh smoothing optimization of finite element triangular meshes
CN113792459B
Reconstruction of parameterization model of quadrilateral finite element grid model
CN105787226A
Grid deformation optimization method for cutting simulation of deformable object in virtual surgery
CN108537797A
A topological mesh generation method and electronic device based on boundary constraints
CN109408870A
Method for automatically generating rotating mechanical structure grid based on multi-block topology
CN117272500A
