Getting volume numbers with materials from h5m file

48 views
Skip to first unread message

drshi...@gmail.com

unread,
Sep 6, 2021, 5:43:16 PM9/6/21
to DAGMC Users and Collaborators
Hi all

Just wondering if anyone has suggestions for getting some data from a DAGMC.h5m file with Pymoab

I am looking for a method of getting the volume ids with their corresponding material tags from a DAGMC h5m file using pymoab

I have a method of getting volume ids from a h5m file

I also have a method of getting material tags from a h5m file

I just can't do the two operations together to produce a list that contains both volume ids and their material tags like this

mat tag 'steel' volume id 1
mat tag 'steel' volume id 2
mat tag 'water' volume id 3
mat tag 'gold' volume id 4


Many thanks

Jon

Paul Wilson

unread,
Sep 7, 2021, 10:48:49 AM9/7/21
to dagmc...@googlegroups.com, drshi...@gmail.com

Hi Jon,

I think you have almost all the pieces.

I threw together this as better than pseudo-code.  It has not been tested and is sure to have bugs, but it gives you the basic process.

Paul

--
You received this message because you are subscribed to the Google Groups "DAGMC Users and Collaborators" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dagmc-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dagmc-users/ac4ae018-3463-46a5-bd4c-f652dad21786n%40googlegroups.com.
--
-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --
Paul P.H. Wilson (he/him/his)
Grainger Professor of Nuclear Engineering
Chair, Department of Engineering Physics
o: 608-263-0807, c: 608-469-9615
paul....@wisc.edu
153 Engineering Research Bldg
1500 Engineering Dr, Madison, WI 53706
Zoom Meeting Room: https://uwmadison.zoom.us/j/6082630807
Zoom Phone Access: +1-929-205-6099, Access code: 6082630807

Computational Nuclear Engineering Research Group

drshi...@gmail.com

unread,
Sep 9, 2021, 5:34:06 PM9/9/21
to DAGMC Users and Collaborators
Thanks Paul

The code you made was super useful. with your help I made a pip installable package.

dagmc_h5m_file_inspector is a minimal Python package for finding DAGMC volume ids with their material tags.

Just in case this is useful to anyone else here is a link


All the best

Jon
Reply all
Reply to author
Forward
0 new messages