Tips & Tricks: Convergence and Mesh Independence Study
The previous posts have discussed the meshing requirements that we need to pay attention to for a valid result. It is important to remember that your solution is the numerical solution to the problem that you posed by defining your mesh and boundary conditions. The more accurate your mesh and boundary conditions, the more accurate your "converged" solution will be.
Convergence is something that all CFD Engineers talk about, but we must remember that the way we generally define convergence (by looking at Residual values) is only a small part of ensuring that we have a valid solution. For a Steady State simulation we need to ensure that the solution satisfies the following three conditions:
- Residual RMS Error values have reduced to an acceptable value (typically 10-4 or 10-5)
- Monitor points for our values of interest have reached a steady solution
- The domain has imbalances of less than 1%.
RMS Residual Error Values
Our values of interest are essentially the main outputs from our simulation, so pressure drop, forces, mass flow etc. We need to make sure that these have converged to a steady value otherwise if we let the simulation run for an additional 50 iterations then you would have a different result. Ensuring that these values have reached a steady solution means that you are basing your decisions on a single repeatable value.
Example of Monitoring a Value of Interest
As a rule, we must ensure that prior to starting a simulation we clearly define what our values of interest are, and we make sure that we monitor these to ensure that they reach a steady state. As previously highlighted, we also need to make sure that the Residual RMS Error values are to at least 10-4. Finally, we need to ensure that the overall imbalance in the domain is less than 1% for all variables.
Imbalances in the Domain
MESH INDEPENDENCE STUDY
The approach outlined above results in a single solution for the given mesh that we have used. Although we are happy that this has "converged" based on RMS Error values, monitor points and imbalances, we need to make sure that the solution is also independent of the mesh resolution. Not checking this is a common cause of erroneous results in CFD, and this process should at least be carried out once for each type of problem that you deal with so that the next time a similar problem arises, you can apply the same mesh sizing. In this way you will have more confidence in your results.
The way we carry out a mesh independence study is fairly straight forward.
- Step 1
Run the initial simulation on your initial mesh and ensure convergence of residual error to 10-4, monitor points are steady, and imbalances below 1%. If not refine the mesh and repeat.
- Step 2
Once you have met the convergence criteria above for your first simulation, refine the mesh globally so that you have finer cells throughout the domain. Generally we would aim for around 1.5 times the initial mesh size.
Run the simulation and ensure that the residual error drops below 10-4, that the monitor points are steady, and that the imbalances are below 1%.
At this point you need to compare the monitor point values from Step 2 against the values from Step 1. If they are the same (within your own allowable tolerance), then the mesh at Step 1 was accurate enough to capture the result.
If the value at Step 2 is not within acceptable values of the Step 1 result, then this means that your solution is changing because of your mesh resolution, and hence the solution is not yet independent of the mesh. In this case you will need to move to Step 3.
- Step 3
Because your solution is changing with the refinement of mesh, you have not yet achieved a mesh independent solution. You need to refine the mesh more, and repeat the process until you have a solution that is independent of the mesh. You should then always use the smallest mesh that gives you this mesh independent solution (to reduce your simulation run time).
The best way to check for a mesh independent solution is to plot a graph of the resultant monitor value vs the number of cells in your simulation. This is illustrated below where we have three results from our steady monitor points for the average temperature at an outlet.
We can see that with 4 million cells we have a result, which could be "converged" for that particular mesh, with 10-4 residuals and imbalances below 1%. By increasing the mesh resolution to 6 million cells, we can see that there has been a jump in the value of interest that is not within my user specified tolerance (in this example I'll say +/-0.5 degrees).
By increasing the mesh size further we can see that the 8 million cell simulation results in a value that is within my acceptable range. This indicates that we have reached a solution value that is independent of the mesh resolution, and for further analysis we can use the 6 million cell case, as it will give us a result within the user defined tolerance.
Example of Mesh Independence Study
It is important that all CFD users follow these steps to ensure that you are reporting accurate simulation results. Please contact our Support Team if you have any further queries on this approach.
In the next blogs we will begin to discuss the importance of turbulence model selection.