pythonpython-2.7ubuntuparaviewopenfoam

PVFoamReader not imported with paraview.simple


I am starting to build python scripts for post-processing OpenFoam-5 results on paraview 5.4.

I was able to record, alter and run scripts inside the paraview interface.

I was also able to run some of these scripts outside of the paraview interface, using both the pvpython and my standart python 2 environment (adding the pvpython libraries folders to the system path).

The problem I am facing now is that when I import paraview.simple, outside of the paraview interface (even if I use pvpython or pvbatch), it loads all the functions and modules but two: PVFoamReader and PVblockMeshReader.

I checked the environment variables and the system path on both shells and they are the same, so I don't know what the issue might me.

I am running the scripts under Ubuntu 16.04

Could somebody help me?

Thank you


Solution

  • I didn't exactly find a solution, but I was suggested a workaround in a CFD-forum. The workaround is to use the extension ".foam" instead of ".OpenFOAM" and use the paraview.simple function OpenDataFile('foam.foam') the file. The file created should be an empty file on the case directory.