Repository navigation
🐛 Fix critical property assignment for CROCOSuperconductingTFCoil - #4645
chris-ashe wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4645 +/- ##
==========================================
- Coverage 49.97% 49.97% -0.01%
==========================================
Files 151 151
Lines 30270 30271 +1
==========================================
Hits 15128 15128
- Misses 15142 15143 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kj5248
left a comment
There was a problem hiding this comment.
This change makes sense and matches equations elsewhere in file and my understanding. However not sure if using an equation and its inversion is necessary?
| d_sc_tf.cur_tf_turn_croco_strand_critical = ( | ||
| d_sc_tf.c_tf_turn_cables_critical / N_CROCO_STRANDS_TURN | ||
| ) |
There was a problem hiding this comment.
Calculation is right however I have concerns over circular nature of calculation with other places in the file. I'll flag them.
| # Conductor properties | ||
| cur_tf_turn_critical = cur_tf_turn_croco_strand_critical * N_CROCO_STRANDS_TURN |
There was a problem hiding this comment.
This is the inversion of the other equation, so I am much more confident the calculations are right.
However should the calculations not all happen in the same direction ie cur_tf_turn_croco_strand_critical = j_superconductor_critical * a_tf_croco_strand then cur_tf_turn_critical = cur_tf_turn_croco_strand_critical * N_CROCO_STRANDS_TURN and then just pass this information along.
Rather than passing along cur_tf_turn_critical and then having to use this to calculate cur_tf_turn_croco_strand_critical again? Didn't look deeply, these could just be separate paths?
This pull request refactors how the critical current values for TF coil turn cables and CROCO strands are calculated and passed within the superconducting model. The main focus is to ensure that the critical current for the entire turn cable is separated from that of individual CROCO strands, improving clarity and correctness in the data flow.
Refactoring of critical current calculations:
superconducting.py, the assignment ofc_tf_turn_cables_criticalandcur_tf_turn_croco_strand_criticalis separated, with the strand critical current now explicitly calculated as the turn cable critical current divided byN_CROCO_STRANDS_TURN.tf_croco_superconductor_propertiesfunction, the value passed forc_turn_cables_criticalis changed from the strand critical current to the overall turn critical current, ensuring the correct value is used in downstream calculations.Checklist
I confirm that I have completed the following checks: