CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] PVFoamReader not imported with paraview.simple

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Flowkersma

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2017, 14:14
Default PVFoamReader not imported with paraview.simple
  #1
New Member
 
Rodrigo Torres
Join Date: Nov 2017
Posts: 2
Rep Power: 0
ratorres is on a distinguished road
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
ratorres is offline   Reply With Quote

Old   November 23, 2017, 05:47
Default
  #2
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13
Flowkersma is on a distinguished road
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
ratorres and miotto like this.
Flowkersma is offline   Reply With Quote

Old   November 23, 2017, 12:28
Default
  #3
New Member
 
Rodrigo Torres
Join Date: Nov 2017
Posts: 2
Rep Power: 0
ratorres is on a distinguished road
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
ratorres is offline   Reply With Quote

Old   November 29, 2017, 05:34
Default
  #4
Member
 
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 12
TobM is on a distinguished road
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
TobM is offline   Reply With Quote

Old   August 9, 2020, 20:49
Default Suggestion
  #5
New Member
 
Hirei
Join Date: May 2019
Posts: 1
Rep Power: 0
shogunhirei is on a distinguished road
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
shogunhirei is offline   Reply With Quote

Reply

Tags
openfoam 5.0, paraview 5.4.0, python script


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 16:41.