Hello,
I was thinking if there is anyway to set depletion chain as environment variable like as we set cross-section path as environment variable. Is there anyway to do this? Also, is it possible to embed the depletion chain file in the cross-section library ?
There used to be an environment variable that was used for just this purpose, but it was removed in #1247
However, you can add the depletion chain to the cross section file pointed at by OPENMC_CROSS_SECTIONS. The best way to do this is with openmc.data.DataLibrary.register_file
import openmc.data
lib = openmc.data.DataLibrary.from_xml() # looks for OPENMC_CROSS_SECTIONS if not path provided
lib.register_file()
lib.export_to_xml()
Then you can update your OPENMC_CROSS_SECTIONS environment variable to point to this new file, or move the new file to the existing location. Alternatively. you could use os.environ to export the new library directly to the path indicated by the environment variable.
It should be said that you may want to make a backup cross sections file before overwriting the file at OPENMC_CROSS_SECTIONS
Regards,
Andrew