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

[Gmsh] gmshToFoam conversion issue!

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

LinkBack Thread Tools Search this Thread Display Modes
Old   January 27, 2021, 09:16
Default gmshToFoam conversion issue!
New Member
Join Date: Feb 2020
Posts: 17
Rep Power: 6
johny_walker is on a distinguished road
I am getting the following error on converting my gmsh mesh file to foam:

Create time

Starting to read mesh format at line 2
Read format version 2.2 ascii 0

Starting to read physical names at line 5
Physical names:6
Surface 1 inlet
Surface 2 outlet
Surface 3 topAndBottomWalls
Surface 4 frontAndBack
Surface 5 cylwall
Volume 6 internal

Starting to read points at line 14
Vertices to be read:18320
Vertices read:18320

Starting to read cells at line 18337
Cells to be read:36286

Mapping region 4 to Foam patch 0
Mapping region 1 to Foam patch 1
Mapping region 3 to Foam patch 2
Mapping region 2 to Foam patch 3
Mapping region 5 to Foam patch 4
hex :0
pyr :0
tet :0

No cells read from file "untitled.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: untitled.msh at line 54625.

From function void readCells(Foam::scalar, bool, const pointField&, const Foam::Map<int>&, Foam::IFstream&, Foam::cellShapeList&, Foam::labelList&, Foam::List<Foam:ynamicList<Foam::face> >&, Foam::labelList&, Foam::List<Foam:ynamicList<int> >&)
in file gmshToFoam.C at line 726.

FOAM exiting

Can anyone tell me why is it so? .Geo and .msh files can be accessed through:

johny_walker is offline   Reply With Quote

Old   February 24, 2021, 01:52
Senior Member
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road

You simply need to add a volume in physical group ( Geometry --> Physical Groups --> Add --> Volume).

For the mesh generation, you need to generate a mesh of version 2.2 compatible for OpenFoam conversion, for this use the command: gmsh -3 -format msh2 unitled.geo

For the mesh conversion: gmshToFoam untitled.msh

The created volume appears in OpenFoam as a cellzone.
foamiste is offline   Reply With Quote

Old   April 15, 2022, 13:46
Default Problems fixed!!??
New Member
Saketh Bharadwaj
Join Date: Jan 2018
Posts: 12
Rep Power: 8
Saketh Bharadwaj is on a distinguished road

I came across a similar problem but could not solve it.

I created another thread. Can someone help me fix this.

Gmsh import into OpenFOAM
Saketh Bharadwaj is offline   Reply With Quote


gmsh to openfoam, mesh 2d

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Gmsh] GMSH to OpenFOAM file conversion error (GmshToFoam) Nikhil Bollimuntha OpenFOAM Meshing & Mesh Conversion 4 May 18, 2019 08:29
[Gmsh] No 3D Element found during gmshToFoam conversion bhargav1195 OpenFOAM Meshing & Mesh Conversion 1 June 21, 2018 09:37
Convergence issue in natural convection problem chrisf90 FLUENT 5 March 5, 2016 08:30
Meshing related issue in Flow EFD appu FloEFD, FloWorks & FloTHERM 1 May 22, 2011 08:27
[Gmsh] gmshToFoam issue tomhebunn OpenFOAM Meshing & Mesh Conversion 3 April 16, 2011 08:08

All times are GMT -4. The time now is 16:06.