Create up down div classes#3999
Merged
timothy-nunn merged 4 commits intomainfrom Dec 18, 2025
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3999 +/- ##
==========================================
- Coverage 45.88% 45.88% -0.01%
==========================================
Files 123 123
Lines 29087 29082 -5
==========================================
- Hits 13346 13343 -3
+ Misses 15741 15739 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f5bb41c to
737bd79
Compare
Collaborator
|
Before I review can you merge #3997 and then rebase this PR onto main |
3f8fae5 to
d010aed
Compare
timothy-nunn
requested changes
Dec 17, 2025
timothy-nunn
approved these changes
Dec 18, 2025
Collaborator
timothy-nunn
left a comment
There was a problem hiding this comment.
Happy with these changes. They are stepping stones towards having separate upper and lower divertor models which will be a great addition to PROCESS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the blanket and divertor modules to improve code modularity, reusability, and clarity. Key changes include separating inboard and outboard blanket geometry logic into dedicated classes, generalizing the calculation of pumping powers, and unifying the computation of divertor incident powers into reusable methods. These changes enable more maintainable and extensible blanket and divertor models across the codebase.
Blanket geometry and modularization:
InboardBlanketandOutboardBlanketclasses inblanket_library.py, each encapsulating their respective geometry calculations and segment length methods, replacing direct calculations in the oldBlanketLibraryclass.DCLLandCCFE_HCPBblanket models to inherit from the newInboardBlanketandOutboardBlanketclasses, and refactored theirrunmethods to use the new geometry calculation methods for setting segment lengths.set_blanket_module_geometryin favor of the new modular methods.Pumping power calculation improvements:
set_pumping_powers_as_fractionsto accept all required parameters as arguments and return a tuple of results, improving testability and reusability. Updated all blanket models to use the new function signature.Divertor power calculation refactor:
Centralized the calculation of incident neutron and radiation power on the divertor into new methods (
set_incident_neutron_power,set_incident_radiation_power) inDivertor, and updated the divertor and blanket models to use these methods instead of duplicating logic.Class structure and code organization:
Added empty
LowerDivertorandUpperDivertorclasses as placeholders for future specialization, inheriting from the refactoredDivertorclass.These changes collectively enhance the maintainability, clarity, and extensibility of the blanket and divertor modelling code.## Description
Checklist
I confirm that I have completed the following checks: