Skip to content

Add sol upstream power - #4504

Merged
clmould merged 14 commits into
mainfrom
add_sol_upstream_power
Aug 7, 2026
Merged

Add sol upstream power#4504
clmould merged 14 commits into
mainfrom
add_sol_upstream_power

Conversation

@chris-ashe

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

Copy link
Copy Markdown
Collaborator

This pull request introduces new calculations and documentation for the scrape-off layer (SOL) parallel energy flux and area, and integrates them into the codebase and output. It also adds new physics variables for total magnetic fields at the inboard and outboard midplane, updates plotting and output routines to include these, and improves the documentation with references and formulas.

Scrape-off layer parallel flux and area calculations:

  • Added calculation of the upstream outboard SOL parallel area (a_plasma_outboard_sol_eich13_parallel) and parallel power flux (pflux_plasma_outboard_sol_eich13_parallel_mw) to ScrapeOffLayer, including a new method calculate_upstream_sol_outboard_parallel_area and corresponding unit test.
  • Extended the output of ScrapeOffLayer to display the new SOL parallel area and flux values.

Magnetic field calculations and variables:

  • Added new variables for total magnetic field at the inboard and outboard midplane (b_plasma_inboard_total, b_plasma_outboard_total) and their calculation in the main physics model.
  • Updated output and plotting routines to display these new magnetic field values, including improved format and sectioning in output files.

Documentation updates:

  • Added a new section to the SOL documentation explaining the parallel energy flux density, the parallel area formula, and referenced key literature. [1] [2]

These changes improve the physical fidelity of the SOL model, enhance the clarity and completeness of outputs, and provide better documentation for users and developers.## Description

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

codecov-commenter commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.14%. Comparing base (75f8468) to head (516b8a4).

Files with missing lines Patch % Lines
process/models/physics/scrape_off_layer.py 33.33% 8 Missing ⚠️
process/models/physics/plasma_fields.py 0.00% 5 Missing ⚠️
process/models/physics/physics.py 0.00% 2 Missing ⚠️
process/core/io/plot/summary.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4504      +/-   ##
==========================================
- Coverage   49.14%   49.14%   -0.01%     
==========================================
  Files         152      152              
  Lines       29777    29803      +26     
==========================================
+ Hits        14635    14647      +12     
- Misses      15142    15156      +14     

☔ 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 marked this pull request as ready for review August 6, 2026 13:42
@chris-ashe
chris-ashe requested a review from a team as a code owner August 6, 2026 13:42
@chris-ashe
chris-ashe requested review from clmould and kj5248 August 6, 2026 13:42
@clmould clmould self-assigned this Aug 6, 2026

@kj5248 kj5248 left a comment

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.

Think you made a slight mistake for the equation for parallel area

Comment thread process/models/physics/scrape_off_layer.py
Comment thread documentation/source/physics-models/plasma_scrape_off_layer.md
Comment thread documentation/source/physics-models/plasma_scrape_off_layer.md Outdated
Comment thread documentation/source/physics-models/plasma_scrape_off_layer.md Outdated
Comment thread tests/unit/models/physics/test_scrape_off_layer.py Outdated
@chris-ashe
chris-ashe requested a review from kj5248 August 6, 2026 14:46

@kj5248 kj5248 left a comment

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.

Seems all good now

@clmould clmould left a comment

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.

Some v minor changes but otherwise all good !

Comment thread documentation/source/physics-models/plasma_scrape_off_layer.md Outdated
Comment thread process/models/physics/scrape_off_layer.py Outdated
Comment thread process/models/physics/scrape_off_layer.py Outdated
Comment thread process/data_structure/physics_variables.py Outdated
Comment thread process/data_structure/physics_variables.py Outdated
Comment thread documentation/source/physics-models/plasma_scrape_off_layer.md Outdated
Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
@chris-ashe
chris-ashe requested a review from clmould August 7, 2026 10:04
@clmould
clmould merged commit a5920a1 into main Aug 7, 2026
8 of 11 checks passed
@clmould
clmould deleted the add_sol_upstream_power branch August 7, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants