CN-120782995-B - Non-uniform hexahedral mesh subdivision method based on regional density distribution rule
Abstract
The invention discloses a non-uniform hexahedral mesh dividing method based on a region density distribution rule, which relates to the technical field of software development and comprises the following steps of S1, dividing a solution target by adopting triangular surface elements, dividing regions according to different region densities to obtain maximum and minimum mesh sizes corresponding to each region, S2, after the step S1 is executed, n regions are obtained, grid lines are sequentially generated in a Cartesian coordinate system according to three dimensions of x, y and z, and optimization is started from the region with the minimum maximum mesh size.
Inventors
- HUANG QINGYING
- ZHAO YINGYAN
- CAO QUNSHENG
Assignees
- 上海瓴术科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20250704
Claims (6)
- 1. The non-uniform hexahedral mesh dissection method based on the area density distribution rule is characterized by comprising the following steps of: S1, for solving a target, meshing by adopting triangular surface elements, and dividing regions according to different region densities to obtain the maximum and minimum mesh sizes corresponding to each region; S2, after the step S1 is executed, n areas are obtained, grid lines are sequentially generated according to three dimensions of x, y and z in a Cartesian coordinate system, optimization is started from an area with the smallest maximum grid size, the minimum grid number and the grid subdivision size of the area are calculated, a grid line incremental sequence is generated, the grid lines of adjacent areas are optimized according to the following sequence, if the initial optimization area is a t-th area, the grid lines of adjacent areas are simultaneously optimized according to the two directions of t-1, t-2..1, t+1 and t+2..n, when t=1, the grid lines are optimized according to the sequence of t+1, t+2..n, when t=n, the grid lines of adjacent areas are optimized according to the sequence of t-1 and t-2..1, the ratio of adjacent grids is met in the optimization process and does not exceed the constraint of a preset maximum Rmax, and the grid size is as close to the maximum grid size of the area as possible; S3, after the step S2 is executed, the intersection test of the ray in the directions parallel to x, y and z and the triangular surface element grid of the model is respectively carried out, and the acceleration is carried out by utilizing a space management container data structure so as to reconstruct the outline of the hexahedral grid; S4, after the step S3 is executed, three Boolean three-dimensional matrixes used for representing hexahedral meshes to be removed and reserved are obtained, and a non-uniform hexahedral mesh topological structure is output according to a format; In the step S2, the vector of the first region range of the n regions is defined, where the maximum grid size of the region is defined as the minimum grid size, and the ratio of the adjacent grids is defined as the ratio of R max >1; in the step S2, the step of sequentially optimizing the grid lines of the adjacent areas is as follows: If 1< t < n, optimizing grid lines in the sequence of the areas in the two directions of t-1, t-2, & gt 1 and t+2, & gt n; if t=1, then optimizing the grid lines of the remaining regions in the order of t+1, t+2. If t=n, then optimizing the grid lines of the remaining regions in the order of t-1, t-2,..1 region; in the step S2, the ratio constraint of adjacent grids is used for ensuring the convergence of the electromagnetic wave time domain finite difference method.
- 2. The method for non-uniform hexahedral mesh partitioning according to claim 1, wherein in the step S1, the method for partitioning the regional density is a multi-resolution clustering method.
- 3. The non-uniform hexahedral mesh partitioning method based on the area density distribution rule according to claim 1, wherein in the step S2, an optimization scheme of the area with the smallest maximum mesh size is as follows: assuming that the region is Area, calculate minimum grid number ; Calculation of Mesh subdivision size on area ; Generating incremental columns of grid lines 。
- 4. The method for non-uniform hexahedral mesh generation based on regional density distribution rule according to claim 1, wherein in the step S2, when optimizing the grid lines of the adjacent region, the constraint condition is: ; ; ; ; ; wherein, the ratio of adjacent grid step length is smaller than Then And Representing the maximum mesh size required for critical points on the left and right sides of the current region, D1, D2.
- 5. The method of non-uniform hexahedral mesh division according to claim 4, wherein in the step S2, the number of columns after the grid lines of the adjacent regions are arranged is 。
- 6. The method of claim 1, wherein in step S3, the spatial management container is a BVH data structure, and BVH is a hierarchical bounding box.
Description
Non-uniform hexahedral mesh subdivision method based on regional density distribution rule Technical Field The invention relates to the technical field of software development, in particular to a non-uniform hexahedral mesh subdivision method based on a regional density distribution rule. Background The electromagnetic wave time domain finite difference method (FDTD) performs computation by discretizing the computation area space and time, and converting the continuous electromagnetic field into discrete data points using mesh subdivision. In the FDTD method, the space is generally divided into regular hexahedral grids, the time step is selected according to the stability condition, the electric field and the magnetic field are alternately stored at different grid positions and updated in a space-time coupling mode, the propagation of electromagnetic waves is simulated, in order to ensure the stability of the FDTD method, the grid subdivision is required to meet certain size requirements, firstly, the size ratio of adjacent grids is not required to be too large or too small, otherwise, the differential process of the algorithm can become unstable and even diverge, the simulation result is influenced, secondly, in order to reduce the error caused by the stepped approximate curved surface, the simulation precision is improved, and the hexahedral grid size is required to be finely regulated and controlled because the error and the grid size are in a remarkable inverse proportion. Currently, the transformation of triangular surface element meshes of a model into hexahedral meshes is a mainstream subdivision mode, and a uniform hexahedral mesh subdivision technology has been developed and matured. However, the non-uniform hexahedral mesh splitting technology still has a plurality of bottlenecks to be broken through, the key problems are focused on precisely defining sparse and dense areas of meshes, ensuring that grid lines with reasonable density are efficiently generated under the constraint condition of meeting the adjacent mesh size proportion, scientifically processing the problem of choosing and rejecting redundant meshes, and taking the quality of hexahedral mesh splitting as a basic link of FDTD simulation calculation as the efficiency and precision of iterative calculation, so that we propose a non-uniform hexahedral mesh splitting method based on the area density distribution rule. Disclosure of Invention In order to overcome the deficiencies of the prior art, at least one technical problem presented in the background art is solved. The technical scheme adopted by the invention solves the technical problems by providing a non-uniform hexahedral mesh subdivision method based on a regional density distribution rule, which comprises the following steps: S1, for solving a target, meshing by adopting triangular surface elements, and dividing regions according to different region densities to obtain the maximum and minimum mesh sizes corresponding to each region; s2, after the step S1 is executed, n areas are obtained, grid lines are sequentially generated according to three dimensions of x, y and z in a Cartesian coordinate system, optimization is started from the area with the smallest maximum grid size, the minimum grid number and the grid size are calculated according to the area range and the largest grid size, the grid lines of adjacent areas are sequentially optimized, and the constraint of the ratio of adjacent grids is met; S3, after the step S2 is executed, the intersection test of the ray in the directions parallel to x, y and z and the triangular surface element grid of the model is respectively carried out, and the acceleration is carried out by utilizing a space management container data structure so as to reconstruct the outline of the hexahedral grid; and S4, after the step S3 is executed, three Boolean three-dimensional matrixes used for representing the hexahedral mesh to be removed and reserved are obtained, and the non-uniform hexahedral mesh topological structure is output according to the format. Preferably, in the step S1, the method of dividing the region density is a multi-resolution clustering method. Preferably, in the step S2, the n-th regionThe individual region ranges from vectorWherein the maximum grid size of the region isThe minimum mesh size isThe ratio of adjacent grids is, wherein,。 Preferably, in the step S2, an optimization scheme of the area with the smallest maximum mesh size is: assuming that the region is Area, calculate minimum grid number; Calculation ofMesh subdivision size on area; Generating incremental columns of grid lines。 Preferably, in the step S2, the step of sequentially optimizing the grid lines of the adjacent area includes: If it is Then press at the same timeAndOptimizing grid lines in sequence of areas in two directions; If it is Then pressOptimizing the grid lines of the remaining areas in the sequence of the areas; If it is Then pressThe order of t