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

Compute homogenized materials over mesh elements #2971

Merged
merged 5 commits into from
May 2, 2024

Conversation

paulromano
Copy link
Contributor

Description

This PR adds a new get_homogenized_materials method to the MeshBase class that allows a user to easily get materials that have been homogenized over mesh elements. Right now, my main intended use case for this is mesh-based R2S calculations where the homogenized materials will be activated and lead to decay photon sources.

A few other notes about changes in this PR:

  • We had two separate change_directory context manager definitions in the code. I've centralized them in a new utility_funcs.py module and added an easy toggle for getting a temporary directory.
  • A check that was added by @shimwell in added check to length of input args for IndependantOperator #2799 was removed because it doesn't work for when multigroup fluxes are passed to IndependentOperator

@pshriwise @eepeterson Can one of you review this?

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)

Copy link
Contributor

@eepeterson eepeterson 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 the feature @paulromano! All looks good for now.

@eepeterson eepeterson merged commit 6e57f1d into openmc-dev:develop May 2, 2024
18 checks passed
@paulromano paulromano deleted the mix-material-mesh branch May 2, 2024 18:50
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.

2 participants