Modern engineering simulation software is capable of performing complex meshing, and controlling mesh element size is the most commonly used feature in all complex meshing operations. Categorized by specific geometric entities, common element size controls are reflected across four levels: vertex, edge, face, and volume. A robust element size control feature helps users quickly obtain high-quality, optimized meshes, which benefits subsequent numerical computations. From a developer’s perspective, this article discusses the application and technical details of precisely controlling element size.
Characteristic Length
Characteristic length is the most critical numerical value in mesh generation. When performing finite element meshing on a geometric shape (such as a BRep entity imported from a STEP file), we always set one or more global characteristic lengths. The most common characteristic length is the maximum element size, which limits the size of the elements to control mesh density. Of course, algorithmically, certain characteristic lengths can also be generated internally based on the geometric body’s bounding box size or curve curvature. The algorithm then compares these characteristic lengths at each node location and selects the minimum value.
In practical meshing, due to the complexity of the geometry, users often need to manually refine the mesh at a specific location, which requires setting a local characteristic length for that area. The local characteristic length has a higher priority than the global characteristic length, overriding it during the meshing process. Although the local locations chosen by users are typically points, lines, or faces, these selected regions are all converted into Cartesian coordinates within the mesh space. When generating the mesh, the algorithm determines the final characteristic length size through evaluation and comparison based on the current node’s position.
Example
Taking a 3D cube model as an example, select one of the six faces and set the maximum element size of the chosen face to 0.2.
After meshing, it can be seen that the mesh density on and near the selected face is significantly higher than in other areas.
In this example, only one face was selected, but users can also select multiple faces. If dealing with an assembly model, different faces across multiple bodies can be selected. Similarly, mesh refinement can also be achieved by selecting a geometric edge.
Alternatively, selecting a geometric vertex allows for local mesh refinement around that specific vertex.
Conclusion
The local density of a finite element mesh depends on the characteristic length of the local elements. When multiple characteristic lengths exist in the same region, the algorithm compares them to determine the minimum characteristic length to use for meshing. For common Delaunay or Advancing Front algorithms, the characteristic length is used to determine the position of the next adjacent mesh node. Because the selected geometric entities are all converted into Cartesian spatial coordinates, there is no difference at the algorithmic level whether the front-end GUI selects a geometric face, edge, or vertex; the characteristic length is always determined based on the spatial position of each node.