Creating nuclide-specific tallies in transport-coupled depletion

I am trying to calculate neurotics parameters (breeding ratio, \beta_\text{eff}, etc) from a depletion simulation by defining tallies. For example, for the breeding ratio, going off of this post on the forums, I want to tally (n,gamma) for fertile nuclides and absoprtion for all fissionable nuclides, sum each of them up, then divide them.

Unfortunately, I’m having trouble tallying these quantities for specific nuclides that are not initially present in the materials.xml file. When I try to run my simulation, I get the following error:

                                %%%%%%%%%%%%%%%
                           %%%%%%%%%%%%%%%%%%%%%%%%
                        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                    %%%%%%%%%%%%%%%%%%%%%%%%
                                     %%%%%%%%%%%%%%%%%%%%%%%%
                 ###############      %%%%%%%%%%%%%%%%%%%%%%%%
                ##################     %%%%%%%%%%%%%%%%%%%%%%%
                ###################     %%%%%%%%%%%%%%%%%%%%%%%
                ####################     %%%%%%%%%%%%%%%%%%%%%%
                #####################     %%%%%%%%%%%%%%%%%%%%%
                ######################     %%%%%%%%%%%%%%%%%%%%
                #######################     %%%%%%%%%%%%%%%%%%
                 #######################     %%%%%%%%%%%%%%%%%
                 ######################     %%%%%%%%%%%%%%%%%
                  ####################     %%%%%%%%%%%%%%%%%
                    #################     %%%%%%%%%%%%%%%%%
                     ###############     %%%%%%%%%%%%%%%%
                       ############     %%%%%%%%%%%%%%%
                          ########     %%%%%%%%%%%%%%
                                      %%%%%%%%%%%

                 | The OpenMC Monte Carlo Code
       Copyright | 2011-2022 MIT, UChicago Argonne LLC, and contributors
         License | https://docs.openmc.org/en/latest/license.html
         Version | 0.13.3-dev
        Git SHA1 | 309c78dc786beb25fe92b271fdd2bd4c6b3ee153
       Date/Time | 2023-02-03 12:23:00
  OpenMP Threads | 12

 Reading settings XML file...
 Reading cross sections XML file...
 Reading materials XML file...
 Reading geometry XML file...
 Reading U234 from
 /home/ooblack/projects/cross-section-libraries/endfb71_hdf5/U234.h5
 Reading U235 from
 /home/ooblack/projects/cross-section-libraries/endfb71_hdf5/U235.h5
 Reading U238 from
 /home/ooblack/projects/cross-section-libraries/endfb71_hdf5/U238.h5
 Reading O16 from
 /home/ooblack/projects/cross-section-libraries/endfb71_hdf5/O16.h5
 Reading O17 from
 /home/ooblack/projects/cross-section-libraries/endfb71_hdf5/O17.h5
 Reading U236 from
 /home/ooblack/projects/cross-section-libraries/endfb71_hdf5/U236.h5
 Reading H1 from
 /home/ooblack/projects/cross-section-libraries/endfb71_hdf5/H1.h5
 Reading H2 from
 /home/ooblack/projects/cross-section-libraries/endfb71_hdf5/H2.h5
 Minimum neutron data temperature: 294 K
 Maximum neutron data temperature: 294 K
 Reading tallies XML file...
 ERROR: Could not find the nuclide I135 specified in tally 1 in any material

I know this is happening because I am specifying a nuclide to tally that has not been loaded (I know that I135 is not a fissionable nuclide, but this loading error will occur for the fertile/fissionable nuclides in my depletion chain that I want to tally)

I am trying to figure out a way to get the necessary nuclide data loaded so that this error doesn’t occur, and also doesn’t interfere with the depletion simulation tallies. Alternatively, I could try to load the tallies after the initial loading. All signs are pointing to me needing to use openmc.lib, but I’m not sure if that module has the full capabilities I need (for example if I want to use a UniverseFilter). I’d appreciate some guidance on this.

Here are my model files:
geometry.xml (622 Bytes)
materials.xml (792 Bytes)
tallies.xml (319 Bytes)
settings.xml (193 Bytes)

And here’s a dummy script:
deplete_with_tallies.py (248 Bytes)

I feel your pain @oyardas2. Can you add the nuclide in question to the material at a very low concentration (akin to what the depletion module does behind the scenes)?

I’m actually thinking we need a refactor of the tally capabilities to be able to tally nuclide-specific reaction rates without them being present in materials (depletion or otherwise). I’m planning on spending some time on this in the near future, so hopefully this will be a lot easier soon!

Hi Paul,

This is the solution I ended up going with. It turns out it’s actually really easy to do if you want OpenMC to do this automatically: you can use MicroXS._add_dilute_nuclides() since it’s a class method and doesn’t require you to actually have a instantiated MicroXS object!

I’m looking forward to seeing the tallying functionality overhauled, but that sounds like a lot of work!

1 Like