Difference between revisions of "Contrib Parallelized Native OpenFOAM Reader for ParaView"

From OpenFOAMWiki
(Created the page)
 
m (addenda)
Line 5: Line 5:
 
* Supports the ParaView 3.3 CVS development version (as of Oct. 22, 2007). Also tested a bit with the 3.2-series and it seems to work.
 
* Supports the ParaView 3.3 CVS development version (as of Oct. 22, 2007). Also tested a bit with the 3.2-series and it seems to work.
  
* Tested under Linux x86, x86_64 and VS2005 on Windows. I heard that the reader also works under Mac OS X.
+
* Tested under Linux x86, x86_64, VS2003.net/2005 on Windows and Mac OS X Leopard (10.5).
  
 
* Supports volScalarField, volVectorField, lagrangian (of class Cloud) scalarField, lagrangian vectorField. Currently no support for point/surface nor symmTensor/tensor fields (See Notes below to use the lagrangian feature).
 
* Supports volScalarField, volVectorField, lagrangian (of class Cloud) scalarField, lagrangian vectorField. Currently no support for point/surface nor symmTensor/tensor fields (See Notes below to use the lagrangian feature).
Line 58: Line 58:
  
 
* Mesh which consists of polyMesh/points, polyMesh/faces and polyMesh/cells (old mesh format) is not supported.
 
* Mesh which consists of polyMesh/points, polyMesh/faces and polyMesh/cells (old mesh format) is not supported.
 +
 +
* The reader handles data with double precision while paraFoam handles with single precision.
  
 
* The FoamFile parser is still under development so if you find a bug posting a minimal test case will be highly appreciated.
 
* The FoamFile parser is still under development so if you find a bug posting a minimal test case will be highly appreciated.
  
=Download=
+
=Downloads=
 
Download from [http://openfoam.cfd-online.com/cgi-bin/forum/show.cgi?tpc=1&post=17466#POST17466 the native reader thread] on the Message Board.
 
Download from [http://openfoam.cfd-online.com/cgi-bin/forum/show.cgi?tpc=1&post=17466#POST17466 the native reader thread] on the Message Board.
 +
 +
You can also download prebuilt binaries with the reader included [http://oshima.eng.niigata-u.ac.jp/OpenFOAM/ParaView/ here] (currently only for Windows).
  
 
=History=
 
=History=
 +
[[User:7islands|7islands]] 09:18, 29 Dec 2007 (CET): some addenda.
 +
 
[[User:7islands|7islands]] 04:36, 16 Dec 2007 (CET) (Takuya OSHIMA): Created this page.
 
[[User:7islands|7islands]] 04:36, 16 Dec 2007 (CET) (Takuya OSHIMA): Created this page.

Revision as of 08:18, 29 December 2007

Although VTK included in ParaView3 has an OpenFOAM reader (and tips for enabling the reader is documented here), it still lacks a number of essential features to be practially used. Since on Windows native reader, rather than PVFoamReader/vtkFoam/paraFoam, is the only feasible approach to get OpenFOAM data into ParaView, I re-coded the reader from ground up and posted to the Message Board. This page is meant as the documentation for the reader.

1 Features

  • Supports the ParaView 3.3 CVS development version (as of Oct. 22, 2007). Also tested a bit with the 3.2-series and it seems to work.
  • Tested under Linux x86, x86_64, VS2003.net/2005 on Windows and Mac OS X Leopard (10.5).
  • Supports volScalarField, volVectorField, lagrangian (of class Cloud) scalarField, lagrangian vectorField. Currently no support for point/surface nor symmTensor/tensor fields (See Notes below to use the lagrangian feature).
  • 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.

2 Installation

1. Get the ParaView3 source.

cvs -d :pserver:anoncvs@www.paraview.org:/cvsroot/ParaView3 login
    (respond with empty password)
cvs -d :pserver:anoncvs@www.paraview.org:/cvsroot/ParaView3 co ParaView3

2. Untar the package at the parent directory of ParaView3 source tree (the directory where you issued the above cvs commands). This will overwrite the reader code included in the source tree.

tar jxf vtkOpenFOAMReader-YYYYMMDD.tar.bz2

3. Patch the XML codes at the parent dirctory of ParaView3.

patch -b -p0 < ParaViewReaders.xml.diff
patch -b -p0 < readers.xml.diff

4. Build ParaView3 as usual. It is highly recommended to turn on compiler optimization (at least -O2) since the reader is dead slow without optimization. If you get a bit better performance than paraFoam the optimization is working adequately.

3 Notes

  • To open an OpenFOAM case, create a symbolic link from controlDict to controlDict.foam and choose controlDict.foam.
  • The reader does not create point-interpolated fields of vol-fields. Use Filter->Cell Data to Point Data to make them (FYI, vector plot with Filter->Glyph also requires point data).
  • The reader lists time instances according to descriptions in controlDict when (adjustTimeStep, writeControl) == (yes, adjustableRunTime) or (no, timeStep) (i. e. writing interval is supposed to be constant in simulated time), or otherwise, lists all valid time directories. This is a different behavior from paraFoam which always lists all valid time directories in a case directory.
  • The reader lists array names according to the "object" entry in FoamFile header, whereas paraFoam lists according to the file name of the object. So you need a valid FoamFile header for every object.
  • To run Filter->Stream Tracer for a case with polyhedral cells, you have to tetrahedralize it (Filter->Tetrahedralize).
  • In order for lagrangians to work you need to create lagrangian fields at the initial timestep in your case. To separate eulerians and lagrangians, extract group 0 for eulerians and group 1 for lagrangians with Filter->Extract Group.
  • The "Accumulate Patches" checkbox is meant to be used for topo change cases to append patches that don't exist in the initial timestep into the selection list over an animation run. To update the patch selection list after the run, deselect controlDict.foam in Pipeline Browser once and re-select it.
  • Filter->Slice doesn't seem to be working correctly in the current CVS of ParaView3. You need to extract dataset 0 with Filter->Extract Datasets (which represents internalField) or run Filter->Cell Data to Point Data before making a slice.
  • Handling of boundary conditions is quite poor as of now; if a boundary patch doesn't have a value entry the corresponding patch-internal field value is used (i. e. equivalent to zeroGradient b. c.)
  • Mesh which consists of polyMesh/points, polyMesh/faces and polyMesh/cells (old mesh format) is not supported.
  • The reader handles data with double precision while paraFoam handles with single precision.
  • The FoamFile parser is still under development so if you find a bug posting a minimal test case will be highly appreciated.

4 Downloads

Download from the native reader thread on the Message Board.

You can also download prebuilt binaries with the reader included here (currently only for Windows).

5 History

7islands 09:18, 29 Dec 2007 (CET): some addenda.

7islands 04:36, 16 Dec 2007 (CET) (Takuya OSHIMA): Created this page.