CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Paraview & paraFoam (http://www.cfd-online.com/Forums/openfoam-paraview/)
-   -   Alternative to paraFoam (http://www.cfd-online.com/Forums/openfoam-paraview/76394-alternative-parafoam.html)

ericnutsch May 25, 2010 01:00

Alternative to paraFoam
 
1 Attachment(s)
I have had moderate success getting paraFoam to work in the past, so I put together a stupid simple bit of code that does the same thing, just reliably!

Step1: Unzip the attached file and put it into your case directory
Step2: Type ./ParaDisplay into the terminal and hit enter
(while in the case directory of course; operates just like Allrun)


All it does is automate the process of using foamToVTK, opening paraview, locating the vtk file and opening it. But 2 minutes here and there add up. :)

Let me know what you think.

Hasselhoff May 31, 2010 01:56

Hi Eric!
Well, it works, so why not:-) I like it, thanks for sharing!
best,
Michael

skarnani July 8, 2010 19:58

Thanks, Eric.
I was having a bit of trouble and I'm unsure of how to solve it.

The line:
paraview --data=VTK/${PWD##*/}_..vtk

raises the error
File ' "VTK/cavity_..vtk" ' cannot be read.

I'm guessing it is a trivial fix, but I'm still a bit lost.
Any help would be greatly appreciated.

Thanks.
Sunny

ericnutsch July 9, 2010 04:19

Hi skarnani,


Try doing the process manually by first running foamToVTK in the shell.

You can then go into paraview and see if the files are in yourCase/VTK and open them up. If both those things work, but the code doesnt, post back with an ls of your case file and I will see if I over looked something.

Note that there is an issue using this script with OpenFOAM1.5Dev, since sourcing the openfoam variables conflict with paraview. (Still pondering a good approach to this)


Eric

7islands July 9, 2010 10:15

Or if you're using PV 3.8 (downloaded from either Kitware or openfoam.com is ok), try its builtin reader by
touch ${PWD##*/}.foam && paraview --data=${PWD##*/}.foam
under your case directory.

T


skarnani July 9, 2010 14:55

Thank you Eric and Takuya for the replies.
By manually running foamToVTK, I can open paraview and then open the results files. However, I think you called it right, as I am using OpenFOAM-1.5-dev.

Thanks for the help though.
Sunny

ericnutsch July 9, 2010 15:52

Yeah for the time being, you can open a new shell that is not sourced, cd to the working directory and run ParaDisplay from there.

The extra shell reduces the convenience, but it can be handy in some situations.

I use 1.5Dev myself and will post an updated version of ParaDisplay once I get it working.

Eric


All times are GMT -4. The time now is 06:31.