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

functionObject to control run time

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2014, 10:43
Default functionObject to control run time
  #1
New Member
 
Marc
Join Date: Sep 2012
Posts: 17
Rep Power: 13
marc.immer is on a distinguished road
Hi!

I created a functionObject that helps me run computations on a cluster queue that has a limited run time.

The functionObject stops the solver 10 minutes before the cpu time reaches the cluster time limit using a time.stopAt(Time::saWriteNow); command in the execute() function.

After that it calls a script in the end() call and resubmits the run on the cluster queue.

The Problem is: if the openFoam run finishes normally, the last time step is not written to disk. I would like to solve this.

My idea so far: detect in execute() if the next time step is the last one and call time.stopAt(Time::saWriteNow); However this does not work, as functionObjects are then not called at the last time step. I though of just increasing endTime by one timestep. But I cant access the function Foam::Time::setEndTime from a function object?

I'm happy for any ideas...

Regards
Marc
marc.immer is offline   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
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 32 June 16, 2021 06:55
Multiple floating objects CKH OpenFOAM Running, Solving & CFD 14 February 20, 2019 09:08
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Help for the small implementation in turbulence model shipman OpenFOAM Programming & Development 25 March 19, 2014 10:08
Unstabil Simulation with chtMultiRegionFoam mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 13:12


All times are GMT -4. The time now is 13:38.