Reputation: 1
I created this .msh file manually. So far I struggled to get GMSH to output the hexahedron mesh I need. So far the end result is that GMSH viewer can't read the nodes as it states in it's status bar.
$MeshFormat
4.1 0 8
$EndMeshFormat
$Nodes
385
1 -2.000000000000000 -4.000000000000000 0.000000000000000
2 -2.000000000000000 -4.000000000000000 10.000000000000000
3 -2.000000000000000 -4.000000000000000 20.000000000000000
4 -2.000000000000000 -4.000000000000000 30.000000000000000
5 -2.000000000000000 -4.000000000000000 40.000000000000000
6 -2.000000000000000 -4.000000000000000 50.000000000000000
7 -2.000000000000000 -4.000000000000000 60.000000000000000
8 -2.000000000000000 -4.000000000000000 70.000000000000000
9 -2.000000000000000 -4.000000000000000 80.000000000000000
10 -2.000000000000000 -4.000000000000000 90.000000000000000
~~~...
383 2.000000000000000 4.000000000000000 80.000000000000000
384 2.000000000000000 4.000000000000000 90.000000000000000
385 2.000000000000000 4.000000000000000 100.000000000000000
$EndNodes
$Elements
1 0 5 1 0 1 6 5 35 36 41 40
2 0 5 2 1 2 7 6 36 37 42 41
3 0 5 3 2 3 8 7 37 38 43 42
4 0 5 4 3 4 9 8 38 39 44 43
5 0 5 5 5 6 11 10 40 41 46 45
6 0 5 6 6 7 12 11 41 42 47 46
7 0 5 7 7 8 13 12 42 43 48 47
8 0 5 8 8 9 14 13 43 44 49 48
9 0 5 9 10 11 16 15 45 46 51 50
10 0 5 10 11 12 17 16 46 47 52 51
~~~....
$EndElements
I was under the impression so far from reading the GMSH manual that element type 5 is for hexahedron with 8 nodes. What is wrong here with the format?
I tried many different ways to output a simple hexahedron mesh with GMSH but ended up writing this text file since that I was unable to accomplish this type of system with GMSH for Python...
Upvotes: 0
Views: 51
Reputation: 34
The second group for 4.1 is $Entities. The msh 4.1 format is not easy. I would recomend to try to create enough simple geometry, mesh it and to write it in a desired format to understand the msh format. I would recommend to start from 2.2 msh format.
Upvotes: 0