CN-122023715-A - Curvature self-adaptive triangle mesh generation method with characteristic reserved
Abstract
The invention discloses a curvature self-adaptive triangle mesh generation method for feature preservation, which comprises the steps of obtaining a geometric self-adaptive size field according to a curved surface set based on a geometric size field construction strategy, obtaining a discrete curve mesh for curve feature preservation by performing curve discretization on a curve set according to the geometric self-adaptive size field based on the geometric self-adaptive size field, taking the discrete curve mesh as a rigid boundary constraint condition, and adopting a front edge propulsion method+ And carrying out local grid merging and optimization on the discrete surface grids to obtain uniform surface grids with geometric continuity, namely curvature self-adaptive triangular grids with feature preservation. The invention solves the technical problems that the prior method can not ensure the quality of boundary grids, and has the defects of low efficiency and poor convergence.
Inventors
- LIU JINGJING
- FENG QIWEI
- ZHANG QUN
- LIU YANG
- TIAN MIAOMIAO
- LI CHUNNAN
- WU HAO
- ZHENG JUNWEN
Assignees
- 英特工程仿真技术(大连)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260112
Claims (8)
- 1. The curvature self-adaptive triangle mesh generation method with the reserved characteristics is characterized by comprising the following steps of: S1, geometric engine based on open source Reading a preset geometric model file, automatically identifying topological entities and geometric elements in the model, extracting all parameterized curved surface sheets and establishing indexes to obtain a geometric data set, wherein the geometric data set comprises a curved surface set and a curve set; s2, based on the curved surface set, acquiring a geometric self-adaptive size field representing local geometric complexity through a predefined geometric size field construction strategy; s3, performing curve discretization on a curve set based on a geometric self-adaptive size field to obtain a discrete curve grid which is used for performing self-adaptive discretization on the curve set and retaining the geometric characteristics of an original curve; S4, taking the discrete curve grid as a rigid boundary constraint condition, and adopting a front edge propulsion method+ Performing surface discretization processing on each parameterized surface sheet according to a geometric self-adaptive size field to obtain discrete surface grids of all parameterized surface sheets; S5, carrying out local grid merging and optimization on the discrete surface grids to obtain unified surface grids which have overall geometric continuity and retain the original model boundary and curvature characteristics, namely curvature self-adaptive triangle grids with the characteristics retained.
- 2. The curvature adaptive triangle mesh generation method of claim 1, wherein S2 specifically comprises the steps of: s21, randomly sampling curved surface boundary curves corresponding to all curved surfaces in the curved surface set to obtain curved surface boundary sampling points; s22, constructing constraint according to curved surface boundary sampling points based on triangulation algorithm Triangular mesh and to constrain The vertexes of the triangular meshes are used as background mesh nodes; s23 based on constraints The triangular mesh calculates the geometric self-adaptive size according to the local curvature radius of the sampling point; And the calculation formula of the geometric self-adaptive size is as follows: wherein: Representing the geometry-adaptive dimensions; Representing the local curvature of the curved surface boundary sampling point; representing a curvature size conversion coefficient; S24, acquiring constraints The method comprises the steps of taking the distance from each curved surface boundary sampling point to a central axis as a characteristic distance, and acquiring adjacent self-adaptive dimensions according to the characteristic distance, wherein the distance is as follows: wherein: representing the neighboring adaptive size; Representing the feature distance; representing the neighboring size conversion coefficients; Combining the geometric self-adaptive size and the adjacent self-adaptive size based on the initial size field interpolation function to obtain an initial size value And associating the initial size value to a background grid node to obtain an initial size field, wherein the expression of the interpolation function of the initial size field is as follows: ; s25, carrying out region division on each curved surface in the curved surface set according to the experience value to obtain a plurality of division regions, and carrying out random sampling on the division regions to obtain sampling points in the curved surface; obtaining local curvature of sampling point in contrast curved surface And boundary curvature Is a difference value of (2); Judging whether the difference value exceeds a preset threshold ; If the number of the divided areas is not exceeded, performing no processing on the corresponding divided areas; If the number of the feature points exceeds the number of the feature points, sampling points are dynamically distributed on the divided areas based on the DT algorithm to increase the feature points, and new constraint is built according to the triangulation algorithm and the feature points Triangular mesh and new constraints Simultaneously updating an initial size field by combining an interpolation function of the initial size field, thereby obtaining a comprehensive size field for representing geometric size and curvature; S26, carrying out Laplace smoothing on the comprehensive size field to eliminate local curvature mutation of the size field, and obtaining the geometric self-adaptive size field containing the size value of any spatial point in the curved surface.
- 3. The curvature adaptive triangle mesh generation method of claim 2, wherein S3 specifically comprises the steps of: s31, initializing uniformly distributed curve integration points in each curve in the curve set, obtaining a distribution point set of the curve, and utilizing The algorithm recursively calls curve integral points in the point distribution set; s32, based on the geometric self-adaptive size field, acquiring a space distance error of an adjacent curve integration point; judging the size of the space distance error and a preset parameter threshold value; the preset parameter threshold is 1% of the curve arc length in the corresponding curve set; if the space distance error is smaller than the preset parameter threshold value, no processing is performed; If the space distance error is larger than a preset parameter threshold, setting a new curve integration point at the curve midpoint between adjacent curve integration points until the distance error between all adjacent curve integration points does not exceed the preset parameter threshold, and obtaining a curve integration point set meeting the convergence requirement; S33, adopt The iterative algorithm carries out smooth optimization on the size corresponding to the curve integral point set, and the curve integral point set with smooth size is obtained; s34, determining minimum discrete point number reserved by curve characteristics according to curve types And the minimum discrete point number The acquisition formula of (1) is: wherein: the radius of the curve arc is shown; Represents a central angle; representing the curve length; The length of a line segment of a curve starting point is represented; , Respectively representing the precision control parameters of the arc and other curves; a curve representing a curvature of 0; s35 based on minimum discrete point number Acquiring the number of curve discrete points according to a curve integral point set with smooth size, and acquiring the unit size value of each curve discrete point based on a geometric self-adaptive size field Obtaining a geometric unit size used for defining an arc section between any two adjacent discrete points based on a unit size function, taking the geometric unit size as a geometric marking feature, and further obtaining a curve discrete point set with the unit size and the geometric marking feature; The expression of the unit size function is: wherein: representing geometric element dimensions; Representing arc length variables; Representing discrete points Is a cell size value of (a); representing discrete points respectively To discrete points Arc length and discrete points of (a) To discrete points Is a length of arc; Discrete points Is a cell size value of (a); S36, acquiring Euclidean distance between any adjacent discrete points in the curve discrete point set, taking the adjacent discrete points with Euclidean distance smaller than a preset distance threshold as redundant discrete points, randomly deleting any one discrete point in the redundant discrete points to acquire an optimized curve discrete point set, and connecting any two adjacent discrete points in the optimized curve discrete point set to acquire a discrete curve grid.
- 4. A method for generating a curvature-preserving adaptive triangular mesh according to claim 3, wherein said S4 specifically comprises the steps of: S41, calling open source geometry engine Analyzing the geometric characteristics of the curved surface corresponding to the discrete curve grid and determining whether a stitching edge exists or not; the stitching edges are edges which are overlapped in the curved surface three-dimensional space; If not, confirming that the curved surface is an aperiodic curved surface; directly connecting the curve boundaries corresponding to the discrete curve grids according to the Euclidean distance in an end-to-end manner to form a closed ring; If the curved surface exists, confirming that the curved surface is a periodic curved surface; marking discrete points on the stitching edge as main nodes to obtain a main node chain, marking discrete points which are overlapped with the main nodes in a curved surface three-dimensional space or are within a preset distance tolerance range and have different parameters as auxiliary nodes, and obtaining an auxiliary node chain; Respectively associating discrete points which do not belong to the stitching edges to a main node chain or a slave node chain closest to the stitching edges according to Euclidean distances to obtain a main node adjacent edge and a slave node adjacent edge; s42, confirming an inner ring part and an outer ring part of the closed ring based on a polygonal area judging method to obtain a manifold closed boundary loop of the curved surface; S43, carrying out two-dimensional projection on discrete points of a boundary curve in a manifold closed boundary loop to obtain two-dimensional projection points of the boundary discrete points; S44, acquiring two-dimensional initial points according to the two-dimensional projection points Triangular mesh; S45, according to two-dimensional initialization Triangular mesh generation anisotropy Triangular mesh; S46. based on the front edge propulsion method + Triangularization coupling strategy based on geometrically adaptive size field in anisotropy After the insertion point is carried out in the triangular mesh, the anisotropism is updated Triangular grids, and further obtaining the discrete surface grids of all the parameterized surface sheets.
- 5. The method for generating a curvature-preserving adaptive triangular mesh according to claim 4, wherein said step S44 specifically comprises the steps of: S441, setting four initial points surrounding all two-dimensional projection points, and obtaining two initial convex hull triangular grids with the same shared edge; S442, sequentially aiming at discrete points of the boundary curve according to each two-dimensional projection point The inserting operation is executed, and specifically comprises the following steps: S4421, confirming the position relation between the current two-dimensional projection point and the initial convex hull triangular grid, and if the current two-dimensional projection point is positioned in the initial convex hull triangular grid, corresponding discrete points are formed Three new triangles are formed by connecting the three vertexes of the initial convex hull triangular mesh, and if the current two-dimensional projection point is positioned on the boundary of the initial convex hull triangular mesh, the corresponding discrete point is positioned on the boundary of the initial convex hull triangular mesh The method comprises the steps of connecting four vertexes of two initial convex hull triangular meshes of the same shared edge to form four new triangles and deleting the shared edge; judging whether all acquired new triangles meet Empty circle criterion, and does not satisfy Carrying out shared edge exchange on triangles with empty circle criterion to obtain two triangles with shared edge exchange, wherein the two triangles are identical in size The empty circle criterion is that the circumscribed circle formed by three vertexes of the triangle does not contain vertexes of other triangles; S4422, taking the triangle after executing S4421 as an initial convex hull triangular grid, and according to the two-dimensional projection points, performing discrete points on the rest boundary curves Repeatedly executing S4421; s443, completing all discrete points of the boundary curve After insertion, the boundary edge marking algorithm identifies and marks the missing triangle boundary edge, and performs local edge exchange operation on each triangle boundary edge to reconstruct the constraint edge to obtain the two-dimensional initial Triangular mesh.
- 6. The method for generating a curvature-adaptive triangular mesh with feature preservation according to claim 5, wherein the step S45 specifically comprises the steps of: s451 is two-dimensional initial Establishing a local Riemann metric matrix at the midpoint of each triangle grid edge in the triangle grids; S452, judging the shared edge as Any two adjacent triangles of (a) meet the anisotropic empty circle criterion; And the anisotropic empty circle criterion is based on shared edges Under the local Riemann metric matrix of the midpoint, the external ellipse formed by the three vertexes of the triangle does not contain the vertexes of the rest triangles; If the triangle is satisfied, not performing any treatment on the adjacent triangle; If not, sharing edges of any two adjacent triangles Performing edge swap operation to reconstruct triangle and obtain anisotropy Triangular mesh.
- 7. The method for generating a curvature-adaptive triangular mesh with feature preservation according to claim 6, wherein the step S46 specifically comprises the steps of: S461 of anisotropy of Triangles in a triangular mesh set a dual evaluation index comprising: Time stamp factor for recording grid generation timing Coefficient of dimensional adaptation Wherein The radius of the circumscribed circle of the triangle is represented; representing a size value of the triangle center of gravity in the geometrically adaptive size field; According to The result of the product is used for arranging all triangles in a descending order to obtain an active front list ; S462, selecting an active front list Triangle with middle first position Performing optimal candidate points Calculate, and the optimal candidate point The calculation method of (1) is as follows: S4621 calculate triangle Is the barycentric coordinates of (2) : Wherein , , Representing triangles Is defined by three spatial vertex coordinates; S4622 querying triangles At active front list Active edges in (a) : ; S4623 calculating active edges Is the midpoint of (2) : Wherein , Representing active edges Is defined by two parameter space vertices; S4624 based on active edges Is the midpoint of (2) And the barycentric coordinates Obtaining optimal candidate directions : Wherein Is a unitized symbol; s4625 based on the optimal candidate direction Obtaining optimal candidate points : Wherein Representation of Querying a size field for a size value; representing optimal candidate factors; S4626, adopting BW increment interpolation method to make optimum candidate point Insertion anisotropy The triangle mesh forms a new triangle, and obtains the current corresponding to the new triangle based on S461 The product results and arrange the current in descending order Product result joining update active preamble list And repeatedly executing S4621 until the preset iteration times are reached, and further acquiring the discrete surface grids of all the parameterized surface sheets.
- 8. The curvature adaptive triangle mesh generation method of claim 7, wherein S5 specifically comprises the steps of: S51, carrying out local mesh merging on the discrete surface meshes, eliminating redundant nodes and reserving geometric features to obtain uniform surface meshes with geometric continuity; and S52, carrying out local operation on the unified curved surface grid to obtain a curvature self-adaptive triangle grid with reserved final characteristics, wherein the local operation comprises, but is not limited to, edge exchange, edge splitting, edge folding and vertex smoothing operation.
Description
Curvature self-adaptive triangle mesh generation method with characteristic reserved Technical Field The invention relates to the technical field related to Computer Aided Engineering (CAE) design, in particular to a curvature self-adaptive triangle mesh generation method with reserved characteristics. Background Numerical simulation is a key technical means in modern scientific research and engineering application, and is widely applied to the fields of computational fluid mechanics, structural mechanics, electromagnetics, material science and the like. The numerical simulation mainly comprises three parts of pretreatment, numerical calculation and post-treatment. The preprocessing is mainly a grid generation part, and the problem to be studied is how to divide a given geometric area into grids composed of a limited number of basic geometric shapes according to model features and calculation accuracy requirements. Grid generation is the basis and premise of numerical calculation in the whole numerical simulation process, and the accuracy and efficiency of the numerical calculation are directly affected by the grid generation efficiency and quality. With the increasing complexity of practical problems in scientific calculation and engineering, the complex model analyzed at present usually contains high-curvature areas or local tiny geometric features, and the grids at the geometric features need to be subjected to fine encryption to ensure the accuracy of the subsequent numerical calculation by the grid quality. An encrypted uniform grid is generated, unnecessary secret units are generated at non-geometric features, and the efficiency of subsequent numerical calculation is affected. To ensure the accuracy and efficiency of subsequent numerical calculations, it is often necessary to manually annotate the geometric feature areas of the model and provide local size control information to facilitate encryption of the grid cells in the local feature areas. For complex models, the effort to manually control the local grid cell size requires a significant amount of time and effort. In addition, the unstructured surface mesh has high flexibility in node and cell arrangement due to the irregularity of the topological structure among cells, and is particularly suitable for high-quality surface mesh generation of complex geometric models. The current curved surface grid mainstream technology comprises a front edge propulsion method and a front edge propulsion methodThe grid generating method has advantages and disadvantages. The front edge advancing method can ensure the quality of the boundary grid, but has the defects of low efficiency and poor convergence by dispersing the boundary of the calculation domain into initial array elements and gradually advancing the boundary into the interior to generate the gridThe method is based on the triangularization criterion of boundary discrete points and utilizesThe incremental interpolation point algorithm dynamically optimizes the grid, and although the efficiency is high and the convergence is strong, the quality of the boundary grid is difficult to meet the precision requirement. Disclosure of Invention The invention provides a curvature self-adaptive triangle mesh generation method with reserved characteristics, which aims to overcome the technical problems. In order to achieve the above object, the technical scheme of the present invention is as follows: the curvature self-adaptive triangle mesh generation method with the reserved characteristics specifically comprises the following steps: S1, geometric engine based on open source Reading a preset geometric model file, automatically identifying topological entities and geometric elements in the model, extracting all parameterized curved surface sheets and establishing indexes to obtain a geometric data set, wherein the geometric data set comprises a curved surface set and a curve set; s2, based on the curved surface set, acquiring a geometric self-adaptive size field representing local geometric complexity through a predefined geometric size field construction strategy; s3, performing curve discretization on a curve set based on a geometric self-adaptive size field to obtain a discrete curve grid which is used for performing self-adaptive discretization on the curve set and retaining the geometric characteristics of an original curve; S4, taking the discrete curve grid as a rigid boundary constraint condition, and adopting a front edge propulsion method+ Performing surface discretization processing on each parameterized surface sheet according to a geometric self-adaptive size field to obtain discrete surface grids of all parameterized surface sheets; S5, carrying out local grid merging and optimization on the discrete surface grids to obtain unified surface grids which have overall geometric continuity and retain the original model boundary and curvature characteristics, namely curvature self-adaptive triangle grids wi