|
[Sponsors] |
How to restart simulation without being forced to write each variable ? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 9, 2020, 10:32 |
How to restart simulation without being forced to write each variable ?
|
#1 |
New Member
Philomène Vergnol
Join Date: Apr 2020
Posts: 11
Rep Power: 6 |
Hello everyone,
In order to save some disk space, I use a function object in my controlDict in order to write only some variables. It works perfectly well, except that when I pause a simulation and want to resume it, an error message tells me that the files for the other variables (the ones that were not written) are missing and the simulation cannot resume. So I am stuck having to choose between being able to resume stopped simulations or being able to have enough disk space left. Do you have an idea how to deal with this ? I use OF v7. Here is my controlDict and the error message is in the attached file : Code:
application compressibleInterFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 25; deltaT 0.001; writeControl runTime; writeInterval 26; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable false; adjustTimeStep yes; maxCo 1; maxAlphaCo 0.2; maxDeltaT 0.01; functions { writeObjects2 { type writeObjects; libs ("libutilityFunctionObjects.so"); objects (U p p_rgh T alpha.water); writeOption autoWrite; writeControl adjustableRunTime; writeInterval 0.02; } } |
|
June 9, 2020, 10:54 |
|
#2 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi Philomène,
Have you considered using purgeWrite? Then you can only keep the most recent restart file(s) and the rest of them are deleted. In addition to this you could define function objects to save other transient data that you want for post-processing. Best, Mikko |
|
June 11, 2020, 05:38 |
|
#3 |
New Member
Philomène Vergnol
Join Date: Apr 2020
Posts: 11
Rep Power: 6 |
Hello Mikko,
This is a great idea and I am trying it, but I doesn't seem to work at the moment : I put purgeWrite = 2 in the controlDict, and let the rest of the parameters the same. This way, I thought there would be every restart variables written in the 2 last time directories, and for the rest of the directories only the ones I want for post-processing. Unfortunately there are only the "post-process variables" in each time directory, even in the last two. It seems that the function object sort of "overrules" the purgeWrite parameter. Any idea ? Thank you, Philomène |
|
June 11, 2020, 05:49 |
|
#4 |
New Member
Philomène Vergnol
Join Date: Apr 2020
Posts: 11
Rep Power: 6 |
Hello again,
Actually I had forgotten to change the writeControl , for which I had put a value larger than the simulation time in order to have only the results from the function object written. I changed it to writeControl = timeStep and writeInterval = 1 to have them written each time step. Now the purgeWrite works well : I only have the last 2 time directories that are kept with all the "restart variables", but it also erases the results from the function object ("post-process variables" that are supposed to be written every 2 time steps). This time it seems that the purgeWrite kind of "overrules" the function object. How can one make them work together ? Best, Philomène |
|
June 12, 2020, 20:03 |
|
#5 |
Senior Member
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7 |
Hello Philomène,
Did I understand correctly, do you want to keep only the last two time folders (steps) but the data written to postProcessing for all the time steps you specified? How do you "pause" the simulation, by pausing the execution of the program (e.g. key combination in Terminal) or by modifying endTime and restarting it later on? To save disk space you could try using writeFormat binary; instead of ascii. |
|
June 15, 2020, 05:14 |
|
#6 |
New Member
Philomène Vergnol
Join Date: Apr 2020
Posts: 11
Rep Power: 6 |
Hello Claudio,
I would like to keep the data folders (time + postprocessing variables) for the time steps I specified in the writeObject function : every 0.02 s. In addition to that, I would like to keep the last 2 data folders that contain all the variables that are needed to restart the simulation. I stop the simulation using CTRL+C in the terminal. I restart it the same way I started it at the beginning, but latestTime is used for startTime. And I will also try writeFormat binary, thank you. |
|
Tags |
compressibleinterfoam, restart, resume, simulation, variable |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Restart 1-D simulation | MarcoMazzetta | CONVERGE | 1 | December 6, 2017 15:40 |
restart simulation | darookie | CFX | 8 | January 14, 2013 03:18 |
Variable of concentration for multiphase simulation | syens | CFX | 0 | February 21, 2012 10:30 |
emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 10:14 |
Restart of FSI simulation | V. Kumar | CFX | 3 | July 20, 2006 14:23 |