OpenFOAM - Quick way to delete previous calculation & HowTo get access to variables
Hi!
Is there a quick way to delete all previous timesteps in a calculation (e.g. a script, deleting all directories regarding the time-steps w/o the "0" directory)? plus: how can I tell the solver which variables to write to the result file - using buoyantBoussinesqPisoFoam I would like to have access to e.g. k and eps for post-processing. Regards, Kriz |
Hi Kriz,
Just install pyFoam, a great set of python utilities by Bernhard Gschaider for doing all kind of openfoam tasks. Have a look at http://openfoamwiki.net/index.php/Contrib_PyFoam For clearing your case directory, it would become one single command: pyFoamClearCase.pl . Regards, Eelco |
Quote:
It's not an uncommon task. I usually use http://openfoamwiki.net/index.php/Co...amClearCase.py for that (but usually every computer I touch becomes polluted with that stuff, so this is the easiest thing to do for ME, not necessarily for everyone) Quote:
Just curious: are you sure you're using a turbulence model that HAS k/epsilon (because usually such a turbulence model writes these out) Bernhard |
There is a command included in OpenFOAM that lists all of the time directories, you just just have to type > foamListTimes.
Now, if you want to remove all those directories, you type > foamListTimes -rm |
Code:
mv 0 O |
Or shorter
Code:
rm -r 0.* [1-9]* |
Quote:
|
Hey guys,
if you need, it is possible to use the command "foamCleanTutorials". It is very usefull command to clean the directory. Cheers, Carlo |
Quote:
|
Quote:
So you have to again do the meshing stuff (i.e.- blockMesh). Basically, the foamCleanTutorial command makes your case's folder contain only the 0/, constant/, system/ directories. (and maybe someother files), more like a fresh case folder. |
decomposed
Quote:
rm -rf processor*/[time] or rm -rf processor* to delete all processors |
For decomposed cases, you can also use foamListTimes with the processor option:
Code:
foamListTimes -processor -rm Cheers, Yann |
Vielen Danke.
|
All times are GMT -4. The time now is 06:49. |