CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

Convergence criterion

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 14, 2005, 08:36
Default Convergence criterion
  #1
newbie
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 navier-stokes equations using the primitive variable formulation.

Thanks in advance
  Reply With Quote

Old   November 14, 2005, 10:06
Default Re: Convergence criterion
  #2
Ram Ranjan
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.
  Reply With Quote

Old   November 14, 2005, 12:16
Default Re: Convergence criterion
  #3
newbie
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...

  Reply With Quote

Old   November 14, 2005, 21:56
Default Re: Convergence criterion
  #4
Mohsen
Guest
 
Posts: n/a
for u it's Sigma[(u_new(i)-u_old(i)]^2/Sigma[u_new(i)]^2 or similar.
  Reply With Quote

Old   November 14, 2005, 21:58
Default Re: Convergence criterion
  #5
Mohsen
Guest
 
Posts: n/a
or better: Sigma{[(u_new(i)-u_old(i)]^2/[u_new(i)]^2}
  Reply With Quote

Old   November 15, 2005, 13:09
Default Re: Convergence criterion
  #6
Yue
Guest
 
Posts: n/a
Is the 'sum' computing necessary ?
  Reply With Quote

Old   November 15, 2005, 13:20
Default Re: Convergence criterion
  #7
Mohsen
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.
  Reply With Quote

Old   November 15, 2005, 13:29
Default Re: Convergence criterion
  #8
Yue
Guest
 
Posts: n/a
How about relapce 'Sigma' by 'Max' function ?
  Reply With Quote

Old   November 16, 2005, 17:36
Default Re: Convergence criterion
  #9
AnotherCFDUser
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.
  Reply With Quote

Old   November 17, 2005, 14:14
Default Re: Convergence criterion
  #10
Mohsen
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?
  Reply With Quote

Old   November 17, 2005, 15:56
Default Re: Convergence criterion
  #11
Mani
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 root-mean-square 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...
  Reply With Quote

Old   November 17, 2005, 17:06
Default Re: Convergence criterion
  #12
Mohsen
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 =u-u_sol

RMS is of the following "fashion": = {sum[u_new-u_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.

  Reply With Quote

Old   November 17, 2005, 21:52
Default Re: Convergence criterion
  #13
Mani
Guest
 
Posts: n/a
The R.M.S. value that you mention is only one of many possible values. You are right that u_new-u_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 root-mean-square. There are really two questions, here:

a) How to define the local residual, e.g. (f -Au_sol), or (u_new-u_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).

  Reply With Quote

Old   November 18, 2005, 17:39
Default Re: Convergence criterion
  #14
Mohsen
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.
  Reply With Quote

Old   November 21, 2005, 01:58
Default Re: Convergence criterion
  #15
Mani
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.

  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convergence Centurion2011 FLUENT 24 May 9, 2015 08:02
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


All times are GMT -4. The time now is 01:17.