As a pre-step of Computational Fluid Dynamics(CFD),meshing occupies more than 60% of the entire CFD numerical simulation cycle.At the same time,as the input and boundary conditions of various solid modeling,the quality of the surface mesh has an important influence on the subsequent numerical simulation results and numerical simulation accuracy.Therefore,how to generate a grid that meets the requirements of numerical calculations in a short time is a topic that current CFD practitioners pay close attention to.This paper takes the surface mesh generation of the STL model as the main goal,and launches a series of researches on the surface mesh generation technology.First study the convex hull algorithm of the two-dimensional plane.In view of the slow speed of the traditional Graham scanning algorithm to generate convex hulls when dealing with massive data,this paper proposes a "Left-Test" screening method based on the idea of double limit point screening.This method can further filter the data on the basis of data preprocessing,so that the amount of data that ultimately participates in the generation of the convex hull is greatly reduced.Experiments have proved that this method can filter out more data compared to the double limit point screening method.Secondly,the basic algorithm of surface(two-dimensional plane,three-dimensional surface)mesh generation is researched.(1)The two-dimensional unstructured grid generation algorithm targeting Delaunay triangulation is determined,and the boundary conditions of the two-dimensional grid generation process are discrete,the background grid is generated,the position of the insertion point is selected,and the insertion point is The technical details such as the rapid positioning of the unit were discussed in detail.(2)The surface mesh is generated by the idea of mapping method,and the Delaunay triangulation is used in the parameter plane to realize the triangulation of the parameter plane.The mutual mapping method of the surface and the parametric plane is explained,and the idea of rapid positioning of the insertion point in the two-dimensional mesh generation is used to solve the rapid positioning problem when the mesh vertices are inversely mapped from the parametric plane to the curved surface.Discretize the discrete surface represented by the STL model.The topological relationship of surface triangles is reconstructed from the data information of the original STL model.In this way,the dihedral angle of the side is calculated,and the average curvature is solved by the least squares through the first-order neighborhood of the triangle vertices.The dihedral angle and average curvature are used to extract the characteristic boundary conditions,and the surface is discretized according to the characteristic boundary.Finally,based on the specific implementation of the above algorithm and relying on the browser/server software architecture,a simple online aircraft surface mesh generation system is implemented.The system can complete the surface mesh generation through the input of STL initial conditions and the control size of the grid unit set by the user. |