TypeError: Results.export_to_materials() got an unexpected keyword argument 'path'

Hi, I’m using openmc depletion plotter to try and plot the activation of my blanket module.

When I run the code, it generates the following error:

I’m pretty sure everything is up to date, and that it’s an issue with depletion plotter being unable to find the depletion results. I’ve tried running this through Jupyter notebook and the graphical interface and both throw the same error. You can see in the attached script I’ve tried a few things to fix it but truth be told I don’t really know what I’m doing.
blanket_activation_2 (working).py (10.1 KB)

I think this task and the depletion plotter currently requires the develop branch of openmc, sorry about that. The task works if you run it within the neutronics workshop docker image or build openmc from source. Otherwise you might have to wait for the next release of openmc

Gotcha. It seems my options are:

  1. Run in docker container. This has the issue of not having (n,t) in the cross sections.
    Is there a way to fix this, eg pass a cross sections file to docker?

  2. Run in Jupyter notebook. Then getting the results from the simulation is tricky.
    I need a list of atoms created in the blanket and their activity. Currently I’m using:

times, number_of_T_atoms_1 = results.get_atoms(breeder_mat_1, ‘H3’)
but this requires I know all the atoms produced in the first place and manually select which ones to obtain. It also doesn’t give me activity. Is there a better way to obtain the results in a decent format?
Thanks

Hi, I’ve been using the depletion plotter in the docker container and have noticed it seems to plot low values for number of atoms:

Any idea what’s going on here?

Sorry about that, I think the depletion plotter currently plots atom density in the material instead of number of atoms.

So I think the shape is probably right but I should fix that, thanks for letting me know

Hi, I think it’s still plotting atom density since I’m still getting pretty low values.
Also is there a way to tell the package to only plot radioactive nuclides since my plots are dominated by built up stable nuclides?

sorry I’ve not had time to make it plot the number of atoms yet. I’m not sure when I will get time to fix it as I’ve got lots of geometry plotting tasks at the moment. If you have time please feel free to take a peak at the package source code and see if there is an easy change to be made. The relevant part of the code is here

For the removal of stable isotopes you might find passing in the original undepleted material to the exclude material helps remove the stables. You could also make a material containing jsut the stable isotopes you want to remove and pass that in.

This example shows use of the keyword in the python api

in the gui this checkbox should do the same
Screenshot from 2023-04-19 12-34-47

This PR attempts to fix the bug reported in this thread where the number of atoms was not being found correctly.

This is now included in the latest version

pip install openmc_depletion_plotter==0.3.3