CN118153450A - Mixed grid quality optimization method based on probability model - Google Patents

Mixed grid quality optimization method based on probability model Download PDF

Info

Publication number
CN118153450A
CN118153450A CN202410394002.7A CN202410394002A CN118153450A CN 118153450 A CN118153450 A CN 118153450A CN 202410394002 A CN202410394002 A CN 202410394002A CN 118153450 A CN118153450 A CN 118153450A
Authority
CN
China
Prior art keywords
grid
vertex
optimization
iteration
quality
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410394002.7A
Other languages
Chinese (zh)
Inventor
尹俊辉
邓龙威
曹欣雨
贺清
张朝阳
崔君豪
李斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN202410394002.7A priority Critical patent/CN118153450A/en
Publication of CN118153450A publication Critical patent/CN118153450A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention belongs to the field of three-dimensional tetrahedral mesh quality optimization, and relates to a mixed mesh quality optimization method based on a probability model. Firstly, carrying out modeling and discretization on a target to generate a three-dimensional tetrahedron grid, and obtaining grid vertex information and corresponding topology information; then determining a grid cell quality measurement criterion, establishing an optimization model, and setting an error function and an objective function form; establishing an integral iteration model, and setting the maximum integral iteration times; then searching low-quality grid cells, and respectively constructing local optimization domains for the vertexes of the grid cells; and (3) iteratively solving an optimal value of the objective function by a mixed grid quality optimization method based on a probability model to finish grid quality optimization. According to the method, the modified gradient descent method is utilized to complete one-time solving, a random direction iteration solving probability model is established, the calculated amount is reduced while the robustness is ensured, and the grid quality optimization with high robustness, high efficiency and high optimization rate is finally realized.

Description

Mixed grid quality optimization method based on probability model
Technical Field
The invention belongs to the field of three-dimensional tetrahedral mesh quality optimization, and relates to a mixed mesh quality optimization method based on a probability model.
Background
Numerical simulation has become a key research method that is driving pace with theoretical and experimental methods. This technique is critical to solving Partial Differential Equations (PDEs), which rely on domain discretization through grid generation. As a basis for numerical calculations, grid generation creates an initial discrete model required for simulation. Grid generation is an important branch of numerical computation, and in particular, the field of computational electromagnetics (Computational Electromagnetics, CEM) requires higher grid quality, the level of automation and grid quality being proportional to the duration of the computation cycle and the accuracy and efficiency of the simulation. However, the quality of the preliminary grid elements typically produced by automated grid generators is poor and does not meet the stringent accuracy requirements of numerical analysis. Such deficiencies may lead to reduced analog stability, false amplification of values, reduced efficiency, unexpected differences in values, and the like. For example, in finite element analysis, too large an angle of the grid element may exacerbate the gradient error, while too small an angle may increase the condition number of the stiffness matrix. Therefore, grid quality optimization is a necessary process after grid generation.
In the field of grid generation, grid vertex fairing can greatly improve the quality of unstructured grids, and is favored by researchers. Mesh vertex fairing mainly includes optimization-based fairing methods and heuristic fairing methods.
Compared with the optimization-based fairing method, the heuristic fairing method is more effective in realization by directly repositioning vertex positions through artificial experience, but has lower grid quality, wherein the more classical is Laplacian fairing. In the implementation process of the optimization-based fairing method, knowledge in the optimization field is generally utilized, and the local grid quality is improved through a series of steps of establishing an optimization model, setting an objective function, adopting an optimization algorithm, solving the optimal vertex position and the like, so that the grid quality is improved greatly, but the time consumption is also huge. Previous studies have also pursued a balance between smoothing efficiency and mesh quality.
The classical gradient descent method carries out iterative optimization solving on vertexes to be optimized one by one, each iteration solves the gradient of the objective function at the current vertex position, then solves the optimal step length by using a line search method, and finally updates the vertex position to enter the next iteration. The gradient descent method has relatively high speed and good optimizing effect. However, it is not difficult to find that in the complete iteration process of each vertex, only the optimization effect of the first few times is better, the subsequent iterations are more converged to the local optimal solution, more time is used for replacing the improvement of the upper limit of the overall grid quality, and the balance between the smoothing efficiency and the grid quality is not perfect.
Therefore, if the traditional gradient descent method is modified, a three-dimensional tetrahedral grid optimization algorithm is constructed, the calculated amount is reduced while the higher optimization rate is achieved under the condition of ensuring the robustness, the better balance between the smooth efficiency and the grid quality is realized, and finally the grid quality optimization with high robustness, high efficiency and high optimization rate is realized; and further, the efficiency and accuracy of electromagnetic simulation are improved, so that the cost of the product in analysis design and data verification is reduced.
Disclosure of Invention
Aiming at the problems or the shortcomings, the invention provides a mixed grid quality optimization method based on a probability model, which aims at solving the problem that the balance between the smooth efficiency and the grid quality is poor in the traditional gradient descent method, and the three-dimensional tetrahedral grid optimization algorithm is constructed by establishing the probability model, so that the calculation amount is reduced while the higher optimization rate is achieved under the condition of ensuring the robustness, the time resource consumption is less, the better balance between the smooth efficiency and the grid quality is realized, and the grid quality optimization with high robustness, high efficiency and high optimization rate is finally realized; thereby enabling cost reduction of the product in analytical design and data validation.
A mixed grid quality optimization method based on a probability model comprises the following steps:
And step 1, carrying out modeling and discretization on a target to generate a three-dimensional tetrahedral grid. And obtaining grid vertex information and corresponding topology information, wherein the grid vertex information comprises boundary vertex information, internal vertex information, tetrahedron grid topology information and adjacent grid information.
Where the boundary vertices are mesh vertices that participate in the triangle mesh that forms the model surface, and all mesh vertices remaining are referred to as interior vertices. The tetrahedron mesh is composed of 4 different mesh vertices, each mesh vertex has a unique and mutually different number, and each tetrahedron mesh also has a unique and mutually different number.
And 2, setting the grids obtained in the step 1 as initial grids, calculating initial grid quality by using a grid quality measurement criterion rho, and storing the initial grid quality as subsequent comparison information.
Firstly, constructing a local optimization domain for each vertex v free to be optimized, wherein the specific definition of the local optimization domain is as follows:
All grid cells taking the vertex v free to be optimized as the vertex are searched in the current grid, the grid cells form a three-dimensional entity similar to a sphere, all grid surfaces forming the surface of the three-dimensional entity are called shells of the vertex v free to be optimized, and the internal space of the shells is called a local optimization domain of the vertex v free to be optimized, namely a coordinate constraint space of the vertex v free to be optimized.
The mesh quality metric criterion used in the present invention is the aspect ratio ρ, specifically the following formula:
Wherein the method comprises the steps of Is the coordinate of the vertex v free to be optimized currently, wherein x 1、x2、x3 represents the positions on three coordinate axes of a three-dimensional cartesian coordinate system respectively, (wherein x 1 represents the position on the x coordinate axis, x 2 represents the position on the y coordinate axis, and x 3 represents the position on the z coordinate axis); f i (x) is the mesh quality function of the ith mesh in the local optimization domain of vertex V free, V is the volume of the corresponding mesh, S m is the triangle area of the mth face of the corresponding mesh, l h is the side length of the h side of the tetrahedron, under which quality metric criterion the regular tetrahedron takes a maximum of 1.
And step 3, establishing an optimization model, and setting error functions and target function forms.
The optimization algorithm generally finds the optimal solution, i.e. the minimum value of the corresponding objective function, for the optimization model. In grid quality optimization, an objective function is generally established by using a grid quality measurement criterion, and the general optimal grid type is a regular tetrahedron. For the grid quality metric criterion expressed in step 2, it takes the maximum value 1 under a regular tetrahedron, and does not meet the basic requirement of the optimization model, so an error function e (x) is established, as follows:
At this time, when the corresponding grid is a regular tetrahedron, the error function e (x) obtains the minimum value 1, and the optimization model is established.
And the definition of the objective function A (x) is as follows
Where n is the number of meshes in the local optimization domain of vertex v free to be optimized. The objective function form aims to promote the overall grid quality of the locally optimized domain.
And 4, establishing an integral iteration model, setting the maximum integral iteration number as K, and defining the current iteration number as K.
The integral iterative model is to perform optimization on the model grid for multiple times, firstly searching for vertexes needing to be optimized in each round of optimization, then performing independent optimization on each vertex, and completing the round of optimization to enter the next round of optimization or exit after all vertexes are optimized. The maximum overall number of iterations, i.e. the number of optimization rounds, is set to k=3, while the current number of iterations is first set to k=0.
And 5, calculating all grid quality of the current model grid by using the grid quality measurement criterion rho in the step 2, setting a grid quality optimization threshold tau, and placing grid cells with the grid quality lower than the threshold into a grid cell container phi G to be optimized.
The grid quality optimization threshold tau takes a value between 0.1 and 0.6, the larger the numerical value is, the more grid vertices involved in each round of optimization are, the better the optimization effect is, but the space-time consumption is also increased.
And 6, creating a grid vertex container phi V to be optimized, traversing the grid cell container phi G to be optimized, checking 4 constituent vertexes of each grid cell, adding the container phi V if the vertexes are the internal vertexes described in the step 1, and skipping if the vertexes are boundary vertexes. And eliminating repeated grid vertexes in the container phi V to obtain a final grid vertex container phi V to be optimized.
The boundary vertices are skipped to ensure that the boundary vertices are not moved, thereby maintaining the shape of the model itself and the topological consistency between the assemblies.
And 7, traversing the final grid vertex container phi V to be optimized obtained in the step 6, constructing a local optimization domain for each vertex v free to be optimized, establishing an objective function A (x), and iteratively solving an optimal value of the objective function by a mixed grid quality optimization method based on a probability model to finally complete one complete iteration of grid quality optimization.
The concrete flow of the mixed grid quality optimization method based on the probability model is as follows:
for the optimal value solving of each vertex v free to be optimized, firstly, completing one-time solving by utilizing a modified gradient descent method, enabling the vertices to be closer to an optimal solution, then establishing a random direction iteration solving probability model, entering a vertex optimal position solving iteration process, randomly selecting a vertex moving direction according to the probability in each iteration, then adjusting each direction probability according to the change of an objective function, and entering the next iteration. Setting the maximum iteration number of the random direction iteration solving probability model as A=200, and defining the current iteration number as a.
The gradient descent method flow before the vertex optimal position solving iterative process is as follows:
calculating the gradient of the objective function under the initial position of the vertex v free to be optimized The descent direction d is defined as follows:
The optimal step size α is then found using the well-known weak Wolfe-Powell line search criteria, which are defined as follows:
The step size α satisfying the above formula satisfies the weak Wolfe-Powell criterion, where c 1,c2 ε (0, 1) is a given constant, and c 1<c2. After the step length alpha is searched, updating the position of the vertex v free to be optimized, wherein the updating formula is as follows:
xnew=x+c3αd (7)
x new represents a new coordinate position of the vertex v free to be optimized after one-time approximation gradient descent is completed, c 3 is a modified gradient descent weight, and the subsequent vertex optimal position solving iteration is prevented from falling into a local optimal solution, wherein c 3 epsilon (0.3,0.8), a larger value can reduce the requirement of the subsequent iteration step number, but the larger value also easily falls into the local optimal solution, so that the final optimization effect is general.
After the above-mentioned modified gradient descent method is used to complete one-time solution, a random direction iteration solution probability model is built, 6 unit vectors are built by using three coordinate axes of Cartesian coordinate system, namely 6 iteration directions d j (j=1, 2,3,4,5, 6), the selection probabilities of the 6 iteration directions are respectively :d1=(1,0,0)T、d2=(-1,0,0)T、d3=(0,1,0)T、d4=(0,-1,0)T、d5=(0,0,1)T and d 6=(0,0,-1)T and are set as p j, and under the initial condition, the selection probabilities of all iteration directions are identical, namelySetting the vertex movement distance l=c 4 q for each iteration by using the vertex density information q, wherein c 4 e (0.05,0.001), the value defines the movement distance of the vertex for each iteration, a smaller value can obtain better effect but the maximum iteration number a can be increased, and after the a-th iteration, the vertex positions are as follows:
xa+1=xa+Lda (8)
Where d a is the direction of vertex movement in iteration a, which is any one of d j.
And (3) entering a vertex optimal position solving iterative process, and setting a=0. The specific flow is as follows:
After each iteration starts, firstly, the iteration direction selection probability p j at this time is utilized to randomly select the moving direction d a of the vertex in the current iteration, for the direction d a, a new position x a+1 of the vertex is calculated through a formula (8) and accepted, objective function values A (x a) and A (x a+1) before and after the movement of the vertex are compared, if A (x a)<A(xa+1), namely, after the current iteration, the grid quality of a local optimization domain is reduced, and the selection probability of each iteration direction is updated as follows:
if a (x a)≥A(xa+1), that is, after the present iteration, the mesh quality of the local optimization domain is raised, the selection probability of updating each iteration direction is as follows:
After the selection probability of each iteration direction is updated, the iteration number a is added with 1, and the next iteration is carried out. And when a= =a, the iteration is terminated, the optimization of the current vertex is completed, and the next vertex optimization process is entered until the grid vertex container Φ V to be optimized is traversed.
Step 8, the iteration number K is added by 1, if K is in the range of K= K, the overall iterative optimization of the model is ended, and the step 9 is skipped; otherwise, returning to the step 5, continuing the overall iterative optimization of the model.
And 9, updating all grid cell quality of the grid whole optimized in the step 8 by using the grid quality measurement criterion rho in the step 2, obtaining and outputting high-quality grids after grid quality optimization, and simultaneously outputting grid quality information before and after optimization and grid quality optimization time consumption information.
According to the method, firstly, a modified gradient descent method is utilized to finish one-time solving, so that the vertexes are closer to an optimal solution, then a random direction iteration solving probability model is established, an optimal position solving iteration process of the vertexes is entered, the selection probability of each iteration direction of the iteration is updated according to the last iteration result when each iteration starts, the vertex moving direction of the iteration is randomly selected according to the selection probability, then the vertex coordinates are updated, the local grid quality is calculated, and the next iteration is entered. The classical gradient descent method solves the gradient of the objective function at the current vertex position every iteration, the optimization effect of the former times is better, the subsequent iterations focus on converging to the local optimal solution, more time is utilized for replacing the lifting of the upper limit of the overall grid quality, and the idea is not perfect in balance between the smooth efficiency and the grid quality. The method provided by the invention avoids the subsequent solution on the gradient, optimizes the original position by using a gradient descent method modified once, then continuously determines the optimal solution of the vertex through the iteration of the probability model, greatly reduces the calculated amount, reduces the time resource consumption, increases the grid quality while improving the efficiency, and balances the relationship between the smoothing efficiency and the grid quality.
In summary, the invention reduces the calculated amount and reaches higher optimization rate while guaranteeing the robustness, consumes less time resources, realizes better balance between the smoothing efficiency and the grid quality, and finally realizes grid quality optimization with high robustness, high efficiency and high optimization rate.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a three-dimensional model diagram of an embodiment;
FIG. 3 is a graph comparing the average mesh quality of an example before mesh quality optimization, after optimization using a classical gradient descent method.
FIG. 4 is a graph comparing the time spent optimizing using classical gradient descent method with the example.
Detailed Description
The technical scheme of the invention is described in detail below with reference to the accompanying drawings and examples.
A Wolfe criterion-based three-dimensional grid quality optimization method for correcting Newton's method, referring to FIG. 1, comprises the following steps:
And step 1, performing modeling and discretization on a target aircraft, and generating a three-dimensional tetrahedral mesh by using a well-known Delaunay triangulation theory. Mesh vertex (boundary vertex, internal vertex) information and corresponding topology information (tetrahedron mesh topology information and adjacent mesh information) are obtained.
Taking class X-51 as an example, the embodiment takes a model structure as shown in fig. 2 as an example, utilizes a mesh dissection tool to carry out surface triangle mesh dissection on the model, then utilizes the well-known Delaunay triangulation theory to carry out internal tetrahedral mesh dissection on the model on the basis of the surface triangle mesh, and utilizes algorithms such as boundary restoration and the like to further perfect the model, ensure the integrity of the model boundary and the topological compatibility among different partitioned areas of the model, and finally obtains tetrahedral mesh dissection information of the class X-51 model, including coordinate information of all mesh vertices, model surface triangle mesh information and model internal tetrahedral mesh information.
Where the boundary vertices are mesh vertices that participate in the triangle mesh that forms the model surface, and all mesh vertices remaining are referred to as interior vertices. The tetrahedron mesh is composed of 4 different mesh vertices, each mesh vertex has a unique and mutually different number, and each tetrahedron mesh also has a unique and mutually different number.
And 2, setting the grids obtained in the step 1 as initial grids, calculating initial grid quality by using a grid quality measurement criterion rho, and storing the initial grid quality as subsequent comparison information.
Firstly, constructing a local optimization domain for each vertex v free to be optimized, wherein the specific definition of the local optimization domain is as follows:
All grid cells taking the vertex v free to be optimized as the vertex are searched in the current grid, the grid cells form a three-dimensional entity similar to a sphere, all grid surfaces forming the surface of the three-dimensional entity are called a shell of the vertex v free to be optimized, and the internal space of the shell is called a local optimization domain of the vertex v free to be optimized, namely a coordinate constraint space of the vertex v free to be optimized.
The mesh quality metric used in the present invention is the aspect ratio ρ, specifically the following formula
Wherein the method comprises the steps ofIs the coordinates of the current vertex V free to be optimized, where x 1、x2、x3 represents the positions on three coordinate axes of the three-dimensional cartesian coordinate system, f i (x) is the mesh quality function of the ith mesh in the local optimization domain of vertex V free, V is the volume of the corresponding mesh, S m is the triangular area of the mth face of the corresponding mesh, l n is the side length of the nth side of the tetrahedron, and under the quality metric criterion, the regular tetrahedron takes the maximum value of 1.
And step 3, establishing an optimization model, and setting error functions and target function forms.
The optimization algorithm generally finds the optimal solution, i.e. the minimum value of the corresponding objective function, for the optimization model. In grid quality optimization, an objective function is generally established by using a grid quality measurement criterion, and the general optimal grid type is a regular tetrahedron. For the grid quality metric criterion expressed in step 2, it takes the maximum value 1 under a regular tetrahedron, and does not meet the basic requirement of the optimization model, so an error function e (x) is established, as follows:
At this time, when the corresponding grid is a regular tetrahedron, the error function e (x) obtains the minimum value 1, and the optimization model is established.
And the definition of the objective function A (x) is as follows
Where n is the number of meshes in the local optimization domain of vertex v free to be optimized. The objective function form aims to promote the overall grid quality of the locally optimized domain.
And 4, establishing an integral iteration model, setting the maximum integral iteration number K, and defining the current iteration number K.
The integral iterative model is to perform optimization on the model grid for multiple times, firstly searching for vertexes needing to be optimized in each round of optimization, then performing independent optimization on each vertex, and completing the round of optimization to enter the next round of optimization or exit after all vertexes are optimized. The maximum overall number of iterations, i.e. the number of optimization rounds, is set to k=3, while the current number of iterations is first set to k=0.
And 5, calculating all grid quality of the current model grid by using the grid quality measurement criterion rho described in the step 2, setting tau=0.25 in the embodiment, and placing grid cells with the grid quality lower than the threshold value into a grid cell container phi G to be optimized.
And 6, creating a grid vertex container phi V to be optimized, traversing the grid cell container phi G to be optimized, checking 4 constituent vertexes of each grid cell, adding the container phi V if the vertexes are the internal vertexes described in the step 1, and skipping if the vertexes are boundary vertexes. And eliminating repeated grid vertexes in the container phi V to obtain a final grid vertex container phi V to be optimized.
The boundary vertices are skipped to ensure that the boundary vertices are not moved, thereby maintaining the shape of the model itself and the topological consistency between the assemblies.
And 7, traversing the final grid vertex container phi V to be optimized obtained in the step 6, constructing a local optimization domain for each vertex v free to be optimized, establishing an objective function A (x), and iteratively solving an optimal value of the objective function by a mixed grid quality optimization method based on a probability model to finally complete one complete iteration of grid quality optimization. In this embodiment, c 1=0.001,c2=0.9,c3=0.5,c4 =0.002 is set.
Step 8, the iteration number K is added by 1, if K is in the range of K= K, the overall iterative optimization of the model is ended, and the step 9 is skipped; otherwise, returning to the step 5, continuing the overall iterative optimization of the model.
And 9, updating all grid cell quality of the grid whole optimized in the step 8 by using the grid quality measurement criterion rho described in the step 2, obtaining and outputting high-quality grids after grid quality optimization, and outputting grid quality information before and after optimization.
FIG. 3 is a graph comparing the average grid quality before grid quality optimization and after optimization by a classical gradient descent method with the method of the present invention for an example of a class X-51 model (as shown in FIG. 2) at different grid densities. The method and the device analyze the data before and after the optimization of the class X-51 grid quality, the overall grid quality is obviously improved, the average grid quality before the optimization is 0.633972, the average grid quality after the optimization is 0.646157 under the quantity of 500 ten thousand grid units, and the overall grid optimization rate reaches 1.922%. And compared with the grid quality optimization effect of the classical gradient descent method on the same grid, the iteration number of each vertex is set to 5 by the classical gradient descent method used in the scheme of the invention, the average grid quality after optimization is 0.646116, and the result shows that the grid quality optimization effect of the scheme of the invention is good, and the overall grid optimization rate is higher.
In time, as shown in fig. 4, under different grid densities, the time consumption of the scheme of the invention is 99.5s under the condition of 500 ten thousand grid units of similar X-51 models, and the time consumption of the classical gradient descent method is 140.8s, and the result shows that the time consumption of the scheme of the invention is reduced by 41.3s and the optimization efficiency is quickened by 29.33% under the condition that the optimization effect is equivalent to or even slightly surpassed with that of the classical gradient descent method. And for the class X-51 grid optimized by the scheme of the invention, the subsequent operation of the modal simulation analysis design of the aircraft structure can be further carried out.
From the above examples, the present invention first models and discretizes the object to generate a three-dimensional tetrahedral mesh. Obtaining grid vertex information and corresponding topology information, wherein the grid vertex information comprises boundary vertex information, internal vertex information, tetrahedron grid topology information and adjacent grid information; determining a grid cell quality measurement criterion, establishing an optimization model, and setting an error function and an objective function form; then establishing an integral iteration model, and setting the maximum integral iteration times; retrieving low-quality grid cells, and respectively constructing local optimization domains for the vertexes of the grid cells; and (3) iteratively solving an optimal value of the objective function by a mixed grid quality optimization method based on a probability model to finish grid quality optimization. According to the method, for the optimal value solving of each vertex to be optimized, the modified gradient descent method is utilized to finish one-time solving, so that the vertices are closer to the optimal solution, then a random direction iteration solving probability model is established, the iterative process of vertex optimal position solving is entered, time resource consumption is less, grid quality is increased while efficiency is accelerated, the relation between smooth efficiency and grid quality is balanced, calculation amount is reduced while higher optimization rate is achieved under the condition of ensuring robustness, and grid quality optimization with high robustness, high efficiency and high optimization rate is finally achieved.

Claims (5)

1. The mixed grid quality optimization method based on the probability model is characterized by comprising the following steps of:
step 1, modeling and dispersing a target to generate a three-dimensional tetrahedral grid; obtaining grid vertex information and corresponding topology information, wherein the grid vertex information comprises boundary vertex information, internal vertex information, tetrahedron grid topology information and adjacent grid information;
wherein the boundary vertices are mesh vertices that participate in forming the triangular mesh of the model surface, and all remaining mesh vertices are referred to as internal vertices; the tetrahedron grids are composed of 4 different grid vertexes, each grid vertex has a unique and mutually different number, and each tetrahedron grid also has a unique and mutually different number;
Step 2, setting the grids obtained in the step 1 as initial grids, calculating initial grid quality by using a grid quality measurement criterion rho, and storing the initial grid quality as subsequent comparison information;
Firstly, constructing a local optimization domain for each vertex v free to be optimized, wherein the specific definition of the local optimization domain is as follows:
Searching all grid units taking the vertex v free to be optimized as the vertex in the current grid, wherein the grid units form a three-dimensional entity similar to a sphere, all grid surfaces forming the surface of the three-dimensional entity are called shells of the vertex v free to be optimized, and the internal space of the shells is called a local optimization domain of the vertex v free to be optimized, namely a coordinate constraint space of the vertex v free to be optimized;
The grid quality metric is aspect ratio ρ, specifically the following:
Wherein the method comprises the steps of Is the coordinate of the vertex v free to be optimized currently, wherein x 1、x2、x3 represents the positions on three coordinate axes of a three-dimensional Cartesian coordinate system, x 1 represents the positions on the x coordinate axis, x 2 represents the positions on the y coordinate axis, and x 3 represents the positions on the z coordinate axis; f i (x) is the mesh quality function of the ith mesh in the local optimization domain of vertex V free, V is the volume of the corresponding mesh, S m is the triangle area of the mth face of the corresponding mesh, l h is the side length of the h side of the tetrahedron, under the quality metric criterion, the regular tetrahedron takes the maximum value of 1;
Step 3, establishing an optimization model, and setting error functions and target function forms;
An error function e (x) is established as follows:
when the corresponding grid is a regular tetrahedron, the error function e (x) obtains a minimum value 1, and an optimization model is established;
And the definition of the objective function A (x) is as follows
Wherein n is the number of meshes in the local optimization domain of the vertex v free to be optimized;
Step 4, establishing an integral iteration model, setting the maximum integral iteration number as K, and defining the current iteration number as K;
The integral iterative model is that the model grid is optimized for multiple times, in each round of optimization, the vertexes needing to be optimized are searched first, then each vertex is optimized independently, and after all vertexes are optimized, the optimization of the round is completed to enter the next round of optimization or exit; the maximum overall iteration number, i.e. the number of optimization rounds, is set to k=3, while the current iteration number is first set to k=0;
Step 5, calculating all grid quality of the current model grid by utilizing the grid quality measurement criterion rho in the step 2, setting a grid quality optimization threshold tau, and placing grid cells with the grid quality lower than the threshold into a grid cell container phi G to be optimized, wherein the tau takes a value of 0.1-0.6;
step 6, creating a grid vertex container phi V to be optimized, traversing the grid cell container phi G to be optimized, checking 4 constituent vertexes of each grid cell, adding the container phi V if the vertexes are the internal vertexes described in the step 1, and skipping if the vertexes are boundary vertexes; and eliminating repeated grid vertexes in the container phi V to obtain a final grid vertex container phi V to be optimized;
Step 7, traversing the final grid vertex container phi V to be optimized obtained in the step 6, constructing a local optimization domain for each vertex v free to be optimized, establishing an objective function A (x), iteratively solving an optimal value of the objective function by a mixed grid quality optimization method based on a probability model, and finally completing one complete iteration of grid quality optimization;
The concrete flow of the mixed grid quality optimization method based on the probability model is as follows:
For the optimal value solving of each vertex v free to be optimized, firstly, completing one-time solving by utilizing a modified gradient descent method, enabling the vertices to be closer to an optimal solution, then establishing a random direction iteration solving probability model, entering a vertex optimal position solving iteration process, randomly selecting a vertex moving direction according to the probability in each iteration, then adjusting each direction probability according to the change of an objective function, and entering the next iteration; setting the maximum iteration number of the random direction iteration solving probability model as A=200, and defining the current iteration number as a;
The gradient descent method flow before the vertex optimal position solving iterative process is as follows:
Calculating an objective function gradient [ v ] A (x) at the initial position of the vertex v free to be optimized, and defining a descent direction d as follows:
d=-▽A(x) (4)
Searching for the optimal step size alpha by using a weak Wolfe-Powell line search criterion, wherein the weak Wolfe-Powell line search criterion is defined as follows:
f(x+αd)≤f(x)+c1α▽f(x)Td (5)
Is (x+αd) Td≥c2▽f(x)T d (6) satisfying the weak Wolfe-poll criterion, where c 1,c2 e (0, 1) is a given constant, and c 1<c2; after the step length alpha is searched, updating the position of the vertex v free to be optimized, wherein the updating formula is as follows:
xnew=x+c3αd (7)
x new represents the new coordinate position of the vertex v free to be optimized after the completion of one-time approximate gradient descent, c 3 is the modified gradient descent weight, and the subsequent vertex optimal position solving iteration is prevented from falling into a local optimal solution, wherein c 3 epsilon (0.3,0.8);
After the above-mentioned modified gradient descent method is used for completing one-time solution, a random direction iteration solution probability model is established, 6 unit vectors are established by using three coordinate axes of a Cartesian coordinate system, namely 6 iteration directions d j (j=1, 2,3,4,5, 6), and the selection probabilities of the 6 iteration directions are respectively :d1=(1,0,0)T、d2=(-1,0,0)T、d3=(0,1,0)T、d4=(0,-1,0)T、d5=(0,0,1)T and d 6=(0,0,-1)T and are set as p j; the selection probability of each iteration direction is the same under the initial condition, namely Setting the vertex movement distance l=c 4 q for each iteration using the vertex density information q, where c 4 e (0.05,0.001), then after the a-th iteration, the vertex position is:
xa+1=xa+Lda (8)
wherein d a is the vertex movement direction in the a-th iteration, which is any one of d j;
entering a vertex optimal position solving iterative process, setting a=0, and specifically, the method comprises the following steps of:
After each iteration starts, firstly, the iteration direction selection probability p j at this time is utilized to randomly select the moving direction d a of the vertex in the iteration, for the direction d a, a new position x a+1 of the vertex is calculated through a formula (8) and accepted, objective function values A (x a) and A (x a+1) before and after the movement of the vertex are compared, if A (x a)<A(xa+1), after the iteration, the grid quality of a local optimization domain is reduced, and the selection probability of each iteration direction is updated as follows:
If a (x a)≥A(xa+1), after this iteration, the mesh quality of the local optimization domain is increased, and the selection probability of updating each iteration direction is as follows:
After the selection probability of each iteration direction is updated, the iteration number a is added with 1, and the next iteration is carried out; and when a= =a, the iteration is terminated, the optimization of the current vertex is completed, the next vertex optimization process is entered until the grid vertex container phi V to be optimized is traversed;
step 8, the iteration number K is added by 1, if K is in the range of K= K, the overall iterative optimization of the model is ended, and the step 9 is skipped; otherwise, returning to the step 5 to continue the integral iterative optimization of the model;
and 9, updating all grid cell quality of the grid whole optimized in the step 8 by using the grid quality measurement criterion rho in the step 2, obtaining and outputting high-quality grids after grid quality optimization, and simultaneously outputting grid quality information before and after optimization and grid quality optimization time consumption information.
2. The probabilistic model-based hybrid mesh quality optimization method of claim 1, wherein: and in the step 1, a Delaunay triangulation theory is adopted to generate a three-dimensional tetrahedral mesh.
3. The probabilistic model-based hybrid mesh quality optimization method of claim 1, wherein: in step 7, c 1=0.001,c2=0.9,c3=0.5,c4 =0.002.
4. The probabilistic model-based hybrid mesh quality optimization method of claim 1, wherein: τ=0.25.
5. The probabilistic model-based hybrid mesh quality optimization method of claim 1, wherein: and (3) using the high-quality grid with the optimized grid quality in the step (9) to perform electromagnetic simulation so as to perform analysis design and data verification of a target product.
CN202410394002.7A 2024-04-02 2024-04-02 Mixed grid quality optimization method based on probability model Pending CN118153450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410394002.7A CN118153450A (en) 2024-04-02 2024-04-02 Mixed grid quality optimization method based on probability model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410394002.7A CN118153450A (en) 2024-04-02 2024-04-02 Mixed grid quality optimization method based on probability model

