|
[Sponsors] |
[OpenFOAM] PVFoamReader not imported with paraview.simple |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 22, 2017, 14:14 |
PVFoamReader not imported with paraview.simple
|
#1 |
New Member
Rodrigo Torres
Join Date: Nov 2017
Posts: 2
Rep Power: 0 |
Hello guys,
I am starting to build python scripts for post-processing OpenFoam results on paraview. 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 it is the same, so I don't know what the issue might me. Could somebody help me? Thank you edit: I am running it under Ubuntu 16.04 Last edited by ratorres; November 22, 2017 at 14:16. Reason: adding information |
|
November 23, 2017, 05:47 |
|
#2 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi Rodrigo,
I always open all files with OpenDataFile('foam.foam') function from paraview.simple. It automatically determines the right reader from the extension of the file. So, create a dummy file in the root of your OpenFOAM case with .foam extension and open that file with OpenDataFile function. Does that work? Best, Mikko |
|
November 23, 2017, 12:28 |
|
#3 |
New Member
Rodrigo Torres
Join Date: Nov 2017
Posts: 2
Rep Power: 0 |
Thanks a lot Flowkersma, it did work and solve my problem.
Anyway I still don't understand why it doesn't import PVFoamReader when I run the code outside Paview. But it doesn't matter now. Thank you, Rodrigo Torres |
|
November 29, 2017, 05:34 |
|
#4 |
Member
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 12 |
I have the same problem. You can always load plugins in paraview with LoadPlugin or LoadDistributedPlugin.
When using the python shell in the GUI this is working. However, with pvbatch or pvpython I got the following error message: Code:
ERROR: .../vtkPVPluginLoader.ccx, line 388 vtkPVPluginLoader ... libPVFoamReader_SM.so: undefined symbol: _ZN12pqRenderView16staticMetaObjectE |
|
August 9, 2020, 20:49 |
Suggestion
|
#5 |
New Member
Hirei
Join Date: May 2019
Posts: 1
Rep Power: 0 |
To others like me, that reached here in the pursuit of loading the PVFoamReader using the pvpython. A possible solution can be found here: https://discourse.paraview.org/t/not...vpython/248/12
|
|
Tags |
openfoam 5.0, paraview 5.4.0, python script |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Python and paraview.simple libprotobuf error | Private Mandella | ParaView | 1 | October 26, 2016 14:25 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 04:23 |
using METIS functions in fortran | dokeun | Main CFD Forum | 7 | January 29, 2013 05:06 |
OpenFOAM141dev linking error on IBM AIX 52 | matthias | OpenFOAM Installation | 24 | April 28, 2008 16:49 |