Skip to content

OpenMC Depletion

Kiesling, Kalin Rose requested to merge depletion into development

Prerequisites Checklist

Self-review checklist:

  • My code follows the style guidelines and software coding standards for this project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added appropriate tests that prove my fix/feature is effective.
  • If the source branch will not be used after this MR, I have set it to be deleted upon merging.

Documentation checklist:

  • I have checked the README and updated it if necessary.
  • I have checked the tutorial and made any documenation or results updates if necessary.
  • I have updated the CHANGELOG.

Does this MR relate to a specific issue? If so, link the issue.

Fixes # (issue)

Description of Changes

This adds the capability to perform OpenMC depletion calculations. Addition of this capability is a BREAKING change because the format of the output results have changed (both as they are written in the files and slight modification to the user_object.results).

I created a new tutorial (sample 19) to demonstrate just the depletion capability since sample 18 was becoming very lengthy. I felt that this was a good separation of material.

Other changes that were made but are not necessarily depletion specific:

  • Additional minor changes have been made to the geometry construction just to be compatible with newer versions of OpenMC (mainly the creation of hex/square prisms has changed and how to define a fissionable source).
  • Added a function in the main test class to check for error and warning files for specified messages (ie, to be able to check that expected warnings/errors are reported).
  • I also took the opportunity to update the tally templates to use the variants options to hopefully make that a bit more user-friendly as well.
  • OpenMC tally test results had to be updated because it now required a source box to be defined (otherwise OpenMC errored out with having too many source particles rejected). This changed the output results, which accounts for the very large diff on those expected test output files.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected or break backwards compatibility)

Additional Information

This depletion capability requires OpenMC v >= 0.14.0 and python v >= 3.10 (updated the install scripts to use the newest v0.15.0). In order to properly test this on CI, I have updated CI to use WB 5.4.0 (current release) but it will use a modified entry.sh script to do the initial WB conda setup so that it has the correct python version. WB <=5.4.0 uses python 3.8, so this is a temporary modification suggested by Rob in order to properly test and be a part of the WB 5.5.0 release. Once WB 5.5.0 is released (which will include this change), CI can be returned to normal (no modified entry.sh script) and use WB 5.5.0. I have been testing/running locally on my Mac with WB 5.5.0 to make sure that it works in that python environment too.

IMPORTANT NOTE:

The tutorial problem takes a very long time to run (even with the smaller number of histories, batches, and fewer depletion timesteps), so I am still waiting on the sample to run fully. I will add in the sample output and expected summary/extended summary files when it finishes. Once that is complete, I will still need to re-run both Sample 18 and 19 with the higher number of histories/batches and full depletion timeline in order to add/update the results in the ARC comparison section of each tutorial. Lack of these results should not prevent you from starting this review, but it should not be merged until I can add those updated results in.

Merge request reports

Loading