CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] IO error using gmshToFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 15, 2011, 17:30
Default IO error using gmshToFoam
  #1
New Member
 
Emilie Garnier
Join Date: Mar 2011
Location: Toulouse
Posts: 3
Rep Power: 15
Emilie is on a distinguished road
Hello guys,

I am new to OpenFoam and I tried to create a very simple mesh : a cavity, with Gmsh.
My mesh looks great, however, when I save it as a .msh file, Gmsh offers several options :

-Version 1.0
-Version 2.0 Binary
-Version 2.0 ASCII
and the options:
-save all (ignore physical groups)
-save parametric coordinates

I tried all the options but eliminated the 'binary', 'save all' and 'save parametric coordinates' because they didn't seem useful.

I finally chose the 2.0 ASCII without ticking the two options.

When I use the "gmshToFoam" command, I have this error :


-----------------------------------------------------------------------
Create time

Found $MeshFormat tag; assuming version 2 file format.
Starting to read mesh format at line 2
Read format version 2.1 ascii 0

Starting to read points at line 5
Vertices to be read:10498
Vertices read:10498

Starting to read cells at line 10506
Cells to be read:10496

Mapping region 30 to Foam patch 0
Mapping region 31 to Foam patch 1
Mapping region 29 to Foam patch 2
Cells:
total:0
hex :0
prism:0
pyr :0
tet :0



--> FOAM FATAL IO ERROR:
No cells read from file "carre_parfait_test_renomme.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: carre_parfait_test_renomme.msh at line 21004.

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

FOAM exiting

-----------------------------------------------------------------------

Does anyone ever had this error/know where it comes from ?


Thank you very much for your help !


Versions : OpenFoam 1.7.1 and Gmsh 2.4.2
Emilie is offline   Reply With Quote

Old   March 16, 2011, 08:45
Default
  #2
Member
 
Arina
Join Date: Oct 2009
Location: Belarus
Posts: 71
Rep Power: 16
Akuji is on a distinguished road
Send a message via ICQ to Akuji
Cells:
total:0
hex :0
prism:0
pyr :0
tet :0




OpenFoam didn't find any cell of your mesh.

When you saved you mesh, what size of .msh file?
Akuji is offline   Reply With Quote

Old   March 16, 2011, 08:48
Default
  #3
Member
 
Arina
Join Date: Oct 2009
Location: Belarus
Posts: 71
Rep Power: 16
Akuji is on a distinguished road
Send a message via ICQ to Akuji
Also, if you want to convert 3D mesh from gmsh, you need to define physical volume.
Akuji is offline   Reply With Quote

Old   March 16, 2011, 16:30
Default
  #4
New Member
 
Emilie Garnier
Join Date: Mar 2011
Location: Toulouse
Posts: 3
Rep Power: 15
Emilie is on a distinguished road
Thank you for your help Akuji !

Indeed there was a problem with the mesh file : the size was 800kb and 21000 lines.
I defined the volume with Gmsh before generating the mesh (by clicking on 3D) and now my mesh file has a size of 9Mb and over 160000 lines.

The foamToGmsh command returned me a better message, except for :


--------------------------------------------------------------------------------
--> FOAM Warning :
From function polyMesholyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 576
Found 10496 undefined faces in mesh; adding to default patch.
--------------------------------------------------------------------------------

but I don't think it'll be a problem, I just need to modify the boundary file concerning the default faces.

Anyway, thank your very much !
Emilie is offline   Reply With Quote

Reply


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] New version of gmshToFoam? stootoon OpenFOAM Meshing & Mesh Conversion 7 February 14, 2022 09:01
[Gmsh] gmshToFoam problem. nilashansen OpenFOAM Meshing & Mesh Conversion 11 June 5, 2016 10:45
[Gmsh] Cell to node connectivity after 'gmshToFoam' Jibran OpenFOAM Meshing & Mesh Conversion 1 June 8, 2015 09:09
[Gmsh] gmshTofoam pbm with cyclicAMI acahuzac OpenFOAM Meshing & Mesh Conversion 2 October 20, 2014 03:53
[Gmsh] gmshToFoam command mvinassa OpenFOAM Meshing & Mesh Conversion 1 April 25, 2014 07:36


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