Restarting simulation on where it had stopped
Someone knows how could I restart my simulation (at OpenFOAM) on where it had stopped?
Thanks for help.
OpenFOAM writes out file at "writeIntervals" specified by you. Check your cse folder and see if you some folders with some number e.g. 0.001, 1e-5, 10, 1000, etc. If you see this then your intermediate results were stored. Otherwise your writeinterval was large and nothing was saved.
If you find such files then you can restart by using "latestTime" . Refer to pg 39 User Guide
"We can now run this case by restarting from the solution at the end of the cavity case run. To do this we can use the option of setting the startFrom keyword to latestTime so that icoFoam takes as its initial data the values stored in the directory corresponding to the most recent time, i.e.0.5. The endTime should be set to 2 s."
I've tried to select the option latestTime but when the simulation started the data (p and U) that it was put into the last paste it was the initial conditions. So the program started at the last time but it didn't read the last data (that it was available into the paste).
Thanks for the answer.:D
I did not understand what you meant by "last paste" ?
= last result directory? (0.01, etc)
Did you visualize your data, to check if something was written out in the last time step?
Sometime if your disk is full during computation, your "last time" directory will exist, but it will not have correct data. Hence you will have to use "last -1" data directory and delete the last directory.
I visualized my data and checked that there were something in the last time step.
What I think that it's strange is the fact that the OpenFOAM writes the initial conditions in the last result directory and starts the simulation from that.
But I'll try to use last -1 data directory.
Thanks a lot.
To the best of my knowledge OF, does not write initial BC in last time step. You can check it with the standard icoFoam tutorials. I guess there might be some variable in your controlDict file, which is causing this abnormal behviour.
I think it would be useful if you could send us a copy of your controlDict file.
BTW: startFrom latestTime is also the default that you should get if you've left this entry blank in the controlDict.
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4.1 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
// FoamX Case Dictionary.
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************** *********************** //
I've tried to continue from the simulation was stopped but I hadn't success.
Thanks for help.
Well...if this is the controlDict you used to restart your simulation, one important thing is missing...you should change "startFrom startTime" to "startFrom latestTime"...
In the case you sent us the wrong file, I suggest you to detail a little more about your system, solver etc, so we can understand it as well and it will be easier to find the reason of your problem.
One question: how do you know OF doesn't continue the iterations from the last time folder? What exactly you've checked? It's just a stupid question, but...
Quoting Rishi and adding one point to what Mark said, boundary conditions are allways written as a boundaryField in the time folders, from the first until the last time, and usually are fixed, i.e., this field is the same in all files (exceptions: mapped, cyclic, unstationnary BC).
I quoted the ControlDict with the data that I've filled out in the beginning. When I tried to restart my simulation I puted "startFrom latestTime", but what happened was that when the simulation started again the last result directory (and this directory already contains data of pressure and velocity) was overwritten with the data from the inicial conditions.
I've used OF 1.4.1 and the the solver is the icoFoam.
I'll gave you an example. At my case I have some time folders. Inside these folders there are three files and one more folder (except the first time folder (time=zero) that contains four files), and the first file is U, the second phi, the third is p and the folder is called uniform (this contains a file called time that contains informations about deltaT and deltaTo). In these files there are vector fields that were generated in that time folder. What it has happened with me is that when I restart simulation using the option "startFrom latestTime " the simulation starts in the lastest time folder but the old fields are erased and the initial conditions are written in the lastest time folder. Because of this I think that OF doesn't consider my latest data.
Thanks for helping.
Ok. Could you attach your files here? (I think there're instructions somewhere in the forum about how to send files)
Or if you prefer, you could send me by e-mail...I'll try to run your case on monday.
leonardo is right,
the control dict must have
startFrom latestTime; in it, and no other "start"-lines. if you only are interested in the last result anyway and want to avoid an enormous increase of the folder number, use the purge-write function. purgeWrite 1; and writeInterval 1; for each timestep to be written out. In that case you will get each timestep to be written into a folder and the folder is replaced with the new one. to make sure that while writing out no error deletes youtr results, increase the purgeWrite to 2;
Actually, I think if we put startFrom latestTime, we can leave startTime X there, it won't be read anyway...
|All times are GMT -4. The time now is 04:09.|