Irregular rough wall surface grid generation method
By combining adaptive grid generation technology and multi-scale geometric analysis, the grid density is dynamically adjusted, and the problem of inability to effectively capture irregular rough wall features in the existing technology is solved, efficient and accurate grid generation is achieved, and the accuracy and calculation efficiency of numerical simulation are improved.
Patent Information
- Application Number
- CN202411543811.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-10-31
AI Technical Summary
When handling irregular and rough walls, the prior art cannot effectively capture the subtle features of the surface, affecting the accuracy of numerical simulation. In addition, traditional methods need to generate a large number of grid cells when processing complex geometric shapes, which increases the calculation amount and may lead to stability problems in numerical calculations.
Adaptive mesh generation technology and multi-scale geometric analysis are used to dynamically adjust the mesh density according to the complexity of wall roughness and geometric features, and the surface curvature response value is calculated by convolution of Gaussian kernel function, the roughness area is divided and adaptive mesh is divided, and finally the corrected mesh is optimized to improve accuracy.
Effectively capture the subtle features on irregular rough surfaces, reduce calculation costs, and improve grid division accuracy, solving the problems of grid distortion and calculation stability in traditional methods.
Smart Images

Figure CN119538337A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer-aided design and engineering analysis, and in particular to a method for generating an irregular rough wall grid. Background Art
[0002] In recent years, with the rapid development of numerical simulation technology, the demand for accurate modeling and simulation of complex geometric shapes has continued to increase. In many engineering fields, such as fluid dynamics, heat conduction, and structural mechanics analysis, the quality of the computational grid directly affects the accuracy and computational efficiency of the simulation results. In particular, when dealing with irregular and rough wall surfaces, traditional grid generation methods face many challenges.
[0003] First, existing mesh generation methods usually assume that the wall is smooth, which makes it impossible to capture the subtle features of the surface when dealing with surfaces with significant roughness, thus affecting the accuracy of numerical simulation. Secondly, when faced with complex geometric shapes, traditional methods often need to generate a large number of mesh units, which not only increases the amount of calculation, but also may cause stability problems in numerical calculations. In addition, existing methods lack effective adaptive capabilities when dealing with multi-scale geometric features, and cannot dynamically adjust the distribution and density of the mesh according to the complexity of the geometric features.
[0004] Therefore, there is an urgent need for a new mesh generation method that can accurately capture the geometric features of irregular rough walls while maintaining computational efficiency to meet the needs of complex engineering applications. Summary of the invention
[0005] In view of this, an embodiment of the present application provides an irregular rough wall mesh generation method for processing a wall with irregular and rough features. The method combines adaptive mesh generation technology with multi-scale geometric analysis to dynamically adjust the mesh density according to the wall roughness and the complexity of the geometric features, thereby improving the efficiency and accuracy of mesh generation, and at least partially solving the problem in the prior art that the distribution and density of the mesh cannot be dynamically adjusted according to the complexity of the geometric features when dividing the rough wall mesh.
[0006] The present application provides a method for generating an irregular rough wall mesh, the method comprising:
[0007] Obtaining a geometric model for generating a mesh, wherein a surface of the geometric model is composed of a plurality of triangular segments;
[0008] Calculate the surface curvature of each vertex based on the normal vector of each vertex of each triangle fragment;
[0009] The surface curvature of each vertex is convolved using Gaussian kernel functions of different scales to obtain the curvature response value of each vertex at different scales.
[0010] According to the curvature response value of each vertex at different scales, the surface roughness area of the geometric model is divided based on a preset division rule;
[0011] Adaptively meshing different surface roughness regions to obtain a rough wall mesh composed of a plurality of mesh units, wherein the meshing rule is to mesh a region with a greater resolution for a region with a greater roughness;
[0012] Each vertex of each mesh unit is aligned with a point on the surface of the geometric model to obtain an optimized and corrected rough wall mesh.
[0013] According to a specific implementation of the embodiment of the present application, the surface curvature of each vertex is calculated according to the normal vector of each vertex of each triangle fragment, including:
[0014] Get the normal vector of each vertex of each triangle fragment;
[0015] Obtaining the curvature tensor of each vertex according to the normal vector of each vertex;
[0016] For each vertex, the curvature tensor is subjected to Wei ngarten mapping to obtain a local curvature matrix;
[0017] Solving the eigenvalue of the local curvature matrix to obtain a first principal curvature and a second principal curvature;
[0018] Based on the first principal curvature and the second principal curvature, the surface curvature of the vertex is obtained.
[0019] According to a specific implementation of the embodiment of the present application, obtaining the normal vector of each vertex of each triangle fragment includes:
[0020] Get the coordinates of each vertex of each triangle fragment;
[0021] For each triangle fragment, obtain the normal vector of the triangle fragment by cross product calculation based on the coordinates of each vertex;
[0022] For each vertex, the normal vector of the vertex is obtained based on the normal vector and area of each triangle fragment adjacent to the vertex. The calculation formula of the normal vector of the vertex is:
[0023]
[0024] Among them, n V is the normal vector of vertex v, A T is the area of each triangle fragment T adjacent to vertex v, n T is the normal vector of each triangle fragment T adjacent to vertex v.
[0025] According to a specific implementation of the embodiment of the present application, performing eigenvalue solving on the local curvature matrix to obtain the first principal curvature and the second principal curvature includes:
[0026] Solve the eigenvalue of the local curvature matrix to obtain the first eigenvalue λ 1 and the second eigenvalue λ 2 , the first eigenvalue λ 1 and the second eigenvalue λ 2 The larger value is taken as the first principal curvature k 1 , the first eigenvalue λ 1 and the second eigenvalue λ 2 The smaller value is taken as the second principal curvature k 2 .
[0027] According to a specific implementation of the embodiment of the present application, the surface curvature is a Gaussian curvature or an average curvature.
[0028] The calculation formula of the Gaussian curvature K is: K = k 1 ·k 2 ,
[0029] The calculation formula of the average curvature H is:
[0030] According to a specific implementation of the embodiment of the present application, the expression of the Gaussian kernel function is:
[0031]
[0032] The expression of the curvature response value is:
[0033]
[0034] Among them, s is the scale parameter, G s (x) is the Gaussian kernel function at scale s, K(x') is the surface curvature at point x', K s (x) is the curvature response value at point x.
[0035] According to a specific implementation of the embodiment of the present application, the surface roughness area division of the geometric model based on a preset division rule includes:
[0036] The preset division rule is: when at a small scale, the greater the change in the curvature response value, the more drastic the local change in the surface of the geometric model, and the greater the corresponding roughness; when at a large scale, the smaller the change in the curvature response value, the smoother the surface of the geometric model, and the smaller the corresponding roughness value;
[0037] The surface of the geometric model is divided into surface roughness regions based on the preset division rule, and the roughness of each region is different.
[0038] According to a specific implementation of the embodiment of the present application, aligning each vertex of each mesh unit with a point on the surface of the geometric model to obtain an optimized and corrected rough wall mesh includes:
[0039] Let the vertex of the grid cell be X old (x old ,y old , z old ), the point on the surface of the geometric model is point P(P x , P y , P z ), the normal vector of point P is n=(n x , n y , n z );
[0040] Set the vertex X old Projecting onto the surface of the geometric model aligns the vertex with the surface of the geometric model, then vertex x old The distance d to the surface of the geometric model is calculated by vertex X old The vector difference between the point P on the geometric surface and the point P is projected into the direction of the normal vector n. The distance d is calculated as follows:
[0041] d=(PX old )·n,
[0042] Expand the distance d formula into coordinate form:
[0043] d=((P x -x old ) x +(P y -y old ) y +(P z -z old ) z );
[0044] Set the vertex X old Move distance d along the direction of normal vector n to the surface of the geometric model to obtain the new vertex coordinate X new ,
[0045] X new =X old +d·n;
[0046] The optimized and corrected rough wall mesh is obtained based on the new vertex coordinates.
[0047] According to a specific implementation of the embodiment of the present application, the method further includes:
[0048] Define boundary conditions on the optimized and corrected rough wall mesh, and generate boundary layers by using the expansion method;
[0049] The rough wall mesh after generating the boundary layer is smoothed based on the Laplace smoothing algorithm.
[0050] According to a specific implementation of the embodiment of the present application, the adaptive meshing is performed by refining the hexahedral mesh using the quadrature method.
[0051] Beneficial effects:
[0052] The irregular rough wall grid generation method in the embodiment of the present application introduces adaptive grid refinement technology and multi-scale geometric analysis method, solves the problems of difficulty in capturing small rough elements, serious boundary layer grid distortion, and excessive total number of grids in traditional grid generation methods, and proposes a body-fitting grid generation method for three-dimensional random rough walls. This method can effectively capture subtle features on irregular rough surfaces, reduce computational costs, and obtain higher accuracy. It can be widely used in fluid dynamics, computer-aided design (CAD), computer-aided engineering (CAE), and other fields involving complex surface simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 is a graphical schematic diagram of an irregular rough wall grid according to an embodiment of the present invention;
[0055] Figure 2 A schematic diagram of a body-fitting mesh generated by a method for generating a mesh of an irregular rough wall according to an embodiment of the present invention;
[0056] Figure 3 FIG. 4 is a schematic diagram of airflow numerical simulation results according to an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0058] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.
[0059] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present application, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0060] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The illustrations only show the components related to the present application rather than being drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0061] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0062] With the widespread application of numerical simulation technology in industrial design, aerospace, energy and other fields, the accurate simulation of complex geometric shapes has become increasingly important. Especially in applications such as fluid dynamics and heat conduction, the wall roughness has a significant impact on the flow characteristics and heat transfer characteristics. Therefore, high-precision and efficient grid generation methods are crucial to the accuracy and efficiency of numerical simulations. The existing grid generation programs have relatively poor ability to generate geometric grids with complex surfaces, and there are problems such as severe distortion of rough wall grids or inability to generate boundary layer grids. Therefore, for CFD calculations of rough walls, interpolation methods with numerical errors are mainly used, such as the immersed boundary method or the overlap method. This patent innovatively proposes a body-fitting grid generation method for three-dimensional random rough walls, aiming to address the deficiencies in the prior art, especially when dealing with walls with complex geometric features and roughness, it is possible to generate high-quality grids to obtain higher-precision CFD simulations.
[0063] The present application embodiment provides a method for generating an irregular rough wall mesh. Figures 1 to 3 A detailed description is given. Specifically, the following steps are included:
[0064] Step S101, obtaining a geometric model of a to-be-generated mesh, wherein the surface of the geometric model is composed of a plurality of triangle segments;
[0065] Step S102, calculating the surface curvature of each vertex according to the normal vector of each vertex of each triangle segment;
[0066] Step S103, using Gaussian kernel functions of different scales to perform convolution calculation on the surface curvature of each vertex to obtain the curvature response value of each vertex at different scales;
[0067] Step S104, dividing the surface roughness area of the geometric model based on a preset division rule according to the curvature response value of each vertex at different scales;
[0068] Step S105, performing adaptive meshing on different surface roughness regions to obtain a rough wall mesh composed of a plurality of mesh units, wherein the meshing rule is to perform meshing with a larger resolution for a region with a larger roughness;
[0069] Step S106: align each vertex of each mesh unit with a point on the surface of the geometric model to obtain an optimized and corrected rough wall mesh.
[0070] In this embodiment, the surface curvature is further obtained by calculating the normal vector of each triangle vertex, and the surface curvature is convolved by a Gaussian kernel function to obtain curvature response values at different scales. By analyzing the curvature response values, different roughness areas of the surface are identified, and the mesh is encrypted (the larger the resolution) for the area with greater roughness. Therefore, for feature responses of different scales, an adaptive mesh refinement strategy is adopted to solve the problems of difficulty in capturing small rough elements, serious boundary layer mesh distortion, and excessive total number of meshes in traditional mesh generation methods. The method of this embodiment can effectively capture subtle features on irregular rough surfaces, reduce computational costs, and improve mesh division accuracy.
[0071] In one embodiment, calculating the surface curvature of each vertex according to the normal vector of each vertex of each triangle fragment includes:
[0072] Get the normal vector of each vertex of each triangle fragment;
[0073] Obtaining the curvature tensor of each vertex according to the normal vector of each vertex;
[0074] For each vertex, the curvature tensor is subjected to Weingarten mapping to obtain a local curvature matrix;
[0075] Solving the eigenvalue of the local curvature matrix to obtain a first principal curvature and a second principal curvature;
[0076] Based on the first principal curvature and the second principal curvature, a surface curvature of the vertex is obtained.
[0077] In one embodiment, obtaining the normal vector of each vertex of each triangle fragment includes:
[0078] Get the coordinates of each vertex of each triangle fragment;
[0079] For each triangle fragment, obtain the normal vector of the triangle fragment by cross product calculation based on the coordinates of each vertex;
[0080] For each vertex, the normal vector of the vertex is obtained based on the normal vector and area of each triangle fragment adjacent to the vertex. The calculation formula of the normal vector of the vertex is:
[0081]
[0082] Among them, n V is the normal vector of vertex v, A T is the area of each triangle fragment T adjacent to vertex v, n T is the normal vector of each triangle fragment T adjacent to vertex v.
[0083] In one embodiment, performing eigenvalue solving on the local curvature matrix to obtain the first principal curvature and the second principal curvature includes:
[0084] Solve the eigenvalue of the local curvature matrix to obtain the first eigenvalue λ 1 and the second eigenvalue λ 2 , the first eigenvalue λ 1 and the second eigenvalue λ 2 The larger value is taken as the first principal curvature k 1 , the first eigenvalue λ 1 and the second eigenvalue λ 2 The smaller value is taken as the second principal curvature k 2 .
[0085] In one embodiment, the surface curvature is a Gaussian curvature or a mean curvature.
[0086] The calculation formula of the Gaussian curvature K is: K = k 1 ·k 2 ,
[0087] The calculation formula of the average curvature H is:
[0088] In the specific implementation, the geometric model is imported in the form of STL file. Figure 1 The rough wall geometry of the STL file is represented by triangular patches.
[0089] (1) Normal vector calculation:
[0090] For a triangle segment T, suppose the vertex is p 1 、p 2 、p 3 , then its normal vector can be calculated by the cross product:
[0091]
[0092] Among them, n T is the normal vector of triangle segment T;
[0093] For each vertex, the normal vector of vertex v can be obtained by weighted average of the normal vectors of its adjacent triangles. The weight is usually taken as the dual area of each triangle (that is, a part of the area of each triangle), and the calculation formula is:
[0094]
[0095] Among them, n V is the normal vector of vertex v, A T is the area of each triangle fragment T adjacent to vertex v, n Tis the normal vector of each triangle fragment T adjacent to vertex v.
[0096] (2) Calculation of the curvature tensor:
[0097] The curvature tensor is approximated by the difference between the normal vectors. For two adjacent vertices p i and p j The edge between them, the corresponding normal vector difference can be expressed as:
[0098] Δn ij =n i -n j ,
[0099] Among them, n i and n j They are adjacent vertices p i and p j The normal vector at ;
[0100] For vertex p i , its curvature tensor T can be calculated by the normal vector difference and the distance between vertices, the formula is:
[0101]
[0102] This curvature tensor is a discretized approximation of the local curvature, representing the vertex p i and adjacent vertex p j The rate of change of the local normal vector between .
[0103] (3) Weingarten mapping and principal curvature solution:
[0104] The Weingarten mapping maps the tangent vector to the change of the normal vector, which reflects the curvature of the surface in all directions and is ultimately used to solve the principal curvature.
[0105] First, the tangent space is constructed. For vertex p i , two orthogonal tangent vectors t can be constructed on the local surface where it is located 1 ,t 2 ,
[0106]
[0107] For another tangent vector t 2 The curvature matrix can be approximated from other vectors of neighboring points by the Gram-Schmidt orthogonalization method;
[0108] Map the curvature tensor to the tangent space to form a local curvature matrix C,
[0109]
[0110] in, are the tensor components obtained by local projection.
[0111] (4) Solving the principal curvature:
[0112] The eigenvalues of the curvature matrix C correspond to the first principal curvature k 1 and the second principal curvature k 2 The eigenvalue problem can be solved by solving the following characteristic equation:
[0113] det(C-λI)=0,
[0114] Solving this equation gives the first eigenvalue λ 1 and the second eigenvalue λ 2 , which correspond to the first principal curvature k 1 and the second principal curvature k 2 ,Right now:
[0115] Maximum curvature: k 1 =max(λ 1 ,λ 2 );
[0116] Minimum curvature: k 2 =min(λ 1 ,λ 2 ).
[0117] (5) Gaussian curvature and mean curvature:
[0118] According to the first principal curvature k 1 and the second principal curvature k 2 , the Gaussian curvature and the mean curvature can be calculated,
[0119] The calculation formula of Gaussian curvature K is: K = k 1 ·k 2 ,
[0120] The calculation formula of the mean curvature H is:
[0121] Multiscale analysis captures the characteristic changes of geometric surfaces at different scales by introducing filters or kernel functions of different scales. It can effectively identify the distribution of curvature at different spatial scales and help analyze the local and global characteristics of the surface. The following is a detailed explanation of the relevant content of multiscale analysis in capturing geometric surface changes.
[0122] In one embodiment, the Gaussian kernel function is expressed as:
[0123]
[0124] The expression of the curvature response value is:
[0125]
[0126] Among them, s is the scale parameter, G s (x) is the Gaussian kernel function at scale s, K(x') is the surface curvature at point x', K s (x) is the curvature response value at point x.
[0127] Furthermore, the surface roughness area division of the geometric model based on a preset division rule includes:
[0128] The preset division rule is: when at a small scale, the greater the change in the curvature response value, the more drastic the local change in the surface of the geometric model, and the greater the corresponding roughness; when at a large scale, the smaller the change in the curvature response value, the smoother the surface of the geometric model, and the smaller the corresponding roughness value;
[0129] The surface of the geometric model is divided into surface roughness regions based on the preset division rule, and the roughness of each region is different.
[0130] The following is a detailed description of the steps of multi-scale analysis in capturing geometric surface changes through a specific implementation process, including:
[0131] 1. Concept of local geometric surface changes
[0132] The core idea of multi-scale analysis is to use kernel functions of different scales (such as Gaussian kernel) to smooth or process geometric surfaces and capture features at long wavelengths (large scales) and short wavelengths (small scales). For example, small bumps or depressions on the surface can be analyzed by a small-scale kernel function, while large-scale smooth surfaces can be analyzed by a large-scale kernel function.
[0133] 2. Introduction of Gaussian kernel function
[0134] In order to capture the curvature response at different scales, a Gaussian kernel function is usually used to perform a convolution operation on the original curvature (surface curvature). The Gaussian kernel function has the following form:
[0135]
[0136] Among them, s is the scale parameter, which determines the extent of the Gaussian kernel expansion. Small s values correspond to smaller-scale features (such as local details), and large s values correspond to larger-scale features (such as the overall shape).
[0137] 3. Multi-scale convolution operation
[0138] In multi-scale analysis, the geometric surface curvature is convolved with a Gaussian kernel function to obtain the curvature K at scale s. s (x),
[0139]
[0140] This means that we smooth the original curvature through Gaussian kernels of different scales to obtain curvature responses at different scales. K(x') is the surface curvature at point x', G s (x-x') is the Gaussian kernel function with scale s, K s (x) is the curvature response value (smoothed curvature) at point x at scale s. This operation is equivalent to smoothing the curvature information in a region (determined by the scale parameter) to obtain the average or weighted curvature response of the local region at a certain scale.
[0141] 4. Multiscale analysis includes the following steps:
[0142] Step 1: Calculate the original curvature
[0143] First, based on the discrete differential geometry method, the original curvature K(x) of each point is calculated, usually Gaussian curvature or mean curvature. This curvature represents the local geometric characteristics of the surface at the smallest scale (i.e., unsmoothed state).
[0144] Step 2: Select Gaussian kernel functions of different scales, each scale represents a characteristic scale within a specific spatial range. Small scale s is used to capture local details, such as small bumps and local protrusions on the surface. Large scale s is used to capture the macroscopic features of the overall surface, ignoring local details and analyzing the curvature changes in a larger range.
[0145] Step 3: Convolution operation
[0146] For each scale, the original curvature K(x) is combined with the Gaussian kernel G of scale s. s (x) Perform convolution operation to calculate the curvature response value K at this scale s (x):
[0147]
[0148] The purpose of this step is to smooth the original curvature, weaken the noise or local changes at a small scale, and capture more significant surface features at a larger scale.
[0149] Step 4: Analyze the curvature response
[0150] Through convolution operations at different scales, the curvature response value K at each scale is obtained s(x). These curvature response values are used to characterize the geometric changes of the surface at different scales. By analyzing the curvature response values, the following conclusions can be drawn: Short wavelength (small scale) characteristics: If the curvature response is larger at a small scale, it indicates that the local changes of the surface are more drastic, and there are small bumps or protrusions. Long wavelength (large scale) characteristics: If the curvature response changes less at a large scale, it indicates that the surface is smoother and the overall changes are gentle.
[0151] Step 5: Comprehensive analysis of multi-scale curvature responses
[0152] By calculating the curvature response value K at multiple different scales s s (x) By comparing and analyzing, the trend of changes in different characteristic scales of the surface can be identified. This trend is used to classify surface areas. For example, areas with high-frequency local changes require a higher resolution grid for refinement. Smooth areas can use a coarser grid, thereby saving computing resources.
[0153] Step 6: Adaptive mesh refinement By analyzing the curvature response at different scales, the mesh refinement strategy can be determined: in the fine-scale feature area (i.e., the area with large curvature response at small scale and large roughness), the mesh is encrypted (high-resolution mesh division) to increase the number of vertices and triangles. In the large-scale smooth area (i.e., the area with insignificant curvature change at large scale and small roughness), the mesh can be kept coarse to reduce the amount of calculation.
[0154] Through the above method, adaptive grid refinement technology and multi-scale geometric analysis method are introduced to solve the problems of difficulty in capturing small rough elements, serious boundary layer grid distortion, and excessive total number of grids in traditional grid generation methods. It can effectively capture subtle features on irregular rough surfaces, reduce computational costs, and obtain higher accuracy.
[0155] In one embodiment, the adaptive meshing is performed by refining the hexahedral mesh using the quadrature method.
[0156] In specific implementation, for each hexahedral grid unit in the rough area, refinement is achieved by subdividing the grid unit into four sub-units, and for a hexahedral unit, the original eight vertices will generate new 27 vertices. Each hexahedron is subdivided into 8 smaller hexahedrons.
[0157] Assume that the initial vertex of a hexahedral unit is P 1 ,P 2 ,...P 8 When generating a new refinement unit, each original vertex will be inserted into the midpoint, and the new vertex coordinates can be expressed as the mean of the original vertices. For example, for vertex P 1 and P 2 The midpoint Pmid :
[0158]
[0159] Furthermore, in order to improve the mesh quality, the quality of the generated mesh is optimized and the shape and size of the mesh cells are adjusted to ensure the stability and accuracy of the numerical simulation.
[0160] In one embodiment, aligning each vertex of each mesh unit with a point on the surface of the geometric model to obtain an optimized and corrected rough wall mesh includes:
[0161] Let the vertex of the grid cell be X old (x old ,y old , z old ), which is located near the surface of the geometric model but does not fall exactly on the geometric surface. The point on the surface of the geometric model is point P (P x , P y , P z ), the normal vector of point P is n=(n x , n y , n z );
[0162] Set the vertex X old Projecting onto the surface of the geometric model aligns the vertex with the surface of the geometric model, then vertex x old The distance d to the surface of the geometric model is calculated by vertex X old The vector difference between the point P on the geometric surface and the point P is projected into the direction of the normal vector n. The distance d is calculated as follows:
[0163] d=(PX old )·n,
[0164] Expand the distance d formula into coordinate form:
[0165] d=((P x -x old ) x +(P y -y old ) y +(P z -z old ) z );
[0166] Set the vertex X old Move distance d along the direction of normal vector n to the surface of the geometric model to obtain the new vertex coordinate X new ,
[0167] X new =X old+d·n;
[0168] The optimized and corrected rough wall mesh is obtained based on the new vertex coordinates.
[0169] In specific implementation, the vertices of the mesh cells are accurately projected onto the surface of the geometric model through an iterative process, that is, the projection can be refined through multiple iterations. If one projection is not enough to achieve the required accuracy, the new vertex coordinates can be used as the starting point of the next iteration and the projection can be calculated again until the vertex meets the error tolerance condition.
[0170] In one embodiment, the processing of boundary conditions is also included to solve the problem that the boundary layer grid cannot be generated in the prior art. The boundary condition processing includes the following steps:
[0171] Define boundary conditions on the optimized and corrected rough wall mesh, and generate boundary layers by using the expansion method;
[0172] The rough wall mesh after generating the boundary layer is smoothed based on the Laplace smoothing algorithm.
[0173] In specific implementation, the boundary layer is generated by using an expansion method to bias the existing surface grid points in a specified direction.
[0174] This process involves controlling the expansion ratio r, which is the change in thickness of each layer of mesh relative to the previous layer. The expansion ratio is calculated as:
[0175] h n+1 = r·h n ,
[0176] where h n is the thickness of the nth layer, and r is the expansion ratio. Logarithmic distribution model: The boundary layer usually uses logarithmic distribution to distribute the grid thickness. This distribution method conforms to the boundary layer characteristics of the fluid and generates a denser grid near the boundary. The logarithmic distribution formula is:
[0177]
[0178] where h(y) is the thickness of the boundary layer mesh, κ is the von Karman constant, and y 0 is the reference distance.
[0179] For surface smoothing, after the boundary layer is generated, the mesh may have irregularities or discontinuities, so smoothing is required to optimize the mesh quality. Common smoothing techniques include adjusting and optimizing node positions to reduce mesh distortion and improve quality.
[0180] Mesh smoothing can be achieved through the Laplace smoothing algorithm, which adjusts the node positions to make the mesh unit shape more uniform and reduce mesh distortion.
[0181] The coordinates of each node are updated by the average value of its neighboring nodes, making the node position smoother and reducing distortion. Suppose the neighbor node of the current node Pi is P 1 ,P 2 ,...P k , the new node position P i new Calculated by the following formula:
[0182]
[0183] Where k is the number of neighbors of a node, P j is the position of the jth adjacent node.
[0184] After the above process, the final structured body-fitting grid reference Figure 2 .
[0185] In practice, in the design process of aircraft engines, accurate simulation of the flow of air in the complex geometric structure inside the engine is crucial for optimizing the design. The inner wall of the engine usually has complex roughness, which has a significant impact on the distribution of the flow field and the heat transfer characteristics. Traditional grid generation methods cannot effectively capture these subtle features, resulting in a large deviation between the simulation results and the actual situation.
[0186] The method of this application first performs a geometric roughness analysis on the inner wall of the engine to identify the roughness changes in different areas. On this basis, an adaptive mesh generation algorithm is used to generate a denser mesh in areas with higher roughness and maintain a coarser mesh in areas with smoother geometric features. The generated mesh is used for numerical simulation of airflow after quality optimization.
[0187] Reference Figure 3 The simulation results show that the grid generated by the method of the embodiment of the present application can more accurately capture the flow characteristics of the airflow in the complex geometric structure, and the simulation accuracy is significantly improved. At the same time, since the adaptive grid generation method can effectively reduce unnecessary computing units, the computing efficiency is significantly improved.
[0188] The embodiment provided by the present invention introduces adaptive mesh refinement technology and multi-scale geometric analysis methods, solves the problems of difficulty in capturing fine rough elements, serious boundary layer mesh distortion, and excessive total number of meshes in traditional mesh generation methods, and proposes a body-fitting mesh generation method for three-dimensional random rough walls, which can effectively capture subtle features on irregular rough surfaces, reduce computational costs, and obtain higher accuracy. It can be widely used in fluid dynamics, computer-aided design (CAD), computer-aided engineering (CAE), and other fields involving complex surface simulation.
[0189] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for generating an irregular rough wall grid, characterized in that: The method comprises: Obtaining a geometric model for generating a mesh, wherein a surface of the geometric model is composed of a plurality of triangular segments; Calculate the surface curvature of each vertex based on the normal vector of each vertex of each triangle fragment; The surface curvature of each vertex is convolved using Gaussian kernel functions of different scales to obtain the curvature response value of each vertex at different scales. According to the curvature response value of each vertex at different scales, the surface roughness area of the geometric model is divided based on a preset division rule; Adaptively meshing different surface roughness regions to obtain a rough wall mesh composed of a plurality of mesh units, wherein the meshing rule is to mesh a region with a greater resolution for a region with a greater roughness; Each vertex of each of the mesh units is aligned with a point on the surface of the geometric model to obtain an optimized and corrected rough wall mesh.
2. The irregular rough wall mesh generation method according to claim 1, characterized in that: The step of calculating the surface curvature of each vertex according to the normal vector of each vertex of each triangle fragment comprises: Get the normal vector of each vertex of each triangle fragment; Obtaining the curvature tensor of each vertex according to the normal vector of each vertex; For each vertex, the curvature tensor is subjected to Weingarten mapping to obtain a local curvature matrix; Solving the eigenvalue of the local curvature matrix to obtain a first principal curvature and a second principal curvature; Based on the first principal curvature and the second principal curvature, a surface curvature of the vertex is obtained.
3. The irregular rough wall mesh generation method according to claim 1, characterized in that: The obtaining of the normal vector of each vertex of each triangle fragment comprises: Get the coordinates of each vertex of each triangle fragment; For each triangle fragment, obtain the normal vector of the triangle fragment by cross product calculation based on the coordinates of each vertex; For each vertex, the normal vector of the vertex is obtained based on the normal vector and area of each triangle fragment adjacent to the vertex. The calculation formula of the normal vector of the vertex is: Among them, n V is the normal vector of vertex v, A T is the area of each triangle fragment T adjacent to vertex v, n T is the normal vector of each triangle fragment T adjacent to vertex v.
4. The irregular rough wall mesh generation method according to claim 2, characterized in that: The performing eigenvalue solving on the local curvature matrix to obtain the first principal curvature and the second principal curvature includes: The local curvature matrix is solved for eigenvalues to obtain a first eigenvalue λ1 and a second eigenvalue λ2, the larger of the first eigenvalue λ1 and the second eigenvalue λ2 is used as the first principal curvature k1, and the smaller of the first eigenvalue λ1 and the second eigenvalue λ2 is used as the second principal curvature k2.
5. The irregular rough wall mesh generation method according to claim 4, characterized in that: The surface curvature is Gaussian curvature or mean curvature, The calculation formula of the Gaussian curvature K is: K = k1·k2, The calculation formula of the average curvature H is:
6. The irregular rough wall mesh generation method according to claim 1, characterized in that: The expression of the Gaussian kernel function is: The expression of the curvature response value is: Among them, s is the scale parameter, G s (x) is the Gaussian kernel function at scale s, K(x') is the surface curvature at point x', K s (x) is the curvature response value at point x.
7. The irregular rough wall mesh generation method according to claim 1, characterized in that: The surface roughness area division of the geometric model based on a preset division rule includes: The preset division rule is: when at a small scale, the greater the change in the curvature response value, the more drastic the local change in the surface of the geometric model, and the greater the corresponding roughness; when at a large scale, the smaller the change in the curvature response value, the smoother the surface of the geometric model, and the smaller the corresponding roughness value; The surface of the geometric model is divided into surface roughness regions based on the preset division rule, and the roughness of each region is different.
8. The irregular rough wall grid generation method according to claim 1, characterized in that: The step of aligning each vertex of each mesh unit with a point on the surface of the geometric model to obtain an optimized and corrected rough wall mesh comprises: Let the vertex of the grid cell be X old (x old ,y old ,z old ), the point on the surface of the geometric model is point P(P x ,P y ,P z ), the normal vector of point P is n=(n x ,n y ,n z ); Set the vertex X old Projecting onto the surface of the geometric model aligns the vertex with the surface of the geometric model, then vertex x old The distance d to the surface of the geometric model is calculated by vertex X old The vector difference between the point P on the geometric surface and the point P is projected into the direction of the normal vector n. The distance d is calculated as follows: d=(P-X old )·n, Expand the distance d formula into coordinate form: d=((P x -x old )n x +(P y -y old )n y +(P z -z old )n z ): Set the vertex X old Move distance d along the direction of normal vector n to the surface of the geometric model to obtain the new vertex coordinate X new , X new =X old +d·n; The optimized and corrected rough wall mesh is obtained based on the new vertex coordinates.
9. The irregular rough wall mesh generation method according to claim 1, characterized in that: The method further comprises: Define boundary conditions on the optimized and corrected rough wall mesh, and generate boundary layers by using the expansion method; The rough wall mesh after generating the boundary layer is smoothed based on the Laplace smoothing algorithm.
10. The irregular rough wall grid generation method according to claim 1, characterized in that: The adaptive meshing is performed by refining the hexahedral mesh using the quadrature method.
Citation Information
Patent Citations
Method of estimating scattered point cloud curvature based on sampling point neighborhood isomorphic surface
CN107610232A
Feature constraint-based triangular mesh optimization method
CN113689566A
Rock joint three-dimensional roughness geometric calculation method based on triangular mesh division
CN117994468A
System and method for generating curvature adapted isosurface based on delaunay triangulation
US20080129727A1
Cited By
Water wall tube detection method
CN120876410A