CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   OpenFOAM - Quick way to delete previous calculation & HowTo get access to variables (http://www.cfd-online.com/Forums/openfoam/75209-openfoam-quick-way-delete-previous-calculation-howto-get-access-variables.html)

kriz April 19, 2010 11:18

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

eelcovv April 19, 2010 12:18

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

gschaider April 19, 2010 13:02

Quote:

Originally Posted by kriz (Post 255291)
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)?

There might be a script in OpenFOAM-1.6/bin (only had a quick glance and nothing caught my fancy)

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:

Originally Posted by kriz (Post 255291)
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.

That was discussed last week (I think the discussion was about rho) and two functionObjects that do that were referenced

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


All times are GMT -4. The time now is 07:01.