Repository navigation
Add decay heat function in material - #2287
Conversation
|
Thanks for making this PR, I am keen to see such a feature adding. Nice work I've made a few tiny comments for your consideration. The main thing I am wondering about is. Should we get the decay energy from a chain_file.xml instead of an additional json file. This would allow us to separate the decay heat for different particles and be consistent with the decay data. With decay data from separate particles we could compare with plots like these |
Thanks for your comments. |
paulromano
left a comment
There was a problem hiding this comment.
Thanks for the updates @jiankai-yu! A few more small changes and this should be good to go.
paulromano
left a comment
There was a problem hiding this comment.
Thanks for the updates @jiankai-yu! One final thing I forgot to mention before -- can you add the openmc.data.decay_energy function to docs/source/pythonapi/data.rst so that it is included in the documentation? Namely, in this section:
https://github.com/openmc-dev/openmc/blob/develop/docs/source/pythonapi/data.rst#core-functions
Added. Thanks for your reminder. |
* add decay heat in material.py * add decay_energy.json into eggs * fix a bug when returned decay_ery is None * add unit test for decayheat * fix typo in doc string * address reviewer's comments * add user defined decay energy * remove json for decay energy * address a few comments * add to docs
Recently I have been asked to extract decay heat from depleted materials. This PR is to add
get_decayheat()function apart fromget_activity()function in material. Its implementation is based ondecay_energy.json, just likehalf_life.jsonfor activity extraction. The extraction of decay heat from depleted materials can be done like this:The unit test is also borrowed from activity's test and adjusted to decay heat.
Any comment is welcome.