nschloe / meshio

:spider_web: input/output for many mesh formats

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while reading Ansys meshing .msh

hugh-tong opened this issue · comments

commented

Describe the bug

I wrote the code to read the Ansys meshing file .msh :

import meshio

# Read binary .msh file(Created by Ansys meshing)
mesh = meshio.read("smesh20240508-0.msh")

And got the error:

Warning: Unknown index 4. Skipping.
Warning: Unknown index 2120. Skipping.
Error: Couldn't read file smesh20240508-0.msh as either of ansys, gmsh

The header of mesh is :

  1 (0 machine configuration:)
      2 (4 (60 0 0 1 2 4 4 4 8 4 8 4))
      3 (0 grid written by ANSYS Meshing
      4 nodes:       (10 (id start end type) (x y z ...))
      5               faces:       (13 (id start end type elemType)
      6                 (v-0 v-1 .. v-n right-cell left-cell ...))
      7    cells:       (12 (id start end type elemtype))
      8    parent-face: (59 (start end parent child) (nchilds child0 child1 ...))
      9 )
     10 (2 3)
     11 (10 (0 1 1ae4bc 0))
     12 (13 (0 1 10388e 0))
     13 (12 (0 1 893d24 0))
     14 (3010 (1 1 1ae4bc 1 3)