Self-adaptive size field construction method for high-curvature model grid generation

By generating internal sampling points of the surface in high curvature areas and building a high curvature dimension field, combined with other adaptive dimension fields, the problems of unqualified grid accuracy and crossover in the existing technology are solved, and high-precision and high-efficiency mesh generation are achieved.

CN120124290AActive Publication Date: 2025-06-10UNIV OF ELECTRONICS SCI & TECH OF CHINA

Patent Information

Application Number
CN202510203238.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-06-10
Estimated Expiration
2045-02-24

AI Technical Summary

Technical Problem

The grid accuracy generated in the high curvature area in the prior art is unqualified or there are crossovers, making it difficult to effectively capture geometric feature information in areas such as complex spline surfaces.

Method used

By generating internal sample points in the surface at the initial stage, a high curvature dimension field is constructed, combining adjacent adaptive and curve curvature adaptive dimension fields, the final adaptive dimension field is fused to guide mesh generation.

Benefits of technology

Accurate adaptive mesh generation in high curvature areas is achieved, ensuring high-precision calculation results, and significantly improving simulation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120124290A_ABST
    Figure CN120124290A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of electromagnetic numerical simulation, and particularly relates to a self-adaptive size field construction method for high-curvature model grid generation. The method comprises the following steps of: generating uniform sampling points and constructing an initial background grid by performing geometric processing on a target geometry model; on the basis of the initial background grid, calculating a discrete central axis point, obtaining an adjacent adaptive size, calculating a model side curvature, obtaining a curve curvature adaptive size, and fusing the two to construct an adaptive size field. On the basis, generating internal sampling points of a high-curvature area, constructing a high-curvature self-adaptive size mode, and fusing the high-curvature self-adaptive size mode into an original self-adaptive size field; and finally, a high-quality unstructured adaptive grid is generated. According to the method, the grid generation efficiency and the simulation precision are improved, and a basis is provided for high-precision algorithm engineering application of computational fluid mechanics and computational electromagnetism in the fields of automobile manufacturing, civil engineering, environmental engineering, ship industry, aviation industry and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of electromagnetic numerical simulation, and particularly relates to an adaptive size field construction method for high-curvature model mesh generation. Background Art

[0002] In electromagnetic engineering and electronic system design, the finite element electromagnetic simulation (Finite Element Method, FEM), as a core technology, is widely used in the structural design, performance evaluation, and electromagnetic characteristic analysis of electromagnetic devices. FEM relies on numerical methods to solve the basic equations of the electromagnetic field, and the effectiveness of this process depends to a large extent on the quality and accuracy of the mesh generation. Mesh generation is the process of discretizing a complex electromagnetic structure into computational units for analyzing the electromagnetic field characteristics on the discrete control model. This process not only needs to consider the complexity of the geometric structure of the electromagnetic system but also ensure the connectivity and good quality of the mesh to improve the accuracy and stability of the calculation results; not only the mesh quality, but also the efficiency of mesh generation has a great impact on the numerical simulation calculation. Therefore, in electromagnetic simulation research, mesh generation is not only the cornerstone of the calculation process but also the key factor affecting the simulation accuracy and efficiency.

[0003] In actual engineering implementation, an excellent mesh needs to pursue two goals simultaneously, that is, generating as few meshes as possible to improve the calculation efficiency and generating finer meshes to improve the model accuracy. If uniform meshes are generated, these two goals conflict with each other: reducing the mesh size can bring higher accuracy, but the scale of the mesh will necessarily increase significantly, and vice versa. However, in actual situations, the model accuracy required in different regions of the model is different. In regions containing complex geometric features, such as spline surfaces and high-curvature regions, fine meshes are required; while in regions with simple geometric features, such as planes and regular analytic surfaces, only a small number of meshes are needed. Therefore, if adaptive meshes can be generated according to geometric features, the two goals of an excellent mesh can be well achieved simultaneously.

[0004] The geometric features of the model are mainly divided into proximity features and curvature features:

[0005] The proximity feature is the distance between model elements (points, lines, surfaces). The mainstream method is to identify the proximity features of the shape by means of the medial axis of the shape. The distance from the medial axis to the boundary of the shape can accurately reflect the proximity features of the shape, thereby calculating the proximity adaptive size.

[0006] The curvature feature characterizes the degree of curvature of the model. The current mainstream method is to calculate the curvature of the sampled points on the edges of the model and then calculate the self-adaptive size of the sampled point curvature. This method has a good effect on the adaptive mesh generation of simple surfaces. However, if there are complex high-curvature regions in the simulation model, it will lead to too low grid accuracy or grid crossing. The reason is that not every high-curvature region has model edges, especially in complex spline surface regions, and the curvature features of these regions cannot be captured by the above method.

[0007] Therefore, it is necessary to study a grid size control method that can achieve precise adaptive mesh generation in high-curvature regions, capture the geometric feature information of high-curvature regions at the initial mesh generation stage, and construct an adaptive size field to ensure that dense meshes can be automatically generated in high-curvature regions with complex geometric features and relatively sparse meshes can be generated in regions with simple features, so as to significantly improve the simulation efficiency while ensuring the calculation accuracy to meet the urgent needs of electromagnetic engineering and electronic system design. Summary of the Invention

