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

moved diff_burnable_mat to model #2718

Conversation

shimwell
Copy link
Member

@shimwell shimwell commented Oct 3, 2023

Description

It would be useful for cell based R2S simulations to be able to call diff_burnable_mats on the Model class. Then users can call model.diff_burnable_mats before calling a volume calculation. It is useful to carry out a volume calculation to get the cell/material volumes needed for depletion simulations after the materials have been diffed. Full motivation in #2714

Would it be acceptable to move the function to the model.py? We do have a few other methods that operate on materials in the Model class like update_material_volumes.

This would not change or break behavior for users that want to diff_burnablemats when calling the deplete method

Fixes # (issue)
#2714

Checklist

  • I have performed a self-review of my own code
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)

Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

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

Good idea @shimwell 👍 two comments below:

openmc/model/model.py Outdated Show resolved Hide resolved
openmc/model/model.py Outdated Show resolved Hide resolved
openmc/model/model.py Outdated Show resolved Hide resolved
openmc/model/model.py Outdated Show resolved Hide resolved
openmc/model/model.py Outdated Show resolved Hide resolved
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
@shimwell shimwell linked an issue Oct 10, 2023 that may be closed by this pull request
updating branch with fix on develop
@shimwell
Copy link
Member Author

shimwell commented Oct 13, 2023

Thanks for fixing the tests @pshriwise

Looks like this PR is now passing the tests again.

https://github.com/openmc-dev/openmc/actions/runs/6506983030

@paulromano paulromano merged commit 03c1c6a into openmc-dev:develop Oct 17, 2023
18 checks passed
stchaker pushed a commit to stchaker/openmc that referenced this pull request Oct 25, 2023
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
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.

Feature request move _differentiate_burnable_mats to model class
2 participants