HomeIndustriesProductsServicesPartnersAbout Us

Customer Login

Home arrow Blog arrow Has Your Simulation Converged?
Has Your Simulation Converged? Print E-mail
Everyone who has run any numerical simulation has had to ask themselves this question at one time or another.  How do you tell if the simulation is complete and converged?  There are several ways to check for convergence.  The most general is to check the residuals for each variable being solved, but other more specific checks can be made by using the integrated summaries and even placing monitor points as a tell-tale indication of when the solution is “done”.  Each of these approaches will be discussed in this note.
Why is convergence important?
The solution process is an iterative process and by definition values are changing from one iteration to the next.  If the change is significant then that means the results that you are relying upon for decision making are therefore also changing significantly. So how can you make good decisions if you are not confident that the solution is complete?  Sometimes it is obvious and an unconverged solution will show unphysical results.  This should not be a surprise and before questioning those unphysical results we must satisfy ourselves that the solver has completed it’s job and produced a converged solution.
How much convergence is required?
Every numerical solution contains errors.  The key is to understand how big those errors are and whether their level is acceptable in the particular application.  The acceptable level of error can vary enormously.  While a simulation comparing to minute experimental details for purposes of replacing experimental tests may require high level of convergence, a simulation to make a go / no-go decision for a particular design concept may require a lower level of convergence. 

You will often hear terms like “orders of magnitude”, “percent error”, or “significant digits”.  All basically can be related as one order of magnitude is similar to 10% error and similar to one significant digit, two orders of magnitude is similar to 1% error and two significant digits, etc.  A general rule of thumb is that 3-5 orders of magnitude of convergence is a good idea.
How is convergence measured?
Residuals – solver residuals represent the absolute error in the solution of a particular variable. CFD-ACE sums the absolute value of this error over all the cells in the simulation and presents that information for each variable for each iteration in the residual file (modelname.RSL). Because the error is not normalized by cell count or solution value you will see that the residual value itself is generally dependent on the scale of the variable being solved. For example, values for velocity are often on the order of 1-100 m/s while values for enthalpy may be on the order of 300000 J/kg.  For this reason the “residual” for velocity may be 0.001 while the residual for enthalpy may be 1.  Only upon looking at the drop in residuals can we get an indication of the overall level of convergence.  The rule of thumb is to look at the first residual or the maximum residual calculated and then look for 3-5 orders of magnitude drop from there.

When using the CFD-ACE-GUI residual plotter the Normalize button will plot the residuals normalized by their largest value. In this case the residual plots will be more closely spaced on the plot and their values represent the order of magnitude fall from their peak values. Note that if your initial guess values for a steady calculation are far away from the final solution then the initial residuals will be quite large relative to that of the converged solution. In that case, it may be necessary to obtain additional orders of magnitude residual reduction before full convergence is reached.
Printed Summaries – using the printed summaries options you can get information like mass flow, heat transfer, species flux, electric current, etc. integrated through all boundaries in the system.  A converged solution will show that the total quantity of say mass coming into the system equals that going out.  The difference between incoming and outgoing is called the imbalance and it should be zero ( or small relative to the incoming value).

Monitor Points – monitor points allow you to track a variable’s value at a particular location.  When the value stops changing you could be near convergence. You should be aware, however, that variable values will approach their final converged value at different rates depending upon where they lie in the flow field. Generally, the smallest flow structures are the slowest to converge.
Is a converged solution “correct”?
A converged solution means that the solver has done it’s job and produced the best solution it can for the given problem.  However, that does not guarantee that the solution is correct.  There are other factors that are involved, most notably the influence of discretization (grid system) and problem definition (user setup).  A poor quality or overly coarse grid system as well as user errors in setup could cause the solver to produce inaccurate results.

If this topic interests you, then please read on to see a case study which puts these ideas into practice.

If you have any questions about this feature or would like us to discuss some other topic in the future, please let us know.

Regards,
Richard Thoms
Manager, ESI-Group CFD Customer Support

Case Study: Laminar Flow over a Backward Facing Step
A low Reynolds steady flow is sent over a backward facing step.  For this note we will only discuss the convergence of the “U” equation (velocity in the x-direction) but the same arguments and details could be shown for the “V” and “P” equations.  The simulation was run for 1000 iterations and we will look at the level of convergence after 1, 10, 100, and 1000 iterations.

Residual File – a quick look at the residual plot shows that the residuals reached a level of 1E-17 after approximately 500 iterations and remained flat thereafter.  This indicates that the solution reached “machine accuracy” and in fact running anything after 500 iterations was not causing any change in the solution.

Iteration
U Residual
Comment
1
5.08E-04
initial
2
2.80E-02
peak
10
4.15E-04
2 orders from peak
100
1.98E-06
4 orders from peak
1000
1.10E-017
15 orders from peak



So according to the guidelines we consider this case converged four orders of magnitude after just 100 iterations.

Printed Summaries – for this case we asked for the solver to write the printed mass flow summary.  After 1000 iterations that summary looks like this:

You can see that the inflow is equal to the outflow to 6 significant digits and in fact the imbalance/inflow indicates that we have 16 orders of magnitude of convergence. Looking at selected snapshots of the mass flow summary after 1, 10, 100, and 1000 iterations shows the following:

Guidelines indicate that the mass flow summary shows 5 orders of convergence after just 10 iterations and if mass flow is all we were looking for then that may have been good enough, but in this case we want to see the flow recirculation and that may take longer to develop.  This shows that even if mass flow continuity is satisfied it may not be sufficient to determine if the simulation is converged.

Monitor Points – we put a monitor point just 1 step height downstream form the step in the center of the channel.  The plot of that data can be seen below and it is clear that after 100 iterations the U velocity is not changing at that location anymore.  Looking at selected snapshots of the monitor point data around 1, 10, 100, and 1000 iterations shows the following:


So according to the guidelines we could say that the monitor point showed 5 orders of magnitude of convergence after just 100 iterations.

Based upon all of the above convergence tests (residuals, mass flow summary, monitor points) we can safely say that this case was converged to a suitable level of accuracy after just 100 iterations.  Below are contour plots of the x-direction velocity taken at various iterations.  It is clear that the solution at 100 iterations and 1000 iterations are quite similar.

 
© 2012 ESI Group CFD Portal