|
[Sponsors] |
Convergence criteria based on temporal statistics |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 6, 2016, 04:32 |
Convergence criteria based on temporal statistics
|
#1 |
Member
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 13 |
Hi,
In Openfoam+ it is possible to end the simulation when relevant statistics have converged within a certain tolerance. (Case Termination Controls) For example (see attached) I would like to stop the simulation when the residuals have not changed considerably during the last n iterations. Is this possible with OF 3.x or 4.x? Thanks |
|
December 1, 2016, 03:10 |
|
#2 |
Member
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 13 |
Hi there
I assume this is not possible then :-) |
|
December 1, 2016, 03:57 |
|
#3 |
Member
Lorenzo
Join Date: Oct 2015
Location: Graz
Posts: 49
Rep Power: 11 |
Well it depends on the kind of simulation : are you using RANS or LES? Indeed if you are using RANS velocity is already a statistics since it is defined as temporal average, if you are using LES it is surely a good idea to monitor the life of first and second order moments ( keep an eye also on variance: pPrime2Mean, UPrime2Mean ecc ecc).
In the latter case I assume you have a stationary boundary condition , not varying with time, otherwise the flow won't reach by nature a steady state . I other words look at moments varying with time advancing to know how far the transient phase is( if there is one of course!) Lorenzo92 |
|
December 1, 2016, 04:33 |
|
#4 |
Member
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 13 |
Thanks Lorenzo,
I am running a RANS simulation (External flow over buildings). I did not know that the residual was a temporal statistics. However, sometimes the residuals tend to oscillate around a value that is very close to the convergence limit, but never get there. This would not be a problem if I could monitor the solution visually. I am running 8 to 16 wind directions (on 8 to 16 AWS machine) at the same time and the whole process is managed programmatically via scripts. I have tried to output the solution every (say) 100 time steps and you can see that it stops changing after 300-400 (varies with case) time steps. Nevertheless the script will wait until 2000 times teps (endTime). One solution could be to create logs, monitor the last 20 residuals with a background script and alter the controlDict endTime once some statistics is satisfied. I was hoping to find a more elegant solution like in OpenFOAM 3+. Thanks for reading. |
|
December 1, 2016, 14:07 |
|
#5 |
Member
Lorenzo
Join Date: Oct 2015
Location: Graz
Posts: 49
Rep Power: 11 |
Residuals are a measure of how much numerical solution fits the governing equations, so they are not statistics like mean or variance.
I got your issue eventually : I know that in fvSolution there is a section called "residual controls" (assuming for example you are using simpleFoam) . You can there set the residual tolerance for each field: once it has been reached the simulation should stop automatically if I remember correctly, ignoring the endTime in controlDict. |
|
December 1, 2016, 14:29 |
|
#6 |
Member
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 13 |
Yes, it is what I actually use. My residuals are all 1e-4 for Ux, Uy, Uz, epsilon, k and p. See the image I attached to the first post.
The fact is that often they become lower than 1e-3, but then get very close to 1e-4 without ever reaching it and I have to wait till 1000 iteration to exit simpleFoam. Usually it is Uz and/or p that manifest this issue. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Statistics for adaptive convergence | whykickamoocow_7 | ANSYS | 0 | October 1, 2012 22:28 |
Convergence Criteria in FLUENT | mahi007 | FLUENT | 9 | March 1, 2012 07:46 |
SIMPLE algorithm, convergence criteria | bbasal | Main CFD Forum | 3 | December 3, 2011 00:24 |
convergence criteria | iuaniu | CFX | 3 | September 24, 2009 20:20 |
convergence criteria | swarley | FLUENT | 3 | June 24, 2009 12:18 |