CFD Online URL
[Sponsors]
Home > Forums > Open Source Meshers: Gmsh, Netgen, CGNS, ...

IO error using gmshToFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 15, 2011, 19:30
Default IO error using gmshToFoam
  #1
New Member
 
Emilie Garnier
Join Date: Mar 2011
Location: Toulouse
Posts: 3
Rep Power: 5
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, 10:45
Default
  #2
Member
 
Arina
Join Date: Oct 2009
Location: Belarus
Posts: 76
Rep Power: 7
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, 10:48
Default
  #3
Member
 
Arina
Join Date: Oct 2009
Location: Belarus
Posts: 76
Rep Power: 7
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, 18:30
Default
  #4
New Member
 
Emilie Garnier
Join Date: Mar 2011
Location: Toulouse
Posts: 3
Rep Power: 5
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

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
GmshToFoam FOAM FATAL ERROR faces deallocated Tobias Prousa (Prousa) Open Source Meshers: Gmsh, Netgen, CGNS, ... 14 January 31, 2012 11:45
gmshToFoam problem: not the same mesh in Gmsh vs. paraview zhernadi Open Source Meshers: Gmsh, Netgen, CGNS, ... 8 July 7, 2011 03:28
gmshToFoam problem. nilashansen Open Source Meshers: Gmsh, Netgen, CGNS, ... 5 December 28, 2009 13:41
gmshToFoam : problem with patch jmf Open Source Meshers: Gmsh, Netgen, CGNS, ... 3 October 4, 2009 17:27
GmshToFoam basic question tdzurny Open Source Meshers: Gmsh, Netgen, CGNS, ... 3 December 3, 2007 11:22


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