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

Get OpenMC to use DAGMC to automatically get cell volume information #3334

Open
jon-proximafusion opened this issue Mar 3, 2025 · 0 comments

Comments

@jon-proximafusion
Copy link
Contributor

jon-proximafusion commented Mar 3, 2025

Description

Feature request: An easy way of getting the DAGMC volume information in cm3 for each DAGMC cell.

I am doing a depletion simulation with DAGMC geometry and a couple of stages felt a bit clunky to me.

Finding the volumes of each material tag in the DAGMC geometry requires another package and the needs to load up the dagmc h5m file separately (which in my case takes a while as the geometry is large)

given that DAGMC knows the volume of these cells could we not add that information in at run time automatically? Then the user would not have to find the volumes (which is not easy and takes an extra file load).

Or perhaps e could add some code the openmc.DAGMCUniverse class so that it offers an API to find the volumes of a given material tag or ID

Alternatives

Alternative 1
Install this package https://github.com/svalinn/pydagmc/ and then load up the DAGMC volumes

import dagmc
dagmc_model = dagmc.DAGModel('dagmc.h5m')
material_volume_dic = {}
for entry in dagmc_model.volumes:
    print(f"id={entry.id} volume={entry.volume}, mat={entry.material}")
    material_volume_dic[entry.material] = entry.volume

Alternative 2
Use the stochastic volume calculation in OpenMC to find these volumes

Compatibility

This would be an additional feature

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