Skip to content

Add SOL physics class - #4479

Open
chris-ashe wants to merge 7 commits into
mainfrom
add_sol_physics_class
Open

Add SOL physics class#4479
chris-ashe wants to merge 7 commits into
mainfrom
add_sol_physics_class

Conversation

@chris-ashe

@chris-ashe chris-ashe commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces a new dedicated model for scrape-off layer (SOL) physics in the codebase, providing consistent calculation, storage, and output of SOL power decay lengths using established scalings. It also adds documentation and new plotting functionality to visualize and compare these quantities. The most important changes are grouped below.


Scrape-off Layer Model Integration

  • Added a new ScrapeOffLayer model (process/models/physics/scrape_off_layer.py) that implements calculation methods for three SOL power decay length scalings (Eich 2013, MAST 2014 I, MAST 2014 II), updates the data structure, and provides output routines.
  • Integrated the ScrapeOffLayer model into the main workflow, including initialization in main.py, inclusion in the Physics model, and invocation in the main model sequence.

Data Structure and Output

  • Added new physics variables to store SOL power decay lengths in PhysicsData (len_plasma_sol_eich13_power_decay, len_plasma_sol_mast14_power_decay_1, len_plasma_sol_mast14_power_decay_2).
  • Updated the divertor model to use the new SOL power decay length calculation and to instantiate the ScrapeOffLayer model.

Documentation

  • Added a new documentation page describing the SOL power decay length scalings, equations, and references.
  • Linked the new SOL documentation in the navigation menu.

Visualization

  • Added a new plotting function to visualize and compare the three SOL power decay length scalings, and included this plot in the summary page.

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 Refactor Scrape off Layer Relating to the scrape off layer outside the plasma separatrix labels Jul 27, 2026
@codecov-commenter

codecov-commenter commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 46.87500% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.63%. Comparing base (ef96cb5) to head (53b76ab).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
process/core/io/plot/summary.py 4.00% 24 Missing ⚠️
process/models/physics/scrape_off_layer.py 71.42% 8 Missing ⚠️
process/models/physics/physics.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4479      +/-   ##
==========================================
- Coverage   48.64%   48.63%   -0.02%     
==========================================
  Files         151      152       +1     
  Lines       29703    29769      +66     
==========================================
+ Hits        14449    14478      +29     
- Misses      15254    15291      +37     

☔ 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 force-pushed the add_sol_physics_class branch from 004c9ce to 53b76ab Compare July 27, 2026 12:27
@chris-ashe
chris-ashe marked this pull request as ready for review July 27, 2026 12:28
@chris-ashe
chris-ashe requested a review from a team as a code owner July 27, 2026 12:28
@chris-ashe
chris-ashe requested a review from j-a-foster July 27, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants