CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

minimum number of timesteps simpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Tobermory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2024, 09:58
Exclamation minimum number of timesteps simpleFoam
  #1
Member
 
Tom Waits
Join Date: Aug 2018
Posts: 42
Rep Power: 7
TomWaits is on a distinguished road
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
TomWaits is offline   Reply With Quote

Old   February 28, 2024, 12:17
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 673
Rep Power: 14
Tobermory will become famous soon enough
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.
TomWaits likes this.
Tobermory is offline   Reply With Quote

Old   February 29, 2024, 03:12
Default
  #3
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,107
Rep Power: 26
Yann will become famous soon enough
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
Yann is online now   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 04:55
Inconsistencies in reading .dat file during run time in new injection model Scram_1 OpenFOAM 0 March 23, 2018 22:29
[mesh manipulation] Mesh Refinement Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Meshing & Mesh Conversion 42 January 8, 2017 12:55
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 18:45
Unaligned accesses on IA64 andre OpenFOAM 5 June 23, 2008 10:37


All times are GMT -4. The time now is 03:58.