Computational fluid dynamics (CFD) is based on the resolution of extremely complex physical problems using finite element methods: the solution is calculated for a finite number of points and subsequently interpolated over the entire domain. The discretization of the domain takes place through the process of creating the mesh, commonly called meshing: the mesh is nothing but the set of all the elements used for the discretization of the domain.
Figure 1: Meshing of a NACA profile
Generating an adequate mesh to solve the problem you are facing is a complex operation that requires specific skills from the designer and a considerable amount of time: it is estimated that about 30% of the time used to set up a correct simulation CFD is used precisely in the realization of the mesh. We can therefore easily imagine how complex it is to summarize in a few lines the mesh generation process; on the subject we advise you to consult the increasingly substantial technical literature of the sector, as well as to engage in the creation of some meshes for simple geometries and characterized by a reduced number of cells. It may be more interesting to tackle the issue of mesh quality: below we will analyze the commonly used indicators to evaluate the quality of a mesh and, therefore, the possibility of using said mesh in a fluid dynamics simulation.
The quality of the mesh is, as has been said, fundamental for obtaining reliable results from CFD simulations: we will never be able to obtain a good solution starting from a poor quality mesh. To evaluate the quality of the mesh, we typically use some important indicators related to the cells that make up the mesh:
- Aspect ratio (AR)
Each element that makes up the mesh, be it 1D, 2D or 3D, will be formed by geometries more or less close to regular geometries. Formally, the orthogonality of the mesh is the angular deviation between the segment that connects the centers of two cells and the normal to the shared face. The non-orthogonality of a cell is therefore an indicator that measures how much the angle formed by two adjacent cells deviates from its ideal value (for example 90 ° for quadrangular faces or 60 ° for triangular faces). Angles distant from the optimum increase the difficulty of calculating the magnitude gradients exponentially and worsen the continuity of the solution. It seems then evident that the designer’s goal is to obtain a mesh with cells having reduced non-orthogonality. Note that the non-orthogonality of the mesh is considered equal to the maximum non-orthogonality present within the mesh itself; in particular, if we assume that two adjacent cells have non-orthogonality equal to 0 when they form a perfectly ideal angle, we can state that:
A) For non-orthogonality> 85: it is practically impossible to obtain an acceptable solution; the mesh must be revised.
B) For 70 <non-orthogonality <85: value of acceptable non-orthogonality that however requires some precautions from the designer; for example, the use of correctors within numerical resolution methods will be required. The solution obtained could be reliable, but it will have to be checked carefully.
C) For 50 <non-orthogonality <70: discrete non-orthogonality value, is typically considered as a good compromise to obtain relatively reliable solutions without excessively increasing the computational cost.
D) For 25 <non-orthogonality <50: good non-orthogonality value, allows to use calculation schemes less robust and more accurate than less regular meshes; with non-orthogonality values of less than 40, second-order calculation schemes can be exploited, rather than first-order ones, considerably improving the reliability of the solution.
E) For non-orthogonality <25: optimal non-orthogonality value thanks to which it is possible to safely use second order resolution schemes, obtaining very precise and reliable solutions. The achievement of such a small value of non-orthogonality risks, in some cases, to weigh severely on time, and therefore on the computational cost.
Figure 2: Examples of non-orthogonal meshes
The second parameter to consider when evaluating the quality of the mesh is the asymmetry of the cells, typically indicated with the term skewness. The skewness of a cell is an indicator that measures how much the real geometry of the cell deviates from the corresponding ideal geometry (for example, the ideal geometry for a hexahedral cell would be a cube): the greater the skewness, the more the geometry will diverge from the ideal. The asymmetry of the cells is a very important problem in the CFD since the numerical equations used in solving the problem are based on the hypothesis that the cells are relatively close to the ideal geometries.The cell skewness is calculated using the normalized angular deviation method, and is defined as:
In the aforementioned definition of the skewness, refers to the major angle of the cell in question, to the minor angle while is the angle of the relative ideal reference geometry. In light of this definition, the cell skewness (for 3D cells) is considered as follows:
|Valore di skewness||Qualità della cella|
|From 0.9 to 1.0||Worst|
|From 0.75 to 0.9||Poor|
|From 0.5 to 0.75||Fair|
|From 0.25 to 0.5||Good|
|From 0 to 0.25||Excellent|
It would be preferable that all the cells that make up the mesh were at least “good”, therefore with skewness less than 0.5; it is however absolutely fine to use meshes that present a limited number of cells with poor quality, especially if these are in positions of little physical interest. A 3D mesh can be considered of high quality when all the cells have a skewness of less than 0.4 and most of them are of excellent quality (<0.25).
Figure 3: Comparison between low skew and high skew cells.
The third parameter to consider in assessing the quality of a mesh is the so-called Aspect Ratio (AR), or the ratio between the maximum size and the minimum size of a cell. Unlike non-orthogonality and skewness, however, there are no benchmark values for evaluating an optimal AR in creating the mesh for a fluid dynamics simulation. Although reduced AR values contribute to the stability of the solution, avoiding unbalances of the fluid flow, it is possible to use meshes with very high AR (even well over 1000) if the mesh size is in the same direction as the fluid. Generally, it can be assumed that an Aspect Ratio of less than 20 does not give any solution convergence problem, regardless of the characteristics of the fluid flow.
Three important indicators of mesh quality were analyzed: non-orthogonality, skewness and Aspect Ratio: the considerations reported above have a very generic value and should be applied to real cases with knowledge of the facts. The experience of the designer in the meshing is fundamental to be able to distinguish the most important indicators for the mesh in question, going to improve one or more specific characteristics of the mesh.In general, we must always remember an important lesson concerning meshing: a good mesh does not guarantee a good solution, but a poor mesh guarantees a poor solution.