CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

How to convert a mesh into openfoam format

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   September 30, 2012, 23:53
Smile How to convert a mesh into openfoam format
New Member
Join Date: Sep 2012
Posts: 27
Rep Power: 7
jr33 is on a distinguished road
Hi foamers,

I have a following triangular meshes for a 3d geometry ( stl format).

so far I am using gmsh, I am trying to figure out:

How to convert above mesh ( .stl and .msh formats) into openfoam format:

If I use: gmshToFoam new.msh

No cells read from file "new.msh"
Does your file specify any 3D elements (hex=5, prism=6, pyramid=7, tet=4)?
Perhaps you have not exported the 3D elements?

file: new.msh at line 4995.

From function readCells(..)
in file gmshToFoam.C at line 721.

FOAM exiting

How to fix above error.

is there any interactive or alternative software that I can use to convert a mesh into foam format i.e. into blockMeshDict.


Last edited by jr33; October 1, 2012 at 00:32.
jr33 is offline   Reply With Quote

Old   October 2, 2012, 17:20
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,123
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Greetings Jay,

I think the problem you're having is due to a simple reason: you have a 3D surface mesh, not a 3D volume mesh.
This is why you're unable to convert the mesh directly to OpenFOAM, because OpenFOAM works with 3D volume meshes.

You either finish generating the mesh:
Best regards,
wyldckat is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gambit problems Althea FLUENT 22 January 4, 2017 04:19
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 07:21
Importing 3D mesh from ANSYS to OpenFOAM martyn88 OpenFOAM Meshing & Mesh Conversion 0 September 3, 2012 19:12
Converting Salome hybrid mesh to OpenFOAM Arnoldinho OpenFOAM 4 March 28, 2012 10:24
salome, openfoam and moving mesh prhlava OpenFOAM Running, Solving & CFD 8 November 9, 2009 09:59

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