Mesh Sensitivity

This section illustrates the various effects that mesh refinement, mesh quality and topology have on your CFD solution.

Mesh Refinement

The role of a CFD solver is to approximate the solution to a coupled set of partial differential equations.

This typically entails solving for the pressure, velocity and turbulence fields within a given domain. These fields can be both spatially and temporally varying. To obtain a solution to the governing equations, the simulation domain is discretized into small, finite regions, referred to as elements or cells, that are made up of faces that are connected by nodes or vertices. The solver then solves the governing equations over each of these finite regions to approximate the solution over the whole domain. In the case of a finite element solver, the solution is obtained and stored at the nodal locations. In other words, the solution is permitted to vary at the locations of the nodes in finite element solvers. The solution between the nodal locations is assumed to vary linearly, in most cases. With this in mind, it is clear that the mesh resolution thus must be sufficient so that all variations in the flow are sufficiently captured by an assumed linear profile between the locations where the solution is stored. Mesh resolution is a measure of the distance between two consecutive measurement points in the mesh.

A consistent numerical analysis will provide a result which approaches the actual result as the mesh resolution approaches zero. In this case the elements become infinitesimally small and the mesh behaves almost like a continuous representation of the domain. Thus, the discretized equations will approach the solution of the actual equations. One significant issue in numerical computations is what level of mesh resolution is appropriate. This is a function of the flow conditions, type of analysis, geometry and other variables. An insufficiently resolved mesh that has nodes far apart will not capture the gradients well enough when assuming linear variations between nodes and will lead to a less accurate numerical solution. An unnecessarily finely resolved mesh will lead to higher solution costs without any gain in accuracy. You are often left to start with a coarse mesh resolution and then conduct a series of mesh refinements to assess the effect of mesh resolution. This is known as a mesh refinement study. Strategic mesh refinement will call for you running a solution on the coarse mesh, studying the results and identifying the areas that require enhanced resolution to improve the solution. The refinement process should be continued until the results do not change with further refinement. Such a solution may be referred to as the grid converged solution.

CFD practitioners must recognize the distinction between a numerical result which approaches an asymptotic numerical value and one which approaches the true solution. It is hoped that as the mesh is refined and resolution improves the computed solution will not change much and approach an asymptotic grid converged value, that is, the true numerical solution. However, there still may be error between this asymptotic value and the true physical solution to the equations. This behavior is shown in the image below.

Figure 1. Effect of Increasing Mesh Density on Accuracy of the CFD Solution

Mesh Quality and Topology

Another possible sensitivity associated with the mesh used for a CFD analysis applies to the quality and type of elements that are used.

Each CFD solver has its own guidelines for what types of elements behave best from a stability, accuracy and convergence stand point. In addition to this, there are generally guidelines about the quality of each type of element that is suitable for use within the solver. Many finite volume solvers cite the aspect ratio of the elements, element skewness, orthogonality of the element faces and the element growth factor as critical metrics for determining their suitability for use. For this reason, it is sometimes recommended by code vendors that you use hexahedra elements for finite volume codes. Finite element solvers typically do not have this same constraint and will often recommend the use of tetrahedral elements. You should consider the needs of your solver when constructing a mesh to determine the most suitable discretization for your application.

The Backward Facing Step Case

The following example uses the backward step facing case. Consider a simulation of this flow using a CFD solver. Assume that you are creating a very coarse mesh on the geometry and then you are running a simulation. The CFD solver produces a solution to the Reynolds-averaged Navier-Stokes (RANS) equations on this discretization that results in a seemingly realistic flow field. The flow is characterized by the large separation zone downstream of the step and the recovering boundary layer after reattachment. Representative results for such a simulation are shown in the image below.

