CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Meshing Format & General Technical (
-   -   How to get polyhedral mesh without additional cells when using foamToVTK (

chnrdu June 7, 2008 11:54

I use salome to generate tetra
I use salome to generate tetrahedral mesh, then use ideasUnvToFoam to convert this mesh. I wanna use polyhedral mesh to compute some cases, so I use polyDualMesh to convert tetra to polyhedral mesh. That all is fine.

However, when I use foamToVTK to convert foam formated mesh to VTK formated mesh in order to show meshes in paraview 3.3.0, things are different, there are additional cells generated. I use this command:

foamToVTK . sonicLiquidPipeWithSymCylinDamperP100_mseq_poly -time 4.8828125e-06 -allPatches

It said:

Internal : "..../VTK/sonicLiquidPipeWithSymCylinDamperP100_mseq_poly_2. vtk"
Original cells:11079 points:60203 Additional cells:229990 additional points:11066

Combined patches : "..../VTK/allPatches/allPatches_2.vtk"
Combining patches:
patch 0 F1
patch 1 F2
patch 2 F3
patch 3 Walls

The boundaries (I load file <allpatches_2.vtk>) are shown correctly. It shows as

but the internal cells are not right, I think. It shows as

I'd like to shown it as real polyhedron without additional cells. How to get it?

olesen June 9, 2008 03:18

As you correctly note, since V
As you correctly note, since VTK does not support polyhedral cells directly, foamToVTK tet decomposes polyhedral cells. If you really don't want to see the decomposed cells, you can try with converting to the EnSight format: the newer paraview versions (eg, 3.3 from CVS) manage to read the nfaced (polyhedral) cells and uses a convex point set to display them. This is generally slower than the tet decomposed equivalent and may fail when your cells have concavity. NOTE: the older paraview/VTK versions will segfault if you try to feed them an EnSight file with nfaced cells.

alexandrepereira June 9, 2008 22:29

Hi Mark, One question... is
Hi Mark,

One question... is there any way to import EnSight format into Paraview without the *%&"#)? "core dump"...?

Should i import it in "Little Endian" or "Big Endian" Format...?

As far i I can recall, Paraview 2.4.4. won't allow it,... Paraview 3.3.0 won't either...downloaded it today from

is there some kind of "trick" to be used in foamToEnsight? or it is just the way things are, not being able to use Paraview with EnSight Format...?

If I use OpenFOAM database format, or VTK export format, lots of streamlines get broken... but if i export it in EnSight Format it gets allright...

... the problem is that my EnSight demo license is almost expiring...

So I am looking for Paraview as one possible alternative...

Best Regards


Best regards


olesen June 10, 2008 03:43

Alex, I've currently broken

I've currently broken my paraview 3.3 installation, but it did work with polyhedral without a core dump.
If you are using Linux, then the reader will initially read okay, but have the incorrect endian in the GUI. When you click Apply it will cause problems.

Another issue that you may have is that the current VTK EnSight reader incorrectly assumes that all the filenames/times are each on a single line (in the .case file). I submitted a patch, but haven't followed up on it.

alexandrepereira June 10, 2008 13:08

Hi Mark, Thanks for this in
Hi Mark,

Thanks for this info.


All times are GMT -4. The time now is 20:24.