-
Notifications
You must be signed in to change notification settings - Fork 17
Create up down div classes #3999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
|
Before I review can you merge #3997 and then rebase this PR onto main |
3f8fae5 to
d010aed
Compare
timothy-nunn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 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: