|
[Sponsors] |
August 22, 2009, 11:59 |
Stopping run when converged.
|
#1 |
New Member
Krzysztof Przysowa
Join Date: Mar 2009
Location: Frimley, Surrey, United Kingdom
Posts: 13
Rep Power: 17 |
I have noticed that simleFoam doesn't automatically stop the run when converged (after having residuals with lower values than specified by tolerances in fvSolution). It just doesn't make any iterations to any parameter. The next
Is there any way to stop the run, when converged? Most intuitive place should be controlDict but I could not find anything else than "stopAt endTime;", which is obviously not applicable. I have seen as well convergenceCheck but its not compiled from the box so I did not check it yet. I could not find any documentation for that. There is as well pyFoamRunner, http://openfoamwiki.net/index.php/Co...yFoamRunner.py But I don't want to use it on the cluster. For sure there is very simple default way of doing it. Cheers |
|
August 22, 2009, 13:18 |
I have found solution by myself.
|
#2 |
New Member
Krzysztof Przysowa
Join Date: Mar 2009
Location: Frimley, Surrey, United Kingdom
Posts: 13
Rep Power: 17 |
I have found solution googling the web.
http://ww3.cad.de/foren/ubb/Forum527/HTML/000005.shtml Its in german, so few words of explanations: You need to recompile the simpleFoam (wmake for newbies), using the contents of the convergenceCheck.H, initConvergenceCheck.H, pEqn.H, UEqn.H from mentioned file. I have changed ("Div" -> "div") in this files since compiler returned error for "Div". Do not forget to make backup of these files before starting to compile. Cheers Last edited by kprzysowagmailcom; August 22, 2009 at 14:16. |
|
August 5, 2013, 07:25 |
|
#3 |
New Member
Basta
Join Date: Jul 2013
Posts: 28
Rep Power: 13 |
Dear Krzysztof Przysowa,
I am a new OF user, and I realized that even I set convergence criterion in fvSolution (tolerances), hhe run didn't stop. So how can i know using simpleFOam that the run is converged ? each time i put the run till 3000 and it took a lot of time to calculate. Also after 3000 I don't know if the run is well converged or not !!!! Could you explain for me how it works on OF? |
|
August 5, 2013, 07:27 |
|
#4 |
New Member
Basta
Join Date: Jul 2013
Posts: 28
Rep Power: 13 |
* the run didn't stop
|
|
August 6, 2013, 03:47 |
|
#5 |
New Member
Stefan Gaerling
Join Date: Dec 2012
Posts: 22
Rep Power: 13 |
Hey its a lot easier. Just add:
SIMPLE { residualControl { p 1e-2; U 1e-3; "(k|epsilon|omega)" 1e-3; } } in your fvsolution - file. Then you can set the convergence criteria for any variable. With the entry "tolerance" in the specific solvers (smoothSolver, GAMG, etc.) you only specify when the solver should stop iterating "within one outer iteration". The "outer iterations" convergence criteria (per timestep) are controlled by the "residualControl" keyword within the SIMPLE brackets (see upper). Cheers |
|
August 6, 2013, 04:44 |
|
#6 |
New Member
Basta
Join Date: Jul 2013
Posts: 28
Rep Power: 13 |
Dear Stefan Gaerling,
Attached is my fvSolustion. I already added the residual control, but my problem didn't been solved. The run stops only with the number of iterations which is fixed in the controlDict which means that if I put endTime:2000, the run will stop at 2000 and if I put endTime: 50000 the run will stop after 50000 even if I set the residualControl. Could you explain to me with more details? Thanks in advance, Mina |
|
August 6, 2013, 09:11 |
|
#7 |
New Member
Stefan Gaerling
Join Date: Dec 2012
Posts: 22
Rep Power: 13 |
Hey,
the reason why simpleFoam is running your specified number of maximum iterations is because it is not able to reach the specified convergence level within these iterations. The numbers specified within residualControl only says: stop if the initial residuals fall below these values. If they do not (because of divergence, instationary behaviour or bad mesh initialized instabilities) it will not stop because the residuals wont reach your convergence level. You will have to take a look at your residuals' behaviour/ boundary conditions etc. Cheers |
|
August 6, 2013, 09:32 |
|
#8 |
New Member
Basta
Join Date: Jul 2013
Posts: 28
Rep Power: 13 |
Thanks a lot Stefan for your quick response
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 21:02 |
Windows 64-bit, Distributed Parallel Run Issues... | Erich | CFX | 3 | March 28, 2006 17:36 |
problems with LES run | Tim | CFX | 1 | February 27, 2006 08:28 |
stopping the model run | co2 | FLUENT | 1 | April 23, 2004 05:18 |
Cycling a transient run | Chetan Mistry | Phoenics | 0 | March 3, 2004 10:50 |