[0008] Aiming at the above existing problems or deficiencies, in order to solve the problem that the mainstream self-adaptive size control method generates unqualified accuracy or crossed meshes in high-curvature regions, the present invention provides an adaptive size field construction method for high-curvature model mesh generation. By generating internal sampling points on the surface at the initial stage and constructing a reasonable high-curvature size field to guide the mesh generation process, both fewer meshes and high accuracy are taken into account to ensure the final mesh quality. And the efficient mesh generation method and reasonable mesh distribution enable the subsequent FEM numerical calculation to greatly improve the calculation efficiency while ensuring the accuracy.

[0009] An adaptive size field construction method for high-curvature model mesh generation includes the following steps:

[0010] Step 1: Process the target geometric body model to obtain the set of discrete surfaces on the model surface; and obtain the parameter range of the model edges of each discrete surface itself. Through the parameter range and a fixed density value (default is 0.1, which can be modified: decreasing the density value will improve the discrete accuracy and reduce the efficiency, while increasing the density value will improve the efficiency and reduce the accuracy), the model edges are evenly divided to generate a set of uniformly sampled points.

[0011] Step 2: Use the uniformly sampled points obtained in Step 1 as boundary constraints to perform mesh division on the model (such as constrained Delaunay algorithm, advancing front algorithm, octree mesh generation method) to generate an initial background mesh covering the entire model.

[0012] Step 3: Based on the triangular elements of the initial background grid generated in Step 2, calculate the discrete medial axis points for each uniformly sampled point; then calculate the adjacent adaptive size for each uniformly sampled point based on the distance from the uniformly sampled point to the discrete medial axis point, and construct the adjacent adaptive size field.

[0013] Step 4: Calculate the curvature and curvature adaptive size for each uniformly sampled point on each model edge, and construct the curve curvature adaptive size field.

[0014] Step 5: Based on the area and curvature of the model discrete surface, generate internal sampled points inside the model discrete surface for the discrete surfaces of planes, analytical surfaces, and spline surfaces, and calculate the adaptive size of the internal sampled points. These internal sampled points are not used for mesh generation, and then the internal sampled points are used to construct the adaptive size field for the internal region of the model.

[0015] For different types of discrete surfaces (planes, analytical surfaces, and spline surfaces), there are significant differences in the methods for obtaining their area and curvature. Among them, planes and analytical surfaces are simple surfaces with deterministic mathematical expressions, and their area and curvature can be accurately calculated directly through their analytical expressions.

[0016] For spline surfaces with complex shapes, their feature extraction and sampled point generation face greater challenges. They are calculated through the tensor product of two B-spline basis functions in two orthogonal directions u and v, and then sampled points inside the surface are generated, and the corresponding adaptive size is calculated, and then the high-curvature adaptive size field is constructed.

[0017] Step 6: On the uniformly discrete initial background grid points obtained in Step 2, fuse the above adjacent adaptive size field, curve curvature adaptive size field, and high-curvature adaptive size field to construct the final adaptive size field.

[0018] Further, in Step 2, the mesh division of the model adopts the constrained Delaunay method, the advancing front algorithm, or the octree mesh generation method.

[0019] Further, the fusion in Step 6 is to take the minimum size value in various size fields for the adjacent adaptive size field, curve curvature adaptive size field, and high-curvature adaptive size field to ensure the mesh accuracy.

[0020] Further, in Step 5, for spline surfaces with complex shapes, the specific feature extraction and sampled point generation are as follows:

[0021] The spline surface is calculated through the tensor product of two B-spline basis functions in two orthogonal directions u and v; a spline surface of degree p in the u direction and degree q in the v direction is a piecewise rational function r(u, v), expressed as:

[0022]

[0023] u 1 u ≤ u ≤ u n+p+1 ,v 1 v ≤ v ≤ v m+q+1

[0024] Among them, the parameter range in the u direction is from 1 to n + p + 1; the parameter range in the v direction is from 1 to m + q + 1; P ij is the control point, there are n + 1 points in the u direction and m + 1 points in the v direction; w ij is the weight coefficient of the product of the B-spline basis functions B i,p (u) and B j,q (v); B i,p (u) is the B-spline basis function of degree p in the u direction, and i is the index of the B-spline basis function; B j,q (v) is the B-spline basis function of degree q in the v direction, and j is the index of the B-spline basis function; U and V are the knot vectors of the B-spline basis functions in the u and v directions.

[0025] First, calculate the area A of the spline surface:

[0026]

[0027] Among them, u 1 , u n+1 represent the starting value and the ending value of the parameter domain in the u direction respectively; v 1 , v m+1 represent the starting value and the ending value of the parameter domain in the v direction respectively; r u (u, v) represents the tangent vector (first-order partial derivative) of the surface equation in the u direction, and r v (u, v) represents the tangent vector (first-order partial derivative) of the surface equation in the v direction.

[0028] Measure the surface complexity by the mean curvature, and the curvature marginal cumulative integral k u (u) in the u direction is:

[0029]

[0030] Among them, k(s, v) represents the mean curvature of the surface at the point (s, v); s is the integration variable in the u direction; r s (s, v) represents the tangent vector of the surface in the u direction, and r v (s, v) represents the tangent vector of the surface in the v direction.

[0031] The area A and the curvature marginal cumulative integral k u(u) Used to calculate the sampling strategy: construct a hybrid parameter corresponding to a hybrid metric based on area and curvature by combining the weights of area and curvature in a ratio of 1:1 It is:

[0032]

[0033] Then, obtain the u and v parameter ranges through the spline surface, and uniformly take K + 1 discrete points in the parameter range interval, where K is a user parameter (as the number of K increases, the final solution accuracy will increase accordingly, while reducing the running efficiency. Initially, K = 10, and the maximum sampling number Kmax = 160); for each discrete point u parameter u in the u direction (k) : u (0) = u min u (1) = u 1 +Δu, …, u (K) = u max , where Δu is the parameter increment in the u direction:

[0034]

[0035] Calculate and store the corresponding hybrid parameter

[0036]

[0037] Form a "reference table" data, including the u - direction parameters of discrete points and hybrid parameters After having the reference table, splice P interp (u) with a linear function:

[0038]

[0039] At the same time, calculate the number N of the final sampling points to be generated. First, calculate the hybrid metric M:

[0040] M = αA+(1 - α)I k

[0041] where I k is the cumulative curvature, α is a user parameter, 0 < α < 1. By reducing α, the proportion of curvature can be increased. The larger the curvature proportion, the more grid points will be generated in the high - curvature area in the end, which will bring higher grid accuracy but increase the calculation pressure. After engineering verification, α = 0.5 is the optimal parameter. Let the sampling density d be:

[0042]

[0043] where Δv is the parameter increment in the v direction. Calculate the number of sampling points Nu in the u direction through the density d u :

[0044]

[0045] Partition the target value on [0, 1] In order to generate N u sampling points in the u direction, let the mixed target parameter

[0046]

[0047] and evenly take N u points on [0, 1]. Use the "reference table" to look up the inverse of ({u i ) for each target value to find u i such that:

[0048]

[0049] Then at the same time, the final u-direction parameter u i meets the accuracy requirements, and the solution is:

[0050]

[0051] So far, the parameter value u corresponding to the target value can be efficiently obtained i . This method based on look-up table interpolation of the present invention significantly reduces the computational complexity and avoids the repeated integral operations and iterative solution processes.

[0052] In order to ensure that the calculation accuracy meets the requirements, the present invention also uses an adaptive method to verify the results. When the average error between u i under different K values is less than the error threshold ∈ = 10 -4 , the generated grid will reach sufficient accuracy; first, calculate with K = 10 as the initial sampling number, and then double the K value and recalculate. Define the relative error ∈ k as:

[0053]

[0054] where represents the i-th parameter value calculated when the sampling number is k, is the last parameter value. Set the relative error threshold ∈ = 10 -4 , when ∈ kWhen <∈, it is considered that the current accuracy meets the requirements; otherwise, double the value of K and repeat the calculation until the error threshold requirement is met or the preset maximum number of samples Kmax = 160 is reached. Through experimental verification, in most cases, K = 100 can meet the accuracy requirements, and only on complex surfaces with drastic curvature changes is a higher value of K required.

[0055] Process the v direction synchronously. Perform the same "pre - discretization + interpolation + inverse lookup" process along the v direction. Discretize in the parameter range {v (k)}, calculate and form a table and then construct an interpolation function. For the required target value use the same piece - wise linear inverse interpolation to find the corresponding v j .

[0056] Finally, in the parameter domain, we obtain u 0 , u 1 , …, u N-1 and v 0 , v 1 , …, v M-1 ; and pair them up to form (u i , v j ) parameter pairs, construct an (N×M) parameter matrix, and substitute them one by one into the spline surface piece - wise rational function r(u, v) to obtain (N×M) three - dimensional sampling points on the surface.

[0057] Then calculate the high - curvature adaptive size for each internal sampling point:

[0058]

[0059] where I s is the curvature of the current internal sampling point; is the user - defined opening angle used to adjust the density of the final high - curvature grid. The smaller the angle, the more grids are generated, the higher the accuracy, and at the same time, the generation time also increases accordingly. It is preferably 20°. Thus, the sampling points inside the surface are generated, and the adaptive size of the sampling points is calculated.

[0060] The present invention generates a uniform initial background grid by performing mesh division (constrained Delaunay) on a model, calculates discrete medial axis points based on the initial background grid, obtains adjacent adaptive sizes, calculates the edge curvature of the model, obtains curve curvature adaptive sizes, and fuses the two to construct an adaptive size field. On this basis, by generating internal sampling points in high-curvature regions and constructing high-curvature adaptive sizes, it is incorporated into the original adaptive size field; finally, a high-quality unstructured adaptive mesh is generated. For traditional uniform mesh division methods, if they want to achieve the same geometric feature accuracy, they often need to generate several times more mesh numbers, which greatly affects the simulation time. For mainstream adaptive meshes that only consider adjacent adaptivity and curve curvature adaptivity, the generated meshes are often not ideal for high-curvature regions of the model. Therefore, the solution of the present invention can greatly reduce the time required for simulation and ensure the model accuracy.

[0061] In summary, based on Delaunay mesh division, the present invention takes the background mesh size as the main body, calculates various adaptive sizes, and finally realizes a complete and efficient method for generating surface adaptive initial meshes; it provides a basis for the high-precision algorithm engineering applications of computational fluid dynamics and computational electromagnetics in fields such as automotive manufacturing, civil engineering, environmental engineering, shipbuilding industry, and aviation industry, and helps the relevant industries to interpret, understand theories, experiments, and designs. Brief Description of the Drawings

[0062] Figure 1 is the flow chart of the present invention;

[0063] Figure 2 is the three-dimensional model diagram of the target model in the embodiment;

[0064] Figure 3 is the internal sampling point diagram generated by dividing the embodiment model of the present invention;

[0065] Figure 4 is the adaptive size field diagram generated by dividing the embodiment model using only adjacent and curve curvature;

[0066] Figure 5 is the adaptive size field diagram generated by dividing the embodiment model of the present invention;

[0067] Figure 6 is the adaptive mesh diagram generated by dividing the embodiment model using only adjacent and curve curvature;

[0068] Figure 7 is the adaptive mesh diagram generated by dividing the embodiment model of the present invention;

[0069] Figure 8 is the quality distribution of the meshes generated by dividing the embodiment models of the present invention, adjacent, and curve curvature adaptive methods respectively; Detailed Embodiments

[0070] The technical solutions and implementation effects of the present invention will be described in detail below in conjunction with the accompanying drawings and embodiments.

[0071] An adaptive size field construction method for controlling initial mesh generation, as Figure 1 shown, includes the following steps:

[0072] Step 1: Process the target geometric body model: Obtain the discrete face set on the model surface; and obtain the parameter range of the model edges of each discrete face itself. Divide the model edges evenly through the parameter range and a fixed density value (default is 0.1, can be modified: decreasing the density value will improve the discrete accuracy but reduce the efficiency, increasing the density value will improve the efficiency but reduce the accuracy) to generate a set of uniformly sampled points; The model used in this embodiment is as Figure 2 shown.

[0073] Specifically, when implementing, it is necessary to first extract the geometric information of the model from the geometric kernel, determine the parameter range of each model edge on the model, the length of the shortest edge of the current model, and the maximum width of the air box where the model is located. Calculate the density value (default is 0.1) of each edge separately through the ratio of the length of each edge to the width of the air box, ensuring that an adaptive number of sampling points can be generated according to different edges, and at the same time ensuring that at least five sampling points can be generated for the shortest edge, and no more than 200 sampling points are generated for the longest edge. After determining the size of each edge, perform fixed-density sampling on each model edge to ensure that the sampling points are evenly distributed and cover the entire model boundary. The uniformly sampled points generated in this way can fully capture the geometric features and curvature changes of the model, ensuring that the distribution of the sampling points can accurately reflect the geometric details of the model, and at the same time will not cause too many sampling points to be generated, affecting the operation efficiency.

[0074] Step 2: Use the uniformly sampled points obtained in Step 1 as boundary constraint points, and use the constrained Delaunay method to divide the model into grids to generate an initial background grid covering the entire model.

[0075] The constrained Delaunay method uses the set of uniformly sampled points as constraints, does not interpolate points inside, and generates triangular grids to cover the model. In this way, any coordinate within the model can be located within a unique triangular element, and the implementation efficiency is very high. All the triangular elements here are collectively referred to as the initial background grid. The initial background grid provides a basic uniform size field for subsequent adaptive size field construction. The points on the current size field store uniform size values.

[0076] Step 3: Based on the triangular elements of the initial background grid generated in Step 2, calculate the discrete medial axis points for each uniformly sampled point. Then calculate the adjacent adaptive size of each uniformly sampled point through the distance from the uniformly sampled point to the discrete medial axis point, and construct an adjacent adaptive size field.

[0077] To achieve the adaptive effect, an adaptive size field is required to characterize the adjacent features of the model, that is, the distances between model elements (points, lines, and surfaces). The simplest method is to calculate the distances between geometric elements. However, this process is usually very time-consuming and prone to identifying adjacent relationships outside the region as features. Therefore, the present invention utilizes the medial axis of the shape to identify the adjacent features of the shape. The distance from the medial axis to the boundary of the shape can accurately reflect the adjacent features of the shape. By multiplying the distance from the medial axis to the boundary of the shape by the adjacent adaptive coefficient, the final result is used to set the grid adjacent adaptive size at the sampling point.

[0078] Among them, not every distance from a discrete medial axis point to the boundary should be calculated as an adjacent feature, as this will lead to incorrect encryption of corner points. It is necessary to determine the adjacent adaptive size by distinguishing whether the medial axis sampling point is located on the main axis or the branch axis; the medial axis points on the main axis are retained, and the medial axis points on the branch axis are removed. The method of distinction mainly depends on judging whether the edges of the initial background grid triangle elements are boundary edges. If two edges in the current triangle are boundary edges, then the current triangle is a corner triangle; if only one edge in the current triangle is a boundary edge, then the current triangle is a branch axis triangle; when there is no boundary edge in the triangle, it is a main axis triangle. The discrete medial axis points inside the corner triangle and the branch axis triangle are all branch axis points to be removed, while the discrete medial axis points inside the main axis triangle are to be retained.

[0079] Step 4: Calculate the curvature and curvature adaptive size for each uniform sampling point on the model edge, and construct a curve curvature adaptive size field.

[0080] In addition to adjacent features, curvature features are also important features of the model. Curvature characterizes the degree of bending of the model. To ensure the geometric accuracy (the approximation degree to the original model) of the grid model, the current mainstream method is to calculate the curvature adaptive size through the line curvature at uniform sampling points, that is, at the uniform sampling points, a circle tangent to the principal curvature of the surface is constructed along the normal direction to calculate the curvature adaptive size. This method can achieve relatively good results for simple geometric models; however, if there are high-curvature regions on the model, the generated grids often have low accuracy, poor quality, and may even cross, making them unusable for simulation.

[0081] Step 5: Based on the area and curvature of the discrete surface of the model, generate internal sampling points inside the discrete surface of the model (plane, analytical surface, and spline surface), and calculate the adaptive size of the internal sampling points. These sampling points are not used for grid generation but only for constructing the adaptive size field in the internal region of the model.

[0082] For different types of discrete surfaces (such as plane surfaces, analytical surfaces, and spline surfaces, etc.), there are significant differences in the methods for obtaining their area and curvature. Among them, for simple surfaces with deterministic mathematical expressions such as plane surfaces and analytical surfaces, the area and curvature can be accurately calculated directly through their analytical expressions. However, for spline surfaces with complex shapes, there are greater challenges in feature extraction and sampling point generation.

[0083] In step 4 above, by calculating the curvature adaptive size at the sampling points on the model edges, the curvature characteristics of the curve are successfully captured; but in actual simulations, there are many models with high curvature parts in areas without model edges. Using only the above method cannot capture the characteristics of these areas, which will result in the final generated mesh not meeting the required mesh accuracy. The present invention proposes a method of generating internal sampling points in high curvature areas to solve this problem.

[0084] In this embodiment, the NURBS spline surface is taken as an example for illustration. In actual engineering, it can be extended to any other discrete surface. Basic concepts of NURBS surfaces: NURBS surfaces are "pulled" out by a series of control points arranged in a grid pattern. The movement of the control points (Control Points) will affect the shape of the surface. Weights: Each control point has a corresponding weight (w ij ), and the greater the weight, the more significant the influence of the control point on the surface shape, thereby being able to represent richer shapes (such as stretching or compressing in a local area). B-spline basis functions (B-spline Basis Functions): B i,p (u) and B j,q (v) are B-spline basis functions in the u and v parameter directions respectively. Their "piecewise polynomial" characteristics ensure that the NURBS surface is piecewise smooth. Knot vectors: The ranges of u and v are determined by the knot vectors. For example, u 1 , …, u n+p+1 and v 1 , …, v m+q+1 . Different knot vector settings will affect the overall / local smoothness of the surface and the influence range of the control points.

[0085] The NURBS spline surface can be calculated through the tensor product of two NURBS basis functions in two orthogonal directions u and v. A NURBS surface of degree p in the u direction and degree q in the v direction is a piecewise rational function r(u, v), described by the following formula:

[0086]

[0087] u 1 ≤u≤u n+p+1 , v1 ≤ v ≤ v m+q+1

[0088] To generate sampling points inside the NURBS surface, the first step is to calculate the area A of the parametric surface:

[0089]

[0090] Then the marginal cumulative area A u (u) along the u - direction can be calculated:

[0091]

[0092] And the marginal cumulative area A v (v) along the v - direction:

[0093]

[0094] The marginal cumulative areas A u (u) and A v (v) are used to calculate the uniform sampling along the u and v directions. Then the sampling on the surface can be calculated as the vector product of the two marginal samplings. This is not an exact equal - area sampling, but it uses the same principle of NURBS surface construction.

[0095] In addition, this method also needs to select a value to measure the surface complexity. An important shape attribute is the mean curvature k(u, v), and its calculation formula is:

[0096]

[0097] where k 1 (u, v) and k 2 (u, v) are the principal curvatures of the surface. Here, the mean curvature is used instead of the Gaussian curvature because the Gaussian curvature is the product of the two principal curvatures. If one of the principal curvatures is zero, the Gaussian curvature becomes zero, which means that even if there is a curvature change in the other direction, the Gaussian curvature cannot reflect this change. For example, at the junction of a plane (curvature is zero) and a cylindrical surface (one principal curvature is zero), the Gaussian curvature cannot distinguish this curvature change. So it is necessary to calculate the cumulative integral of the mean curvature on the surface. The curvature marginal cumulative integral k u (u) along the u - direction is:

[0098]

[0099] The curvature marginal cumulative integral k v (v) along the v - direction is:

[0100]

[0101] These quantities can be used to derive the sampling strategy of this method: a hybrid metric method based on area and curvature, with a hybrid parameter being:

[0102]

[0103] where area and curvature have the same importance, and in this embodiment, the weights of area and curvature are 1:1.

[0104] To calculate the final internal sampling points on the surface, it is first necessary to calculate the u and v parameters through the above formula.

[0105] In a NURBS surface, there is a data structure that internally stores two knot vectors: U = (u 0 , u 1 , …, u n+p+1 ), V = (v 0 , v 1 , …, v m+q+1 ). Therefore, the parameter domain range of the current surface can be directly read from the knot vectors (u min = u p , v min = v q , u max = u n+1 , v max = v m+1 ).

[0106] In the interval [u 1 , u n + 1], K + 1 discrete points are evenly taken out (K = 100). u (0) = u min , u (1) = u 1 + Δ u , …, u (K) = u max , where Δu is the parameter increment in the u direction:

[0107]

[0108] For each discrete point u (k) , calculate and store the corresponding hybrid parameter

[0109]

[0110] Form a "reference table" data, which contains the parameters in the u direction of the discrete points and the hybrid parameters where

[0111]

[0112] After having the reference table ({(u (k) , p (k) )}), construct a linear interpolation function P interp (u):

[0113]

[0114] For linear interpolation on each small interval [u (k) , u (k+1) , splice P interp (u) with a linear function:

[0115]

[0116] Now, it is necessary to calculate the number N of sampling points to be finally generated. Let the mixing metric and sampling density be M and d respectively:

[0117] M = αA + (1 - α)I k (15)

[0118]

[0119] where I k is the cumulative curvature and α = 0.5.

[0120] Then calculate the number of sampling points N u in the u direction:

[0121]

[0122] The number of sampling points N v in the v direction:

[0123]

[0124] Divide the value of the target mixing parameter in [0, 1] To generate N u sampling points in the u direction, let the mixing parameter

[0125]

[0126] and uniformly take N u points in [0, 1]. Use the "reference table" to look up the inverse of ({u i ) for each target value to find u i such that:

[0127]

[0128] In the piecewise linear case, it can be done in the following way: First, find the interval where it is located. In the discrete table , use binary search or sequential search to find k such that p (k) ≤p i <p (k+1) Do linear inverse interpolation in this interval. It is known that in the interval [u (k) , u (k+1) :

[0129]

[0130] Let P interp (u) = p (i) :

[0131]

[0132] Solve to get:

[0133]

[0134] Record this solution as u i . Obviously, u i ∈[u (k) , u (k+1) .

[0135] So far, through the above steps, we can efficiently obtain the parameter value u (k) corresponding to the target mixing parameter p i . This method based on table lookup and interpolation significantly reduces the computational complexity and avoids repeated integral operations and iterative solution processes. To ensure the computational accuracy, this embodiment also uses an adaptive method to verify the results: First, calculate with K = 10 as the initial sampling number, and then double the K value and recalculate. Define the relative error ∈ k as:

[0136]

[0137] where represents the i-th parameter value calculated when the sampling number is k. Set the relative error threshold ∈ = 10 -4 . When ∈ k <∈, it is considered that the current accuracy meets the requirements; otherwise, double the K value and repeat the calculation until the accuracy requirement is met or the preset maximum sampling number Kmax = 160 is reached. Through experimental verification, in this embodiment, K = 80 meets the accuracy requirements, and only on complex surfaces with drastic curvature changes is a higher K value required.

[0138] Synchronously process the v direction. Along the v direction, also perform the same "pre-discretization + interpolation + inverse lookup" process. In the parameter range [v 1 , v m+1] on the discretized {v (k)},calculate Composition table Build Interpolation function. For the required target value Use the same piecewise linear inverse interpolation to find the corresponding v j .

[0139] Finally, we obtain u in the parameter domain 0 ,u 1 ,…,u N-1 and v 0 , v 1 , …, v M-1 . Combine them into two groups (u i , v j ) parameter pairs, construct an (N×M) parameter matrix, and substitute it into the NURBS surface formula (1) to obtain (N×M) three-dimensional sampling points on the surface.

[0140] In the above manner, the internal sampling points are generated for the model of this embodiment, such as Figure 3 As shown. Then calculate the curvature adaptive size h for each internal sampling point c (S):

[0141]

[0142] Among them I s is the curvature of the current internal sampling point, Customize the opening angle for users, different opening angles It can be used to adjust the density of the final high curvature grid. The smaller the angle, the more grids are generated, the higher the accuracy, and the generation time is correspondingly improved. In this embodiment, it is 20°. At the same time, the neighboring adaptive size of the uniform sampling point on the initial background grid and its distance to the internal sampling point are interpolated to calculate the neighboring adaptive size of the current internal sampling point, and the two are combined to set the final adaptive size of the current internal sampling point.

[0143] Step 6. So far, this method has successfully calculated the neighboring adaptive size field, curve curvature adaptive size field and high curvature adaptive size field on the current initial background grid; however, for each uniform sampling point, the final size to guide the grid division can only be a fixed value, so the size field needs to be fused.

[0144] On the uniformly discrete initial background grid points obtained in step 2, the above-mentioned neighboring adaptive size field, curve curvature adaptive size field and high curvature adaptive size field are fused to construct the final adaptive size field.

[0145] For the isotropic case, the adaptive size field fusion is very simple. Assume that {h i (P)| i = 1, 2, ···, n} is the set of size values defined at point P. The adaptive size value h(P) at point P after size fusion is the minimum of all size values, that is:

[0146] h(P) = min{h i (P)} (26)

[0147] However, if the size values in different directions at the sampling points are different, it is an anisotropic size. The anisotropic size is defined as a tensor. When fusing three or more size tensors, a pairwise progressive fusion method can be considered, and the final result is related to the fusion order. Only using neighborhood adaptation and curve curvature adaptation for the adaptive size field map generated by the embodiment model, as Figure 4 shown. Figure 5 is the adaptive size field map generated by the embodiment model divided by the present invention. It can be seen that only using neighborhood adaptation and curve curvature adaptation for the adaptive size field generated by the embodiment model has very uneven size values in the high-curvature part at the front end of the electron gun, and the size values are significantly too large. The mesh generated in this way will surely not meet the accuracy requirements; the adaptive size field generated by the embodiment model divided by the present invention optimizes the size fields of the global high-curvature regions, constructs reasonable size fields in the high-curvature regions, and can guide the generation of conformal adaptive meshes.

[0148] Finally, the adaptive mesh map generated by only using neighborhood adaptation and curve curvature adaptation for the embodiment model is as Figure 6 shown. The adaptive mesh map generated by the embodiment model divided by the present invention is as Figure 7 shown. It can be clearly seen that on the electron gun model, the adaptive mesh generated by only using neighborhood adaptation and curve curvature adaptation for the embodiment model has the situation of non-conformal meshes, which will surely affect the final simulation results, while the adaptive mesh generated by the present invention generates conformal adaptive meshes under the same mesh size.

[0149] After mesh generation, calculate the triangle quality Q for all the generated triangular elements. The calculation formula:

[0150]

[0151] where S is the area of the triangular element, l 1 , l 2 , l 3 are the side lengths of the triangle. Calculate the quality of the adaptive mesh generated by only using neighborhood adaptation and curve curvature adaptation for the embodiment model and the adaptive mesh generated by the embodiment model divided by the present invention as Figure 8As shown. It can be seen that this method not only improves the grid accuracy but also optimizes the grid quality.

[0152] As can be seen from the above embodiments, the present invention performs geometric processing on the target geometric body model to generate uniformly sampled points and construct an initial background grid; calculates discrete medial axis points on the basis of the initial background grid, obtains adjacent adaptive sizes, calculates the edge curvature of the model, obtains the curve curvature adaptive size, and fuses the two to construct an adaptive size field; and on this basis, generates internal sampling points in the high-curvature region and constructs a high-curvature adaptive size, which is incorporated into the original adaptive size field; finally, generates a high-quality unstructured adaptive grid. The present invention improves the grid generation efficiency and simulation accuracy, and the efficient grid generation method and reasonable grid distribution enable the subsequent FEM numerical calculation to greatly improve the calculation efficiency while ensuring the accuracy; it provides a basis for the high-precision algorithm engineering applications of computational fluid dynamics and computational electromagnetics in fields such as automotive manufacturing, civil engineering, environmental engineering, shipbuilding industry, and aviation industry. It is particularly suitable for fields such as electromagnetic device structure design, performance evaluation, and electromagnetic characteristic analysis.

Claims

1. An adaptive size field construction method for high curvature model mesh generation, characterized in that: The following steps are involved: Step 1: Process the target geometric model to obtain a set of discrete faces on the model surface; obtain the parameter range of the model edge of each discrete face itself, divide the model edge evenly by the parameter range and the fixed density value, and generate a set of uniform sampling points; Step 2: Use the uniform sampling points obtained in step 1 as boundary constraints to mesh the model and generate an initial background mesh covering the entire model; Step 3: Based on the triangular elements of the initial background grid generated in step 2, a discrete median point is calculated for each uniform sampling point; then, the neighboring adaptive size of each uniform sampling point is calculated by the distance from the uniform sampling point to the discrete median point, and a neighboring adaptive size field is constructed; Step 4: Calculate the curvature and curvature adaptive size of each uniform sampling point on the edge of the model, and construct the curve curvature adaptive size field; Step 5: Based on the area and curvature of the discrete surface of the model, internal sampling points are generated inside the discrete surface of the model for the plane, analytical surface and spline surface, and the adaptive size of the internal sampling points is calculated. Then, the internal sampling points are used to construct the adaptive size field of the internal area of ​​the model; Among them, planes and analytical surfaces are simple surfaces with deterministic mathematical expressions, and their areas and curvatures can be accurately calculated directly through their analytical expressions; For spline surfaces, feature extraction and sampling point generation are performed by calculating the tensor product of two B-spline basis functions in two orthogonal directions u and v, thereby generating sampling points inside the surface and calculating the corresponding adaptive size, thereby constructing a high curvature adaptive size field; Step 6: On the uniformly discrete initial background grid points obtained in step 2, the above-mentioned neighboring adaptive size field, curve curvature adaptive size field and high curvature adaptive size field are fused to construct the final adaptive size field.

2. The method for constructing an adaptive size field for high curvature model mesh generation according to claim 1, characterized in that: The step 2 meshes the model using a constrained Delaunay method, a frontier advancing algorithm or an octree mesh generation method.

3. The adaptive size field construction method for high curvature model grid generation according to claim 2, characterized in that: The step 2 meshes the model using the constrained Delaunay method.

4. The method for constructing an adaptive size field for high curvature model grid generation according to claim 1, characterized in that: The fusion of step 6 is to take the smallest size value among the neighboring adaptive size field, the curve curvature adaptive size field and the high curvature adaptive size field.

5. The adaptive size field construction method for high curvature model grid generation according to claim 1, characterized in that: In step 5, for the spline surface, the feature extraction and sampling point generation are specifically as follows: Spline surfaces are computed by taking the tensor product of two B-spline basis functions in two orthogonal directions u and v; a spline surface of degree p in the u direction and degree q in the v direction is a piecewise rational function r(u, v) expressed as: u1≤u≤u n+p+1 ,v1≤v≤v m+q+1 The parameter range along the u direction is from 1 to n+p+1; the parameter range along the v direction is from 1 to m+q+1; P ij are control points, there are n+1 points along the u direction and m+1 points along the v direction; w ij is the B-spline basis function B i,p (u) and B j,q (v) is the weight coefficient of the product; B i,p (u) is the p-degree B-spline basis function in the u direction, i is the index of the B-spline basis function; B j,q (v) is the q-degree B-spline basis function in the v direction, j is the index of the B-spline basis function; U and V are the knot vectors of the B-spline basis function in the u and v directions; First, calculate the area A of the spline surface: Among them, u1, u n+1 They represent the starting and ending values ​​of the u direction parameter domain respectively; v1, v m+1 Respectively represent the starting value and ending value of the v direction parameter domain; r u (u, v) represents the tangent vector (first-order partial derivative) of the surface equation in the u direction, r v (u, v) represents the tangent vector (first-order partial derivative) of the surface equation in the v direction; The mean curvature is a measure of the complexity of the surface. The marginal cumulative integral k of the curvature along the u direction is u (u) is: Where k(s, v) represents the average curvature of the surface at point (s, v); s is the integral variable in the u direction; r s (s, v) represents the tangent vector of the surface in the u direction, r v (s, v) represents the tangent vector of the surface in the v direction; Area A and curvature marginal cumulative integral k u (u) To calculate the sampling strategy: The weights of area and curvature are constructed as 1:1, and the corresponding hybrid parameters are constructed based on the mixed measurement of area and curvature. for: Then, the u and v parameter ranges are obtained through the spline surface, and K+1 discrete points are evenly taken in the parameter range interval, where K is the user parameter, the initial K=10, and the maximum sampling number Kmax=160; for each discrete point u direction parameter u (k) :u (0) =u min ,u (1) =u1+Δu,…,u (K) =u max , where Δu is the parameter increment in the u direction: Calculate and store the corresponding mixing parameters Form a reference table data, including the parameters of the discrete point u direction and the mixed parameters After having the reference table, use the linear function to splice P interp (u): At the same time, calculate the number of sampling points N to be generated in the end; first calculate the mixed metric M: M=αA+(1-α)I k Among them, I k is the cumulative curvature, α is a user parameter, 0<α<1; let the sampling density d be: Among them, Δv is the parameter increment in the v direction; the number of sampling points N in the u direction is calculated by the density d u : Split the target value on [0, 1] To generate N in the u direction u sampling points, let the mixed target parameter And take N uniformly on [0, 1] u points; use the reference table to check ({u i For each target value Find u i So that: At the same time, the final u direction parameter u i The accuracy requirement is met, and the solution is: At this point, get the target value The corresponding parameter value u i ; When u i The average error between them is less than the error threshold ∈=10 -4 When , the generated grid will reach sufficient accuracy; first calculate with K = 10 as the initial sampling number, then double the K value and recalculate, define the relative error ∈ k for: in represents the i-th parameter value calculated when the number of samples is k, is the last parameter value; set the relative error threshold ∈ = 10 -4 , when ∈ k <∈, the current accuracy is considered to meet the requirements; Otherwise, double the K value and repeat the calculation until the error threshold requirement is met or the preset maximum sampling number Kmax=160 is reached; The v direction is processed synchronously, and the same pre-discretization + interpolation + reverse query process is performed along the v direction: {v (k) },calculate Composition table Then build Interpolation function, for the required target value Use the same piecewise linear inverse interpolation to find the corresponding v j ; Finally, we obtain u0, u1, ..., u in the parameter domain. N-1 and v0, v1, …, v M-1 ; and combine them into two groups (u i , v j ) parameter pairs, construct an (N×M) parameter matrix, and substitute them into the spline surface piecewise rational function r(u, v) one by one to obtain (N×M) three-dimensional sampling points on the surface; Then calculate the high curvature adaptive size for each internal sampling point: Among them, I s is the curvature of the current internal sampling point; The user-defined opening angle is used to adjust the density of the final high curvature mesh; at this point, the sampling points inside the surface are generated and the adaptive size of the sampling points is calculated.

6. The method for constructing an adaptive size field for high curvature model mesh generation according to claim 5, characterized in that: In step 5, the plane and analytical surface also use the same method as the spline surface to obtain their area and curvature.

7. The method for constructing an adaptive size field for high curvature model grid generation according to claim 5, characterized in that: In the step 5, α=0.

5.

8. The method for constructing an adaptive size field for high curvature model grid generation according to claim 5, characterized in that: In step 5, K+1 discrete points are uniformly taken in the parameter range, where K=80.

9. The method for constructing an adaptive size field for high curvature model grid generation according to claim 5, characterized in that: In step 5,

Citation Information

Patent Citations

  • Bone CT sequence image oriented grid model adaptive reconstruction method

    CN106600683A

  • Curved surface triangular mesh generation method

    CN116778112A

  • Electromagnetic calculation-oriented geometric adaptive grid generation method

    CN118095012A

  • Method and System for Generating a Mesh

    US20190304180A1

Cited By

  • Electromagnetic field simulation adaptive grid generation method taking electromagnetic field distribution characteristics as core guidance and system thereof

    CN121525346A

  • An electromagnetic field simulation adaptive mesh generation method and system taking electromagnetic field distribution characteristics as a core orientation

    CN121525346B

  • Pressure control method and system for polishing head of polishing machine

    CN121572160A

  • A method and system for pressure control of a polishing head

    CN121572160B