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

[Gmsh] gmshToFoam unhandled element

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 14, 2010, 10:48
Default gmshToFoam unhandled element
  #1
Senior Member
 
Join Date: Apr 2010
Posts: 151
Rep Power: 16
flowris is on a distinguished road
Hello,

1. I am trying to convert a gmsh using gmshtoFoam. The .msh-file I use is good, because I see a nice mesh in the gmsh GUI. When I type
gmshToFoam blok01.msh

the console answers (only the lower lines)

Code:
...
Unhandled element 1 at line 430
Unhandled element 1 at line 431
Unhandled element 1 at line 432
Unhandled element 1 at line 433
Unhandled element 1 at line 434
Unhandled element 1 at line 435
Unhandled element 1 at line 436
Unhandled element 1 at line 437
Unhandled element 1 at line 438
Mapping region 0 to Foam patch 0
Cells:
    total:0
    hex  :0
    prism:0
    pyr  :0
    tet  :0



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

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

FOAM exiting

My blok.msh file is attached.



2. How do I define the patches? I assume I have to make physical surfaces in the .geo file, but this has not been succesfull so far.
flowris is offline   Reply With Quote

Old   June 25, 2015, 10:35
Default
  #2
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Quote:
Originally Posted by flowris View Post
Hello,

1. I am trying to convert a gmsh using gmshtoFoam. The .msh-file I use is good, because I see a nice mesh in the gmsh GUI. When I type
gmshToFoam blok01.msh

the console answers (only the lower lines)

Code:
...
Unhandled element 1 at line 430
Unhandled element 1 at line 431
Unhandled element 1 at line 432
Unhandled element 1 at line 433
Unhandled element 1 at line 434
Unhandled element 1 at line 435
Unhandled element 1 at line 436
Unhandled element 1 at line 437
Unhandled element 1 at line 438
Mapping region 0 to Foam patch 0
Cells:
    total:0
    hex  :0
    prism:0
    pyr  :0
    tet  :0



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

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

FOAM exiting

My blok.msh file is attached.



2. How do I define the patches? I assume I have to make physical surfaces in the .geo file, but this has not been succesfull so far.
Hello,

how did you solve this problem?

Best regards,

Kate
KateEisenhower is offline   Reply With Quote

Old   August 6, 2018, 10:13
Default
  #3
New Member
 
Jonathan Charbonneau
Join Date: Jul 2018
Posts: 1
Rep Power: 0
jcharbonneau is on a distinguished road
I fell upon this thread when looking up the error.

I got the same error because I had forgotten to define physical surfaces in the .geo file.

I did not look at your .geo file (can't find it/not attached anymore, new guy on the forum here), but I assume that all surfaces must have a physical name.

This is for someone in the future like me who might get the same error.
jcharbonneau is offline   Reply With Quote

Old   February 20, 2023, 18:31
Default
  #4
New Member
 
Wassim Abdel Nour
Join Date: Feb 2021
Location: France
Posts: 16
Blog Entries: 1
Rep Power: 5
wa$$im is on a distinguished road
It's not mandatory to assign a physical surface to each geometrical surface. Non assigned surfaces are converted into "defaultFaces" patch in OpenFoam.

Whereas, you should always take care of creating a physical volume.

Also, surfaces that belong to more than one physical surface ususally generate errors.
wa$$im is offline   Reply With Quote

Old   February 20, 2023, 18:50
Default
  #5
New Member
 
Wassim Abdel Nour
Join Date: Feb 2021
Location: France
Posts: 16
Blog Entries: 1
Rep Power: 5
wa$$im is on a distinguished road
The error about unhandled elements : 'Unhandled element 1 at line 430 ... ' comes out because gmshToFoam does not support geometrical entities (geometrical points, lines, surfaces, ...). So the error has nothing to do with the quality of the mesh that you see in the GUI, but with how you write the mesh in the .msh-file.

When writing your msh, do not just 'Save Mesh'. Instead, go to Export and pick .msh file format. Then in 'MSH Option' uncheck 'Save all Elements'. And finally Save the mesh.

Preferably, also select the 'Version 2 ASCII' file format.
wa$$im is offline   Reply With Quote

Reply

Tags
gmshtofoam, patch, unhandled element


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] 3D Mesh conversion from gmsh-2.5.0 to OpenFOAM Ancioi OpenFOAM Meshing & Mesh Conversion 17 January 9, 2019 00:50
Identifying Markers in a CGNS Mesh tjim SU2 3 October 12, 2018 02:21
[Other] Mesh Importing Problem cuteapathy ANSYS Meshing & Geometry 2 June 24, 2017 06:29
[Gmsh] discretizer - gmshToFoam Andyjoe OpenFOAM Meshing & Mesh Conversion 13 March 14, 2012 05:35
autoPatch error, mesh quality related...? Alexvader OpenFOAM 0 October 6, 2011 18:57


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