Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix unit conversion in openmc.deplete.Results.get_mass #2761

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

nplinden
Copy link
Contributor

@nplinden nplinden commented Nov 7, 2023

Description

The openmc.deplete.Results class provides a get_mass method that can provides mass values in g (default), g/cm3, and kg.
To convert from g to kg, the mass is multiplied by 1_000, which convert to mg instead.

Fixes

I changed to * operator to the / operator for correct conversion.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • 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)

@shimwell
Copy link
Member

shimwell commented Nov 7, 2023

Wow nice find @nplinden much appreciated. Also GitHub is telling me this is your first PR, welcome aboard.

@paulromano paulromano merged commit 910d1df into openmc-dev:develop Nov 9, 2023
16 checks passed
church89 pushed a commit to openmsr/openmc that referenced this pull request Jul 18, 2024
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