Full-automatic hexahedral mesh generation optimization method based on octree mesh

The fully automated hexahedral mesh generation method using octree meshes addresses the limitations of traditional methods by dynamically refining mesh resolution and quality control, ensuring accurate boundary matching and grid quality, thus improving efficiency and accuracy for complex geometries.

CN119722982APending Publication Date: 2025-03-28BEIJING ZHIYI TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411694988.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Traditional six-faced mesh generation methods face challenges in handling complex geometries and high-precision requirements, leading to issues such as grid distortion, low accuracy, and low computational efficiency, particularly when dealing with irregular regions and boundary adaptation.

Method used

A fully automated method for optimizing hexahedral mesh generation using an octree mesh structure, which involves dynamic depth refinement based on geometric curvature, distance field information, and quality control algorithms to ensure accurate boundary matching and grid quality.

Benefits of technology

This approach enhances mesh generation efficiency and accuracy, adapts to complex geometries, ensures geometric fidelity, and improves grid quality by dynamically adjusting mesh resolution and applying Laplacian smoothing and shape insertion techniques.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722982A_ABST
    Figure CN119722982A_ABST
Patent Text Reader

Abstract

The invention discloses a full-automatic hexahedral mesh generation optimization method based on an octree mesh, particularly relates to the technical field of hexahedral mesh generation, and aims to avoid redundant calculation of uniform mesh generation, improve mesh generation efficiency and ensure accuracy of a complex region by dynamically adjusting adaptation of mesh refinement depth and region features. The requirements of complex geometrical shapes are met; through distance field information and a global search method, the geometric surface is accurately identified and adapted, accurate matching of grid units on the boundary is ensured, deviation between the grid and the geometric surface is avoided, and the geometric fidelity of the generated grid is ensured; shape insertion and continuous deformation control are carried out on the adjusted hexahedral mesh, a mesh screening model is constructed according to a warping degree abnormal coefficient, an inclination disqualification coefficient and a smoothness fluctuation coefficient, a mesh quality screening index is generated, and the disqualified hexahedral mesh is identified, so that the mesh quality is improved; and the stability of the grid and the accuracy of a numerical simulation result are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of hexahedral mesh generation, and more specifically, to a fully automatic hexahedral mesh generation optimization method based on octree mesh. Background Art

[0002] In the fields of numerical simulation such as computer-aided design (CAD), computational fluid dynamics (CFD), and finite element analysis (FEA), mesh generation is one of the key steps in the simulation process. High-quality meshes can significantly improve the accuracy and efficiency of numerical simulation results, especially when dealing with complex geometries and large-scale physical problems. Hexahedra lmesh is widely used in structural analysis and fluid dynamics simulation due to its good numerical stability and accuracy.

[0003] Traditional hexahedral mesh generation methods mainly rely on the refinement strategy of regular meshes or quadtree / octree meshes. Faced with complex geometries and high precision requirements, traditional methods often encounter problems such as mesh distortion, insufficient precision, and low computational efficiency when processing complex surfaces. In order to solve these problems, in recent years, mesh generation methods based on space segmentation have gradually attracted attention, among which Octree mesh has become an important solution due to its excellent space segmentation ability and adaptability.

[0004] The octree grid structure can provide higher resolution in the detailed areas of the geometry by recursively partitioning the space, thereby achieving fine meshes in local areas and adapting to complex geometric shapes. Its advantage is that it can flexibly capture the complex features of the geometry through adaptive refinement and can retain high mesh quality in irregular areas. However, the simple octree grid structure faces a series of challenges in practical applications, such as boundary adaptation, mesh quality control, and geometric fidelity assurance. Summary of the invention

[0005] In order to overcome the above defects of the prior art, an embodiment of the present invention provides a fully automatic hexahedral mesh generation optimization method based on an octree mesh to solve the problems raised in the above background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] The fully automatic hexahedral mesh generation optimization method based on octree mesh includes the following steps:

[0008] Step S1, importing the input geometric model, initializing the bottom-up octree background grid, obtaining the curvature information of the geometric body, constructing a dynamic depth refinement model according to the curvature information of the geometric body, correcting the resolution of the grid unit, and dynamically adjusting the resolution of the grid unit to refine the generated grid unit;

[0009] Step S2, obtaining distance field information from the grid unit to the surface of the geometric body, performing a global search in the octree background grid according to the distance field information, identifying hexahedral grid units that meet the boundary requirements, and removing hexahedral grid units that do not meet the requirements, aligning the hexahedral grid units that meet the boundary requirements with the global coordinate system, and obtaining an initial hexahedral grid;

[0010] Step S3, mapping the geometric body surface to the hexahedral mesh unit according to the back-projection algorithm, and calculating the displacement vector of each mesh vertex, adjusting the mesh vertex according to the displacement vector, and adjusting the vertices that cannot be directly projected according to the Lap lacian smoothing algorithm to obtain the adjusted hexahedral mesh;

[0011] Step S4, performing shape insertion and continuous deformation control on the adjusted hexahedral mesh, obtaining mesh quality information to construct a mesh screening model, generating a mesh quality screening index, and identifying unqualified hexahedral meshes.

[0012] In a preferred embodiment, the curvature information of the geometric body includes a local area curvature coefficient Jbq;

[0013] The logic for obtaining the local area curvature coefficient is as follows:

[0014] Get the coordinates of each point on the surface of the geometric body in the grid unit area, take any point on the surface of the geometric body in the grid unit area as the target point, and the remaining points as the domain points. Use the least squares algorithm to perform local quadratic fitting on the neighborhood points of the target point, obtain the principal curvatures k1 and k2 of each point on the surface of the geometric body in the grid unit area, and calculate the curvature value of each point on the surface of the geometric body in the grid unit area. The expression is as follows Among them, ql i Represents the i-th point on the surface of the geometric body within the grid unit area; calculates the mean value kmean of the curvature difference, and the expression is as follows Where I represents the total number of geometric surface points in the grid unit area; calculate the local area curvature coefficient Jbq, expressed as follows

[0015] A dynamic depth refinement model is constructed according to the local area curvature coefficient. The model is based on the following formula: Fnew=Fcsd*(1+α*Jbq), where Fnew represents the corrected grid cell resolution, Fcsd represents the initial grid cell resolution, and α represents the preset adjustment factor.

[0016] In a preferred embodiment, the distance field information includes a distance field value Jlc;

[0017] The logic for obtaining the distance field value is as follows:

[0018] Get the coordinates of the center point of the grid unit and calculate the distance from the center point of the grid unit to the surface of the geometric body. The expression is as follows Among them JL j represents the distance from the center point of the grid unit to the jth point on the surface of the geometric body, xw represents the x-axis coordinate of the center point of the grid unit, yw represents the y-axis coordinate of the center point of the grid unit, zw represents the z-axis coordinate of the center point of the grid unit, x j Indicates the x-axis coordinate of the jth point on the surface of the geometric body, y j represents the y-axis coordinate of the jth point on the surface of the geometric body, z j Represents the z-axis coordinate of the jth point on the surface of the geometric body; calculate the distance field value Jlc, expressed as follows Jlc = min (JL j ), where min(JL j ) is the minimum value acquisition function;

[0019] The distance field value is compared with the preset distance field threshold, and a global search is performed in the octree background grid. If the distance field value is less than or equal to the distance field threshold, a boundary requirement qualified signal is generated to mark the grid unit as a hexahedral grid unit that meets the boundary requirements; if the distance field value is greater than the distance field threshold, a rejection signal is generated to reject the grid unit.

[0020] In a preferred embodiment, the surface of the geometric body is mapped onto the hexahedral grid unit according to the back-projection algorithm, and the calculation expression of the back-projection is as follows: in Represents the new position of the nth vertex of the grid cell after back-projection, WG n represents the original position of the nth vertex of the grid cell, fx represents the normal vector, and λ represents the step factor;

[0021] For each mesh vertex of a mesh cell, calculate the displacement vector Among them, Dl n Represents the displacement vector of the nth mesh vertex;

[0022] The displacement vector is compared with the displacement vector threshold. If the displacement vector is less than the displacement vector threshold, the new position of the nth vertex of the grid unit after backprojection is updated according to the displacement vector. The update formula is as follows: in Represents the updated mesh vertex position;

[0023] If the displacement vector is greater than or equal to the displacement vector threshold, the mesh vertex is marked as a difference mesh vertex;

[0024] The difference mesh vertices are adjusted according to the Laplacian smoothing algorithm. The expression is as follows in represents the adjusted m-th difference mesh vertex position, represents the mth difference mesh vertex, represents the pth neighbor mesh vertex of the mth difference mesh vertex, M(m) represents the set of neighbor mesh vertices of the mth difference mesh vertex, and β represents a preset smoothing factor.

[0025] In a preferred embodiment, the mesh quality information includes a warpage abnormality coefficient Qud, an inclination unqualified coefficient Qxd, and a smoothness fluctuation coefficient Phd.

[0026] In a preferred embodiment, the logic for obtaining the warpage abnormality coefficient is as follows:

[0027] Get the actual generated volume Tj of the grid unit and calculate the warpage qq of the grid unit. The expression is as follows Where qi represents the expected mesh unit generation volume; the mean mesh unit warpage wq is calculated as follows: Among them, QQ qw Represents the grid unit warpage of the qwth grid unit, and calculates the warpage anomaly coefficient Qud of the target grid unit. The expression is as follows

[0028] The calculation expression of the inclination failure coefficient is as follows where fx m represents the surface normal vector of the target mesh cell, fx ll represents the surface normal vector of the llth grid cell adjacent to the target grid cell, fx m ·fx ll Represents a vector dot product operation, |fx m | represents the magnitude of the surface normal vector of the target mesh cell, |fx ll | represents the modulus of the surface normal vector of the llth grid cell adjacent to the target grid cell, ll = {1, 2, 3, 4, 5, 6};

[0029] The calculation of the smoothness fluctuation coefficient is expressed as follows in represents the position vector of the cvth grid cell vertex of the target grid cell, Represents the position vector of the hth adjacent grid unit vertex of the cvth grid unit vertex, cv={1,2,3,4,5,6}, h={1,2,...,H}, H is a positive integer.

[0030] In a preferred embodiment, a grid screening model is constructed based on the warpage abnormality coefficient, the inclination unqualified coefficient, and the smoothness fluctuation coefficient to generate a grid quality screening index Wzl. The model is based on the following formula: Wherein w1, w2, and w3 represent the preset proportional coefficients of the warpage abnormality coefficient, the inclination unqualified coefficient, and the smoothness fluctuation coefficient, respectively, and w1, w2, and w3 are all greater than 0.

[0031] In a preferred embodiment, the grid quality screening index is compared with a preset grid quality screening index threshold, and the target grid unit is screened, as follows:

[0032] If the mesh quality screening index is greater than the mesh quality screening index threshold, the mesh cell is marked as a quality qualified mesh cell;

[0033] If the mesh quality screening index is less than or equal to the mesh quality screening index threshold, the mesh cell is marked as a mesh cell of unqualified quality.

[0034] Technical effects and advantages of the present invention:

[0035] 1. The present invention avoids redundant calculations of uniform grid generation and improves grid generation efficiency by dynamically adjusting the grid refinement depth and regional characteristics, ensures the accuracy of complex areas, and adapts to the needs of complex geometric shapes; through distance field information and global search methods, accurately identifies and adapts the surface of geometric bodies, ensures the precise matching of grid units on the boundaries, avoids deviations between the grid and the surface of geometric bodies, and ensures the geometric fidelity of the generated grid; finally, by performing shape insertion and continuous deformation control on the adjusted hexahedral grid, and constructing a grid screening model based on the warping anomaly coefficient, the inclination unqualified coefficient, and the smoothness fluctuation coefficient, a grid quality screening index is generated, unqualified hexahedral grids are identified, and the grid quality is further improved to ensure the stability of the grid and the accuracy of the numerical simulation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to facilitate understanding by those skilled in the art, the present invention is further described below in conjunction with the accompanying drawings;

[0037] Figure 1The figure is a flow chart of a method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] Example: Figure 1 The present invention provides a fully automatic hexahedral mesh generation optimization method based on octree mesh, which includes the following steps:

[0040] Step S1, importing the input geometric model, initializing the bottom-up octree background grid, obtaining the curvature information of the geometric body, constructing a dynamic depth refinement model according to the curvature information of the geometric body, correcting the resolution of the grid unit, and dynamically adjusting the resolution of the grid unit to refine the generated grid unit;

[0041] Step S2, obtaining distance field information from the grid unit to the surface of the geometric body, performing a global search in the octree background grid according to the distance field information, identifying hexahedral grid units that meet the boundary requirements, and removing hexahedral grid units that do not meet the requirements, aligning the hexahedral grid units that meet the boundary requirements with the global coordinate system, and obtaining an initial hexahedral grid;

[0042] Step S3, mapping the geometric body surface to the hexahedral mesh unit according to the back-projection algorithm, and calculating the displacement vector of each mesh vertex, adjusting the mesh vertex according to the displacement vector, and adjusting the vertices that cannot be directly projected according to the Lap lacian smoothing algorithm to obtain the adjusted hexahedral mesh;

[0043] Step S4, performing shape insertion and continuous deformation control on the adjusted hexahedral mesh, acquiring mesh quality information to construct a mesh screening model, generating a mesh quality screening index, and identifying unqualified hexahedral meshes;

[0044] Step S1, importing the input geometric model, initializing the bottom-up octree background grid, obtaining the curvature information of the geometric body, constructing a dynamic depth refinement model according to the curvature information of the geometric body, correcting the resolution of the grid unit, and dynamically adjusting the resolution of the grid unit to refine the generated grid unit;

[0045] Import the geometry model to be meshed, and initialize the octree background mesh within the bounding box of the geometry. The octree background mesh is a recursive space segmentation data structure. The basic idea is to start from the coarsest level of the space and gradually increase the resolution of the mesh by recursively refining the mesh. The initial mesh resolution is set to a predefined maximum scale (for example, the bounding box size of the entire geometry). Each grid cell will contain a cubic area, and the space will be divided into smaller cubic cells by recursion.

[0046] The curvature information of the geometric body includes the local area curvature coefficient Jbq;

[0047] The local area curvature coefficient is used to measure the degree of curvature change of the geometric body in a grid unit area in the octree background grid generated by initialization. When the local area curvature coefficient is large, the grid resolution should be increased so that more grid units can be generated in the initial grid unit area to refine it. On the contrary, when the local area curvature coefficient is small, a larger grid unit can be maintained to reduce the computational overhead.

[0048] The logic for obtaining the local area curvature coefficient is as follows:

[0049] Get the coordinates of each point on the surface of the geometric body in the grid unit area, take any point on the surface of the geometric body in the grid unit area as the target point, and the remaining points as the domain points. Use the least squares algorithm to perform local quadratic fitting on the neighborhood points of the target point, obtain the principal curvatures k1 and k2 of each point on the surface of the geometric body in the grid unit area, and calculate the curvature value of each point on the surface of the geometric body in the grid unit area. The expression is as follows Among them, ql i Represents the i-th point on the surface of the geometric body within the grid unit area; calculates the mean value kmean of the curvature difference, and the expression is as follows Where I represents the total number of geometric surface points in the grid unit area; calculate the local area curvature coefficient Jbq, expressed as follows

[0050] A dynamic depth refinement model is constructed according to the local area curvature coefficient. The model is based on the following formula: Fnew = Fcsd*(1+α*Jbq), where Fnew represents the corrected grid cell resolution, Fcsd represents the initial grid cell resolution, and α represents a preset adjustment factor, which is used to control the influence of the local area curvature coefficient on the grid cell resolution.

[0051] Refining the generated grid cells according to the corrected grid cell resolution;

[0052] Step S2, obtaining distance field information from the grid unit to the surface of the geometric body, performing a global search in the octree background grid according to the distance field information, identifying hexahedral grid units that meet the boundary requirements, and removing hexahedral grid units that do not meet the requirements, aligning the hexahedral grid units that meet the boundary requirements with the global coordinate system, and obtaining an initial hexahedral grid;

[0053] The distance field information includes a distance field value Jlc;

[0054] The distance field value is used to measure the shortest distance from the center point of a grid cell to the surface of the geometry;

[0055] The logic for obtaining the distance field value is as follows:

[0056] Get the coordinates of the center point of the grid unit and calculate the distance from the center point of the grid unit to the surface of the geometric body. The expression is as follows Among them JL j represents the distance from the center point of the grid unit to the jth point on the surface of the geometric body, xw represents the x-axis coordinate of the center point of the grid unit, yw represents the y-axis coordinate of the center point of the grid unit, zw represents the z-axis coordinate of the center point of the grid unit, x j Indicates the x-axis coordinate of the jth point on the surface of the geometric body, y j represents the y-axis coordinate of the jth point on the surface of the geometric body, z j Represents the z-axis coordinate of the jth point on the surface of the geometric body; calculate the distance field value Jlc, expressed as follows Jlc = min (JL j ), where min(JL j ) is the minimum value acquisition function;

[0057] Compare the distance field value with the preset distance field threshold, and perform a global search in the octree background grid. If the distance field value is less than or equal to the distance field threshold, it indicates that the grid unit is close to the surface of the geometric body and is a hexahedral grid unit that meets the boundary requirements and belongs to the boundary grid. A boundary requirement qualified signal is generated to mark the grid unit as a hexahedral grid unit that meets the boundary requirements. If the distance field value is greater than the distance field threshold, it indicates that the grid unit is far from the surface of the geometric body, and a rejection signal is generated to reject the grid unit.

[0058] Through the transformation matrix Among them, R represents the rotation matrix used to adjust the direction between the local coordinate system and the global coordinate system, and P represents the translation vector used to move the origin of the local coordinate system to the appropriate position in the global coordinate system. The local coordinate system Clobal of the hexahedral mesh unit that meets the boundary requirements is converted to the global coordinate system Cglobal to obtain the initial hexahedral mesh;

[0059] Step S3, mapping the geometric body surface to the hexahedral mesh unit according to the back-projection algorithm, and calculating the displacement vector of each mesh vertex, adjusting the mesh vertex according to the displacement vector, and adjusting the vertices that cannot be directly projected according to the Lap lacian smoothing algorithm to obtain the adjusted hexahedral mesh;

[0060] The geometric surface is mapped onto the hexahedral grid unit according to the back-projection algorithm. The back-projection calculation expression is as follows: in Represents the new position of the nth vertex of the grid cell after back-projection, WG n represents the original position of the nth vertex of the grid cell, fx represents the normal vector, and λ represents the step factor, which is used to control the step size of the back projection;

[0061] For each mesh vertex of a mesh cell, calculate the displacement vector Among them, Dl n The displacement vector of the nth mesh vertex is used to adjust the position of the mesh vertex to make it as close to the surface of the geometry as possible;

[0062] The displacement vector is compared with the displacement vector threshold. If the displacement vector is less than the displacement vector threshold, the new position of the nth vertex of the grid unit after backprojection is updated according to the displacement vector. The update formula is as follows: in Represents the updated mesh vertex position;

[0063] If the displacement vector is greater than or equal to the displacement vector threshold, it means that the mesh cannot be directly projected onto the surface of the geometric body. A large displacement vector may cause the mesh shape to be deformed or unreasonable. The mesh vertex is marked as a difference mesh vertex.

[0064] The difference mesh vertices are adjusted according to the Laplacian smoothing algorithm. The expression is as follows in represents the adjusted m-th difference mesh vertex position, represents the mth difference mesh vertex, represents the pth neighbor mesh vertex of the mth difference mesh vertex, M(m) represents the set of neighbor mesh vertices of the mth difference mesh vertex, β represents a preset smoothing factor, which is used to control the strength of smoothing;

[0065] Step S4, performing shape insertion and continuous deformation control on the adjusted hexahedral mesh, acquiring mesh quality information to construct a mesh screening model, generating a mesh quality screening index, and identifying unqualified hexahedral meshes;

[0066] Shape insertion refers to the process of making the mesh units more accurately match the shape of the geometric body through shape adjustment based on the initially adjusted hexahedral mesh. Commonly used shape insertions include facet insertion, adaptive mesh insertion, and geometric body surface normal constraints. Continuous deformation control refers to controlling the continuity and smoothness of the mesh shape during mesh optimization to avoid drastic deformation of the mesh, thereby ensuring the stability and quality of the mesh. Commonly used continuous deformation control methods include local deformation control, global deformation optimization, and energy minimization methods. Based on shape insertion and continuous deformation control, a body-fitting mesh with pure hexahedral mesh layer units is obtained.

[0067] The mesh quality information includes the warpage abnormality coefficient Qud, the inclination unqualified coefficient Qxd, and the smoothness fluctuation coefficient Phd;

[0068] The warpage anomaly coefficient is used to measure the nonlinear degree of shape change of the mesh unit. A mesh unit with a large warpage anomaly coefficient will affect the stability of the numerical calculation, indicating that the deformation of the mesh unit is more severe and the quality of the mesh unit is worse. On the contrary, the smaller the warpage anomaly coefficient, the more the mesh unit meets the expected requirements.

[0069] The logic for obtaining the warpage anomaly coefficient is as follows:

[0070] Get the actual generated volume Tj of the grid unit and calculate the warpage qq of the grid unit. The expression is as follows Where qi represents the expected mesh unit generation volume; the mean mesh unit warpage wq is calculated as follows: Among them, QQ qw Represents the grid unit warpage of the qwth grid unit, and calculates the warpage anomaly coefficient Qud of the target grid unit. The expression is as follows

[0071] The inclination failure coefficient is used to measure the degree of angle deviation of the mesh unit from the ideal state. The mesh unit with a large inclination will affect the accuracy of the numerical calculation. Specifically, it describes the angle between the normal line of the mesh unit surface and the normal line of the ideal mesh shape, or the deviation between the angle of the diagonal line or side of the mesh unit and the ideal unit. The larger the inclination failure coefficient, the greater the degree of angle deviation of the mesh unit from the ideal state, and the worse the quality of the mesh unit. Conversely, the smaller the inclination failure coefficient, the more the mesh unit meets the expected requirements.

[0072] The calculation expression of the inclination failure coefficient is as follows where fx m represents the surface normal vector of the target mesh cell, fx ll represents the surface normal vector of the llth grid cell adjacent to the target grid cell, fxm ·fx ll Represents a vector dot product operation, |fx m | represents the magnitude of the surface normal vector of the target mesh cell, |fx ll | represents the modulus of the surface normal vector of the llth grid cell adjacent to the target grid cell, ll = {1, 2, 3, 4, 5, 6};

[0073] The smoothness fluctuation coefficient is used to measure the degree of change of the surface of the target grid unit in the local area. A larger smoothness fluctuation coefficient indicates that the degree of change of the surface of the target grid unit in the local area is greater, which may lead to a decrease in grid quality. Conversely, a smaller smoothness fluctuation coefficient indicates that the degree of change of the surface of the target grid unit in the local area is smaller, and its grid quality is higher.

[0074] The calculation of the smoothness fluctuation coefficient is expressed as follows in represents the position vector of the cvth grid cell vertex of the target grid cell, represents the position vector of the hth adjacent grid unit vertex of the cvth grid unit vertex, cv={1,2,3,4,5,6}, h={1,2,...,H}, H is a positive integer;

[0075] The grid screening model is constructed based on the warpage anomaly coefficient, the inclination unqualified coefficient, and the smoothness fluctuation coefficient to generate the grid quality screening index Wzl. The formula based on the model is as follows: Wherein w1, w2, and w3 represent the preset proportional coefficients of the warpage abnormal coefficient, the inclination unqualified coefficient, and the smoothness fluctuation coefficient, respectively, and w1, w2, and w3 are all greater than 0;

[0076] It should be noted that before building the grid screening model, it is necessary to ensure that the warpage anomaly coefficient, the inclination unqualified coefficient, and the smoothness fluctuation coefficient are all normalized. Common normalization methods include Min-Max normalization and Z-Score standardization. w1, w2, and w3 are set according to actual conditions. For example, the expert empowerment method is adopted, that is, experts in related fields are invited to determine the preset proportional coefficients of various indicators through professional opinion surveys and comprehensive evaluations.

[0077] From the above calculation expression, it can be seen that the larger the warpage anomaly coefficient, the larger the inclination unqualified coefficient, and the larger the smoothness fluctuation coefficient, the smaller the mesh quality screening index, indicating that the quality of the target mesh unit is worse; conversely, the smaller the warpage anomaly coefficient, the smaller the inclination unqualified coefficient, and the smaller the smoothness fluctuation coefficient, the larger the mesh quality screening index, indicating that the quality of the target mesh unit is better;

[0078] The mesh quality screening index is compared with the preset mesh quality screening index threshold to screen the target mesh cells, as follows:

[0079] If the grid quality screening index is greater than the grid quality screening index threshold, it indicates that the quality of the grid unit can meet the expected requirements, and the grid unit is marked as a grid unit with qualified quality;

[0080] If the mesh quality screening index is less than or equal to the mesh quality screening index threshold, it indicates that the quality of the mesh unit cannot meet the expected requirements, and the mesh unit is marked as a mesh unit with unqualified quality;

[0081] The present invention avoids redundant calculations of uniform grid generation and improves grid generation efficiency by dynamically adjusting the grid refinement depth and adapting to regional features, and ensures the accuracy of complex areas to meet the needs of complex geometric shapes; through distance field information and a global search method, the surface of a geometric body is accurately identified and adapted to ensure accurate matching of grid units on the boundary, avoids deviations between the grid and the surface of the geometric body, and ensures the geometric fidelity of the generated grid; by performing shape insertion and continuous deformation control on the adjusted hexahedral grid, and constructing a grid screening model according to the warping anomaly coefficient, the inclination unqualified coefficient, and the smoothness fluctuation coefficient, a grid quality screening index is generated, unqualified hexahedral grids are identified, and the grid quality is further improved to ensure the stability of the grid and the accuracy of the numerical simulation results.

[0082] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0083] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0084] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A fully automatic hexahedral mesh generation optimization method based on octree mesh, characterized by: The steps include: Step S1, importing the input geometric model, initializing the bottom-up octree background grid, obtaining the curvature information of the geometric body, constructing a dynamic depth refinement model according to the curvature information of the geometric body, correcting the resolution of the grid unit, and dynamically adjusting the resolution of the grid unit to refine the generated grid unit; Step S2, obtaining distance field information from the grid unit to the surface of the geometric body, performing a global search in the octree background grid according to the distance field information, identifying hexahedral grid units that meet the boundary requirements, and removing hexahedral grid units that do not meet the requirements, aligning the hexahedral grid units that meet the boundary requirements with the global coordinate system, and obtaining an initial hexahedral grid; Step S3, mapping the geometric body surface to the hexahedral mesh unit according to the back-projection algorithm, and calculating the displacement vector of each mesh vertex, adjusting the mesh vertices according to the displacement vector, and adjusting the vertices that cannot be directly projected according to the Laplacian smoothing algorithm to obtain an adjusted hexahedral mesh; Step S4, performing shape insertion and continuous deformation control on the adjusted hexahedral mesh, obtaining mesh quality information to construct a mesh screening model, generating a mesh quality screening index, and identifying unqualified hexahedral meshes.

2. The fully automatic hexahedral mesh generation optimization method based on octree mesh according to claim 1, characterized in that: The curvature information of the geometric body includes the local area curvature coefficient Jbq; The logic for obtaining the local area curvature coefficient is as follows: Get the coordinates of each point on the surface of the geometric body in the grid unit area, take any point on the surface of the geometric body in the grid unit area as the target point, and the remaining points as the domain points. Use the least squares algorithm to perform local quadratic fitting on the neighborhood points of the target point, obtain the principal curvatures k1 and k2 of each point on the surface of the geometric body in the grid unit area, and calculate the curvature value of each point on the surface of the geometric body in the grid unit area. The expression is as follows Among them, ql i Represents the i-th point on the surface of the geometric body within the grid unit area; calculates the mean value kmean of the curvature difference, and the expression is as follows Where I represents the total number of geometric surface points in the grid unit area; the local area curvature coefficient Jbq is calculated and expressed as follows A dynamic depth refinement model is constructed according to the local area curvature coefficient. The model is based on the following formula: Fnew=Fcsd*(1+α*Jbq), where Fnew represents the corrected grid cell resolution, Fcsd represents the initial grid cell resolution, and α represents the preset adjustment factor.

3. The fully automatic hexahedral mesh generation optimization method based on octree mesh according to claim 1, characterized in that: The distance field information includes a distance field value Jlc; The logic for obtaining the distance field value is as follows: Get the coordinates of the center point of the grid unit and calculate the distance from the center point of the grid unit to the surface of the geometric body. The expression is as follows Among them JL j represents the distance from the center point of the grid unit to the jth point on the surface of the geometric body, xw represents the x-axis coordinate of the center point of the grid unit, yw represents the y-axis coordinate of the center point of the grid unit, zw represents the z-axis coordinate of the center point of the grid unit, x j Indicates the x-axis coordinate of the jth point on the surface of the geometric body, y j represents the y-axis coordinate of the jth point on the surface of the geometric body, z j Represents the z-axis coordinate of the jth point on the surface of the geometric body; calculate the distance field value Jlc, expressed as follows Jlc = min (JL j ), where min(JL j ) is the minimum value acquisition function; The distance field value is compared with the preset distance field threshold, and a global search is performed in the octree background grid. If the distance field value is less than or equal to the distance field threshold, a boundary requirement qualified signal is generated to mark the grid unit as a hexahedral grid unit that meets the boundary requirements; if the distance field value is greater than the distance field threshold, a rejection signal is generated to reject the grid unit.

