|
[Sponsors] |
June 17, 2022, 06:08 |
stopAt writeNow; does not stop the run
|
#1 |
New Member
Sean
Join Date: Apr 2022
Posts: 5
Rep Power: 4 |
Hi all,
I've had issues where a DES simulation would not write the final time-step due to inaccuracies in the timestep because I'm using single precision. (It never reaches the required time of 10 because due to single precision the time of final iteration is 9.99875 or something like that, causing the final result to not be written.) Now i'm trying a workaround, by allowing slightly more iterations than required and using timeActivatedFileUpdate to change the controlDict and stop the simulation by setting 'stopAt writeNow'. However, it doesn't work... I'm testing with the pitzDaily case now. The timeActivatedFileUpdate updates the controlDict perfectly fine at the required time, also runTimeModifiable is set to true so I don't understand why it doesn't stop the run. Please find the used controlDict's attached, does anyone have an idea why this doesn't work? Thanks! Last edited by DataDriven; June 17, 2022 at 07:20. |
|
June 18, 2022, 08:14 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14 |
Have you tried using the
Code:
writeControl adjustableRunTime |
|
June 20, 2022, 05:10 |
|
#3 |
New Member
Sean
Join Date: Apr 2022
Posts: 5
Rep Power: 4 |
No I have not. Thank you, solving the original problem is of course more elegant!
Will give it a try and report what I found. |
|
June 20, 2022, 05:13 |
|
#4 |
New Member
Sean
Join Date: Apr 2022
Posts: 5
Rep Power: 4 |
However, I'm also still keen to learn why stopAt writeNow doesn't work as expected.
|
|
June 20, 2022, 05:38 |
|
#5 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14 |
Haha! Me too! I tried doing something similar around a year ago to change time step sizes I think, and I ended up tearing my hair out since it seemed to be ignoring the changes to the controlDict (i.e. was not rereading the new deltaT). In the end, I gave up trying to control the run from inside, and instead managed the run parameters externally with the Allrun script.
If you have a simple test case that you can reproduce this on, then it may be worth uploading it as a "bug" and see what the Development team say, since it clearly isn't working as intended. Let us know if you find a fix. Good luck. |
|
Tags |
stopat, timeactivatedfileupdate, write control, writenow |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
stop when I run in parallel | Nolwenn | OpenFOAM | 36 | March 21, 2021 05:56 |
Problem in foam-extend 4.0 ggi parallel run | Metikurke | OpenFOAM Running, Solving & CFD | 0 | February 20, 2018 07:34 |
How to stop transient simulation which has been run from scheme script? | AlexanderZ | FLUENT | 8 | August 31, 2017 05:25 |
parallel run is slower than serial run (pimpleFoam) !!! | mechy | OpenFOAM | 18 | August 17, 2016 18:19 |
simpleFoam parallel | AndrewMortimer | OpenFOAM Running, Solving & CFD | 12 | August 7, 2015 19:45 |