|
[Sponsors] |
Restarting simulation on where it had stopped |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 27, 2009, 11:37 |
Restarting simulation on where it had stopped
|
#1 |
New Member
Ulisses
Join Date: Mar 2009
Location: Brazil
Posts: 24
Rep Power: 17 |
Hi people,
Someone knows how could I restart my simulation (at OpenFOAM) on where it had stopped? Thanks for help. |
|
May 28, 2009, 15:41 |
|
#2 |
Senior Member
Rishi .
Join Date: Mar 2009
Posts: 149
Rep Power: 17 |
HI,
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." Last edited by hellorishi; May 29, 2009 at 04:19. Reason: typo |
|
May 28, 2009, 18:03 |
|
#3 |
New Member
Ulisses
Join Date: Mar 2009
Location: Brazil
Posts: 24
Rep Power: 17 |
Hi hellorishi,
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. |
|
May 29, 2009, 04:23 |
|
#4 |
Senior Member
Rishi .
Join Date: Mar 2009
Posts: 149
Rep Power: 17 |
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. Last edited by hellorishi; May 29, 2009 at 13:46. |
|
May 29, 2009, 13:33 |
|
#5 | |
New Member
Ulisses
Join Date: Mar 2009
Location: Brazil
Posts: 24
Rep Power: 17 |
Quote:
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. |
||
May 29, 2009, 13:49 |
|
#6 |
Senior Member
Rishi .
Join Date: Mar 2009
Posts: 149
Rep Power: 17 |
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.
|
|
June 2, 2009, 04:09 |
|
#7 |
Member
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 17 |
Hi Ulisses,
I think it would be useful if you could send us a copy of your controlDict file. Regards, Leonardo |
|
June 2, 2009, 05:14 |
|
#8 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Quote:
BTW: startFrom latestTime is also the default that you should get if you've left this entry blank in the controlDict. |
||
June 4, 2009, 14:42 |
|
#9 | |
New Member
Ulisses
Join Date: Mar 2009
Location: Brazil
Posts: 24
Rep Power: 17 |
Quote:
| ========= | | | \\ / 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. FoamFile { version 2.0; format ascii; root "/home/delio/OpenFOAM/delio-1.4.1/run"; case "icoValv05"; instance "system"; local ""; class dictionary; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application icoFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 0.5; deltaT 1e-08; writeControl runTime; writeInterval 0.001; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; graphFormat raw; runTimeModifiable yes; functions ( ); // ************************************************** *********************** // I've tried to continue from the simulation was stopped but I hadn't success. Thanks for help. |
||
June 4, 2009, 16:47 |
|
#10 |
Member
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 17 |
Hello,
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). Regards, Leonardo |
|
June 5, 2009, 14:23 |
|
#11 | ||
New Member
Ulisses
Join Date: Mar 2009
Location: Brazil
Posts: 24
Rep Power: 17 |
Quote:
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. Quote:
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. |
|||
June 5, 2009, 15:25 |
|
#12 |
Member
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 17 |
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. Nice weekend! |
|
June 10, 2009, 07:18 |
|
#13 |
Senior Member
Wolfgang Heydlauff
Join Date: Mar 2009
Location: Germany
Posts: 136
Rep Power: 21 |
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; greets |
|
June 10, 2009, 08:23 |
|
#14 |
Member
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 17 |
Actually, I think if we put startFrom latestTime, we can leave startTime X there, it won't be read anyway...
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Restarting a InterFoam Simulation | asaha | OpenFOAM Running, Solving & CFD | 2 | April 11, 2008 16:08 |
Restarting simulation with a Backup file. | Mohammad Faridul Alam | CFX | 3 | November 2, 2007 16:53 |
restarting lagrange (particle tracking) simulation | dbdias | CFX | 0 | September 22, 2007 20:26 |
Restarting KIVA simulation | Tomislav | Main CFD Forum | 2 | April 5, 2006 04:22 |
3-D Contaminant Dispersal Simulation | Apple L S Chan | Main CFD Forum | 1 | December 23, 1998 11:06 |