# Quick question about convergence.

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 April 21, 2011, 09:31 Quick question about convergence. #1 Member   Ammar Tareen Join Date: Jan 2011 Location: Boston University Posts: 61 Rep Power: 8 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.

 April 21, 2011, 10:10 #2 Member   Ammar Tareen Join Date: Jan 2011 Location: Boston University Posts: 61 Rep Power: 8 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?

 April 21, 2011, 10:42 #3 Senior Member   Vesselin Krastev Join Date: Jan 2010 Location: University of Tor Vergata, Rome Posts: 368 Rep Power: 12 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.

 April 21, 2011, 10:48 #4 Member   Ammar Tareen Join Date: Jan 2011 Location: Boston University Posts: 61 Rep Power: 8 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.

April 21, 2011, 10:56
#5
Senior Member

Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 12
Quote:
 Originally Posted by atareen64 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.

 April 21, 2011, 10:58 #6 Member   Ammar Tareen Join Date: Jan 2011 Location: Boston University Posts: 61 Rep Power: 8 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 :-)

 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 brahim OpenFOAM Running, Solving & CFD 20 June 9, 2015 09:09 steventay CFX 7 May 14, 2010 12:44 Claudio2010 CFX 4 September 14, 2009 18:39 D.Tandra Main CFD Forum 2 March 16, 2004 05:29 Anshul FLUENT 1 August 2, 2002 02:14

All times are GMT -4. The time now is 10:05.

 Contact Us - CFD Online - Privacy Statement - Top