Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting Abaqus model #1489

Open
m-bellv opened this issue Aug 26, 2024 · 1 comment
Open

Converting Abaqus model #1489

m-bellv opened this issue Aug 26, 2024 · 1 comment

Comments

@m-bellv
Copy link

m-bellv commented Aug 26, 2024

I am trying to load a rat head model (.inp abaqus file) using meshio to convert to a gmsh22 file, but when I load the model it seems some of the information is not being loaded by meshio. The .inp file contains element sets, which may be the source of the issue (#493):

*Node
*Element, type=C3D4
*Elset, elset=BRAIN, generate
*Elset, elset=CSF, generate
*Elset, elset=SKULL, generate
*Elset, elset=WHITE_MATTER, generate
*Elset, elset=WHOLE_HEAD, generate
** Section: Section-1-WHOLE_HEAD
*Solid Section, elset=WHOLE_HEAD, controls=EC-1, material=WHOLE_HEAD
** Section: Section-2-BRAIN
*Solid Section, elset=BRAIN, controls=EC-2, material=BRAIN
** Section: Section-3-SKULL
*Solid Section, elset=SKULL, controls=EC-2, material=SKULL
** Section: Section-4-WHITE_MATTER
*Solid Section, elset=WHITE_MATTER, controls=EC-2, material=WHITE_MATTER
** Section: Section-5-CSF
*Solid Section, elset=CSF, controls=EC-3, material=CSF
** MATERIALS
**
*Material, name=BRAIN
*Material, name=CSF
*Material, name=SKULL
*Material, name=WHITE_MATTER
*Material, name=WHOLE_HEAD

When trying to save to gmsh22 format, using
mesh.write('/home/mbellvila/Downloads/ratmodeloxford/rathead_gmsh22.msh', file_format="gmsh22")
I get the error:
"Warning: Appending zeros to replace the missing physical tag data.
Warning: Appending zeros to replace the missing geometrical tag data."

The meshio file does seem to load some of the information correctly, as the mesh object contains:
Number of points: 597752
Number of cells:
tetra: 3408851
Cell sets: BRAIN, CSF, SKULL, WHITE_MATTER, WHOLE_HEAD

@m-bellv
Copy link
Author

m-bellv commented Aug 26, 2024

The mesh.cell_sets_dict is showing up, making me think the cell sets are loading in correctly:

mesh.cell_sets_dict
Out[104]:
{'BRAIN': {'tetra': array([2654446, 2654447, 2654448, ..., 2889107, 2889108, 2889109],
dtype=int32)},
'CSF': {'tetra': array([3317305, 3317306, 3317307, ..., 3408848, 3408849, 3408850],
dtype=int32)},
'SKULL': {'tetra': array([2889110, 2889111, 2889112, ..., 3233049, 3233050, 3233051],
dtype=int32)},
'WHITE_MATTER': {'tetra': array([3233052, 3233053, 3233054, ..., 3317302, 3317303, 3317304],
dtype=int32)},
'WHOLE_HEAD': {'tetra': array([ 0, 1, 2, ..., 2654443, 2654444, 2654445],
dtype=int32)}}

However, the mesh.point_sets is empty, as is mesh.cell_data, and mesh.point_data, though mesh.points does contain the point location information, and mesh.cells_dict contains the point information for each cell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant