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

Final Edits and Comparison with Cycamore #17

Merged
merged 63 commits into from
Sep 13, 2023
Merged

Conversation

abachma2
Copy link
Collaborator

This PR got a bit bigger than I intended, so apologizes in advance.

This PR includes:

  • updates to the README on how to install dependencies and define a prototype using this archetype
  • remove files that aren't needed anymore from the examples directory
  • Update the archetype file (openmcyclus/DepleteReactor.py) include:
    • Updating datatypes, doc strings, and defaults for different state variables
    • Adding new state variables (or moving variables to be state variables) to match better with the Cycamore Reactor archetype
    • Adding capacities for the ResBufMaterialInvs
    • Request tracked materials
    • Defining requests to be exclusive (must be met in full, no partial fuel assemblies)
    • Remove recording information about the discharged assemblies to the database (no longer needed with the requested material being tracked)
    • Reflect changes to the Depletion class
    • Add function to record the position of the archetype to the database
  • Updates to the Depletion (openmcyclus/depletion.py) class include:
    • Reading in only materials instead of an entire model
    • Passing the updated materials from update_materials instead of writing to the materials.xml file
    • Update the run_depletion method to better match what is done in DepleteReactor
    • Add conversion of atom fraction to weight fraction to get_spent_comps()
  • Update the unit tests to reflect the changes in openmcyclus/depletion.py
  • Add a directory for the comparison with Cycamore:
    • comparison/Comparison-results.ipynb to hold the results of the comparison
    • comparison/OpenMC_model.ipynb to show how the cross sections were generated for OpenMCyclus, and the spent fuel compositions that were used in Cycamore
    • comparison/cycamore_recycle.xml: Cyclus input file using the Cycamore Reactor archetype
    • comparison/openmcyclus_recycle.xml: Cyclus input file using the OpenMCyclus DepleteReactor archetype

The CI is still broken, partly because of Issue #12. This will be investigated and updated in a future PR. The unit tests all pass locally. This PR should conclude the primary development of OpenMCyclus::DepleteReactor!

abachma2 added 30 commits June 26, 2023 16:23
Updated based on using a smaller power level to reach a burnup of 50 MWd/kgU and not fry the fuel trying to get 100 MW out of it.
Previous power level of 100 MW and mass of 100 kg (arbitarily chosen)
were too high to correspond to a single pin cell model. Lower the power
level to match a burnup of 50 MWd/kgU, and the mass to
correspond to the volume and density of the fuel. Results still seem
a little funky, but it shoul dbe a more accurate/realstic simulation
changed the power to a lienar power density (2-D geometry).
I also updated OpenMC, so the cross sections created by OpenMC
include many more nuclides. Updated the power for the prototypes
to match the needed power for the linear power density
The compositions are correct, but the spent fuel isn't being
recorded as traded away.
@abachma2 abachma2 added the Type:Test Is related to software testing. Failing tests, necessary new tests, test frameworks, etc. label Jul 20, 2023
Copy link
Contributor

@yardasol yardasol left a comment

Choose a reason for hiding this comment

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

Hi @abachma2, apologies for the late review on this.

in Comparison-results.ipynb, it is difficult to see the lines for the OpenMCylcus results in
your figures. I'd reccomend using a different line style (maybe try using dots: '.')

My other comments are below.

@abachma2 abachma2 requested a review from yardasol July 31, 2023 14:18
@abachma2
Copy link
Collaborator Author

To help speed up run times, I have added in some arrays to keep track of pre-depletion and post-depletion fuel compositions. If all of the pre-depletion compositions have been seen before (i.e., are in the pre-depletion composition array) then the corresponding post-depletion composition is applied to each of the assemblies instead of re-running the depletion solver.

Copy link

@smpark7 smpark7 left a comment

Choose a reason for hiding this comment

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

Good job with maintaining good documentation and tests.

Do you have any comments to add for differences observed in the comparison results plots? E.g. whether the differences are expected and why they appear.

My suggestions for other changes are provided below.

Copy link

@smpark7 smpark7 left a comment

Choose a reason for hiding this comment

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

I approve but I assume we're waiting on @yardasol's comments. Remember to test locally again if you made new changes to your tests during the review period.

@abachma2
Copy link
Collaborator Author

abachma2 commented Sep 5, 2023

@yardasol Do you have any other comments or suggested changes for this PR?

Copy link
Contributor

@yardasol yardasol left a comment

Choose a reason for hiding this comment

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

Hi @abachma2,

This is almost ready for merge. Looks like you resolved a couple of my comments without actually making any code changes. I've added additional in-line commments with some more context and unresolved those comments. Also, there are several code comments that should be deleted.

@abachma2
Copy link
Collaborator Author

Thanks for the feedback @yardasol. I think I have addressed your comments now (I must have missed a few from your last review, my apologies).

@abachma2 abachma2 requested a review from yardasol September 13, 2023 21:23
Copy link
Contributor

@yardasol yardasol left a comment

Choose a reason for hiding this comment

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

Great work @abachma2. Just one more comment to remove then I can merge

Co-authored-by: Olek <45364492+yardasol@users.noreply.github.com>
@abachma2 abachma2 requested a review from yardasol September 13, 2023 22:29
@yardasol yardasol merged commit 750d6e1 into arfc:main Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Comp:Analysis This issue has to do with the analysis component of the code or document. (plots, postprocessing) Comp:Core This issue has to do with the main bulk of the code or document. (methods, main content) Difficulty:2-Challenging This issue may be complex or require specialized skills. Priority:2-Normal This work is important and should be completed ASAP. Status:5-In Review This issue has been handled, and the solution is being reviewed. (probably as a PR) Type:Docs Is related to API documentation, website content, etc. Type:Feature New feature or feature request Type:Test Is related to software testing. Failing tests, necessary new tests, test frameworks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants