Allow reactions included in depletion chain to be configured#1618
Allow reactions included in depletion chain to be configured#1618drewejohnson merged 7 commits intoopenmc-dev:developfrom
Conversation
drewejohnson
left a comment
There was a problem hiding this comment.
No major issues on my end. Would like to hear what @shimwell or other fusion people think
| reactions : iterable of str, optional | ||
| Transmutation reactions to include in the depletion chain, e.g., | ||
| `["(n,2n)", "(n,gamma)"]`. Note that fission is always included if | ||
| it is present. |
There was a problem hiding this comment.
Perhaps something could be added to this doc string so users are more aware of that useful list of reactions in chain.Reactions.keys()
There was a problem hiding this comment.
Good suggestion @shimwell. I've just pushed a commit that adds documentation of REACTIONS and references it here.
|
That looks most useful. reactions using the same defaults as before but also allowing a much larger list to be added. Not sure I would have spotted that useful list of reactions available in chain.REACTIONS.keys() without seeing your example and reading the source code. Wondering if that could be hinted at in the documentation or docstring. |
|
Based on the feedback by @shimwell #1618 (comment) and the updated documentation 3d35cd3, this looks good to go. Thanks @paulromano and @shimwell! |
Allow reactions included in depletion chain to be configured
This pull request expands the list of (possible) transmutation reactions in the deplete/chain.py module. There is now a global dictionary,
REACTIONS, that contains all the necessary information for each transmutation reaction. To actually choose which reactions should be included in a depletion chain, theChain.from_endfmethod now has areactionsargument that takes an iterable of reaction names, e.g.["(n,2n)", "(n,3n)", "(n,gamma)"]. The default list of reactions is still the same as it was before.I've been able to use these capabilities to generate a depletion chain using TENDL-2019 with 36 reactions present (for fusion applications). The way it works is roughly:
A few other small fixes/changes:
replace_missingfunction is used to find a suitable replacement