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

Tally factors for OpenMC volume and mass corrections. #360

Merged
merged 10 commits into from
Nov 28, 2024
Merged

Conversation

sbradnam
Copy link
Collaborator

Description

This pull requests adds the functionality required to renormlaise OpenMC output data into an equivalent form to the corresponding MCNP benchmark. This is done a tally_factors.yaml file, which must be located within the Benchmarks_Inputs folder:

Benchmark_Inputs/Test/openmc

An example has been developed for testing, and is included in:

tests/TestFiles/openmc/tally_factors.yaml

In addition, a volumes.json file should also be provided in the Benchmarks_Inputs folder, containing as a minimum the volumes of all tally cells:

Benchmark_Inputs/Test

The implementation has been made optional, therefore for any benchmarks where the native OpenMC and MCNP tally outputs are equivalent (for example, if the SD card is set to 1 on selected MCNP tallies), the additional yaml and json files are not required.

Baseline tally_factors.yaml and volumes.json files should be developed for each benchmark, and pushed to the IAEA-NDS/open_benchmarks repository.

It should also be noted that within this pull request, the ability to generate and run any computational benchmark in OpenMC has been enabled.

Type of change

Please select what type of change this is.

  • Bug fix (non-breaking change which fixes an issue)
  • New benchmark
    • Non-breaking change which entirely uses existing classes, structure etc
    • Breaking change which has implemented new/modified classes etc
  • New feature
    • Non-breaking change which adds functionality
    • Breaking change fix or feature that would cause existing functionality to not work as expected

Testing

Specific tests have been added to openmc_test.py, to test the reading of tally_factors.yaml and volumes.json. To test the application of mass and volume correction factors, existing numerical tests in test_tallies_to_dataframes have been updated accordingly.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • General testing
    • New and existing unit tests pass locally with my changes
    • Coverage is >80%

@sbradnam sbradnam requested a review from dodu94 November 27, 2024 14:07
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 94.61538% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
jade/openmc.py 95.28% 5 Missing ⚠️
jade/output.py 84.61% 2 Missing ⚠️
Files with missing lines Coverage Δ
jade/testrun.py 66.39% <100.00%> (+0.46%) ⬆️
jade/output.py 92.22% <84.61%> (-0.22%) ⬇️
jade/openmc.py 96.48% <95.28%> (-0.29%) ⬇️

Copy link
Member

@dodu94 dodu94 left a comment

Choose a reason for hiding this comment

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

Getting closer :D

@dodu94 dodu94 merged commit 51311a8 into developing Nov 28, 2024
9 checks passed
@dodu94 dodu94 deleted the omc-volumes branch November 28, 2024 08:55
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