|
[Sponsors] |
OpenFOAM - Quick way to delete previous calculation & HowTo get access to variables |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 19, 2010, 12:18 |
OpenFOAM - Quick way to delete previous calculation & HowTo get access to variables
|
#1 |
New Member
Christoph
Join Date: Apr 2010
Posts: 19
Rep Power: 16 |
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 |
|
April 19, 2010, 13:18 |
|
#2 |
Senior Member
Eelco van Vliet
Join Date: Mar 2009
Location: The Netherlands
Posts: 124
Rep Power: 19 |
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 |
|
April 19, 2010, 14:02 |
|
#3 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
|||
February 14, 2018, 19:16 |
|
#4 |
New Member
Katsantonis Michalis
Join Date: Dec 2017
Posts: 21
Rep Power: 9 |
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 |
|
February 15, 2018, 01:27 |
|
#5 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
Code:
mv 0 O rm -r 0* rm -r 1* rm -r 2* rm -r 3* rm -r 4* rm -r 5* rm -r 6* rm -r 7* rm -r 8* rm -r 9* mv O 0 rm -r postProcessing
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
February 15, 2018, 10:33 |
|
#6 |
Senior Member
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12 |
Or shorter
Code:
rm -r 0.* [1-9]* |
|
February 15, 2018, 11:30 |
|
#7 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Which can be problematic for some of the tutorial-cases that have a 0.orig-directory
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
July 31, 2019, 03:59 |
|
#8 |
Senior Member
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 8 |
Hey guys,
if you need, it is possible to use the command "foamCleanTutorials". It is very usefull command to clean the directory. Cheers, Carlo |
|
July 23, 2021, 08:32 |
|
#9 |
New Member
Yugal Sharma
Join Date: Apr 2021
Posts: 3
Rep Power: 5 |
||
July 23, 2021, 08:39 |
|
#10 | |
New Member
Yugal Sharma
Join Date: Apr 2021
Posts: 3
Rep Power: 5 |
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. |
||
September 1, 2021, 03:23 |
decomposed
|
#11 | |
New Member
Yanjun Tong
Join Date: Jul 2020
Posts: 17
Rep Power: 6 |
Quote:
rm -rf processor*/[time] or rm -rf processor* to delete all processors |
||
September 1, 2021, 10:42 |
|
#12 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
For decomposed cases, you can also use foamListTimes with the processor option:
Code:
foamListTimes -processor -rm Cheers, Yann |
|
March 6, 2023, 04:20 |
|
#13 |
New Member
Karthik Lukka
Join Date: Nov 2022
Location: Roorkee, India
Posts: 2
Rep Power: 0 |
Vielen Danke.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The calculation efficiency of OpenFOAM | chiven | OpenFOAM Running, Solving & CFD | 4 | September 14, 2009 05:44 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |
A new Howto on the OpenFOAM Wiki Compiling OpenFOAM under Unix | mbeaudoin | OpenFOAM Installation | 2 | April 28, 2006 09:54 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |
access to variables at interface of porous media? | Mazyar | FLUENT | 0 | October 10, 2003 15:59 |