Extracting endf library

Hi,

I am new to openmc and I am trying to create decay, neutron and fission yield files for my chain depletion on Jupyter notebook. I downloaded the ENDFB71.tar.xz library and extracted it with 7 zip, but it stayed as a .tar file. May I ask how to get those three files? Thanks.

The depletion chain file is a single XML file that contains information from the decay, fission yield, and incident neutron ENDF sublibraries and can be created using the openmc.deplete.Chain Python class. Each of the ENDF sublibraries typically contains one file per isotope. For example, the incident neutron sublibrary in ENDF/B-VII.1 has 423 files. I’m not sure which .tar.xz file you’re referring to, but if it’s the one distributed here, that tar file contains processed HDF5 data, not ENDF files. If you want the corresponding ENDF files, you can get them from NNDC.

That being said, we have pregenerated depletion chains (including for ENDF/B-VII.1) that you can download here. I would take a look at those first before you try generating your own.

Hi,

Thanks for the reply. I then tried to create a deplete chain containing four nuclides, but the .xml chain file was empty.


Do you have any idea why is that?

Your best option here is to use the Chain.reduce method, which can take a larger depletion chain and reduce it to a selected set of nuclides. If you really want a chain with only those four nuclides, you can run:

chain = openmc.deplete.Chain.from_endf(...)
small_chain = chain.reduce(['Al27', 'Mg24', 'Mg25', 'Mg26'], level=0)

This will result in a reduced chain with only those nuclides. However, note that Al27 will be completely isolated (i.e., reactions on Mg26 won’t produce any Al27). I would recommend letting the reduce method go one level further to establish the Mg26(n,γ)Mg27 → Al27 pathway:

small_chain = chain.reduce(['Al27', 'Mg24', 'Mg25', 'Mg26'], level=1)

This will give you a chain that includes 15 nuclides but establishes the connection between Mg and Al.

HI,

I then had an error, saying “IndexError: The following isotopes were not found in the chain: Mg24, Mg25, Al27, Mg26”. I think this might have to do with the files pathing. I basically just created paths directly to the sub-library folders, as shown in the following.


May I ask what is the correct way of doing it if this was the problem? Should I just use the openmc.data.endf.Evaluation instead?

The glob expressions you have there look ok. One thing that is wrong though is that the second argument to Chain.from_endf should be a list of fission product yield files, not thermal scattering files as you have.

Yes, I previously used the fission product yield files, but then I realised my nuclides are not fissionable or fissile. So, I replaced them with the thermal scattering files, to simulate the transmutation of aluminium alloy. Would that make any difference? Should I keep the fission product yield files?


Just want to add this to give an overview of my script.

Chain.from_endf will definitely not know what to do if you pass it thermal scattering files, so you should avoid that. Even though your reduced chain will not include any fissionable nuclides, your neutron_files does include nuclides that are fissionable. I would include the fission product yield files when you create chain with the understanding that they won’t be preset in the reduced small_chain that is produced immediately afterward.

Make sure that neutron_files is the third argument to Chain.from_endf, not the second.

I am still getting the same error here.

Hi,

I think I have found the reason. Please disregard my previous comment. Thanks for the help btw.