Using python script for automatic post processing of openFoam
Hi,
I'm having some problems with the automation of the post processing of my openFoam case.. 1) can't run python script with parafoam but can open my openFoam case 2) can run python script with paraview but can't open my openFoam case 3) I dont know how to fully automate my script i just know how to use: tool-->python shell is there a way to only use a script that: open paraview -> do stuff with python shell -> close paraview Thanx! |
Have you tried running the script using pvpython?
You should be able to copy and paste your script into the python shell. Joshua |
tool -> python shell is greyed in parafoam so i can't use it..
|
Quote:
Joshua |
paraFoam 4.4.0 64bits Linux
|
Quote:
Joshua |
What's the difference between pvpython and python script?
I have use Cmake to put PARAVIEW_ENABLE_PYTHON = ON but python script is still greyed When i launch my script from the bash: paraFoam --script=parapy04.py I get an error message : Python support not enabled. Cannot run python scripts. |
Quote:
If you run "python script.py" then python is used to run the script. If you do "pvpython script.py" then you use the paraview version of python that already has certain modules loaded into it. On the other hand, pvbatch is the parallel version of pvpython. Joshua |
You might want to try looking at this CFD Online post:
https://www.cfd-online.com/Forums/pa...n-diabled.html Joshua |
Yea I have seen this post but the problem is that I have is that paraview can't open my openFoam case correctly (only take 1/4 of the time steps and mix them up), but paraview have no problems running scripts.
So I use the paraview that was installed with openFoam (it can open my case without problems) but paraFoam cant run python scripts.. I have follow these steps to try to solve the situation but i didnt work: https://www.paraview.org/Wiki/ParaVi...iew_With_CMake Reistalling paraFoam seems like a pretty intricate task, it's all mixed up in OF files! |
Try installing the newest version of paraview 5.3, 5.2 also works well. Either way they have more filters and options then version 4.4.
Joshua |
Now i have the version 5.4 of paraview installed but still got the same problem.
|
Please check this video, the automation in paraview is well explained:
https://youtu.be/h6Y7HZR_SAI |
All times are GMT -4. The time now is 22:02. |