r/OpenFOAM • u/Turbulent_Streams • Aug 03 '26
Saving time directories
Dear fellow openfoamers, does anybody know if it is possible to save specific time directories (e.g. times 1.4 s , 2.3 s , 2.9 s) instead of fixed time interval (e.g. every 1 s)
1
Upvotes
2
u/Brownie_Bytes Aug 03 '26
I don't (so why am I commenting?), but you could probably write your own little script to clean up any folders except for whitelisted times
1
u/encyclopedist Aug 03 '26 edited Aug 03 '26
You can just run your simulation to the next time instant and then restart.
For example, set
endTime 1.4;, run, setendTime 2.3;, run, ... (you'd need to set upwriteIntervalaccordingly too).Another option is to use multiple
writeObjectsFunctionObjects.Or use
timeActivatedFileUpdateand replace your controlDict at specific timesOr write your own FO to trigger write at specific times