Custom S Alpha Beta Libraries

Hi all. I’m trying use an Sab set I have for 20% porous graphite. It was originally ace formatted, but I made some tweaks to this conversion script ( data/convert_lib80x.py at bcc99743f5c0efa0d7f3821201e04a31f8fd1d0d · openmc-dev/data · GitHub ) to convert it to the proper format and add it to my cross_sections.xml file. When I try to add the data to a material using the call material_name.add_s_alpha_beta(“c_graphite_20p”), OpenMC doesn’t recognize the name of this dataset and instead assigns the c_Graphite_30p data. Is there a way to force OpenMC to add my Sab library without manually adding the new Sab library into the _THERMAL_NAMES dictionary within the openmc/data/thermal.py file? Thanks!
-Josh

Hi Josh - thanks for sending your cross_sections.xml file separately. From that file, it looks like you’ve named the S(a,b) data set as “c_Graphite_20p”, but are using “c_graphite_20p” in your script? Here’s what I see in your cross_sections.xml:

 <library materials="c_Graphite_20p" path="home/josh/openmc_cross_sections/c_Graphite_20p.h5" type="thermal" />

Would you please try using the case-sensitive file name?

April, I checked the cases across my files and they seem to be consistent across the files. I’m realizing now that I mistyped in the forum post above. In my materials files I am actually using the call material_name.add_s_alpha_beta(“c_Graphite_20p”). Sorry for the confusion!

As suggested by April offline, in the same file as the material definition with the custom Sab library, adding the following code will prevent renaming the associated library:

import openmc.data.thermal as d
d._THERMAL_NAMES["c_Graphite_20p"] = "c_Graphite_20p"

Thanks April!

1 Like