CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Automatic figures/picture extraction from paraFoam. (https://www.cfd-online.com/Forums/openfoam/98345-automatic-figures-picture-extraction-parafoam.html)

rachelm March 8, 2012 12:37

Automatic figures/picture extraction from paraFoam.
 
Hi All,

I am quite new to OpenFOAM- and have just about managed to install and run the examples in OpenFoam (cavity, dam..).

I find it rather annoying to launch paraFoam and extract results for individual cases or timesteps. Id rather have a code, which automates this process and throws my *.pngs in my directory.

Is there a way to (efficiently) do this? I tried for example, following:
http://www.cfd-online.com/Forums/ope...-paraview.html

but, I get some nasty exceptions as below (+ the perl script fails to execute):

======
Reading startup template case: cavity_base
Clone base to new current: cavity_U0.2_init1
Make mesh: cavity_U0.2_init1
Traceback (most recent call last):
File "cavUvar.py", line 62, in <module>
UtilityRunner(argv=["blockMesh","-case",casefile,],silent=False).start()
File "/usr/local/lib/python2.7/dist-packages/PyFoam/Execution/UtilityRunner.py", line 38, in __init__
jobId=jobId)
File "/usr/local/lib/python2.7/dist-packages/PyFoam/Execution/AnalyzedRunner.py", line 33, in __init__
jobId=jobId)
File "/usr/local/lib/python2.7/dist-packages/PyFoam/Execution/BasicRunner.py", line 100, in __init__
error("Solution directory",self.dir,"does not exist. No use running. Problem:",e)
File "/usr/local/lib/python2.7/dist-packages/PyFoam/Error.py", line 49, in error
raise FatalErrorPyFoamException(*text)
PyFoam.Error.FatalErrorPyFoamException: FatalError in PyFoam: 'PyFoam FATAL ERROR on line 100 of file /usr/local/lib/python2.7/dist-packages/PyFoam/Execution/BasicRunner.py: Solution directory -case/cavity_U0.2_init1 does not exist. No use running. Problem: [Errno 2] No such file or directory: '/home/ram/OpenFOAM/ram-2.1.0/run/tutorials/incompressible/icoFoam/cavity/cavityseries/-case/cavity_U0.2_init1''
./go.sh: 3: pvbatchprocess.pl: not found
find: `cavity_U*init1/Images': No such file or directory
movies created
find: `cavity_U*init1/Images': No such file or directory
=======

Is there an easier way to extract images and possibly even the data (in csv maybe?) without using the GUI? I m using OF2.1 and ParaView 3.12.0 64bit.

Many thanks for all you time and help.

regards,

Rachel.M


All times are GMT -4. The time now is 12:45.