Skip to content

📐 Add blkt and divertor poloidal angles#4207

Draft
chris-ashe wants to merge 17 commits intomainfrom
add_blkt_poloidal_angles
Draft

📐 Add blkt and divertor poloidal angles#4207
chris-ashe wants to merge 17 commits intomainfrom
add_blkt_poloidal_angles

Conversation

@chris-ashe
Copy link
Copy Markdown
Collaborator

@chris-ashe chris-ashe commented Apr 28, 2026

This pull request introduces new calculations and visualizations for the poloidal angles subtended by the outboard and inboard blankets, as well as the divertor, in the plasma cross-section plots. It adds new variables to store these angles and their fractions, integrates their calculation into the blanket and divertor models, and updates plotting and output routines to display these geometric relationships.

The main change is that f_ster_div_single is no longer an input and is calculated from the geometry. This is a necessary step in having seperate blankets and divertors as the specific flux to each component can now be calculated so they can have their own cooling requirements.

New blanket and divertor angle calculations and variables:

  • Added variables to blanket_library.py and divertor_variables.py to store outboard/inboard blanket poloidal angles, their fractions, and divertor poloidal angle.
  • Implemented calculation methods for outboard/inboard blanket poloidal angles and their fractions in BlanketLibrary, and for the divertor angle in the divertor model, referencing the blanket geometry.

Integration into model execution:

  • Updated hcpb.py and divertor.py to set the new angle variables during model runs, ensuring these values are available for output and further calculations.

Enhanced output and visualization:

  • Modified output routines to write the new angle variables and their fractions to output files for both blanket and divertor.
  • Significantly improved the plot_blkt_structure function to display the blanket and divertor angles visually, including annotated arcs, arrows, and info boxes for each angle on the cross-section plot.

Data initialization and test updates:

  • Updated initialization routines to handle new variables and set default values.
  • Minor test import update to reflect new class usage.

✍🏻 Plotting outputs

Large tokamak

image

ST

image

These changes improve the geometric fidelity of the model and enhance the clarity of output visualizations, making it easier to interpret the physical relationships between the plasma, blankets, and divertor.

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 and others added 13 commits April 28, 2026 09:42
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…ations

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…ed by plasma

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…ded by plasma

Co-authored-by: Copilot <copilot@github.com>
…plasma

Co-authored-by: Copilot <copilot@github.com>
…n structure plot

Co-authored-by: Copilot <copilot@github.com>
…for outboard, inboard, and divertor angles

Co-authored-by: Copilot <copilot@github.com>
…dal angle

Co-authored-by: Copilot <copilot@github.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 22.58065% with 96 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.99%. Comparing base (25b9f07) to head (d5eb5b7).

Files with missing lines Patch % Lines
process/core/io/plot/summary.py 0.00% 76 Missing ⚠️
process/models/blankets/blanket_library.py 52.94% 8 Missing ⚠️
process/models/blankets/dcll.py 20.00% 4 Missing ⚠️
process/models/blankets/hcpb.py 0.00% 4 Missing ⚠️
process/models/divertor.py 50.00% 3 Missing ⚠️
process/models/physics/physics.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4207      +/-   ##
==========================================
- Coverage   52.10%   51.99%   -0.12%     
==========================================
  Files         148      148              
  Lines       30389    30511     +122     
==========================================
+ Hits        15835    15863      +28     
- Misses      14554    14648      +94     

☔ 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.

Co-authored-by: Copilot <copilot@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants