
[Sponsors] 
November 14, 2005, 08:36 
Convergence criterion

#1 
Guest
Posts: n/a

Hi,
I'm developping a small code in order to resolve incompressible viscous bidimentionnal steady flows. Everything seems Ok apart the convergence criterion, for now, i'm just giving the number of iteration to be sure that the code will stop. I tried the relative convergence criterion: abs((Un+1  Un)/Un+1)<eps but it doesn't work.... I want to apply the residual but I still don't know how. I'm working on navierstokes equations using the primitive variable formulation. Thanks in advance 

November 14, 2005, 10:06 
Re: Convergence criterion

#2 
Guest
Posts: n/a

HI, For applying residual convergence criterion, you should find the root mean square(RMS) value of the differences of u or v velocity at all the mesh nodes and put it to be less than 0.001(for steady state criterion in time, lets say). Try it out. hope it helps.


November 14, 2005, 12:16 
Re: Convergence criterion

#3 
Guest
Posts: n/a

I must confess that i don't really understand what do u mean by : RMS value of the DIFFERENCES of u or v...


November 14, 2005, 21:56 
Re: Convergence criterion

#4 
Guest
Posts: n/a

for u it's Sigma[(u_new(i)u_old(i)]^2/Sigma[u_new(i)]^2 or similar.


November 14, 2005, 21:58 
Re: Convergence criterion

#5 
Guest
Posts: n/a

or better: Sigma{[(u_new(i)u_old(i)]^2/[u_new(i)]^2}


November 15, 2005, 13:09 
Re: Convergence criterion

#6 
Guest
Posts: n/a

Is the 'sum' computing necessary ?


November 15, 2005, 13:20 
Re: Convergence criterion

#7 
Guest
Posts: n/a

it highly depends on you. What I use is a "norm". If you don't use a sum, then you need to check the convergence for "all" the nodes. It's up to the programmer.


November 15, 2005, 13:29 
Re: Convergence criterion

#8 
Guest
Posts: n/a

How about relapce 'Sigma' by 'Max' function ?


November 16, 2005, 17:36 
Re: Convergence criterion

#9 
Guest
Posts: n/a

Although its widely used you need to be a little careful with this criteria as it is dependent upon the rate of convergence. As it uses the solution rather than the residual as the convergence criteria it can be satisfied in two ways: by a converged solution or by a calculation that is converging very slowly.


November 17, 2005, 14:14 
Re: Convergence criterion

#10 
Guest
Posts: n/a

This is a very good point. I have a slowly converging code and this problem has made me busy thinking about it. What other category of convergence criteria can I consider?


November 17, 2005, 15:56 
Re: Convergence criterion

#11 
Guest
Posts: n/a

"If you don't succeed at first, ... redefine success!"
Are you seriously suggesting that you can fix your convergence problems by choosing a more nicely looking convergence criterium? The rootmeansquare of the velocity residual is a good convergence criterium for incompressible flow, and to answer a previous question: Yes, it is necessary to obtain the sum (otherwise it wouldn't be a "mean" value). This criterium gives you the average convergence over the flow field. The maximum is also useful. Usually we monitor both values, maximum and R.M.S., but we don't use any of them to determine the number of iterations, because that wouldn't be robust. There is no guarantee that you'll ever get down to the residual value you specified, and also there is no absolute (or even relative) residual level that defines a "good" convergence for all cases. That very much depends on the type of flow, the equations you're solving, the initial conditions, and other things... Simply specify the number of iterations, monitor the convergence (R.M.S. and max), and use human intelligence and experience to decide if you need to run more iterations or if you could do with less... 

November 17, 2005, 17:06 
Re: Convergence criterion

#12 
Guest
Posts: n/a

What you think of "residual" is not precise. I hope residual is different from RMS of error. Imagine we want to solve the problem:
Au=f e =uu_sol RMS is of the following "fashion": = {sum[u_newu_old]^2/u_new^2}^0.5 but residual is: r = f Au_sol where u_sol is the present solution from the current iteration. I can use this criterion but I it takes more cpu time. anyway. Please read "AnotherCFDUser" explanation. Please all let me know if you have a better idea. 

November 17, 2005, 21:52 
Re: Convergence criterion

#13 
Guest
Posts: n/a

The R.M.S. value that you mention is only one of many possible values. You are right that u_newu_old is not a residual in the classical sense, but if you use the "precise" residual, you can (and should) still make use of the rootmeansquare. There are really two questions, here:
a) How to define the local residual, e.g. (f Au_sol), or (u_newu_old), or something else. In either case, let's call it r(u). b) How to obtain one or two parameters to describe the convergence of the whole flow field. If you locally define your residual as r(u), then you can obtain the maximum in the flow field as max(r(u)), and you can also obtain the R.M.S. value of your residual as sqrt(average(r(u)*r(u))). For the average you have to use summation, and divide by the number of nodes (and reference scales of your choice). 

November 18, 2005, 17:39 
Re: Convergence criterion

#14 
Guest
Posts: n/a

I see what you mean. Now, can you imagine a situation in which terporarily error increses by iteration, but residual decreses? I can. I guess this is the main difference of the error and residual. I was talking about this. Your RMS discussion is correct in that we need to sum, average and sqrt.


November 21, 2005, 01:58 
Re: Convergence criterion

#15 
Guest
Posts: n/a

>can you imagine a situation in which terporarily error >increses by iteration, but residual decreses
It depends on the numerical scheme. Some schemes use the residual more or less directly to obtain the update (delta u) of a solution and in that case you may see the error (delta u) and residual behave similarly. Of course, that's not the case for all schemes. However, regardless of the scheme, both terms will approach zero as the solution converges, even though their convergence histories might be different. You cannot have one term diverge and the other converge indefinitely... unless there is something wrong with the scheme. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Convergence  Centurion2011  FLUENT  30  October 3, 2016 04:45 
problem with Min/max rho  tH3f0rC3  OpenFOAM  7  February 23, 2013 06:37 
Force can not converge  colopolo  CFX  13  October 4, 2011 22:03 
convergence criterion  Dominique  FLUENT  5  November 24, 2006 03:36 
Setting convergence criterion  Vidya  FLUENT  5  August 6, 2006 16:46 