An adaptive size field construction method for high-curvature model mesh generation

By constructing a high-curvature size field and an adaptive size field in the initial stage, the problems of accuracy and efficiency in mesh generation in high-curvature regions are solved, and efficient mesh generation and electromagnetic simulation calculations are achieved.

CN120124290BActive Publication Date: 2025-11-25UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies generate meshes with inaccurate precision or with overlapping meshes in high curvature regions, making it difficult to achieve efficient and accurate mesh generation in electromagnetic simulations.

Method used

By generating sampling points inside the surface in the initial stage, a reasonable high curvature size field is constructed. Combining neighbor adaptive and curvature adaptive size fields, mesh generation is guided to ensure that dense meshes are generated in high curvature regions and sparse meshes are generated in simple regions. An adaptive size field construction method is adopted.

Benefits of technology

It improves the accuracy and efficiency of mesh generation, ensuring the accuracy and speed of electromagnetic simulation calculations, and is suitable for models with complex geometric features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120124290B_ABST
    Figure CN120124290B_ABST
Patent Text Reader

Abstract

The present application 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 present application generates uniform sampling points and constructs an initial background grid by performing geometric processing on a target geometric model; and calculates discrete central axis points on the basis of the initial background grid, obtains adjacent self-adaptive sizes, calculates model edge curvatures, obtains curve curvature self-adaptive sizes, and fuses the two to construct a self-adaptive size field. On this basis, internal sampling points of a high-curvature region are generated, a high-curvature self-adaptive size is constructed, and the original self-adaptive size field is fused; and finally, a high-quality unstructured self-adaptive grid is generated. The present application improves grid generation efficiency and simulation precision, and provides a basis for high-precision algorithm engineering applications of computational fluid dynamics and computational electromagnetics in the fields of automobile manufacturing, civil engineering, environmental engineering, shipbuilding industry and aviation industry.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application 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. BACKGROUND

[0002] In electromagnetic engineering and electronic system design, finite element electromagnetic simulation (FEM) as a core technology is widely used in structural design, performance evaluation and electromagnetic characteristic analysis of electromagnetic equipment. FEM relies on numerical methods to solve the basic equations of electromagnetic field, and the effectiveness of this process depends largely on the quality and accuracy of grid partitioning. Grid partitioning is the process of discretizing complex electromagnetic structures into computational units for electromagnetic field characteristic analysis on discrete control models. This process not only needs to consider the complexity of the geometric structure of the electromagnetic system, but also needs to ensure the connectivity and good quality of the grid to improve the accuracy and stability of the calculation results; not only the grid quality, but also the efficiency of grid generation has a great influence on numerical simulation calculation. Therefore, in electromagnetic simulation research, grid partitioning 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 grid needs to pursue two goals at the same time, that is, to generate as few grids as possible to improve the calculation efficiency, and to generate smaller grids to improve the model accuracy. If uniform grids are generated, the two goals are contradictory: reducing the grid size can bring higher accuracy, but the size of the grid will inevitably increase, and vice versa. However, in actual situations, the model accuracy required by the model in different areas is different, and in areas containing complex geometric features, such as spline surfaces, high-curvature areas, etc., fine grids are needed; while in areas with simple geometric features, such as planes, regular analytic surfaces, etc., only a small amount of grids are needed; therefore, if adaptive grids can be generated according to geometric features, the two goals of excellent grids can be well achieved at the same time.

[0004] The geometric features of the model mainly include adjacent features and curvature features:

[0005] Adjacent features refer to the distance between model elements (points, lines, and surfaces), and the mainstream method is to identify the adjacent features of the shape by means of the center axis of the shape. The distance from the center axis to the boundary of the shape can accurately reflect the adjacent features of the shape, so as to calculate the adjacent adaptive size.

[0006] And the curvature feature represents the bending degree of the model, and the current mainstream method is to calculate the curvature of the sampling points on the edge of the model, and then calculate the adaptive size of the sampling point curvature. This method has good effect on adaptive grid division of simple curved surface, but if the simulation model has complex high curvature area, it will cause the generated grid to be too low in precision or the grid to cross, because not every high curvature area has a model edge, especially in complex spline surface area, the curvature feature of these areas cannot be captured by the above method.

[0007] Therefore, it is necessary to study a grid size control method which can realize accurate adaptive grid generation in high curvature area, can capture the geometric feature information of high curvature area in the initial grid generation stage, and construct an adaptive size field, to ensure that dense grid can be automatically generated in high curvature area with complex geometric features, and relatively sparse grid can be generated in areas 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

[0008] In view of the above problems or deficiencies, in order to solve the problem of unqualified or crossed grid generated by the mainstream adaptive size control method in the high curvature area, the present application provides an adaptive size field construction method for high curvature model grid generation, which generates sampling points inside the curved surface in the initial stage, constructs a reasonable high curvature size field to guide the grid generation process, and takes into account the few grids and high precision to ensure the quality of the final grid. 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.

[0009] An adaptive size field construction method for high curvature model grid generation, comprising the following steps:

[0010] Step 1, process the target geometric model to obtain a discrete surface set of the model surface; and obtain the parameter range of the model edge of each discrete surface itself, uniformly divide the model edge by the parameter range and a fixed density value (default is 0.1, which can be modified: reducing the density value will improve the discrete precision and reduce the efficiency, and increasing the density value will improve the efficiency and reduce the precision), to generate a uniform sampling point set.

[0011] Step 2, use the uniform sampling points obtained in step 1 as boundary constraints to divide the model into grids (such as constrained Delaunay algorithm, front propagation algorithm, octree grid generation method), to generate an initial background grid covering the entire model.

[0012] Step 3, based on the initial background mesh generated in step 2, calculate the discrete medial axis point for each uniform sampling point; then calculate the adaptive size of each uniform sampling point by the distance from the uniform sampling point to the discrete medial axis point, and construct the adaptive size field of the neighborhood.

[0013] Step 4, calculate the curvature and curvature adaptive size of each uniform sampling point on the model edge, and construct the curvature adaptive size field of the curve.

[0014] Step 5, based on the area and curvature of the model discrete surface, generate internal sampling points inside the model discrete surface for the planar, analytic surface and spline surface, and calculate the adaptive size of the internal sampling points, which are not used for mesh generation, and then use the internal sampling points to construct the adaptive size field of the model internal region.

[0015] For different types of discrete surfaces (planar, analytic surface and spline surface), the methods for obtaining the area and curvature are significantly different. Among them, the planar and analytic surface is a simple surface with a deterministic mathematical expression, and the area and curvature can be accurately calculated directly through its analytic expression.

[0016] For spline surfaces with complex morphology, the feature extraction and sampling point generation are a big challenge. Through the tensor product of two B-spline basis functions in two orthogonal directions u and v, the internal sampling points of 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 uniform discrete initial background mesh points obtained in step 2, fuse the above-mentioned adaptive size field of the neighborhood, the adaptive size field of the curve curvature and the high curvature adaptive size field, and construct the final adaptive size field.

[0018] Further, the step 2 uses the constrained Delaunay method, the front propagation algorithm or the octree mesh generation method for mesh division of the model.

[0019] Further, the fusion of step 6 is to take the smallest size value in the adaptive size field of the neighborhood, the adaptive size field of the curve curvature and the high curvature adaptive size field, in order to ensure the mesh precision.

[0020] Further, the feature extraction and sampling point generation of the spline surface with complex morphology in step 5 are as follows:

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

[0022]

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

[0024] where 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 there are m+1 points along 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 a p-degree B-spline basis function in the u direction, and i is the index of the B-spline basis function; B j,q (v) is a q-degree B-spline basis function in the v direction, and j is the index of the B-spline basis function; U and V are the node 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] where u1, u n+1 represent the starting value and the ending value of the parameter domain in the u direction, respectively; v1, 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, r v (u, v) represents the tangent vector (first-order partial derivative) of the surface equation in the v direction.

[0028] The average curvature is used to measure the complexity of the surface, and the curvature margin cumulative integral k u (u) along the u direction is:

[0029]

[0030] where k(s, v) represents the average curvature of the surface at the 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.

[0031] The area A and the curvature margin cumulative integral k u (u) are used to calculate the sampling strategy: a hybrid metric based on the area and the curvature is constructed by weighting the area and the curvature by 1:1, and the corresponding hybrid parameter is:

[0032]

[0033] Then, the u, v parameter range is obtained by the spline surface, K+1 discrete points are uniformly taken on the parameter range interval, K is a user parameter (with the increase of the number of K, the accuracy of the final solution will also increase, and the running efficiency will decrease, the initial K=10, and the maximum sampling number Kmax=160); for each discrete point (k) : u (0) = u min , u (1) = u1+Δu, …, u (K) = u max , where Δu is the parameter increment in the u direction:

[0034]

[0035] The corresponding mixing parameter is calculated and stored

[0036]

[0037] A "reference table" data is formed, containing the parameters of the discrete points in the u direction and the mixing parameters After the reference table is obtained, the linear function is used to splice P interp (u):

[0038]

[0039] The number N of the final generated sampling points is also calculated. First, the mixing measure M is calculated:

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

[0041] Where I k is the cumulative curvature, and α is a user parameter, 0<α<1, which can increase the proportion of curvature by reducing α. The greater the proportion of curvature, the more grid numbers generated in the high curvature area, which will bring higher grid accuracy, but will increase the calculation pressure. Engineering verification shows that α=0.5 is the optimal parameter. Set the sampling density d as:

[0042]

[0043] Where Δv is the parameter increment in the v direction. The number N of the sampling points in the u direction is calculated by the density d u :

[0044]

[0045] The target value is divided on [0, 1] To generate N u sampling points in u direction, let the blending target parameter

[0046]

[0047] and evenly take N u points on [0, 1]. Use the "reference table" to find u i for each target value Find u i such that:

[0048]

[0049] At the same time, the final u direction parameter u i meets the accuracy requirement, and the solution is:

[0050]

[0051] At this point, the target value corresponding parameter value u i can be efficiently obtained. The method based on table lookup interpolation of the application significantly reduces the computational complexity and avoids repeated integration operations and iterative solution processes.

[0052] To ensure that the calculation accuracy meets the requirements, the application 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, take K = 10 as the initial sampling number for calculation, and then double the K value for recalculation. 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 ∈ k < ∈, it is considered that the current accuracy meets the requirements; otherwise, double the K value and repeat the calculation until the error threshold requirement is met or the maximum sampling number Kmax = 160 is reached. Through experimental verification, in most cases, K = 100 can meet the accuracy requirements, and only on complex surfaces with sharp curvature changes, higher K values are needed.

[0055] Synchronize the v direction. The same "pre-discretization + interpolation + reverse lookup" process is performed along the v direction. Discretize {v (k)} on the parameter range, and calculate Table Further construct Interpolation function. The target value With the same piecewise linear inverse interpolation, find the corresponding v j .

[0056] Finally, in the parameter domain, u0, u1, …, u N-1 And v0, v1, …, v M-1 ; And they are two pairs of (u i , v j ) parameters, construct (N x M) parameter matrix, and substitute into the spline surface piecewise rational function r(u, v) one by one to get (N x M) three-dimensional sampling points on the surface.

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

[0058]

[0059] Where, I s The curvature of the current internal sampling point; The user-defined opening angle is used to adjust the density of the final high curvature grid, the smaller the angle, the more the generated grid, the higher the precision, and the generation time is also improved accordingly, preferably 20°. At this point, the sampling points inside the surface are generated, and the adaptive size of the sampling points is calculated.

[0060] The present application generates a uniform initial background grid by grid division (constrained Delaunay) of the model, calculates the discrete center axis point based on the initial background grid, obtains the adjacent adaptive size, calculates the model edge curvature, obtains the curve curvature adaptive size, and fuses the two to construct the adaptive size field. And on this basis, by generating internal sampling points in the high curvature area, constructing the high curvature adaptive size, and fusing into the original adaptive size field, a high-quality unstructured adaptive grid is finally generated. If the traditional uniform grid division method wants to achieve the same geometric feature precision, it often needs to generate several times more grid quantity, which greatly affects the simulation time, and the mainstream adaptive grid only considers the adjacent adaptive and curve curvature adaptive, and the generated grid is often very ideal. Therefore, the present application can greatly reduce the simulation time required and ensure the model precision.

[0061] In summary, the application is based on Delaunay meshing, with background mesh size as the main body, calculating multiple adaptive sizes, and finally realizing a complete and efficient surface adaptive initial mesh generation method; For the high-precision algorithm engineering application of computational fluid dynamics, computational electromagnetics in the fields of automobile manufacturing, civil engineering, environmental engineering, shipbuilding industry and aviation industry, etc. Provide a basis for the interpretation, understanding theory, experiment and design of related industries. BRIEF DESCRIPTION OF DRAWINGS

[0062] Figure 1 is a flowchart of the application;

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

[0064] Figure 3 is a diagram of the internal sampling points generated by dividing the model of the embodiment;

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

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

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

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

[0069] Figure 8 is a diagram of the quality distribution of the mesh generated by dividing the model of the embodiment of the application using proximity and curve curvature adaptive methods respectively; DETAILED DESCRIPTION

[0070] The technical solutions and implementation effects of the application will be described in detail below with reference to the drawings and embodiments.

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

[0072] Step 1, process the target geometric model: obtain the discrete surface set of the model surface; and obtain the parameter range of the model edge of each discrete surface itself, uniformly divide the model edge by the parameter range and a fixed density value (default is 0.1, which can be modified: reducing the density value will improve the discrete precision and reduce the efficiency, increasing the density value will improve the efficiency and reduce the precision) to generate a uniform sampling point set; the model used in this embodiment is as shown in Figure 2 .

[0073] In a specific implementation, the geometric information of the model needs to be extracted from the geometric kernel first, the parameter range of each model edge on the model, the length of the smallest edge of the current model and the maximum width of the air box where the model is located are determined. The density value of each edge is calculated separately by the ratio of the length of each edge and the width of the air box (default value is 0.1), which ensures that the adaptive number of sampling points can be generated according to different edges, and at the same time, at least five sampling points can be generated for the shortest edge, and no more than 200 sampling points can be generated for the longest edge. After determining the size of each edge, fixed density sampling is performed on each model edge to ensure uniform distribution of sampling points and cover the entire model boundary. The uniform sampling points generated in this way can fully capture the geometric features and curvature changes of the model, and ensure that the distribution of sampling points can accurately reflect the geometric details of the model, while not generating too many sampling points to affect the running efficiency.

[0074] Step 2, using the uniform sampling points obtained in step 1 as boundary constraint points, using the constrained Delaunay method to divide the model into grids to generate an initial background grid covering the entire model.

[0075] The method of constrained Delaunay uses a set of uniform sampling points as constraints, does not insert points inside, and generates a triangular grid to cover the model. This way, any coordinate inside the model can be located in a unique triangular element, and the efficiency is very high. All triangular elements here are collectively referred to as the initial background grid. The initial background grid provides a basis for the 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 uniform sampling point. Then calculate the adjacent adaptive size of each uniform sampling point by the distance from the uniform sampling point to the discrete medial axis point, and construct the adjacent adaptive size field.

[0077] To achieve the effect of adaptivity, the adaptive size field needs to represent the proximity features of the model, i.e. the distance between model elements (points, lines, surfaces). The simplest method is to calculate the distance between geometric elements, but this process is usually very time-consuming and easy to identify the proximity relationship outside the region as a feature; therefore, the invention uses the medial axis of the shape to identify the proximity features of the shape. The distance from the medial axis to the shape boundary can accurately reflect the proximity features of the shape. By multiplying the distance from the medial axis to the shape boundary by the adjacent adaptive coefficient, the final result is used to set the grid adjacent adaptive size at this sampling point.

[0078] Wherein, not every discrete center axis point to the distance of the boundary should be calculated as the adjacent feature, which will lead to the false encryption of the corner point, and the adjacent adaptive size is determined by distinguishing whether the center axis sampling point is located on the main axis or the branch axis; the main axis center axis point is retained, and the branch axis center axis point is removed. The distinguishing method mainly depends on judging whether the edge of the initial background grid triangular element is a boundary edge, if two edges of the current triangle are boundary edges, the current triangle is a corner triangle; if only one edge of the current triangle is a boundary edge, the current triangle is a branch axis triangle; when the triangle has no boundary edge, it is a main axis triangle, the discrete center axis points in the corner triangle and the branch axis triangle are branch axis points to be removed, and the discrete center axis points in the main axis triangle are retained.

[0079] Step 4, calculate the curvature and curvature adaptive size of each uniform sampling point on the model edge, and construct the curvature adaptive size field of the curve.

[0080] In addition to the adjacent feature, the curvature feature is also an important feature of the model, and the curvature represents the bending degree of the model. In order to ensure the geometric accuracy (the approximation degree of the original model) of the grid model, the mainstream method at present is to calculate the curvature adaptive size through the linear curvature of the uniform sampling point, that is, a circle tangent to the principal curvature of the curved surface is constructed along the normal at the uniform sampling point to calculate the curvature adaptive size. This method can achieve good results for simple geometric models; but if there is a high curvature area on the model, the generated grid is often low in precision and poor in quality, and may exist cross, which cannot be used for simulation.

[0081] Step 5, based on the area and curvature of the model discrete surface, internal sampling points are generated in the model discrete surface (plane, analytical surface and spline surface), and the adaptive size of the internal sampling points is calculated, which are not used for grid generation, but only for the construction of the adaptive size field of the internal area of the model.

[0082] For different types of discrete surfaces (such as plane, analytical surface and spline surface, etc.), the methods for obtaining the area and curvature are significantly different. Among them, the simple surface with deterministic mathematical expression such as plane and analytical surface can accurately calculate the area and curvature through its analytical expression. However, for spline surfaces with complex morphology, feature extraction and sampling point generation face great challenges.

[0083] In the above step 4, the curvature feature of the curve is successfully captured by calculating the curvature adaptive size of the model edge sampling point; but in actual simulation, there are many high curvature parts in the area without model edge, and only the above method cannot capture the features of these areas, which will lead to the generated grid not meeting the required grid precision. The present application proposes a method of generating internal sampling points in the high curvature area to solve this problem.

[0084] In this embodiment, NURBS surface is taken as an example for illustration. In practical engineering, it can be extended to other arbitrary discrete surfaces. Basic concept of NURBS surface: NURBS surface is "pulled" by a series of grid-shaped control points. The movement of control points will affect the shape of the surface. Weights: Each control point has a corresponding weight (w ij ). The greater the weight, the more significant the influence of the control point on the shape of the surface, thereby representing a richer shape (such as stretching or compressing in a local area). B-spline Basis Functions: B i,p (u) and B j,q (v) are B-spline basis functions in u and v parameter directions, respectively. Their "piecewise polynomial" property ensures that NURBS surface is piecewise smooth. Knot Vectors: The range of u and v is determined by the knot vector, for example, u1, …, u n+p+1 and v1, …, 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] NURBS surface can be calculated by the tensor product of two NURBS basis functions in two orthogonal directions u and v. A NURBS surface of p degree in u direction and q degree in v direction is a piecewise rational function r(u, v) described by the following formula:

[0086]

[0087] u1≤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:

[0091]

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

[0093]

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

[0095] In addition, the method needs to select a value to measure the complexity of the surface. An important shape property is the average curvature k(u, v), which is calculated as:

[0096]

[0097] where k1(u, v) and k2(u, v) are the principal curvatures of the surface. The average curvature is used here instead of the Gaussian curvature because the Gaussian curvature is the product of the two principal curvatures, and if one of them is zero, the Gaussian curvature becomes zero, which means that even if the surface has curvature variation in the other direction, the Gaussian curvature cannot reflect this variation. For example, at the intersection of a plane (zero curvature) and a cylindrical surface (one principal curvature is zero), the Gaussian curvature cannot distinguish the curvature variation. Therefore, the cumulative integral of the average curvature on the surface is calculated, 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 the method: a hybrid metric method based on area and curvature, with a hybrid parameter is:

[0102]

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

[0104] To calculate the final sampling points inside the surface, first, the u, v parameters need to be calculated by the above formula.

[0105] In the NURBS surface, there is a data structure that internally stores two vectors of knots: U = (u0, u1, …, u n+p+1 ), V = (v0, v1, …, v m+q+1 ). So the parameter domain range (umin =u p v min =v q u max =u n+1 v max =v m+1 ).

[0106] In the interval [u1, u] n K+1 discrete points (K=100) are uniformly selected from [+1]. (0) =u min u (1) =u1+Δ 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 mixing parameters

[0109]

[0110] This creates a "reference table" of data, containing parameters and mixed parameters in the u-direction of discrete points. in

[0111]

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

[0113]

[0114] Linear interpolation in each small interval [u (k) u (k+1) On the above, use linear functions to concatenate P interp (u):

[0115]

[0116] Now we need to calculate the final number of sampling points N to be generated, assuming the mixing metric and sampling density are M and d is:

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

[0118]

[0119] In the formula I k For cumulative curvature, α = 0.5.

[0120] Next, calculate the number of sampling points N in the u direction. u :

[0121]

[0122] N sampling points in the v direction v :

[0123]

[0124] Split the values ​​of the target mixing parameter in [0, 1]. To generate N in the u direction u Each sampling point can be used to adjust the mixing parameters.

[0125]

[0126] And uniformly take N values ​​on [0, 1]. u Points. Use the "reference table" to look up ({u i}) for each target value Find u i Make:

[0127]

[0128] In the piecewise linear case, the following steps can be taken: First, find the interval in the discrete table. In the middle, use binary search or sequential search to find k such that p (k) ≤p i <p (k+1) Performing linear inverse interpolation in this interval, given that the interval is [u] (k) u (k+1) ]superior:

[0129]

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

[0131]

[0132] Solving for:

[0133]

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

[0135] At this point, through the above steps, we can efficiently obtain the target mixed parameter p (k) The corresponding parameter value u i This table-based interpolation method significantly reduces the computational complexity and avoids repeated integration operations and iterative solution processes. To ensure calculation 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 value of K 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 value of K and repeat the calculation until the accuracy requirements are met or the maximum sampling number Kmax = 160 is reached. Through experimental verification, K = 80 meets the accuracy requirements in this embodiment, and only on complex surfaces with dramatic curvature changes do higher K values are needed.

[0138] Synchronize the v direction, and do the same "pre-discrete + interpolation + reverse lookup" process along the v direction. Discretize {v m+1} on the parameter range [v (k) ], and calculate to form a table Construct the interpolation function. For the target value , use the same piecewise linear reverse interpolation to find the corresponding v j .

[0139] Finally, in the parameter domain, u0, u1, …, u N-1 and v0, v1, …, v M-1 are obtained. Pair them up to form (u i , v j ) parameter pairs, construct a parameter matrix of (N x M), and substitute it into the NURBS surface formula (1) to obtain (N x M) three-dimensional sampling points on the surface.

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

[0141]

[0142] where Is curvature of the current interior sampling point, user-defined opening angle, different opening angles can be used to adjust the density of the final high-curvature grid, the smaller the angle, the more the generated grid, the higher the accuracy, and the generation time is also improved, the embodiment is 20°. At the same time, the adaptive size of the current interior sampling point is calculated by interpolating the adaptive size of the adjacent sampling point on the initial background grid and the distance from the interior sampling point to the interior sampling point. The two are fused to set the final adaptive size of the current interior sampling point.

[0143] Step 6, so far, the method has successfully calculated the adjacent adaptive size field, the curve curvature adaptive size field and the high curvature adaptive size field on the current initial background grid; but for each uniform sampling point, the size that finally guides the grid division must be a fixed value, so the size field needs to be fused.

[0144] The adjacent adaptive size field, the curve curvature adaptive size field and the high curvature adaptive size field are fused on the uniformly discrete initial background grid obtained in step 2 to construct the final adaptive size field.

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

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

[0147] But if the size values of the sampling points to different directions are different, it is anisotropic size. Anisotropic size is defined as a tensor, and when fusing three or more size tensors, a step-by-step fusion method can be considered, and the final result is related to the fusion order. The adaptive size field generated by the embodiment model using only adjacent adaptive and curve curvature adaptive is shown in Figure 4 . Figure 5 is the adaptive size field generated by the embodiment model of the present application. It can be seen that the adaptive size field generated by the embodiment model using only adjacent adaptive and curve curvature adaptive is very uneven in size value in the high-curvature part of the front end of the electron gun, and the size value is obviously too large. The generated grid must not meet the accuracy requirement; the adaptive size field generated by the embodiment model of the present application optimizes the size field of the global high-curvature region, and also constructs a reasonable size field in the high-curvature region, which can guide the generation of conformal adaptive grid.

[0148] Finally, the adaptive mesh generated by the embodiment model using only the neighborhood adaptation and the curve curvature adaptation is shown in Figure 6 The adaptive mesh generated by the embodiment model of the present application is shown in Figure 7 It can be clearly seen that on the electron gun model, the adaptive mesh generated by the embodiment model using only the neighborhood adaptation and the curve curvature adaptation has the problem of non-conformity, which will inevitably affect the results of the final simulation, while the adaptive mesh generated by the present application generates a conformal adaptive mesh under the same mesh size.

[0149] After the mesh generation, the triangle quality Q of all generated triangular elements is calculated, and the calculation formula is:

[0150]

[0151] where S is the area of the triangular element, and l1, l2, l3 are the lengths of the triangle sides. The quality of the adaptive mesh generated by the embodiment model using only the neighborhood adaptation and the curve curvature adaptation and the adaptive mesh generated by the embodiment model of the present application is shown in Figure 8 It can be seen that the present method not only improves the mesh precision, but also optimizes the mesh quality.

[0152] As can be seen from the above embodiments, the present application generates uniform sampling points and constructs an initial background mesh by geometric processing of the target geometric model; and calculates the discrete center axis points on the basis of the initial background mesh, obtains the neighborhood adaptive size, calculates the model edge curvature, obtains the curve curvature adaptive size, and fuses the two to construct an adaptive size field; and on this basis, by generating internal sampling points of the high curvature area and constructing a high curvature adaptive size, the original adaptive size field is fused; and finally a high-quality unstructured adaptive mesh is generated. The present application improves the mesh generation efficiency and simulation precision, 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 precision; and provides a basis for the high-precision algorithm engineering application of computational fluid dynamics and computational electromagnetics in the fields of automobile manufacturing, civil engineering, environmental engineering, shipbuilding industry and aviation industry. It is especially suitable for the fields of electromagnetic equipment structure design, performance evaluation and electromagnetic characteristic analysis.

Claims

1. An adaptive size field construction method for generating meshes of high curvature models, characterized in that, Includes the following steps: Step 1: Process the target geometric model to obtain a set of discrete surfaces on the model surface; and obtain the parameter range of the model edge of each discrete surface. Divide the model edge evenly by using the parameter range and fixed density value to generate a set of uniform sampling points. Step 2: Using the uniform sampling points obtained in Step 1 as boundary constraints, perform mesh generation on the model to generate an initial background mesh that covers the entire model; Step 3: Based on the triangle elements of the initial background mesh generated in Step 2, calculate the discrete central axis point for each uniform sampling point; then calculate the neighbor adaptive size of each uniform sampling point by the distance from the uniform sampling point to the discrete central axis point, and construct the neighbor adaptive size field. 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 surfaces of the model, generate internal sampling points inside the discrete surfaces of the model for the discrete surfaces of planes, analytical surfaces and spline surfaces, calculate the adaptive size of the internal sampling points, and then use the internal sampling points to construct the adaptive size field of the model's internal region. Among them, planes and analytic surfaces are simple surfaces with deterministic mathematical expressions, and their area and curvature can be accurately calculated directly through their analytical expressions; For spline surfaces, feature extraction and sampling point generation are calculated by 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, thus constructing a high curvature adaptive size field. Step 6: On the uniformly discrete initial background grid points obtained in Step 2, fuse the aforementioned neighbor adaptive size field, curve curvature adaptive size field, and high curvature adaptive size field to construct the final adaptive size field.

2. The adaptive size field construction method for generating meshes of high curvature models as described in claim 1, characterized in that: Step 2 involves meshing the model using the constrained Delaunay method, the forward propagation algorithm, or the octree mesh generation method.

3. The adaptive size field construction method for generating meshes of high curvature models as described in claim 1, characterized in that: The fusion in step 6 involves selecting the smallest size value among the neighboring adaptive size field, the curve curvature adaptive size field, and the high curvature adaptive size field.

4. The adaptive size field construction method for generating meshes of high curvature models as described in claim 1, characterized in that, In step 5, for spline surfaces, the feature extraction and sampling point generation are specifically as follows: The spline surface is calculated using the tensor product of two B-spline basis functions in two orthogonal directions u and v; a spline surface with 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 Wherein, 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 These are control points; there are n+1 points along the u direction and m+1 points along the v direction; w ij It is a B-spline basis function B i,p (u) and B j,q The weighting coefficients of the product of (v); B i,p (u) is the p-degree B-spline basis function in the u direction, where 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, and j is the index of the B-spline basis function; U and V are the node vectors of the B-spline basis functions in the u and v directions, respectively. First, calculate the area A of the spline surface: Where, u1, u n+1 Let v1 and v2 represent the starting and ending values ​​of the u-direction parameter domain, respectively; v1, v2 m+1 These represent the starting and ending values ​​of the v-direction parameter field, respectively; r u (u, v) represents the tangent vector of the surface equation in the u direction, r v (u, v) represents the tangent vector of the surface equation in the v direction; Mean curvature is a measure of surface complexity; the marginal cumulative integral of curvature along the u direction is k. u (u) is: Where k(s, v) represents the average curvature of the surface at the 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) Used to calculate the sampling strategy: The area and curvature are weighted in a 1:1 ratio to form a hybrid metric based on both area and curvature, and the corresponding hybrid parameters are constructed. for: Then, the range of parameters u and v is obtained through spline surfaces. K+1 discrete points are uniformly selected within the parameter range, where K is the user parameter, initially K=10, and the maximum number of samples Kmax=160; for each discrete point, the parameter u in the u direction... (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 Create a reference table of data, containing parameters and mixed parameters in the direction of discrete point u. With the reference table, we can obtain P. interp (u): Simultaneously calculate the final number of sampling points N to be generated; first calculate the mixing metric M: M=αA+(1-α)I k Among them, I k Let be the cumulative curvature, α be a user parameter, 0 < α < 1; let the sampling density d be: Where Δv is the parameter increment in the v direction; the number of sampling points N in the u direction is calculated using density d. u : Divide the target value in [0, 1]. To generate N in the u direction u Each sampling point, let the mixed target parameter And uniformly take N values ​​on [0, 1]. u One point; use the reference table to look up ({u i }) for each target value Find u i Make: Then at the same time, the final u-direction parameter u i The solution meets the accuracy requirements. At this point, the target value has been obtained. The corresponding parameter value u i ; When different K values, u i The average error between them is less than the error threshold ∈=10 -4 At this point, the generated mesh will achieve sufficient accuracy; first, calculations are performed using K=10 as the initial sample number, then the K value is doubled and recalculated, defining the relative error ∈ k for: in This represents the value of the i-th parameter calculated when the number of samples is k. For the last parameter value; set the relative error threshold ∈ = 10 -4 When ∈ k When <∈, the current precision is considered to meet 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; Synchronously process the v-direction, performing the same pre-discretion + interpolation + reverse lookup process along the v-direction: discretize {v} within the parameter range. (k) },calculate Spell out a table Then build Interpolation function, for the desired target value Using the same piecewise linear inverse interpolation, find the corresponding v. j ; Finally, u0, u1, ..., u were obtained in the parameter domain. N-1 and v0, v1, ..., v M-1 ; and combine them in pairs (u i v j By constructing an (N×M) parameter matrix from the parameter pairs, and substituting each parameter into the piecewise rational function r(u, v) of the spline surface, we can 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 The curvature of the current internal sampling point; A user-defined angle is used to adjust the density of the final high-curvature mesh; at this point, sampling points inside the surface are generated, and the adaptive size of the sampling points is calculated.

5. The adaptive size field construction method for generating meshes of high curvature models as described in claim 4, characterized in that: In step 5, the area and curvature of the plane and analytical surface can also be obtained using the same method as for spline surfaces.

6. The adaptive size field construction method for generating meshes of high curvature models as described in claim 4, characterized in that: In step 5, α = 0.

5.

7. The adaptive size field construction method for generating meshes of high curvature models as described in claim 4, 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