Skip to content

Refactor blkt poloidal height#4083

Open
chris-ashe wants to merge 5 commits intomainfrom
refactor_blkt_poloidal_height
Open

Refactor blkt poloidal height#4083
chris-ashe wants to merge 5 commits intomainfrom
refactor_blkt_poloidal_height

Conversation

@chris-ashe
Copy link
Collaborator

@chris-ashe chris-ashe commented Feb 4, 2026

This pull request introduces a more detailed and flexible calculation of blanket module geometry in the process/blanket_library.py file. The main improvement is the replacement of a generic poloidal height calculation with specialized methods that account for different machine shapes (D-shaped vs. elliptical) and divertor configurations. This allows for more accurate modeling of the blanket module segment lengths in both inboard and outboard regions.

Geometry calculation enhancements:

  • Added four new static methods to blanket_library.py for calculating segment lengths: calculate_dshaped_inboard_blkt_segment_poloidal, calculate_dshaped_outboard_blkt_segment_poloidal, calculate_elliptical_inboard_blkt_segment_poloidal, and calculate_elliptical_outboard_blkt_segment_poloidal. These methods use plasma geometry and divertor configuration parameters for more precise calculations.
  • Updated the set_blanket_module_geometry method to select the appropriate calculation method based on machine and blanket shape, replacing the previous generic blanket_module_poloidal_height call. Segment lengths are now computed using the new specialized methods for both inboard and outboard modules.## 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.

@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 21.62162% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.44%. Comparing base (ca03a41) to head (d5a2243).

Files with missing lines Patch % Lines
process/blanket_library.py 21.62% 29 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4083      +/-   ##
==========================================
- Coverage   46.47%   46.44%   -0.04%     
==========================================
  Files         123      123              
  Lines       28902    28938      +36     
==========================================
+ Hits        13432    13440       +8     
- Misses      15470    15498      +28     

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

@chris-ashe chris-ashe marked this pull request as ready for review February 17, 2026 10:25
@chris-ashe chris-ashe requested a review from a team as a code owner February 17, 2026 10:25
@timothy-nunn timothy-nunn self-assigned this Feb 18, 2026
)
return len_blkt_outboard_segment_poloidal

def blanket_module_poloidal_height(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this function now completely duplicate and should be removed?

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.

3 participants

Comments