Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4152 +/- ##
==========================================
- Coverage 48.02% 47.96% -0.07%
==========================================
Files 143 143
Lines 30088 30185 +97
==========================================
+ Hits 14451 14477 +26
- Misses 15637 15708 +71 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ingTFCoil - Added fixtures for CICCSuperconductingTFCoil and CROCOSuperconductingTFCoil. - Updated test cases to utilize cicc_sctfcoil fixture instead of the generic sctfcoil. - Ensured that all relevant tests are now using the specific coil types for improved accuracy.
…P and casing areas
…ld calculation with ripple
…COSuperconductingTFCoil classes
3473018 to
b023ab3
Compare
je-cook
left a comment
There was a problem hiding this comment.
I'm not a huge fan of the large number of float returns in this. It would be preferable to return a dataclass so the variable names are propagated and hard coded so most variable name order issues are avoided eg superconducting_tf_case_geometry and others. Obviously this would need to be then fed through. Rough metric >= 5 float outputs probably should be dataclass.
| output: bool | ||
|
|
||
| """ | ||
| self.iprint = 0 |
There was a problem hiding this comment.
I dont think iprint does anything anymore
| def __init__(self): | ||
| super().__init__() |
There was a problem hiding this comment.
This does nothing
| def __init__(self): | |
| super().__init__() |
| ) | ||
| == SuperconductingTFTurnType.CABLE_IN_CONDUIT | ||
| ): | ||
| self.models.cicc_sctfcoil.run() |
There was a problem hiding this comment.
I dont know whether this should be organised differently in future eg self.models.sctfcoil.cicc.run().
this if check would then be moved into some sctfcoil object. Right know I'm not going to hold this up but before we add a future cable design we have to reoganise this. I'm not yet sure what that will look like.
This pull request introduces support for multiple toroidal field (TF) coil superconductor turn geometry types by refactoring the codebase to use specific model classes for each geometry and updating the data structure and input handling accordingly. The changes also add new input variables, update the main process flow, and extend the test suite to cover the new model classes.
The most important changes are:
Core Model and Process Flow Updates:
caller.pyandoutput.pyto select and run/output the appropriate model (CICCSuperconductingTFCoilorCROCOSuperconductingTFCoil) based on the newi_tf_turn_typevariable, instead of always using the genericSuperconductingTFCoilmodel.main.pyto instantiate and store the new turn-type-specific model classes (CICCSuperconductingTFCoil,CROCOSuperconductingTFCoil) in theModelsclass.Input and Data Structure Enhancements:
i_tf_turn_typevariable tosuperconducting_tf_coil_variables.pyand registered it as an input variable, allowing users to select the TF coil turn geometry type. Set a default value in the initialization function.Testing Improvements:
CICCSuperconductingTFCoilclass instead of the genericSuperconductingTFCoil, ensuring coverage of the refactored logic.Imports and Code Organization:
SuperconductingTFTurnTypeenum where appropriate.These changes collectively improve the flexibility and maintainability of the TF coil modeling code by supporting multiple turn geometries and ensuring the correct model is used throughout the process.
Checklist
I confirm that I have completed the following checks: