Skip to content

♻️ Refactor Bruner div heat split - #4511

Open
chris-ashe wants to merge 27 commits into
mainfrom
add_bruner_div_heat_split
Open

♻️ Refactor Bruner div heat split#4511
chris-ashe wants to merge 27 commits into
mainfrom
add_bruner_div_heat_split

Conversation

@chris-ashe

@chris-ashe chris-ashe commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Description

This pull request introduces significant improvements to the plasma exhaust modeling and visualization in PROCESS. The main changes include the addition of new documentation for plasma exhaust physics, refactoring and renaming of variables related to divertor power splits for clarity and consistency, and the implementation of new plotting functions to visualize separatrix power splits and Brunner model power sharing. These updates enhance both the usability and accuracy of the plasma exhaust modeling, while also improving the documentation and user interface.

Plasma Exhaust Modeling and Documentation:

  • Added a comprehensive new documentation page (plasma_exhaust.md) describing separatrix power, divertor protection metrics, and the Brunner model for power splits.
  • Added Plasma Exhaust to the navigation in mkdocs.yml for easier access to the new documentation.

Variable Renaming and Data Structure Updates:

  • Refactored all instances of f_p_div_lower to f_p_div_lower_separatrix and updated related obsolete variable mappings for clarity and consistency in input, scan, and obsolete variable code.
  • Expanded PhysicsData to include explicit variables for separatrix power splits and target powers (e.g., f_p_div_inboard_separatrix, p_div_lower_inboard_separatrix_mw, etc.), replacing ambiguous or legacy variable names.

Visualization and Plotting Enhancements:

  • Added two new plotting functions: one for visualizing Brunner divertor power splits as a stack plot, and another for displaying separatrix power splits as a bar chart, both integrated into the summary plotting workflow.
  • Ensured that these new visualizations are included in the plasma exhaust summary page for improved user analysis.

Large tokamak

image

ST

image

Codebase Maintenance:

  • Updated imports and references to support new models and maintain code clarity, including importing DivertorNumberModels and PlasmaExhaust where required. [1] [2]

These changes collectively improve the clarity, maintainability, and scientific accuracy of the plasma exhaust modeling in PROCESS, while also enhancing the user experience through better documentation and 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 Physics Relating to the physics models Divertor Scrape off Layer Relating to the scrape off layer outside the plasma separatrix labels Aug 10, 2026
@codecov-commenter

codecov-commenter commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 34.53608% with 127 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.26%. Comparing base (c0ae5b2) to head (7769f8a).

Files with missing lines Patch % Lines
process/core/io/plot/summary.py 4.76% 80 Missing ⚠️
process/models/physics/exhaust.py 55.17% 26 Missing ⚠️
process/models/physics/physics.py 0.00% 16 Missing ⚠️
process/models/physics/scrape_off_layer.py 0.00% 4 Missing ⚠️
process/models/build.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4511      +/-   ##
==========================================
- Coverage   49.32%   49.26%   -0.07%     
==========================================
  Files         150      150              
  Lines       29802    29940     +138     
==========================================
+ Hits        14700    14750      +50     
- Misses      15102    15190      +88     

☔ View full report in Codecov by Harness.
📢 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.

@chris-ashe chris-ashe changed the title Add bruner div heat split ♻️ Refactor Bruner div heat split Aug 14, 2026
@chris-ashe
chris-ashe force-pushed the add_bruner_div_heat_split branch from e5d6816 to 95eb74f Compare August 14, 2026 12:49
…date references in plasma calculations; add Brunner's method for divertor power splits calculation
…rSeparatrixPowerSplits dataclass and update related methods
… and distances for double null configuration
… inner divertor power splits and update references
@chris-ashe
chris-ashe force-pushed the add_bruner_div_heat_split branch from 95eb74f to 6168a31 Compare August 17, 2026 08:58
@chris-ashe
chris-ashe marked this pull request as ready for review August 17, 2026 09:50
@chris-ashe
chris-ashe requested a review from a team as a code owner August 17, 2026 09:50

@staticmethod
def calculate_brunner_divertor_power_splits(
dr_plasma_outboard_midplane_separatrix_separation: float,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this name is far too long to be used in the function (hence the formatting nightmare), fine if you want it for input but please rename it to something more useable inside the function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Divertor Physics Relating to the physics models Refactor Scrape off Layer Relating to the scrape off layer outside the plasma separatrix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants