CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Convergence criteria (http://www.cfd-online.com/Forums/openfoam-solving/110528-convergence-criteria.html)

batta31 December 13, 2012 08:33

Convergence criteria
 
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 December 14, 2012 09:25

Does anyone have some idea?

santiagomarquezd December 14, 2012 10:52

Hi Simone, check appendix A of this paper:

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

Regards.

Lieven December 14, 2012 17:13

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...

batta31 December 17, 2012 05:15

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

Lieven December 17, 2012 05:59

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

batta31 December 17, 2012 07:06

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

Lieven December 17, 2012 07:45

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

bullmut February 5, 2015 05:08

2 Attachment(s)
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


All times are GMT -4. The time now is 07:40.