View Issue Details

IDProjectCategoryView StatusLast Update
0001826OpenFOAM[All Projects] Bugpublic2015-09-02 14:36
ReporterjkauAssigned Tohenry 
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version14.04
Product Version 
Fixed in Version 
Summary0001826: fluentMeshToFoam exits with segmentation fault
Descriptionwhen converting a fluent msh file to OpenFOAM format fluentMeshToFoam exits with segmentation fault. Import in other software (e.g. starccm+) works. The msh file is in ascii format and was converted via dos2unix.
Steps To ReproduceDownload attached block.msh file.
execute fluentMeshToFoam block.msh
TagsNo tags attached.



2015-08-12 22:53


block.tgz (1,934,791 bytes)


2015-08-13 16:18

reporter   ~0005230

Maybe worth to mention: with same topology but hex or tetra cells works well, segmentation fault only happens when using polycells


2015-08-13 18:58

updater   ~0005233

Last edited: 2015-08-13 19:06

View 2 revisions

Thanks for the sample mesh!
I've taken a look at the "block.msh" file and there are 2 important details:

  1- "fluent3DMeshToFoam" is the correct utility to be used for this kind of mesh file. I'm not 100% certain, but I think that "fluentMeshToFoam" is meant for 2D mesh files.

  2- The parser that is used in both "fluentMeshToFoam" and "fluent3DMeshToFoam" isn't prepared for some of the new characters that are being used in this file you provided. Some examples: commas "," and pipes "|".

If you remove from the first line the comma; then remove the lines including and after this line:

  (0 "TGrid variables:")

it should work just fine with "fluent3DMeshToFoam".

I honestly am not 100% sure if this is worth fixing. You stated that generating meshes with hex and tetra cells works well. Can you please provide the ".msh" files for each one of those meshes? I ask this to ascertain where is the difference in file formatting coming from.


2015-08-13 23:13


blockTetra.tgz (1,160,613 bytes)


2015-08-13 23:23

reporter   ~0005239

Thanks Bruno for having a look. I have uploaded also a mesh containing tetras. I can not see any difference.

But I do not agree, fluentMeshToFoam can be used for 3D. If I use fluent3DMesh with the tetra-mesh it also complains about the pipe character. Anyway with fluentMeshToFoam it works.


2015-08-23 00:20

updater   ~0005284

I did some digging into the history of OpenFOAM's source code and ended up pinpointing why fluent3DMeshToFoam was introduced, and I quote from the release notes for 1.4.1:

    New fluent3DMeshToFoam converter for 3D meshes from Fluent format to OpenFOAM format including full support for all BCs, zones etc.;

I've compiled further details at


But the main detail is that fluentMeshToFoam cannot handle polyhedral cells, it can only deal with: tet, hex, pyramid, prism

I'll check what needs to be fixed in fluent3DMeshToFoam for parsing properly the meshes you've provided.


2015-08-23 00:55


fluent3DMeshToFoam.L (41,225 bytes)


2015-08-23 01:04

updater   ~0005285

Last edited: 2015-08-23 01:06

View 2 revisions

Attached is the file "fluent3DMeshToFoam.L", for the folder "applications/utilities/mesh/conversion/fluent3DMeshToFoam", tested with 2.4.x, with the following main modifications:

 - Handles headers with commas and pipes (vertical bars) in the text as well.

 - Ignores blocks that also have commas and pipes (vertical bars).

I've tested with both of the provided meshes and it seems to have imported them correctly.

Nonetheless, I'm a bit concerned about what "checkMesh -constant" tells us for the polyhedral mesh that is inside "block.tgz":

  Checking topology...
      Boundary definition OK.
      Cell to face addressing OK.
      Point usage OK.
    <<Found 100 neighbouring cells with multiple inbetween faces.
      Upper triangular ordering OK.
    <<Writing 204 unordered faces to set upperTriangularFace
      Face vertices OK.
      Number of regions: 1 (OK).

I'm not sure what to make of it. I'll attach the full log file, for reference. (edit: "log.checkMesh.block.msh")


2015-08-23 01:06


log.checkMesh.block.msh (3,535 bytes)


2015-08-24 17:51

manager   ~0005292

Thanks for the patch Bruno. I have applied the changes to both 2.4.x and dev.
Resolved by commit ee9849afbf365d44af168e51984758940fb21e1a

Issue History

Date Modified Username Field Change
2015-08-12 22:53 jkau New Issue
2015-08-12 22:53 jkau File Added: block.tgz
2015-08-13 16:18 jkau Note Added: 0005230
2015-08-13 18:58 wyldckat Note Added: 0005233
2015-08-13 19:06 wyldckat Note Edited: 0005233 View Revisions
2015-08-13 23:13 jkau File Added: blockTetra.tgz
2015-08-13 23:23 jkau Note Added: 0005239
2015-08-23 00:20 wyldckat Note Added: 0005284
2015-08-23 00:55 wyldckat File Added: fluent3DMeshToFoam.L
2015-08-23 01:04 wyldckat Note Added: 0005285
2015-08-23 01:06 wyldckat File Added: log.checkMesh.block.msh
2015-08-23 01:06 wyldckat Note Edited: 0005285 View Revisions
2015-08-24 17:51 henry Note Added: 0005292
2015-08-24 17:51 henry Status new => resolved
2015-08-24 17:51 henry Resolution open => fixed
2015-08-24 17:51 henry Assigned To => henry