|
[Sponsors] |
February 28, 2024, 10:58 |
minimum number of timesteps simpleFoam
|
#1 |
Member
Tom Waits
Join Date: Aug 2018
Posts: 42
Rep Power: 8 |
I am using runTimeControl in my controlDict to stop my simpleFoam (steady-state) simulation when certain criteria are reached. However, I want simpleFoam to run at least 100 iterations (time-steps) before stopping. For some runs, the convergence criteria in runTimeControl finish before 100 iterations.
Is there a way to set the minimum number of time-steps/iterations or have a criteria where the solution is not converged if the number of iterations is less than 100? Many thanks, Tom Waits |
|
February 28, 2024, 13:17 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14 |
No built-in way, Tom, but you can do it simply as follows:
1. run for 100 iterations without setting any convergence criteria; 2. restart and run with convergence criteria active. You could automate it in your Allrun script, if you're lazy like me - I would generate two versions of controlDict (eg controlDict.v1 and controlDict.v2) and two versions of fvSolution, each with the correct setup for runs 1 & 2, and use the Allrun script to copy the relevant version into the system folder for each run. |
|
February 29, 2024, 04:12 |
|
#3 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello Tom,
Since you are already using the runTimeControl function object, you could just use the timeStart parameter to start your function object from the 100th iteration. https://doc.openfoam.com/2306/tools/...ction-objects/ Regards, Yann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam-Extend 4.0 simpleFoam motorbike parallel error? | EternalSeekerX | OpenFOAM Running, Solving & CFD | 0 | May 10, 2021 05:55 |
Inconsistencies in reading .dat file during run time in new injection model | Scram_1 | OpenFOAM | 0 | March 23, 2018 23:29 |
[mesh manipulation] Mesh Refinement | Luiz Eduardo Bittencourt Sampaio (Sampaio) | OpenFOAM Meshing & Mesh Conversion | 42 | January 8, 2017 13:55 |
simpleFoam parallel | AndrewMortimer | OpenFOAM Running, Solving & CFD | 12 | August 7, 2015 19:45 |
Unaligned accesses on IA64 | andre | OpenFOAM | 5 | June 23, 2008 11:37 |