|
[Sponsors] |
[OpenFOAM] Using python script for automatic post processing of openFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 14, 2017, 11:54 |
Using python script for automatic post processing of openFoam
|
#1 |
New Member
Join Date: Apr 2017
Posts: 6
Rep Power: 9 |
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! |
|
June 14, 2017, 13:42 |
|
#2 |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
Have you tried running the script using pvpython?
You should be able to copy and paste your script into the python shell. Joshua |
|
June 14, 2017, 13:50 |
|
#3 |
New Member
Join Date: Apr 2017
Posts: 6
Rep Power: 9 |
tool -> python shell is greyed in parafoam so i can't use it..
|
|
June 14, 2017, 13:52 |
|
#4 |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
||
June 14, 2017, 14:03 |
|
#5 |
New Member
Join Date: Apr 2017
Posts: 6
Rep Power: 9 |
paraFoam 4.4.0 64bits Linux
|
|
June 14, 2017, 14:32 |
|
#6 |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
||
June 15, 2017, 06:22 |
|
#7 |
New Member
Join Date: Apr 2017
Posts: 6
Rep Power: 9 |
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. Last edited by vPaquet; June 15, 2017 at 09:58. |
|
June 15, 2017, 10:09 |
|
#8 |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
Say you have script.py
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 |
|
June 15, 2017, 10:21 |
|
#9 |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
||
June 15, 2017, 10:52 |
|
#10 |
New Member
Join Date: Apr 2017
Posts: 6
Rep Power: 9 |
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! |
|
June 15, 2017, 10:59 |
|
#11 |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
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 |
|
June 20, 2017, 08:32 |
|
#12 |
New Member
Join Date: Apr 2017
Posts: 6
Rep Power: 9 |
Now i have the version 5.4 of paraview installed but still got the same problem.
|
|
December 16, 2021, 04:30 |
|
#13 |
Senior Member
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10 |
Please check this video, the automation in paraview is well explained:
https://youtu.be/h6Y7HZR_SAI |
|
Tags |
openfoam, parafoam, paraview, python |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PyFoam with Python Post Processing | godfatherBond | OpenFOAM Post-Processing | 0 | October 18, 2018 16:18 |
python script to create geometry for salome, and then mesh | 6863523 | Mesh Generation & Pre-Processing | 4 | March 18, 2017 10:00 |
Post processing in CFD Post or Fluent. | Blobs | OpenFOAM Post-Processing | 2 | June 26, 2016 08:23 |
Post processing from OpenFoam to Tecplot | danielec87 | Tecplot | 2 | August 14, 2012 15:19 |
CentFOAM Python Script Installation: Error | socon009 | OpenFOAM Installation | 2 | May 26, 2012 10:36 |