Skip to content

Conversation

@paulromano
Copy link
Contributor

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, the Chain.from_endf method now has a reactions argument 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:

from openmc.deplete import chain

chain.Chain.from_endf(..., reactions=chain.REACTIONS.keys())

A few other small fixes/changes:

  • Made the reaction name for MT=34 consistent with others
  • Fixed the reaction name for MT=180
  • If a reaction product is missing during depletion chain generation, the replace_missing function is used to find a suitable replacement

@paulromano paulromano requested a review from shimwell July 23, 2020 17:52
@paulromano paulromano requested a review from drewejohnson as a code owner July 23, 2020 17:52
Copy link
Contributor

@drewejohnson drewejohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps something could be added to this doc string so users are more aware of that useful list of reactions in chain.Reactions.keys()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion @shimwell. I've just pushed a commit that adds documentation of REACTIONS and references it here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for that

@shimwell
Copy link
Member

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.

@drewejohnson
Copy link
Contributor

Based on the feedback by @shimwell #1618 (comment) and the updated documentation 3d35cd3, this looks good to go. Thanks @paulromano and @shimwell!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants