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

OpenMC general output processing for simple tokamak model #333

Merged
merged 62 commits into from
Nov 18, 2024

Conversation

sbradnam
Copy link
Collaborator

@sbradnam sbradnam commented Nov 1, 2024

Description

This is a first pass at implementing output data processing for a general computational benchmark in OpenMC. The approach uses the OpenMC. API to generate a native pandas dataframe for each tally, with subsequent post-processing conducted to formulate consistently with other simulation outputs. Further work is required to correctly normalize OpenMC. tally outputs, for example, applying volume corrections, and combining photon, positron and electron contributions for photon heating tallies. So far, this has been demonstrated for the new Simple Tokamak benchmark.

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 exisiting 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

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • tests/output_test : test_single_output_openmc has been updated to mimic test_single_output_mcnp. Previously, this test was merely a skeleton test to check OpenMC. metadata and code version parsing.

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 1, 2024 14:43
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 91.56939% with 65 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
jade/sphereoutput.py 90.72% 32 Missing ⚠️
jade/output.py 93.41% 21 Missing ⚠️
jade/expoutput.py 91.56% 7 Missing ⚠️
jade/postprocess.py 28.57% 5 Missing ⚠️
Files with missing lines Coverage Δ
jade/openmc.py 95.53% <100.00%> (+0.58%) ⬆️
jade/postprocess.py 34.83% <28.57%> (-1.64%) ⬇️
jade/expoutput.py 93.60% <91.56%> (+0.11%) ⬆️
jade/output.py 92.78% <93.41%> (+17.85%) ⬆️
jade/sphereoutput.py 94.72% <90.72%> (-1.41%) ⬇️

@dodu94
Copy link
Member

dodu94 commented Nov 6, 2024

before considering approving we need to go through the type hint and docstring of output.py, expoutput.py and sphereoutput.py

@dodu94 dodu94 marked this pull request as draft November 6, 2024 15:53
@dodu94 dodu94 mentioned this pull request Nov 7, 2024
18 tasks
@alexvalentine94 alexvalentine94 marked this pull request as ready for review November 18, 2024 14:40
Copy link
Collaborator

@alexvalentine94 alexvalentine94 left a comment

Choose a reason for hiding this comment

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

Changes to increase level of abstraction and first implementation for capability to process OpenMC outputs using the API. Very nice additions plus substantial improvement to docstrings across codebase.

@alexvalentine94 alexvalentine94 merged commit 97f93bd into developing Nov 18, 2024
9 checks passed
@dodu94 dodu94 deleted the omc-tokamak-out branch November 18, 2024 14:57
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.

3 participants