CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Quick question about convergence. (https://www.cfd-online.com/Forums/openfoam/87502-quick-question-about-convergence.html)

atareen64 April 21, 2011 09:31

Quick question about convergence.
 
Dear All,

In some cfd software like fluent or solidWorks, when we carry out a simulation, the software decides to stop the simulation when a convergent solution is reached.

In openfoam, on the other hand, we always have to specify an ending time of our simulation. My question: is it possible to have openfoam determine when a convergent solution is reached and have it stop the simulation automatically?

Or do we have to somehow figure out when the system should be in equilibrium and specify that time?

Any help or pointers appreciated,
Regards,
~Ammar.

atareen64 April 21, 2011 10:10

Simply stated, in steady state solvers, (e.g. rhoSimpleFoam, the one I am using) why is there time involved in the control Dictionary? Aren't all the time derivatives supposed to be zero? :confused:

vkrastev April 21, 2011 10:42

1) Concerning the timeStep settings in the steady state solvers, in such cases they are simply iteration counters: for instance, setting a timeStep equal to 1 with an endTime of 1000 in simpleFoam (or rhoSimpleFoam or other steady solvers) means that the solver in question will perform 1000 SIMPLE loops on velocity, pressure and other (eventual) quantities before stopping. But you can obtain the same identical result by setting a timeStep of 0.1 and an endTime of 100 and so on.

2) About the issue of stopping the simulation at a given level of convergence, you can set your own convergence level in the fvSolution dictionary (take a look here http://www.cfd-online.com/Forums/ope...m-solvers.html ) : usually 10^-06 for all quantities is enough for assuming a substantially converged solution, but of course it depends of the kind of application we're talking about...

hope this helps

V.

atareen64 April 21, 2011 10:48

1) Thank you Vesselin, makes a lot of sense.

2) So is that only way to go about it? Here's what I am worried about. let's say I run my case for a 100 iterations, from 0 to 99. But let's also assume that my required tolerances were reached at step 40, meaning I would get a nice solution at that step. So what happens in all those iterations after step 40? Are they wasted? That's the kind of thing I want to avoid.

Thanks for your help

~Ammar.

vkrastev April 21, 2011 10:56

Quote:

Originally Posted by atareen64 (Post 304594)
So what happens in all those iterations after step 40? Are they wasted?


No, if you set the convergence criterion like is shown in the post I mentioned, once the criterion is satisfied the solver stops (which means that in this case the solution procedure is stopped at time step 41). Instead, if the criterion is not satisfied during the solution iterative procedure, the solver will stop only at the endTime set in the controlDict dictionary.

V.

atareen64 April 21, 2011 10:58

Oh wow thank you that seems like exactly what I was looking for!

The link wasn't opening before but now it's working. I'll try it right now! THANKS A LOT :-)


All times are GMT -4. The time now is 20:47.