Tip Build A Paraview3 Plugin

From OpenFOAMWiki
Jump to: navigation, search

In current Versions of Paraview3 there is no support for OpenFOAM (although the VTK can read OF-Files). To add that:

  1. Download Paraview3-Sources and compile them (that's the hard part)
  • Create a directory (OFPlugin or so). In that directory add the files
    • CMakeLists.txt:
                    GUI_RESOURCES foamReader.qrc )
    • foamReader.qrc:
    <qresource prefix="/ParaViewResources" >
    • foamReader.xml:
  <Reader name="OpenFOAMReader"
          extensions="controlDict foam"
          file_description="OpenFOAM Files">
  • In that directory do
ccmake .
  • Specify the path where you compiled paraview and generate the Makefiles
  • A simple make should produce a dynamic library (the Plugin)

Now to use that plugin:

  • start paraview
  • go to the Tools-Menu - Plugin Manager
  • Load the dynamic library you generated as a Client-Plugin
  • now the file open-Dialog knows about OpenFOAM (the file to "open" is the controlDict)


  • Caution: currently the Reader can't deal with gzipped files. Make sure everything in your cases is unzipped. Otherwise paraview might hang (and crash) while opening the case
  • The good people of Kitware intend to enable the OF-Reader by default (then all this won't be necessary)
  • Altanatively, on ParaView 3.0.2 (at least, I still haven't tried other ParaView3 versions) you can turn on OpenFOAMReader as a builtin reader by adding
  <Reader name="OpenFOAMReader"
          extensions="controlDict foam"
          file_description="OpenFOAM Files">

to ParaView3/Qt/Components/Resources/XML/ParaViewReaders.xml in the ParaView3 source tree before configureing ParaView3 with ccmake. -- 7islands 14:12, 5 Oct 2007 (CEST)