# Convergence criteria

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

 December 13, 2012, 08:33 Convergence criteria #1 Member   Simone Join Date: Sep 2012 Posts: 95 Rep Power: 6 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

 December 14, 2012, 09:25 #2 Member   Simone Join Date: Sep 2012 Posts: 95 Rep Power: 6 Does anyone have some idea?

 December 14, 2012, 10:52 #3 Senior Member     Santiago Marquez Damian Join Date: Aug 2009 Location: Santa Fe, Santa Fe, Argentina Posts: 430 Rep Power: 16 Hi Simone, check appendix A of this paper: http://www.cimec.org.ar/ojs/index.ph...File/3263/3186 Regards. __________________ 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

December 14, 2012, 17:13
#4
Senior Member

Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 297
Rep Power: 14
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...

 December 17, 2012, 05:15 #5 Member   Simone Join Date: Sep 2012 Posts: 95 Rep Power: 6 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

December 17, 2012, 05:59
#6
Senior Member

Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 297
Rep Power: 14
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

 December 17, 2012, 07:06 #7 Member   Simone Join Date: Sep 2012 Posts: 95 Rep Power: 6 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

December 17, 2012, 07:45
#8
Senior Member

Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 297
Rep Power: 14
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

February 5, 2015, 05:08
#9
Member

Gareth
Join Date: Jun 2010
Posts: 32
Rep Power: 8
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
 Screenshot from 2015-02-05 11:11:30.jpg (23.5 KB, 15 views) Screenshot from 2015-02-05 11:12:00.jpg (19.1 KB, 11 views)

Last edited by bullmut; February 5, 2015 at 05:14. Reason: addition of images

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post colopolo CFX 13 October 4, 2011 22:03 steventay CFX 7 May 14, 2010 12:44 star CD-adapco 2 January 14, 2009 05:57 edwin FLUENT 1 February 14, 2008 20:24 asaha OpenFOAM Running, Solving & CFD 0 December 9, 2007 10:53

All times are GMT -4. The time now is 04:18.