Closed paulromano closed 7 years ago
This is becoming a more complicated review than I anticipated. I'll have it done in an hour or two.
I've confirmed that this capability works with JEFF data (decay/FPY library from JEFF 3.1.1, neutron library from JEFF 3.2). There are a few neutron files that are badly formatted (e.g., Gd-152 is ISO-8859-1 encoded which is against ENDF rules) but once they are fixed everything runs fine. There are actually fewer errors reported (no fission products that don't have decay data, no missing reaction products).
So, last few notes, as this is close to merging.
import sys
in depletion_chain.py
isn't needed.Thanks for pointing me to tqdm
by the way, I love it. I'll get rid of the old full chain file. Do you want me to add in a chain file for JEFF too?
I'm not sure on JEFF. See, I don't know if it would ever be used before the chains are modified again for capture branching ratios. I'll leave that choice up to you.
Also, before I forget again, I did email Kord asking about how he would handle the missing yield data.
I guess I would use yield data for the closest isotope A number and scale to conserve mass.
Ugly call!
I am fine leaving it as is for now, as I would really rather do some research on the topic to see what is done elsewhere.
Good point, let's wait for branching ratios (I'll start cogitating on that one).
@cjosey I believe that I've addressed all your actionable comments. Let me know if I'm still missing something.
It all appears good. In fact, I was making one last check to ensure the yields were right and discovered that the old decay chain was much worse than it should've been. For example Xe135's U235 yield was the total yield (stable + metastable). So, I guess we can count this as a bugfix release.
This pull request makes some major changes to the
DepletionChain
class and modest changes toNuclide
. I've combined the data from theYield
class into theNuclide
class (as part of theyield_data
andyield_energies
attribute). Thus, now the decay, reaction Q values, and yield data appears together in the same class. Together with this, the format of the chain.xml file has also changed:<nuclide_table>
can now have adecay_energy
attribute<reaction_type>
can now have aQ
attributeQ
value for fission.<decay_type>
is used correctly now instead of being "?" everywhere. Additionally,multiple decays (e.g., beta-, n, n) are handled correctly.<neutron_fission_yields>
are now directly embedded in<nuclide_table>
. The hierarchy has also changed to better reflect how the data is actually stored in ENDF files. Namely, I allow the number of energies at which yields are tabulated and the list of products to vary by parent. As an example, here's what U235 looks likeThere is now a
make_depletion_chain
function that will create a chain file given a list of ENDF decay files, FPY files, and incident neutron files (used to get reaction Q values). When I create a chain file from ENDF/B-VII.1 data, there are a few data issues that should be noted:replace_missing
function in depletion_chain.py handles this gracefully by assuming that the daughter nuclides decay until a stable product is reached. Some heuristics are used to assume whether the missing daughter has a beta-, beta+, or alpha decay.The full test suite passes for me. I need to do some more testing with a full chain file generated from ENDF/B-VII.1 data, but thought I'd submit this PR so that you can start reviewing.