Skip to content

♻️ Refactor blanket library 4#3960

Merged
timothy-nunn merged 4 commits intomainfrom
refactor_blanket_library_4
Nov 3, 2025
Merged

♻️ Refactor blanket library 4#3960
timothy-nunn merged 4 commits intomainfrom
refactor_blanket_library_4

Conversation

@chris-ashe
Copy link
Copy Markdown
Collaborator

@chris-ashe chris-ashe commented Oct 29, 2025

This pull request introduces improvements to the handling and visualization of blanket and first wall geometry across the codebase, standardizes naming conventions for Darcy friction factors, and enhances output reporting for blanket properties. The most significant changes are grouped below by theme.

Geometry Calculation and Data Flow Enhancements:

  • The hydraulic diameter and bend radii for blanket channels are now calculated and stored in fwbs_variables during the run methods of both the DCLL and HCPB blanket classes, improving consistency and data availability for downstream use.

  • The first wall (Fw) class now instantiates BlanketLibrary and uses its calculate_pipe_bend_radius method to set the bend radii for first wall channels, centralizing geometry logic.
    Visualization Improvements:

  • The plotting routine in plot_proc.py now includes a detailed poloidal cross-section of the blanket and first wall, with labeled axes, grid, and lines marking the major radius, blanket half height, and midplane for improved interpretability.

Output Reporting Enhancements:

  • The blanket half height (dz_blkt_half) is now explicitly written to output files in both the blanket library and HCPB modules, ensuring this key geometric parameter is available in results.
    Documentation and Standards:

  • Added a new section to the development standards documentation specifying that Darcy friction factor variables should use the darcy_frict_ prefix, promoting consistent naming conventions.

Data Structure Import Correction:

  • Updated hcpb.py to import blanket_library variables from the correct module, ensuring data consistency.## 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 force-pushed the refactor_blanket_library_4 branch from 265f44c to 52a4cb7 Compare October 29, 2025 10:26
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 12.00000% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.95%. Comparing base (633a49e) to head (3210187).
⚠️ Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
process/io/plot_proc.py 0.00% 13 Missing ⚠️
process/hcpb.py 20.00% 4 Missing ⚠️
process/dcll.py 0.00% 3 Missing ⚠️
process/blanket_library.py 0.00% 1 Missing ⚠️
process/fw.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3960      +/-   ##
==========================================
- Coverage   45.98%   45.95%   -0.03%     
==========================================
  Files         123      123              
  Lines       28550    28575      +25     
==========================================
+ Hits        13129    13132       +3     
- Misses      15421    15443      +22     

☔ 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 October 29, 2025 10:33
Comment thread process/fw.py Outdated
@timothy-nunn timothy-nunn merged commit a88d34b into main Nov 3, 2025
14 of 18 checks passed
@timothy-nunn timothy-nunn deleted the refactor_blanket_library_4 branch November 3, 2025 09:59
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