openmc-dev / openmc

OpenMC Monte Carlo Code
https://docs.openmc.org
Other
745 stars 481 forks source link

Reading Beta-decay energies from ENDF format files #1672

Closed dryuri92 closed 3 years ago

dryuri92 commented 3 years ago

I'm currently working on my depletion code validation with residual heat tests and using data generated by chain = openmc.deplete.Chain.from_endf(decay_files, nfy_files, neutron_files). I initially started with endfb-vii.1 library and results was fine except the first 10 seconds of heat measurement then i switched to jeff 3.3 lib and results have changed extrmely. As I supposed the main reason is the value of decay energy calculated as follows: nuclide.decay_energy = sum(E.nominal_value for E in data.average_energies.values()) (openmc/depletion/chain.py:398) with average_energies were read from *.endf file `ex = self.average_energies

        ex['light'] = ufloat(*pairs[0])
        ex['electromagnetic'] = ufloat(*pairs[1])
        ex['heavy'] = ufloat(*pairs[2])
        if NC == 17:
            ex['beta-'] = ufloat(*pairs[3])
            ex['beta+'] = ufloat(*pairs[4])
            ex['auger'] = ufloat(*pairs[5])
            ex['conversion'] = ufloat(*pairs[6])
            ex['gamma'] = ufloat(*pairs[7])
            ex['xray'] = ufloat(*pairs[8])
            ex['Bremsstrahlung'] = ufloat(*pairs[9])
            ex['annihilation'] = ufloat(*pairs[10])
            ex['alpha'] = ufloat(*pairs[11])
            ex['recoil'] = ufloat(*pairs[12])
            ex['SF'] = ufloat(*pairs[13])
            ex['neutron'] = ufloat(*pairs[14])
            ex['proton'] = ufloat(*pairs[15])
            ex['neutrino'] = ufloat(*pairs[16])`

(openmc/data/decay.py:351) Where the endfb lib contains only the first three records('light', 'electromagnetic', 'heavy') but the jeff along with these contains the rest 14 records. It seems to me to duplicating take places by simple sum over these 17 values in the case with jeff3.3 lib. I can fix it but i don't know how to do it properly. @paulromano @drewejohnson

paulromano commented 3 years ago

Thanks for reporting this @dryuri92. Your assessment is exactly right. I'll submit a pull request to fix this issue.