Skip to content

Add plasma neutron surface power#4087

Merged
timothy-nunn merged 3 commits intomainfrom
add_plasma_neutron_surface_power
Feb 10, 2026
Merged

Add plasma neutron surface power#4087
timothy-nunn merged 3 commits intomainfrom
add_plasma_neutron_surface_power

Conversation

@chris-ashe
Copy link
Collaborator

@chris-ashe chris-ashe commented Feb 8, 2026

This pull request introduces a new physics variable to track the average neutron flux at the plasma surface and integrates it throughout the codebase. The changes ensure this value is calculated, initialized, displayed in plots, and outputted for analysis. Here are the most important updates, grouped by theme:

Addition and Initialization of New Variable:

  • Added plfux_plasma_surface_neutron_avg_mw to physics_variables.py and initialized it in init_physics_variables() to enable tracking of the average neutron flux at the plasma surface.
    Calculation Logic:

  • Computed plfux_plasma_surface_neutron_avg_mw in the physics() method by dividing total neutron power by plasma surface area, ensuring accurate physics modeling.

Output and Visualization:

  • Added plfux_plasma_surface_neutron_avg_mw to the output in outplas() for reporting and analysis.
  • Updated plot_main_plasma_information() to display the new neutron flux value in plasma information plots, improving data visualization

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@chris-ashe chris-ashe added the Physics Relating to the physics models label Feb 8, 2026
@chris-ashe chris-ashe requested a review from a team as a code owner February 8, 2026 22:30
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.47%. Comparing base (ca03a41) to head (43e060e).

Files with missing lines Patch % Lines
process/physics.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4087   +/-   ##
=======================================
  Coverage   46.47%   46.47%           
=======================================
  Files         123      123           
  Lines       28902    28907    +5     
=======================================
+ Hits        13432    13435    +3     
- Misses      15470    15472    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timothy-nunn timothy-nunn self-assigned this Feb 10, 2026
Copy link
Collaborator

@j-a-foster j-a-foster left a comment

Choose a reason for hiding this comment

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

Happy with changes.

Copy link
Collaborator

@timothy-nunn timothy-nunn left a comment

Choose a reason for hiding this comment

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

Happy with code changes, JF happy too

@timothy-nunn timothy-nunn merged commit 31ad61d into main Feb 10, 2026
8 of 10 checks passed
@timothy-nunn timothy-nunn deleted the add_plasma_neutron_surface_power branch February 10, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Variables Physics Relating to the physics models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants