The definition of the mesh is an important part of the pre-processing, because if dealing with a watertight model, there are another set of simplifications which are based on mesh requirements and how the meshing is performed. Hence, once defined the mesh configuration, the geometry must be adapted to it. The volume mesh is usually composed of tetrahedra, pyramid, triangular prism and hexahedron, and the Navier-Stokes Equations need to be solved in the external air, which is discretized into very small elements. Typically, hexahedron and triangular prism for the boundary layer. These elements match some constraints in the geometry. On the surface, there are two possibilities, triangular and quadrilateral. Since these elements are defined, there are two main types of grid strategies, these are structured and unstructured mesh.
Structured mesh
The structured mesh are based on hexagonal or squared elements into the 2D grid. Its characteristics are their repeatability, in order to be recognized by the pattern of the grid. It is a huge help when indexing the elements and the nodes that compose the part or body. In addition, this kind of grid is fast to be generated.
Unstructured mesh
The unstructured mesh (Figure 2) is more chaotic since its main advantage is flexibility. It is based on triangular elements, but there are also polyhedral elements. This mesh makes it possible to adapt well into complex geometries without failure and having more elements generated. For instance, plinth is a good application for the unstructured mesh since it adapts better to a narrow and small geometry. A structured mesh will not only increase the amount of elements, as build distorted elements that result in a failed mesh.
This can be observed on Figure 3 that illustrates a vehicle body, which was discretized with a structured grid. It is possible to observe that there are a lot of total refinements that are forced by the requirements of the structural mesh. Therefore, the unstructured mesh is always advisable in the motorsport CFD runs and surface discretization.
Conformal and non-conformal mesh
The other way to describe a mesh is as conformal and non-conformal mesh. In a conformal mesh the intersection between two elements is a sub-element. For instance, Figure 4 illustrates a non-conformal mesh that has very different elements, in which their faces are sectioned by three faces of other elements and these are non-conformal ones. This is a non-conformal mesh. The huge difference between them is their application. When imposing the solver, these meshes do very different things. For instance, the balance of fluxes of a small mesh. In the case of the conformal mesh, the fluxes that are exiting the element and going directly into the close element without any intersection. In the case of non-conformal mesh, the fluxes are going outside the element and these are split according to the tangential element. Hence there is some compromise with the mesh accuracy.
Mesh quality
Another important point about the mesh is its quality. In the final volume method, which is based on the balance of fluxes of the faces, as much the elements are bilateral, more the fluxes are clean and well computed. Hence, more accuracy is obtained. In the opposite case, as much the elements are crashed, less accurate are the fluxes. Therefore, to have the entire translation of the mesh requirement, its quality criteria is based on the evaluation of how much the elements are bilateral.
Skewness
The surfaces which are typically discretized into triangular elements have their quality measured by the skewness. This is a measure of the deviation in terms of the angle delta relative to the ideal angle since a triangle is equilateral when all angles are equal and their sum is 180°. When the skewness is zero, it means that the triangle collapse since their angles are too different from the equilateral one.
Top-to-bottom and bottom-up
The volume mesh usually starts the configuration of the mesh, because it is related to what is being done, instead of what should be done. Dealing with the volume mesh, usually from the solution of a flow outside the car, two main strategies can be performed, top-to-bottom and bottom-to-top. Bottom-up or bottom-to-top is based in a 2D mesh surfaces, which are frozen. From this is grown the volume mesh. Hence, this is a direct sequence of the surface mesh. This is usually used for the box end of the car. The top-to-bottom is a different strategy. It is based in the car domain already defined, then the splitting begins from this domain to form small boxes. This process goes until the point the the splitting reaches the car. From this point the algorithms extract the fake cells, which intersect the body, and cut them according to the shape of the body. Hence, this provides a lot of cut cells near the car geometry in order to start the car geometry discretization from the surface elements generated after the cut.
Differences between top-to-bottom and bottom-up
The results between these two methods are very different. The mesh bottom-up is very nice in terms of quality. There is a boundary layer mesh and then a huge and uniform volume mesh. In the case of top-to-bottom meshes, it is possible to notice that the boundary layer is non-uniform, the volume elements vary a lot in terms of the number of layers. This occurs because the cut of the faces is a complex process. It is not obvious where it is able to put the boundary layer. The compromise is that this method tries to push the elements into the car surfaces. Therefore, the results are very different, but there is no better approach. Actually, it depends on the solver used. For instance, Fluent is very high learning in terms of mesh quality, which means, it does not easily accept the top-to-bottom method. On the other hand, the Open Foam accepts it more quietly. The top-to-bottom approach can be already meshed, because meshing surfaces is a help for the solver and has more features. If it is not quietly performed, maybe these have more features that are interesting to cut and it is not coupling. Hence, creating a nice and small detailed surface mesh helps the algorithm to have a high accuracy in terms of cutting them.
The bottom-up has very nice surfaces which are used to create the boundary layer and then the surface mesh is used to create prisms. This is done through the extrusion of the surface mesh. In the top-to-bottom approach there is the box which the car is inside of it. A lot of boxes are added in order to subdivide the car. The algorithm realizes the intersections created by the boxes. Hence, more boxes are created until the target size of the element is reached. In this situation, the algorithm tries to go inside the wall until the size, but at a certain quality it cuts the element. When the boundary layer is thin, it is not clear that it is working with the extrusion. Actually, it is trying to cut the elements into a small layer. Hence, if there are three layers and one of them is in another point, this is a very common in non-conformal meshes, thus it is possible to see that there are areas with more layers and others with less layers. However, if there are all uniform and extruded mesh for the boundary layer, the elements of the surface will be tetrahedral matching hexahedral layers, thus resulting in a hexahedron.
Good mesh discretization guidelines
The key points for a good mesh for motorsports applications are described as follows. Theoretically, the mesh resolution is defined by its constant refinement until the point that the solutions are not changing anymore. However, in practice this too time consuming, thus for the surface mesh of a car mesh 1:1 it is adopted 1 to 5 mm for surface mesh to cover the car. This is important for the mesh independency. Therefore, the mesh resolution should be fine enough to reproduce the geometric detail (accuracy), to reproduce the pressure gradients along the surfaces and to ensure a proper resolution of the boundary layer.
Mesh target
The definition of the mesh resolution is a very difficult task, because the size of the elements is an important point for the simulation. A good practice to define it is to achieve the mesh independency, which is when the process keeps the refinement until the point that the numerical solution is not changing anymore. Usually, for the surface mesh of 1:1 scale model, the surface elements go from 1 to 5 mm. Hence, the triangle elements have their sides varying from 1 to 5 mm. The impact of the mesh resolution is summarized in three points:
- Accuracy;
- Pressure gradients computation;
- Fluxes computation near the wall.
The accuracy is related to the size of the elements, as smaller they are, more accurate will be the simulation. However, the accuracy also depends of the RANS turbulent model adopted. The pressure gradient computation guides the process to design the boundary layer mesh. In general, gradients are important to solve the fluxes and the overall flow field. For instance, in the boundary layer, the gradients are concentrated in the normal direction, thus it is required a very fine mesh with respect to the surface gradients. In some cases it is possible to run a simulation with a higher sizes of the mesh. This is usual when the gradients are tangential. Therefore, the pressure gradients of the flow field is guiding how the elements and the solutions are obtained.
CAD to mesh
From the CAD surfaces it is generated a surface mesh through bottom-to-top strategy, which its objective is to build the volume mesh cloud. Usually, triangle elements for this kind of strategy allow a set of modifications to be done into the CAD model. Hence, there are more tools not only to build the watertight model, but also to make geometry nice to achieve a good surface mesh. Actually, the CAD and the mesh are related, this means that if the CAD is properly prepared, then the probability to have a good mesh is increased. Usually, the mesh is not ideal at first iteration, thus it is verified the points which the mesh is bad. After that the CAD model is reviewed in order to simplify and adjust the points which the mesh were bad. Hence, the mesh is improved making small compromises into the CAD to improve the accuracy of the solution. The CAD model can be as complex as possible, but if the solver has problems to converge, the complex regions will have a very low accuracy or a complete mislead solution. The best approach is to have a high fidelity and robust numerical solution sacrificing very small details of the CAD.
References
- This articles was based on the lectures notes written by the author during the Industrial Aerodynamics lectures attend in Dallara Academy.