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

[Gmsh] Mesh Conversion Error (gmshToFoam)

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By RGS

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 26, 2020, 18:58
Default Mesh Conversion Error (gmshToFoam)
  #1
Member
 
Mondal131211's Avatar
 
Mondal
Join Date: Sep 2018
Location: Canberra ACT
Posts: 68
Rep Power: 7
Mondal131211 is on a distinguished road
Hi All,

Hope everyone is doing well. I was trying to convert my mesh (unstructured) from Gmsh to OpenFoam. The mesh conversion looks ok but in checkMesh shows an error (high aspect ratio cell). I can not understand why the error occurs as there wasn't any error while meshing in Gmsh. I noticed as the mesh refinement increases the number of errors also increase after conversion. For a better understanding of my question, I attached the *.geo and error file with this post. Feel free to check it.

Can anyone explain to me what causes this error? How can I overcome this issue? I will appreciate any little suggestions. Thank you very much in advance.

Cheers
Razon
Attached Images
File Type: png Error.png (70.0 KB, 8 views)
Attached Files
File Type: txt Plate.txt (918 Bytes, 2 views)
Mondal131211 is offline   Reply With Quote

Old   November 1, 2020, 07:58
Default
  #2
RGS
Member
 
Rohit George Sebastian
Join Date: May 2017
Posts: 41
Rep Power: 9
RGS is on a distinguished road
Quote:
Originally Posted by Mondal131211 View Post
Hi All,

Hope everyone is doing well. I was trying to convert my mesh (unstructured) from Gmsh to OpenFoam. The mesh conversion looks ok but in checkMesh shows an error (high aspect ratio cell). I can not understand why the error occurs as there wasn't any error while meshing in Gmsh. I noticed as the mesh refinement increases the number of errors also increase after conversion. For a better understanding of my question, I attached the *.geo and error file with this post. Feel free to check it.

Can anyone explain to me what causes this error? How can I overcome this issue? I will appreciate any little suggestions. Thank you very much in advance.

Cheers
Razon

I am not an expert in meshing, but I can try to help with what little I do know.


Gmsh and checkMesh probably check for different mesh criteria. I have very little experience with Gmsh, and so I am not even sure what kind of mesh checks Gmsh does, or if it even does any by default. But Gmsh is a general purpose meshing tool, and the quality criteria for meshes used in FEM and FVM are different. For instance, at my previous job, a mesh that was generated in Gmsh and worked fine in Abaqus caused the simulation to crash in OpenFOAM. This is not because OpenFOAM is inferior or has stricter requirements - just different requirements.


I haven't seen your geometry, or your geo file, but I am guessing that there are some regions that Gmsh is finding difficult to mesh. And the finer the mesh resolution, the more bad elements there are because the more elements are generated in this region.

One thing you can try is to scale up your model (make it for instance 100 times bigger than what it should be), and then scale the results you get from your simulation. Working with a bigger geometry means that Gmsh has more room to make elements while sticking to the defined tolerances, and you should get a better quality mesh.


You can also try to set some quality criteria in Gmsh. With my very limited experience with Gmsh, I cannot guide you here other than to suggest reading the Gmsh manual.


You can still try to run the simulation with your mesh, and depending on what kind of simulation case it is, where these bad elements are, and what settings you use, you may get your simulation to converge.
hogsonik and Mondal131211 like this.
RGS is offline   Reply With Quote

Old   November 1, 2020, 21:00
Default
  #3
Member
 
Mondal131211's Avatar
 
Mondal
Join Date: Sep 2018
Location: Canberra ACT
Posts: 68
Rep Power: 7
Mondal131211 is on a distinguished road
Quote:
Originally Posted by RGS View Post
I am not an expert in meshing, but I can try to help with what little I do know.


Gmsh and checkMesh probably check for different mesh criteria. I have very little experience with Gmsh, and so I am not even sure what kind of mesh checks Gmsh does, or if it even does any by default. But Gmsh is a general purpose meshing tool, and the quality criteria for meshes used in FEM and FVM are different. For instance, at my previous job, a mesh that was generated in Gmsh and worked fine in Abaqus caused the simulation to crash in OpenFOAM. This is not because OpenFOAM is inferior or has stricter requirements - just different requirements.


I haven't seen your geometry, or your geo file, but I am guessing that there are some regions that Gmsh is finding difficult to mesh. And the finer the mesh resolution, the more bad elements there are because the more elements are generated in this region.

One thing you can try is to scale up your model (make it for instance 100 times bigger than what it should be), and then scale the results you get from your simulation. Working with a bigger geometry means that Gmsh has more room to make elements while sticking to the defined tolerances, and you should get a better quality mesh.


You can also try to set some quality criteria in Gmsh. With my very limited experience with Gmsh, I cannot guide you here other than to suggest reading the Gmsh manual.


You can still try to run the simulation with your mesh, and depending on what kind of simulation case it is, where these bad elements are, and what settings you use, you may get your simulation to converge.

Hi Rohit,


Thank you for your useful suggestions. This will be really helpful for me. BTW, I am also not an expert in Gmsh. I have a rudimentary knowledge in Gmsh. Though I haven't ran the simulation yet with this mesh, it has to be checked first. If that crush, I will go through the other suggestions that you made here.



Cheers
Razon
Mondal131211 is offline   Reply With Quote

Old   November 8, 2020, 21:45
Default
  #4
Member
 
Mondal131211's Avatar
 
Mondal
Join Date: Sep 2018
Location: Canberra ACT
Posts: 68
Rep Power: 7
Mondal131211 is on a distinguished road
Quote:
Originally Posted by Mondal131211 View Post
Hi Rohit,


Thank you for your useful suggestions. This will be really helpful for me. BTW, I am also not an expert in Gmsh. I have a rudimentary knowledge in Gmsh. Though I haven't ran the simulation yet with this mesh, it has to be checked first. If that crush, I will go through the other suggestions that you made here.



Cheers
Razon

The issue has been resolved..
Mondal131211 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
GeometricField -> mesh() Function Tobi OpenFOAM Programming & Development 10 November 19, 2020 11:33
[Commercial meshers] Thin Walls Conversion from Fluent Mesh Isaac OpenFOAM Meshing & Mesh Conversion 1 March 4, 2016 12:08
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55


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