Add new div upper lower vars#4019
Merged
chris-ashe merged 6 commits intomainfrom Jan 20, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4019 +/- ##
==========================================
+ Coverage 46.49% 46.51% +0.01%
==========================================
Files 123 123
Lines 28777 28798 +21
==========================================
+ Hits 13381 13396 +15
- Misses 15396 15402 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… nuclear heat load
… nuclear heat load
…ate nuclear heat and radiation power
fa2a54a to
3dac541
Compare
3dac541 to
3b1cd7a
Compare
j-a-foster
approved these changes
Jan 20, 2026
Collaborator
j-a-foster
left a comment
There was a problem hiding this comment.
Happy with variable changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors how the number of divertors (
n_divertors) is managed throughout the codebase. The main change is to move the ownership ofn_divertorsfromphysics_variablesto a new home indivertor_variables, and to update all references accordingly. Additionally, new attributes for tracking upper and lower divertor heat loads are introduced, and relevant initialization and output routines are updated to use the new structure.The most important changes include:
Refactoring and Data Structure Updates:
Moved
n_divertorsfromphysics_variablestodivertor_variables, removed its definition and initialization fromphysics_variables.py, and updated all code to referencedivertor_variables.n_divertorsinstead ofphysics_variables.n_divertors.Updated the initialization logic in
init.pyto setdivertor_variables.n_divertorsinstead ofphysics_variables.n_divertorsbased on thei_single_nullflag. [1] [2]Enhancements to Divertor Variables:
Added new attributes to
divertor_variables.pyfor tracking lower and upper divertor neutron nuclear heat loads and incident radiation power (p_div_lower_nuclear_heat_mw,p_div_upper_nuclear_heat_mw,p_div_upper_rad_mw,p_div_lower_rad_mw), and initialized them ininit_divertor_variables().Implemented new
runmethods forLowerDivertorandUpperDivertorclasses to calculate and store these new heat load and radiation attributes.Imports and Consistency:
divertor_variablesis available where needed, and replaced usage ofphysics_variables.n_divertorswithdivertor_variables.n_divertorsthroughout the codebase for consistency.These changes centralize divertor-specific configuration and results within
divertor_variables, improving code organization and maintainability.## DescriptionChecklist
I confirm that I have completed the following checks: