Skip to content

Support expanding elements in MCNP by weight percent#102

Merged
nstauff merged 5 commits intowatts-dev:developmentfrom
paulromano:mcnp-expand-weight
Jun 28, 2023
Merged

Support expanding elements in MCNP by weight percent#102
nstauff merged 5 commits intowatts-dev:developmentfrom
paulromano:mcnp-expand-weight

Conversation

@paulromano
Copy link
Copy Markdown
Contributor

@paulromano paulromano commented Jun 26, 2023

Description

Current, the PluginMCNP class allows a user to expand elements that appear in a material definition according to their naturally occurring isotopes. However, this only works when the corresponding fraction is given as an atom percent. This PR extends this capability to work for weight fractions (specified as negative numbers in a MCNP material card).

Note that this required access to atomic masses, which I've pulled in from the AME2020 data file.

Fixes #101

Checklist:

  • My code follows the style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have updated the CHANGELOG.md file (if applicable)
  • I have successfully run examples that may be affected by my changes

@paulromano paulromano requested a review from nstauff June 26, 2023 19:11
Copy link
Copy Markdown
Contributor

@nstauff nstauff left a comment

Choose a reason for hiding this comment

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

Thanks for this development. do you want to mention this in the documentation? https://watts.readthedocs.io/en/latest/user/plugins.html

@paulromano
Copy link
Copy Markdown
Contributor Author

@nstauff Just updated the example in the documentation to use weight fractions

@nstauff nstauff merged commit 8e4d6f2 into watts-dev:development Jun 28, 2023
@paulromano paulromano deleted the mcnp-expand-weight branch July 10, 2023 20:39
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.

Natural element expansion support when using weight fractions

2 participants