CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Paraview & paraFoam (
-   -   Native ParaView Reader Bugs (

tj22 June 13, 2007 15:44

I just wanted to created a pos
I just wanted to created a post where we could keep a buglist/request for functionality list for the native openfoam reader in ParaView.

I have been away from developing the reader for sometime and would like to get it upto date.


gschaider June 14, 2007 06:58

Hi Terry! Thanks for your w
Hi Terry!

Thanks for your work.

I'm currently trying it (64Bit Linux Machine, Paraview 3, compiled from the CVS). OpenFOAM-functionality is enabled via a Client-Plugin (right now the OpenFile-Dialog doesn't know OF-files).

It works fine for some cases. The problems I can put my finger on so far are:

- it is not very tolerant about the files in the time-direcotries (it allocates memory if there are any gzipped-files until the machine is completely filled). Same thing happens if there are any backup-files from the texteditor (ending with a ~)
- For some geometries I only can see the grid but can not color it with data (although the data gets recognized) I'll try to find a minimal case where that happens.

If you got a new version of vtkOpenFOAMReader that you want to have tested, I'd be more than happy to do so.


tj22 June 14, 2007 14:24

*Gzipped data is not supported
*Gzipped data is not supported.

*You need to create a copy of the controlDict file named "controlDict.foam" -> Paraview doesnt support opening files without extensions.

*The newest version of the reader would be in the latest release of Paraview. I would however suggest using the Paraview 2.6.2 (which also has the newest reader) not the 3 branch. I havent tested it much on 3 and there were major changes to Paraview made between those two releases.


gschaider June 14, 2007 15:11

@Gzipped data: Any plans to su
@Gzipped data: Any plans to support that? Because having only non-zipped-data limits the usefullness for any real-life data (at least a more robust result than crashing would be cool)

Cool features (if you have too much time on your hands) would be:
- Support for Multi-region cases
- Lagrange particles

tj22 June 14, 2007 17:04

I don't have much time to inve
I don't have much time to invest in the reader currently. Hopefully in the future I will have sometime to add some functionality. For the time being I am looking for any bugs in the current functionality.

7islands August 9, 2007 10:27

Hi, I'm now trying rather tho
I'm now trying rather thorough bug hunting of the paraview native reader since I wrote paraFoam for Cygwin to use the native reader (afaik this is the only feasible way to realize paraFoam on Windows). Maybe I'll be posting a patch around early next week.

Although I well understand, and also would like what Bernhard suggests, the patch will exactly be focused on bugfix (most notably reported at this thread) and will include no feature enhancements, meant to serve as a basis for enhancements.


7islands August 13, 2007 06:10

Hi, Here's the patch for the
Here's the patch for the reader included in the ParaView-2.6.2 distribution. To apply cd to ParaView-2.6.2/VTK/IO and run

patch < vtkOpenFOAMReader-20070813.diff.

If your mesh has any zones defined, extract group 0 (choose Filter->Extract Group and select group 0) to work on the dataset. Otherwise you'll see geometry but cannot colorize it (just as Bernhard pointed out above). Group 1 and above contain zone geometries.

Problems fixed:
* the reader should now work better and stably at least for most of the tutorial cases except for gzipped ones, and for other cases with relatively complex meshes/overall setups (especially ones with polyhedra/tetrahedra).

Problems not fixed:
* proper comment handling
* handling of tiny mesh/internalField/boundaryField datasets (< 10 elements), e. g. the solidEquilibriumDisplacementFoam/beamEndLoad case where some patches have only 6 faces

I figured that these remaining problems would be better fixed by rewriting the current line-based parser of the reader to token-based one that better emulates the one in libOpenFOAM, with gzipped stream support, as a longer-term work.

Hopefully Terry will be able to concentrate on new features,
Takuya vtkOpenFOAMReader-20070813.diff

tj22 August 15, 2007 11:49

It may be quite a while before
It may be quite a while before I have time to add new features. I will try to get these changes in soon. If anyone wants to add new features feel free. You will have to commit the code through me.

Takuya, if I use your patch I will credit you in the source.


7islands August 17, 2007 09:03

Thanks Terry, personally I thi
Thanks Terry, personally I think it's well worth investing some collaborative developments to improve the native reader since all VTK-based applications under all the supported platforms, not only paraview on Linux, could benefit from it, but I neither have enough time... I will post a patch again if I ever could implement those listed in my post above.


7islands October 23, 2007 08:12

Hi Terry and all, After a clo
Hi Terry and all,
After a close and intensive collaboration, Philippose Rajan and I are happy to announce the availability of OpenFOAM native reader for ParaView3-CVS.

New features are:
  • Supports the ParaView 3.3 CVS development version (as of Oct. 22, 2007).
  • The reader supports volScalarField, volVectorField, lagrangian (of class Cloud) scalarField, lagrangian vectorField. Currently no support for point/surface nor symmTensor/tensor fields (see Notes to use the lagrangian feature).
  • The reader supports compressed(gzipped)/uncompressed-ascii/double precision binary data formats. Single precision binary format is not supported.
  • Improved performance. You should find the reader a lot faster than the previous versions.
  • Neat user interface. Patch and array selection lists are now offered.
Roles are:
Before using the reader, you might want to have a look at ReleaseNotes for installation procedure and notes (the same file is also included in the package): ReleaseNotes

After reading ReleaseNotes if you think it's worth trying, here's the package: vtkOpenFOAMReader-20071023.tar.bz2

To Terry:
We would like to make the reader code go into the source tree of ParaView3. Would it be possible?


tj22 January 3, 2008 14:23

Takuya, I have sent the reade
I have sent the reader updates to my contact at ParaView. I will let you know when the changes are available in the CVS.

7islands January 4, 2008 09:29

Thanks Terry, thanks indeed!
Thanks Terry, thanks indeed!


johannes January 6, 2008 14:09

Hi Takuya, I'm currently us
Hi Takuya,

I'm currently using the OpenFOAM native reader together with the precompiled ParaView 3.3.0 you offered to download from your homepage (Thanks for that!). It runs fine, but I still have two small questions which may fit into this thread:

1.) I tried to use the ParaView filter "Surface Flow" but although I extracted the correct boundary surface the filter was not avaiable (stayed grey).
I doubt it's a bug, so maybe you can tell me whether it's simply not supported in the current version or a different procedure has to be used to make the filter available.

2.) It's an understanding question: When you refer to the performance of the reader, do you mean e. g. the playback speed of a timestep animation in ParaView? I noticed that the animation of the same case runs a bit faster and smoother when vtk-Files are used, do you know why?

Many thanks in advance.

Best regards,

7islands January 7, 2008 02:21

Hi Johannes, 1.) It looks l
Hi Johannes,

1.) It looks like it's because of an incompatibility between what the reader offers as output dataset and what the filter requires as input, i.e. the Surface Flow filter doesn't seem to support composite dataset types, one of which is the type of dataset reader outputs. Other possibly incompatible filters with the same reason are Append Attributes and Append Datasets (I still haven't confirmed though). Unfortunately no quick workaround come to me.

2.) Roughly yes, I mean performance by mainly the initial loading time of a case and the playback speed of an animation. However note that
a.) I meant "better performance" by comparison to the previous versions of the reader and by no means comparison to the VTK reader.
b.) even if we make some comparisons with the VTK reader, nothing can't be said for sure without the details of the comparison, i.e. what formats (single/double-precision, text/binary formats) are used, whether patch data are also read or not, what differences are observed etc. For example if you compared the OpenFOAM reader with an ascii format case reading all internal mesh/patches and the VTK reader with single-precision binary format reading only internal mesh, and observed "only" a bit faster result with the VTK reader (which is quite a likely situation), in my view the OpenFOAM reader is doing surprisingly and unexpectedly well.



7islands January 7, 2008 02:38

Sorry I mistakenly pressed the
Sorry I mistakenly pressed the post button.

Since the OpenFOAM reader only supports double precision and foamToVTK only supports single precision as binary formats, a fair comparison will be in ascii formats (foamToVTK -ascii -noPointValues for VTK format).


johannes January 7, 2008 14:59

Hi Takuya, that's exactly w
Hi Takuya,

that's exactly what I wanted to know, thanks.

Regarding 1.): I can live with that; for cases where I need this filter I'll use VTK files.

Regarding 2.): I think the performance of the OpenFOAM reader is absolutely ok for watching the results. And for the rare times I record an animation via screen capturing I may use foamToVTK as well.

Best regards,

jens_klostermann January 16, 2008 13:47

Hi Takuya First thank you f
Hi Takuya

First thank you for your contribution this is good stuff and I really like the new Paraview3

I downloaded the paraview-3.3.0 svn-version by end November last year. Patched up and compiled this version all the way it was described by your beautiful Release Notes. Until now everything works marvelous!

Unfortunately this version has a feature (setting the resolution, when saving pictures "Save ScreenShot"), which is added in the most reason svn version (16.01.08). Now again I patched and compiled everything without any errors, but as soon as I try to read a controlDict.foam (OFcase) I get a crash with the following error:

ERROR: In /home/klosterm/OpenFOAM/linux64/ParaView3/Servers/Common/vtkProcessModule.cxx, line 1008
vtkProcessModule (0x6ff960): Object type: vtkOpenFOAMReader, could not find requested method: "SetKeepPatches"
or the method was called with incorrect arguments.

while processing
Message 0 = Invoke
Argument 0 = id_value {94

Argument 1 = string_value {SetKeepPatches}
Argument 2 = int32_value {1}

ERROR: In /home/klosterm/OpenFOAM/linux64/ParaView3/Servers/Common/vtkProcessModule.cxx, line 1009
vtkProcessModule (0x6ff960): Aborting execution for debugging purposes.}

Do you have any idea where to dig further?


philippose January 16, 2008 14:22

Hello Jens, You downloaded
Hello Jens,

You downloaded the latest version of Paraview 3.3.0 from the anonymous CVS right? Or is there also a parallel SVN repository?

Anyway.... was just wondering.... if you downloaded a completely new version of paraview from CVS, then this also includes the original "vtkOpenFOAMReader.cxx" and "vtkOpenFOAMReader.h" files in the "<pv3_root>/VTK/IO" directory that comes with PV3.... this version of the reader is extremely old, and is not Takuya's version.

You need to replace these two files with the version written by Takuya, and then recompile paraview.

The error that you are obtaining basically says that the XML file which configures the graphical interface has been modified to use Takuya's version, but the openfoam reader compiled into Paraview does not contain those configuration settings.

Hope this helps :-)!

Have a nice day!


jens_klostermann January 16, 2008 14:46

Hi Philippose @You download
Hi Philippose

@You downloaded the latest version of Paraview 3.3.0 from the anonymous CVS right?

You are right it was anonymous CVS repository.

@Hope this helps :-)!

Yes it does I forgot to replace "vtkOpenFOAMReader.cxx" and "vtkOpenFOAMReader.h" files in the "<pv3_root>/VTK/IO" with the version written by Takuya.



lr103476 January 23, 2008 12:10

Hi paraview experts!, I hav
Hi paraview experts!,

I have a problem using the latest ParaView 3.3.0. When running paraview and loading a case.foam dir the following error pops up:

ERROR: In /home/frankl/OpenFOAM/linux/ParaView3/VTK/IO/vtkOpenFOAMReader.cxx, line 2424
vtkOpenFOAMReader (0x8b742a0): /home/frankl/OpenFOAM/frankl-1.4.1/run/tutorials/interFoam/damBreak/controlDict. foam contains no timestep data.

ERROR: In /home/frankl/OpenFOAM/linux/ParaView3/VTK/Filtering/vtkExecutive.cxx, line 757
vtkCompositeDataPipeline (0x8b75cf8): Algorithm vtkOpenFOAMReader(0x8b742a0) returned failure for request: vtkInformation (0x8b8b838

Let me describe the installation steps, which I followed:

1) Downloaded the latest ParaView 3.3.0 from the CVS repo.

2) I patched the reader using the 'patch -b -p0 < *.xml.diff' as described in the release notes of this new reader. I also replaced "vtkOpenFOAMReader.cxx" and "vtkOpenFOAMReader.h".

Then I did the following to compile paraview:

cd $HOME/OpenFOAM/linux/ParaView3
mkdir -p lib/paraview-3.3.0
cd $HOME/OpenFOAM/linux/ParaView3/lib/paraview-3.3.0
ccmake $HOME/OpenFOAM/linux/ParaView3
make install

In the case dir I created a sym link from /system/controlDict to controlDict.foam.

Is this the right way to compile and use the new paraview 3.3.0 ?? Using VTK files, my paraview installation seems to work correct....

Thanks and regards,

All times are GMT -4. The time now is 14:46.