|
[Sponsors] |
How to stop iterating when residuals fall down enough |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 12, 2014, 15:56 |
How to stop iterating when residuals fall down enough
|
#1 |
Member
Richardpluff
Join Date: May 2014
Posts: 95
Rep Power: 12 |
Hi guys,
When I used FLUENT, I remember that there exist a tolerance for residuals (I hardly remember it, but I think it was set by default to 1e-3 except for energy, 1e-6). When residuals fall down this values, the simulation stops and the result is considered as converged (I know, it can also be added another physical quantity like flow rate, averaged value or so to make sure the solution is really converged). Now I want to stop my simulation with OpenFOAM when residuals fall below 1e-5 for p and 1e-7 for U and T. I am using my own version of simpleFoam with SIMPLE algorithm. How can I do this? I have been playing with values in residualControls and tolerance of solvers, but the solver always continues iterating, even when I am seeing that residuals have drop down the specified value. Anybody can help? This seems an easy question but I cannot find the solution yet... THANKS!!! |
|
December 12, 2014, 16:51 |
|
#2 |
Senior Member
|
Hi,
here's a excerpt from tutorials/incompressible/simpleFoam/pitzDaily/system/fvSolution Code:
SIMPLE { nNonOrthogonalCorrectors 0; residualControl { p 1e-2; U 1e-3; "(k|epsilon|omega)" 1e-3; } } |
|
December 15, 2014, 07:01 |
|
#3 |
Senior Member
James
Join Date: May 2013
Posts: 116
Rep Power: 13 |
Hey CRI,
Did you remeber to include convergence criteria for new variable you have introduced? You said that you have your own simpelFoam based solver and I see you are computing T. So if you want to set a convergence criteria, you have to set it in the source code for all variables. Otherwise the solver will continue iterating until maximun number of iterations specified in controlDict is reached... Hope it helps. Regards, Tensi |
|
December 15, 2014, 07:07 |
|
#4 |
Member
Richardpluff
Join Date: May 2014
Posts: 95
Rep Power: 12 |
Thanks alexeym and Tensian for yur replies.
As I expected, the residualControl is the place where I should establish my convergence criteria. I have made several trial and error and nothing works... Tensian, I think you have pointed me in the right direction. I have not implemented any kind of control over residuals in my solver source code, so, how can I expect it stops? This have no sense and I have to review the code and create something that makes T residuals to stop under any condition... Thanks for the tips guys! |
|
December 15, 2014, 07:11 |
|
#5 |
Member
Richardpluff
Join Date: May 2014
Posts: 95
Rep Power: 12 |
Unfortunately I have no idea about the starting point to add this kind of condition over T residuals.
Has anybody implemented something similar? I have to put and "if" statement in somewhere, but I have no idea about classes or methods related to residuals. Any hints? Thanks in advance, Best, CRI |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
motorBike Residuals for SST k-omega... and mine | JR22 | OpenFOAM Running, Solving & CFD | 6 | August 1, 2013 10:08 |
residuals...how to make them fall | laura_c | Main CFD Forum | 2 | April 12, 2013 13:39 |
UDF:Is there a MICRO to stop iterating | andy P. | FLUENT | 2 | February 9, 2007 21:49 |
error when iterating - no residuals, no results | Ralf Schmidt | FLUENT | 2 | December 1, 2006 12:29 |
Stop iterating | DAE | FLUENT | 0 | January 7, 2004 07:58 |