
[Sponsors] 
December 24, 2012, 00:59 
judging convergence through residuals

#1 
Member
Join Date: Aug 2011
Posts: 54
Rep Power: 5 
I am using Fluent, and as many users do, I often monitor convergence (at least partially) by monitoring the residuals. I think that many CFD users can get confused about exactly what the residuals mean. I am occasionally one of those users.
In theory, residuals are just the change from one iteration to the next. As a solution converges one would expect the residuals to drop such that there is no change from iteration n to n+1. But that can be misleading. For example, as you drop the underrelaxation factors, residuals drop. At first glance one could say "it is converging better!" without that being the case. Taking this to the extreme... If UR factors are dropped to 0.001, the solution simply isnt progressing, almost at all. Therefore the residuals will drop to approx. machine precision. My ultimate point is that, residuals can mean many things, from "the solution is converged" to "the solution is not progressing". Or, when the residuals are constant at a higher value, that "the solution is changing consistently or oscillating". So my ultimate question is, are there any good ways to weed out some of these issues? Yes, I like most people set surface monitors and judge those for convergence, but I want this conversation to remain about residuals. Are there any experts out there with some insight into this matter? I would be interested in having some discussion. 

December 24, 2012, 05:31 

#2 
Senior Member
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 387
Rep Power: 6 
Residuals actually aren't a measure of change from one iteration to the next, they are a local measure of how well the current solution satisfies the governing equations, typically normalized in some way. For example, you have the equation at a control volume P with neighbors NB:
Then the residual at that control volume is: Which is then normalized by some global scale such as the average magnitude of in the domain. The residual reported by CFD codes is usually the RMS average of the residuals in the domain or sometimes the maximum. Note that the "a" coefficients and the source "b" depend on the current solution, so after the solution comes from the linear solver the residual will be very small (depending on solver tolerance) but then the coefficients are updated based on that solution which is when the residual is actually checked. So it is a measure of how well your linearized problem is converged to the solution of the nonlinear problem. If your coefficients don't change much between iterations the residual will be small. To judge convergence the residual is important because it tells you how well your linearized problem is approximated. If the residual is small it is telling you that your coefficients are not changing much between iterations and the nonlinear problem is well approximated. However, you are right, high levels of relaxation will make this number misleading because it causes the solution, and as a result the coefficients, to change less between iterations. I think the best thing to do is also report all global quantities you are interested in and make sure they are also not changing. If you have to use a lot of relaxation in the beginning for stability reasons, try backing this of later in the calculation to get a better idea of convergence. 

December 24, 2012, 05:58 

#3 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,588
Rep Power: 20 
Good issue!
Assuming for example a system in the form A.x = q, x is the exact solution, at a generic iteration k you have: rk = A . xk  q while you can see that xk+1  xk = A^1 . (rk+1  rk ) Therefore, the conclusion is that one must never use the difference xk+1  xk ... 

December 24, 2012, 10:21 

#4 
Member
Join Date: Aug 2011
Posts: 54
Rep Power: 5 
Thank you both so much for your replies! They both help clarify this issue quite a bit for me. I have used CFD for some time, and now I am really trying to get back into understanding the mathematics as I think that will really help my quality of results. Thanks again!


December 25, 2012, 05:52 

#5 
Senior Member
Rami BenZvi
Join Date: Mar 2009
Posts: 148
Rep Power: 8 
I suggest that in addition the residual monitoring you'll also check global balances (e.g., mass, momentum and energy over the entire domain). This will help you to see if your solution is reasonable and not just frozen due to low relaxation. Another measure is indeed the change between subsequent iterations.


December 25, 2012, 09:35 

#6 
Member
Join Date: Aug 2011
Posts: 54
Rep Power: 5 
So that is what I was looking for, additional checks to deterine whether it is converged or not progressing. When you say check global mass balance and energy etc, is there a good way to do that? Is it simple checking mass flow at inlet and outlet? Or is there some sort of volume integral. As well, is there a way to check difference in flow solution between iterations? I know Fluent is doing some normalization, would it be beneficial to stop it from doing this? I have run into slight issues where *I thought* I was not getting a good convergence on residuals, but it was just that I had used an fmg initialization, so my initial condition was very good.
Thanks again for your help, this has been extremely informative. Merry Christmas! 

December 25, 2012, 10:01 

#7 
Senior Member
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 387
Rep Power: 6 
In Fluent you can report the net mass flow through all inlets and outlets, which should sum to something near zero. Look for this under the monitors menu. You can also get it not to normalize residuals under the same menu by opening up the residuals panel. In general the normalization is good, otherwise residual levels are completely problem dependent. When they are normalized they are only somewhat problem dependent.


December 25, 2012, 13:18 

#8 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,588
Rep Power: 20 
I am not an expert in Fluent ... but for me the balance between inlet and outlet is of lesser meaning in checking the real convergence ..


Tags 
convergence, fluent, residuals, residuals fluent 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Convergence  Centurion2011  FLUENT  24  May 9, 2015 08:02 
Force can not converge  colopolo  CFX  13  October 4, 2011 22:03 
Convergence issue residuals of continuity  s.garg  FLUENT  2  January 18, 2011 19:10 
convergence and residuals  ebm  CFX  2  February 2, 2009 18:55 
Convergence  scaled vs unscaled residuals  HS  FLUENT  1  November 7, 2005 06:45 