Figure 2. Streamlines Showing Separation Zone in Backward Facing Step Model
However, if there are insufficient points in the mesh to provide a good estimate of the gradients between the solution points the solver will not be able to resolve the flow features properly. Using this example, the shear layer that develops in the separation zone is under resolved and this leads to a poor representation of the reattachment point. In order to improve the solution it is necessary to refine the mesh in the locations of high velocity gradients. By doing this, the solver is better able to represent the local variations in the solution leading to a better approximation of the true solution to the governing equations. The image below shows five different meshes created for the backward facing step problem. Each mesh is progressively refined with respect to the previous mesh to illustrate the areas of refinement that must be paid careful attention to for this particular application.

(a) Mesh 1; (b) Mesh 2; (c) Mesh 3; (d) Mesh 4; (e) Mesh5

Figure 3. Five Meshes Used in Backward Facing Step Mesh Sensitivity Study

The figure below shows the velocity profiles obtained from the solutions of each of the meshes using a consistent solver setup. Images (a) to (d) each correspond to the solution from mesh one through four, respectively. It is easy to see how the solution improves with each refinement in the mesh. A detailed discussion of these figures is covered in the mesh refinement process below.

Figures a-d each correspond to mesh one through four, respectively.

(a) Mesh 1; (b) Mesh 2; (c) Mesh 3; (d) Mesh 4

Figure 4. Velocity Profiles Downstream of the Step Depicting Mesh Sensitivity for the Backward Facing Step Case
The refinement process is briefly discussed below.
Mesh 1-image (a)
This is the first mesh created for this case. As mentioned earlier, you begin with a coarser mesh which is systematically refined to achieve a mesh suitable for the application.
Global absolute element size of 2m for each element is used for this mesh.
A look at the solution from Mesh 1 (image 5a) reveals thick boundary layers near the top and bottom walls and core flow velocity gradients in the vertical direction.
The reattachment location could not be obtained from this solution and the flow appears to never have made contact with the lower wall downstream of the step.
Mesh 2-image (b)
The previous solution had a poor representation of the core flow and boundary layers, indicating a mesh resolution insufficient to capture the gradients present.
It is advised to use the anisotropic mesh size setting for this case. This means that you will specify a different mesh setting for the horizontal and vertical direction for efficiency. Using anisotropic mesh sizing allows you to efficiently refine the mesh by targeting the specific direction where gradients are stronger. The mesh displayed in image 4(b) is generated using the following global mesh size specification.
Mesh Size Type Absolute Anisotropic
Element size in horizontal direction (x) 2 m
Element size in vertical direction (y) 0.4 m
This will give about five times more elements in vertical direction.
This solution (image 5b) shows much better resolution of the velocity field, but the shear layer and the recirculation zone are not properly represented in the solution as irregularities can be seen in the velocity profiles in these locations.
The reattachment point for this mesh is observed to be at a distance of 8.44 m downstream of the step.
Mesh 3 – image (c)
The shear layer zone and the recirculation zone must be properly resolved for proper representation.
Mesh can be refined in these zones using localized mesh refinement zones. The suggested mesh zones for this refinement are shown in the image. The mesh sizes used for these zones are as follows:
  • Recirculation zone mesh size is 0.1 m.
  • Shear layer zone mesh size is 0.01 m.
After refinement the shear layer and the recirculation zone are much better represented, as shown in image (c).
The reattachment point for this mesh is observed to be at a distance of 7.42 m downstream of the step.
Mesh 4-image (d)
Without proper resolution at the boundary it is difficult to visualize where exactly the recirculation zone ends and the flow reattaches to the lower wall. In this step boundary layers are added near the walls to remedy that.
The following settings are used for creating the boundary layers.
Wall Lower Downstream, Wall Lower Upstream, Wall Upper Wall - Step
Mesh Type: Absolute Anisotropic Mesh Type: Absolute
X, Y element size: 2 m, 0.4 m Element size: 0.1 m
Boundary layer type: Full control Boundary layer: No
Resolve type: Number of layers  
First element height: 0.00035 m  
Total layer height: 1.25 m, for Wall Lower Downstream: 0.625 m  
Layer growth rate: 1.3  
Boundary layer elements type: Tetrahedron  
Wall-Step does not need a boundary layer because it is not expected to have attached flow. The step edge has been resolved with a fine mesh because it is the location of separation.
Results from this mesh can be seen to have a proper representation of all of the features of interest for this case. The recirculation zone is properly represented and the location of the reattachment point can be easily identified.
The reattachment point for this mesh is observed to be at a distance of 5.73 m downstream of the step.
Mesh 5 – image (e)
Having refined all critical areas of the domain, further improvement in the solution may be achieved by using a smaller element size. Mesh topology does not need to be changed from this point forward.
For this study, the following settings were used to generate a fine mesh with similar topology as the Mesh 4:
  • Global anisotropic mesh size: X, Y element size: 1 m, 0.2 m
  • Recirculation zone mesh size: 0.05 m, Shear Layer Zone: 0.005 m
Wall Lower Downstream, Wall Lower Upstream, Wall Upper Wall - Step
Mesh Type: Absolute Anisotropic Mesh Type: Absolute
X, Y element size: 1 m, 0.2 m Element size: 0.05 m
Boundary layer type: Full control Boundary layer: No
Resolve type: Number of layers  
First element height: 0.0001 m  
Total layer height: 1.25 m, for Wall Lower Downstream: 0.625 m  
Layer growth rate: 1.2  
Boundary layer elements type: Tetrahedron  
The reattachment point for this mesh is observed to be at a distance of 5.73 m downstream of the step.
The table below gives a summary of the refinement process discussed above along with the mesh size generated in each case.
Table 1. Summary of the Mesh Refinement Process
Mesh Number Number of Nodes Number of Elements Refinement over previous mesh
1 688 1,737  
2 4,508 12,981 Reduced element size
3 51,056 152,049 Refinement zone in recirculation zone
4 68,014 202,329 Boundary layers on the walls
5 207,492 619,551 Reduced element size further
The table below shows the results achieved using five different meshes. Listed in the table is the variation of the location of the reattachment point for each mesh.
Table 2. Reattachment Point Location as Observed for Each of the Different Meshes
Mesh Number Number of Nodes Reattachment Point distance downstream of the step (m)
1 688 No reattachment happens
2 4,508 8.44
3 51,056 7.42
4 68,014 5.73
5 207,492 5.73

It is evident that refining the mesh in the shear layer, recirculation zone and the near wall area where the velocity gradients are highest leads to a change in the solution between meshes one through four. However, it is interesting to note that as the mesh is further refined between grids four and five there is no change seen in the solution. This implies that the solution error associated with grid refinement has been minimized and you have reached an asymptotically grid converged solution with the mesh density and topology utilized in mesh four. All of the critical regions have been refined at this stage and suitable mesh topology as well as sufficient mesh resolution has been achieved. Further refinement of the mesh did not change the solution quantity of interest. A review of the table above indicates that the separation location changed by almost 50 percent between mesh one and the final grid converged solution of mesh four. If no grid sensitivity study was performed the engineer could have made very poor conclusions about the location of the pressure tap.

Appropriate grid refinement is one of the most important aspects of obtaining accurate CFD results. Unfortunately, there is currently no reliable method of automatically generating appropriate meshes for all applications. Additionally, different numerical methods will require different levels of mesh refinement, that is, each code will be different. Ensuring the suitability of a mesh for a given application is your responsibility. The level of accuracy required from a CFD analysis depends on the desired use of the results. A conceptual design effort may be content with general depiction of the flow features, whereas a detailed design may require accurate determination of the flow field. Each quantity to be determined generally has its own accuracy requirement. Levels of effort invested into the CFD model may vary according to the information required. It is often recommended that a minimum of three different meshes are constructed that cover a wide range of refinement and differ significantly in mesh density and resolution. For applications that require high levels of accuracy this number may be more depending on the number of mesh refinements it takes to achieve a grid converged solution. This allows you to evaluate the sensitivity of the solution quantity of interest to mesh density. Some CFD practitioners endorse the use of a Grid Convergence Index, or GCI, to estimate the level to which a simulation has reached a grid independent solution. More information about the GCI metric is available in the book by Patrick J. Roache, listed in reference [1].