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

stopAt writeNow; does not stop the run

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Tobermory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 17, 2022, 06:08
Default stopAt writeNow; does not stop the run
  #1
New Member
 
Sean
Join Date: Apr 2022
Posts: 5
Rep Power: 4
DataDriven is on a distinguished road
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!
Attached Files
File Type: txt controlDict.txt (1.5 KB, 13 views)
File Type: txt controlDict.0.txt (1.5 KB, 7 views)
File Type: txt controlDict.150.txt (1.5 KB, 7 views)

Last edited by DataDriven; June 17, 2022 at 07:20.
DataDriven is offline   Reply With Quote

Old   June 18, 2022, 08:14
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14
Tobermory will become famous soon enough
Have you tried using the
Code:
writeControl adjustableRunTime
(or adjustable in the ESI version, I think)? This will adjust the time step to make sure that the save occurs exactly at the required interval. That might cure the original problem of getting a save at t=10.
Tobermory is offline   Reply With Quote

Old   June 20, 2022, 05:10
Default
  #3
New Member
 
Sean
Join Date: Apr 2022
Posts: 5
Rep Power: 4
DataDriven is on a distinguished road
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.
DataDriven is offline   Reply With Quote

Old   June 20, 2022, 05:13
Default
  #4
New Member
 
Sean
Join Date: Apr 2022
Posts: 5
Rep Power: 4
DataDriven is on a distinguished road
However, I'm also still keen to learn why stopAt writeNow doesn't work as expected.
DataDriven is offline   Reply With Quote

Old   June 20, 2022, 05:38
Default
  #5
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14
Tobermory will become famous soon enough
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.
DataDriven likes this.
Tobermory is offline   Reply With Quote

Reply

Tags
stopat, timeactivatedfileupdate, write control, writenow


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
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


All times are GMT -4. The time now is 08:17.