CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Convergence criteria

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

Like Tree2Likes
  • 1 Post By santiagomarquezd
  • 1 Post By bullmut

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 13, 2012, 08:33
Default Convergence criteria
  #1
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 13
batta31 is on a distinguished road
Hi to all!

does anybody know how are the residuals defined in openFoam? Which kinds of residuals is it possible to use? And..is it possible to use as convergence criteria the values of a force coefficient (lift coefficient, drag coefficient)?

Thanks in advance
Simone
batta31 is offline   Reply With Quote

Old   December 14, 2012, 09:25
Default
  #2
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 13
batta31 is on a distinguished road
Does anyone have some idea?
batta31 is offline   Reply With Quote

Old   December 14, 2012, 10:52
Default
  #3
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 23
santiagomarquezd will become famous soon enough
Hi Simone, check appendix A of this paper:

http://www.cimec.org.ar/ojs/index.ph...File/3263/3186

Regards.
kcavatar likes this.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   December 14, 2012, 17:13
Default
  #4
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Quote:
... is it possible to use as convergence criteria the values of a force coefficient (lift coefficient, drag coefficient)
Depends on the type of simulations your doing. If it is unsteady LES where you monitor the average over time of Cl and Cd, then this will work.
With RANS however, there is no guaranty that if Cl or Cd stabilize at a certain value, the solution is converged as well. But if the solution is converged, you can be sure of the values for Cl and Cd being correct. Or said differently, you can't be sure that you have obtained the correct values for Cl and Cd as long as you don't check the residuals...
Lieven is offline   Reply With Quote

Old   December 17, 2012, 05:15
Default
  #5
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 13
batta31 is on a distinguished road
Dear Lieven, my situation is the following:
I've been running some simulations with prescribed convergence criteria for the residuals of U and p. I was actually almost sure that, when those criteria were reached, the coefficients would be stabilized as well, but they weren't.

So, what I've done was running a simulation without convergence criteria (and for many more iterations than the previous simulations) and check when the force coefficients were stabilized by plotting them.

Finally, what I'm doing now is running the simulations again for a prescribed number of iterations, that guarantees both the satisfaction of the residuals and of the coefficients.

I only wanted to know if there was some way to automate all the process, and so I'll check the appendix suggested by santiago as soon as possible.

Do you think my reasoning is correct?

Cheers
Simone
batta31 is offline   Reply With Quote

Old   December 17, 2012, 05:59
Default
  #6
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Quote:
the coefficients would be stabilized as well, but they weren't.
This indicates that the criteria is not strict enough.

Quote:
that guarantees both the satisfaction of the residuals and of the coefficients.
... I would be great if this were the case, but unfortunately it isn't.

What you could do is figure out the size of the residuals when you are fully converged. Then set the convergence criteria to a value 10x higher than the converged-residuals (e.g. is the latter is 1e-14, set it to 1e-12 or -13. This won't make a lot of difference. Just don't think that if residuals drop 4 or 5 orders of magnitude that the solution is converged, this is in general simply not true (although this is what you read in manuals).

You can still set a maximum number of iterations but if convergence is reached sooner, the simulation will stop earlier.

Kind regards,


L
Lieven is offline   Reply With Quote

Old   December 17, 2012, 07:06
Default
  #7
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 13
batta31 is on a distinguished road
Well Lieven thanks again for your reply.. What maybe I don't have underlined enough is that the stabilization of the coefficient needs a higher number of iterations than those requested from the simple "convergence of the residuals"; in this new situation the residuals are then far smaller then my "first" simulations when I didn't look at the stabilization of the coefficient.

with this clarification does my reasoning looks more correct for you?

Thanks again
Simone
batta31 is offline   Reply With Quote

Old   December 17, 2012, 07:45
Default
  #8
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Quote:
What maybe I don't have underlined enough is that the stabilization of the coefficient needs a higher number of iterations than those requested from the simple "convergence of the residuals"
That's exactly what I mean when I say the criteria you used in the first simulation is not strict enough. Based on the convergence criterion, the code thinks the solution is converged while it is not.

Quote:
far smaller then my "first" simulations
This size of residuals probably comes close to the level of convergence to machine accuracy (this is something you can check).

Quote:
with this clarification does my reasoning looks more correct for you?
Monitoring the stabilization of the coefficient indeed gives an indication about the progress of your simulation. However, you can't see convergence problems with it e.g. due to incorrect boundary conditions etc. There is a big difference between a stable solution and a converged solution. If the solution is fully converged (so the residuals remain at a constant and very low level) the solution will be stable as well. But there is no guaranty that when the solution is stable, it is converged as well...

Greetz,

L
Lieven is offline   Reply With Quote

Old   February 5, 2015, 05:08
Default
  #9
Member
 
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 15
bullmut is on a distinguished road
Hi all
In a similar line of questioning, i am trying a 2d model of a foil in openFoam, steady state with a simpleFoam solver
When i initially set my residuals, the tolerance was very high. And i set my iterations to a overly large value (>15000). What i noticed is that my Cl and Cd values leveled off fairly early, but the tolerance of my U and P meant the solver kept on running. No matter the number of iterations the U and P residuals would not drop. they also flattened out between 1e-4 and 1e-5 for U while P never dropped under 0.01.
My question is then can i not calculate my Cl and Cd residuals and use that as a cut off value?

Check out the residual plot and Cl and Cd plot in attachment

Thanks
Attached Images
File Type: jpg Screenshot from 2015-02-05 11:11:30.jpg (23.5 KB, 70 views)
File Type: jpg Screenshot from 2015-02-05 11:12:00.jpg (19.1 KB, 46 views)
ari003 likes this.

Last edited by bullmut; February 5, 2015 at 05:14. Reason: addition of images
bullmut is offline   Reply With Quote

Old   August 17, 2021, 16:09
Default
  #10
Member
 
Gabriel Felix
Join Date: May 2021
Location: Brazil
Posts: 34
Rep Power: 5
gabrielfelix is on a distinguished road
Quote:
Originally Posted by bullmut View Post
Hi all
In a similar line of questioning, i am trying a 2d model of a foil in openFoam, steady state with a simpleFoam solver
When i initially set my residuals, the tolerance was very high. And i set my iterations to a overly large value (>15000). What i noticed is that my Cl and Cd values leveled off fairly early, but the tolerance of my U and P meant the solver kept on running. No matter the number of iterations the U and P residuals would not drop. they also flattened out between 1e-4 and 1e-5 for U while P never dropped under 0.01.
My question is then can i not calculate my Cl and Cd residuals and use that as a cut off value?

Check out the residual plot and Cl and Cd plot in attachment

Thanks
You should then try to refine your mesh, or change the relaxation factors, as well as turbulence model variables to improve your convergence.
gabrielfelix is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Force can not converge colopolo CFX 13 October 4, 2011 23:03
What value shall I set for the Convergence criteria? steventay CFX 7 May 14, 2010 13:44
star-ccm+ convergence criteria star Siemens 2 January 14, 2009 05:57
Convergence Criteria edwin FLUENT 1 February 14, 2008 20:24
Global Convergence Criteria asaha OpenFOAM Running, Solving & CFD 0 December 9, 2007 10:53


All times are GMT -4. The time now is 06:46.