|
[Sponsors] |
March 23, 2014, 11:50 |
Error when using gmshToFoam
|
#1 |
Member
Join Date: Aug 2013
Posts: 60
Rep Power: 13 |
I am trying to mesh a test component in GMSH but am having problems.
I meshed the component using the [Mesh] [3D] option and then saved as a .msh extension. When I tried to run this in OpenFOAM using gmshToFoam I got the following error: Code:
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:3 Surface 1 frontAndBack Surface 2 base Surface 3 walls Starting to read points at line 11 Vertices to be read:74 Vertices read:74 Starting to read cells at line 88 Cells to be read:122 Mapping region 1 to Foam patch 0 Mapping region 3 to Foam patch 1 Mapping region 2 to Foam patch 2 Cells: total:0 hex :0 prism:0 pyr :0 tet :0 --> FOAM FATAL IO ERROR: No cells read from file "gmshtest.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: gmshtest.msh at line 212. From function readCells(..) in file gmshToFoam.C at line 726. FOAM exiting Thank you. Last edited by sur4j; March 23, 2014 at 14:25. |
|
April 3, 2014, 06:04 |
|
#2 | |
Member
Laurent Fitschy
Join Date: May 2011
Posts: 40
Rep Power: 15 |
Hi,
I think you forgot to create a physical volume containing your 3D mesh as follow : Quote:
Laurent. |
||
April 15, 2014, 23:26 |
|
#3 |
Member
Lucas Mutti
Join Date: Aug 2013
Posts: 47
Rep Power: 14 |
Hello Laurent,
I also have the same problem. In my case, I have imported a geometry created in CAD and I am trying to mesh it. How can define the fluid based on the provided parameters in gmsh? Regards, Lucas |
|
April 16, 2014, 09:06 |
|
#4 |
Member
Laurent Fitschy
Join Date: May 2011
Posts: 40
Rep Power: 15 |
Hi Lucas,
Check your elementary entities (menubar -> tools -> visibility) and add IDs of your volume(s) to the Physical Volume like this : Code:
Physical Volume("fluid") = {1,2,3}; Regards, Laurent. |
|
April 16, 2014, 13:41 |
|
#5 |
Member
Lucas Mutti
Join Date: Aug 2013
Posts: 47
Rep Power: 14 |
Hello Laurent,
Thanks for replying. I have tried to implement your suggestion however it seems that an elementary entity called surface 1 is already there for the analyzed STL. I tried to hit apply to see if it makes a difference and then refine but for some strange reason when I try to convert my .msh file into OpenFOAM I still get this message --> FOAM FATAL IO ERROR: No cells read from file "Harran_clean.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: Harran_clean.msh at line 13832697. Then, I open my .geo file and it says the following: Merge "Harran_clean.stl"; Surface Loop(2) = {1}; Would you mind if I forward to your e-mail my STL? Regards, Lucas |
|
April 17, 2014, 04:25 |
|
#6 |
Member
Laurent Fitschy
Join Date: May 2011
Posts: 40
Rep Power: 15 |
From my knowledge, gmsh is not able to build a 3D mesh from STL file. It handles STEP and IGES from CAD software.
Go to menubar -> tools -> statistics -> "mesh" tab and you will see you don't have any 3D mesh elements ... |
|
April 17, 2014, 04:53 |
|
#7 |
Senior Member
|
Hi,
in fact you've forgotten to add one line to your geo file: Code:
Merge "your-stl-file.stl"; Surface Loop(2) = {1}; Volume(3) = {2}; Last edited by alexeym; April 17, 2014 at 04:54. Reason: typo |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] New version of gmshToFoam? | stootoon | OpenFOAM Meshing & Mesh Conversion | 7 | February 14, 2022 10:01 |
[Gmsh] gmshToFoam problem. | nilashansen | OpenFOAM Meshing & Mesh Conversion | 11 | June 5, 2016 11:45 |
[Gmsh] Cell to node connectivity after 'gmshToFoam' | Jibran | OpenFOAM Meshing & Mesh Conversion | 1 | June 8, 2015 10:09 |
[Gmsh] gmshTofoam pbm with cyclicAMI | acahuzac | OpenFOAM Meshing & Mesh Conversion | 2 | October 20, 2014 04:53 |
[Gmsh] gmshToFoam command | mvinassa | OpenFOAM Meshing & Mesh Conversion | 1 | April 25, 2014 08:36 |