Publications (1)

Publication Number Publication Date
CN118153450A true CN118153450A (en) 2024-06-07

Family

ID=91298471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410394002.7A Pending CN118153450A (en) 2024-04-02 2024-04-02 Mixed grid quality optimization method based on probability model

Country Status (1)

Country Link
CN (1) CN118153450A (en)

Similar Documents

Publication Publication Date Title
CN112308961B (en) Robot rapid robust three-dimensional reconstruction method based on layered Gaussian mixture model
Praveen et al. Low cost PSO using metamodels and inexact pre-evaluation: Application to aerodynamic shape design
CN110069800B (en) Three-dimensional structure topology optimization design method and equipment with smooth boundary expression
JP3404532B2 (en) Optimal fitting parameter determining method and apparatus, and optimal fitting parameter determining program
CN109063355A (en) Near-optimal method based on particle group optimizing Yu Kriging model
CN109472870B (en) Model matching method based on grid reconstruction and multi-influence-domain correction
CN110941261A (en) Autonomous underwater vehicle multi-zone traversal path planning method
CN113589753B (en) Three-dimensional model surface path planning method, system and equipment
CN111967183A (en) Method and system for calculating line loss of distribution network area
CN112884236B (en) Short-term load prediction method and system based on VDM decomposition and LSTM improvement
CN111523270A (en) Improved continuum structure topology optimization post-processing method
CN116562129A (en) Intelligent optimization method for investment casting process parameters based on machine learning
CN111695281A (en) Particle rapid positioning method for tetrahedral mesh division finite element particle simulation
CN109961129A (en) A kind of Ocean stationary targets search scheme generation method based on improvement population
CN113342999B (en) Variable-resolution-ratio point cloud simplification method based on multi-layer skip sequence tree structure
CN113191486B (en) Graph data and parameter data mixed dividing method based on parameter server architecture
CN113313322B (en) MOEA/D extrusion process parameter multi-objective optimization method and device
CN117151277A (en) Two-dimensional irregular layout method based on network migration and hybrid positioning and application
CN112766609A (en) Power consumption prediction method based on cloud computing
CN107491841A (en) Nonlinear optimization method and storage medium
CN118153450A (en) Mixed grid quality optimization method based on probability model
CN115330971B (en) Geometric model lightweight method oriented to rendering performance optimization
CN113111612B (en) Discrete point cloud repeated point fast searching method based on self-adaptive space subdivision
CN113722853B (en) Group intelligent evolutionary engineering design constraint optimization method for intelligent computation
CN114329320A (en) Partial differential equation numerical solution method based on heuristic training data sampling

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination