CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to resume a stopped simulation (http://www.cfd-online.com/Forums/openfoam-solving/90896-how-resume-stopped-simulation.html)

Pallav July 23, 2011 19:50

How to resume a stopped simulation
 
Hi,

I run my simulations in OF in parallel on a supercomputer (TACC). I have to submit the simulation job and ask for a defined period of time for the simulation to run.

TACC kills the simulation after the simulation has run for the requested amount of time.

In OF, is there a way to resume the simulation from where it stopped?

Please advise.

Thanks.

-Pallav

wyldckat July 23, 2011 20:04

Greetings Pallav,

What you are looking for is this option in controlDict:
Quote:

Originally Posted by http://www.openfoam.com/docs/user/controlDict.php
Code:

startFrom      latestTime;    //Most recent time step from the set of time directories.

Check the link in the quote for more informations on what you can do in controlDict ;)

Best regards,
Bruno

Pallav July 23, 2011 20:53

Thanks a lot Bruno.

lovecraft22 July 24, 2011 04:19

You'll have your simulation to be started with the runTimeModifiable option set to yes on your controlDict or no changes on that file will affect your simulation…

Bernhard July 24, 2011 05:32

Well, if the simulation was killed by the computer, then these changes will still take effect.

Pallav July 24, 2011 11:45

Lore and Bernhard,

Thank you for your inputs.

aujamal20 January 29, 2013 09:12

Dear
I am having a problem to resume the openFoam simulation after making manual changes in last time directory of previous run. For example if I run a simulation for 100 s and I have 0,20, 40 ...,100 time directories. Now I reverse the flow direction by changing inlet/outlet BC for 100/U , manually. From now onward I cant run the simulation from latestTime of 100.
While I set my controlDict properly but it shows an error. But If I remove the time directory 100 and want to run from any other directory like 80, which is not changed, then the simulation runs properly.
Please let me how to resolve this problem.

Regards

wyldckat January 29, 2013 18:57

Greetings Jamal,

A few questions:
  1. Which OpenFOAM version are you using? It's possible that you're triggering an old bug on an old version of OpenFOAM.
  2. What value do you have for "endTime" in "system/controlDict"?
  3. Are you using a stopping criteria based on residuals?
Best regards,
Bruno

aujamal20 January 30, 2013 18:17

Dear Bruno
1. I am using OF 2.1.0
2. When I start a simulation I set endTime in controlDict to 100 when simulation ends then I edit the last time directory 100/U and 100/T to reverse the flow by switching the BC for inlet/outlet & set endTime to say 200.
3. So I don't use any stopping criteria.

Thanks and regards,
Jamal

wyldckat January 30, 2013 18:23

Hi Jamal,

I can't remember very well... there was at least one bug in 2.1.0 that might be related: http://www.openfoam.org/mantisbt/view.php?id=382
So you might want to update to 2.1.1.

Nonetheless... do you change the "endTime" value in "controlDict" before continuing?
edit: OK, you updated your answer... so you did change...

Additionally, is "startFrom" set to "latestTime" for at least the second run?

Best regards,
Bruno

hpp10 April 16, 2014 04:04

Thanks a lot! I did parallel computing with mpi, when there was no space for my computing in my devices. So, I cleared some room, using your suggestion, I set in controlDict :startFrom latestTime; This didnot work. But with your suggesting website tutorial guide, I got the topic of the problem: the lastestTime cannot be used, when I set in the controlDict:sartFrom startTime; startTime 2140; It works well.(my latest time is 2150, I guess there must be some missing files in 2150, so latestTime didnot work)


All times are GMT -4. The time now is 10:11.