4. The fully automatic hexahedral mesh generation optimization method based on octree mesh according to claim 1, characterized in that: The geometric surface is mapped onto the hexahedral grid unit according to the back-projection algorithm. The back-projection calculation expression is as follows: in Represents the new position of the nth vertex of the grid cell after back-projection, WG n represents the original position of the nth vertex of the grid cell, fx represents the normal vector, and λ represents the step factor; For each mesh vertex of a mesh cell, calculate the displacement vector Among them, Dl n Represents the displacement vector of the nth mesh vertex; The displacement vector is compared with the displacement vector threshold. If the displacement vector is less than the displacement vector threshold, the new position of the nth vertex of the grid unit after backprojection is updated according to the displacement vector. The update formula is as follows: in Represents the updated mesh vertex position; If the displacement vector is greater than or equal to the displacement vector threshold, the mesh vertex is marked as a difference mesh vertex; The difference mesh vertices are adjusted according to the Laplacian smoothing algorithm. The expression is as follows in represents the adjusted m-th difference mesh vertex position, represents the mth difference mesh vertex, represents the pth neighbor mesh vertex of the mth difference mesh vertex, M(m) represents the set of neighbor mesh vertices of the mth difference mesh vertex, and β represents a preset smoothing factor.

5. The fully automatic hexahedral mesh generation optimization method based on octree mesh according to claim 1, characterized in that: The mesh quality information includes the warpage abnormality coefficient Qud, the inclination unqualified coefficient Qxd, and the smoothness fluctuation coefficient Phd.

6. The fully automatic hexahedral mesh generation optimization method based on octree mesh according to claim 5 is characterized in that: The logic for obtaining the warpage anomaly coefficient is as follows: Get the actual generated volume Tj of the grid unit and calculate the warpage qq of the grid unit. The expression is as follows Where qi represents the expected mesh unit generation volume; the mean mesh unit warpage wq is calculated as follows: Among them, QQ qw Represents the grid unit warpage of the qwth grid unit, and calculates the warpage anomaly coefficient Qud of the target grid unit. The expression is as follows The calculation expression of the inclination failure coefficient is as follows where fx m represents the surface normal vector of the target mesh cell, fx ll represents the surface normal vector of the llth grid cell adjacent to the target grid cell, fx m ·fx ll Represents a vector dot product operation, |fx m | represents the magnitude of the surface normal vector of the target mesh cell, |fx ll | represents the modulus of the surface normal vector of the llth grid cell adjacent to the target grid cell, ll = {1, 2, 3, 4, 5, 6}; The calculation of the smoothness fluctuation coefficient is expressed as follows in represents the position vector of the cvth grid cell vertex of the target grid cell, Represents the position vector of the hth adjacent grid unit vertex of the cvth grid unit vertex, cv={1,2,3,4,5,6}, h={1,2,...,H}, H is a positive integer.

7. The fully automatic hexahedral mesh generation optimization method based on octree mesh according to claim 6, characterized in that: The grid screening model is constructed based on the warpage anomaly coefficient, the inclination unqualified coefficient, and the smoothness fluctuation coefficient to generate the grid quality screening index Wzl. The formula based on the model is as follows: Wherein w1, w2, and w3 represent the preset proportional coefficients of the warpage abnormality coefficient, the inclination unqualified coefficient, and the smoothness fluctuation coefficient, respectively, and w1, w2, and w3 are all greater than 0.

8. The fully automatic hexahedral mesh generation optimization method based on octree mesh according to claim 7, characterized in that: The mesh quality screening index is compared with the preset mesh quality screening index threshold to screen the target mesh cells, as follows: If the mesh quality screening index is greater than the mesh quality screening index threshold, the mesh cell is marked as a quality qualified mesh cell; If the mesh quality screening index is less than or equal to the mesh quality screening index threshold, the mesh cell is marked as a mesh cell of unqualified quality.

Citation Information

Cited By

  • Three-dimensional grid construction method, electronic equipment, scanning equipment and storage medium

    CN121053309A