Repository navigation
STEP TF turn structure - #4643
chris-ashe wants to merge 20 commits into
Conversation
|
| """Cross-sectional area of the stabiliser in the TF turn [m²]""" | ||
|
|
||
| n_tf_turn_superconducting_strands: int = 0.0 | ||
| """Number of superconducting strands in the TF turn""" |
| # Copper mass [kg] | ||
| self.data.tfcoil.m_tf_coil_copper = ( | ||
| m_tf_coil_copper = ( | ||
| self.data.tfcoil.len_tf_coil |
There was a problem hiding this comment.
When itart == 1 include the centre column length cplen is not included in len_tf_coil. This is accounted for else where or is copper the missing?
There was a problem hiding this comment.
This is true of all the masses in section. I can see some if statements for itart == 1. Also is it useful to list, list the copper masses, without the centre rod included? Are the centre rod masses/area calculated as well, we these will be needed for costing or other engineering models.
There was a problem hiding this comment.
Looking at tf_coil_shape_inner() the len_tf_coil is calculated as itart dependant
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4643 +/- ##
==========================================
+ Coverage 51.17% 51.82% +0.64%
==========================================
Files 181 181
Lines 30426 30747 +321
==========================================
+ Hits 15571 15934 +363
+ Misses 14855 14813 -42 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
e1b992b to
53b6618
Compare
| whttflgs = m_tf_coils_total * (self.data.tfcoil.len_tf_coil / tfleng_sph) | ||
| else: | ||
| whtcp = 0.0 | ||
| whttflgs = 0.0 |
There was a problem hiding this comment.
For the coil case you compute the mass with a else statement for the itart where as for the copper, superconductor and insulation you do not. Therefore you will double the mass contribution from the case in the centerpost with this final step.
Also for future work it would be good to also calculate the total copper mass counting for itart.
Also whtcp and whttflgs don't follow the variable style guide and are confusingly named.
| whttflgs = m_tf_coils_total * (self.data.tfcoil.len_tf_coil / tfleng_sph) | ||
| else: | ||
| whtcp = 0.0 | ||
| whttflgs = 0.0 |
There was a problem hiding this comment.
Same comment as for the STEP areas and masses function.
…or model handling and improve comments
… related calculations
…ingTFCoil for accurate critical current calculations
…nboard_peak_ripple_symmetric in SuperconductingTFCoil
…tions in STEPSuperconductingTFCoil
…add tf_cicc_areas_and_masses method for improved accuracy
…add tf_step_inboard_areas_and_fractions method for improved accuracy
…culations in CROCOSuperconductingTFCoil
…erconductingTFCoil to compute superconductor lengths
…essValueError in STEPSuperconductingTFCoil
…e unit tests for tf_cicc_areas_and_masses
53b6618 to
705092c
Compare
430b511 to
d72c48c
Compare
|
@chris-ashe @ajpearcey I am a little confused why adding in this turn structure has impacted all of the other regression tests? Are other bugs fixed along the way? |
If you look at line 1490 of |
| a[2] = -0.85031e0 | ||
| a[3] = 0.89808e0 | ||
| case _: | ||
| self.data.superconducting_tfcoil.f_b_tf_inboard_peak_ripple_symmetric = ( |
There was a problem hiding this comment.
Is there not a better place to do this? The rest of the cases do not mutate the data structure.
Also how separate is this? Could it be another PR so that the tests on this branch pass?
| m_file.get("i_tf_turn_type", scan=scan) | ||
| == SuperconductingTFTurnType.STEP_STACKED_TAPE | ||
| or SuperconductingTFTurnType.CROSS_CONDUCTOR |
There was a problem hiding this comment.
| m_file.get("i_tf_turn_type", scan=scan) | |
| == SuperconductingTFTurnType.STEP_STACKED_TAPE | |
| or SuperconductingTFTurnType.CROSS_CONDUCTOR | |
| m_file.get("i_tf_turn_type", scan=scan) | |
| in (SuperconductingTFTurnType.STEP_STACKED_TAPE, SuperconductingTFTurnType.CROSS_CONDUCTOR) |
This is a bug at the moment where its doing if (i == j) or k
| tfleng_sph = self.data.tfcoil.cplen + self.data.tfcoil.len_tf_coil | ||
| whtcp = m_tf_coils_total * (self.data.tfcoil.cplen / tfleng_sph) |
There was a problem hiding this comment.
| tfleng_sph = self.data.tfcoil.cplen + self.data.tfcoil.len_tf_coil | |
| whtcp = m_tf_coils_total * (self.data.tfcoil.cplen / tfleng_sph) | |
| tfleng_sph = cplen + self.data.tfcoil.len_tf_coil | |
| whtcp = m_tf_coils_total * (cplen / tfleng_sph) |
cplen is a local variable above and has not yet been assigned to the data structure
| a_tf_turn=self.data.tfcoil.a_tf_turn, | ||
| t_tf_quench_dump=self.data.tfcoil.t_tf_superconductor_quench, | ||
| f_a_tf_turn_cable_copper=self.data.tfcoil.f_a_tf_turn_cable_copper, | ||
| f_a_tf_turn_cable_space_cooling=d_sc_tf.f_a_tf_turn_cable_space_cooling, |
There was a problem hiding this comment.
f_a_tf_turn_cable_space_cooling is not set in the STEP case so uses default value
| a_tf_turn_cable_space=self.data.tfcoil.a_tf_turn_cable_space_no_void, | ||
| a_tf_turn=self.data.tfcoil.a_tf_turn, | ||
| t_tf_quench_dump=self.data.tfcoil.t_tf_superconductor_quench, | ||
| f_a_tf_turn_cable_copper=self.data.tfcoil.f_a_tf_turn_cable_copper, |
There was a problem hiding this comment.
f_a_tf_turn_cable_copper does not appear to be set in the STEP case so the default is used
| ) | ||
| d_sc_tf.a_tf_turn_stabiliser = integer_turn_geometry.a_tf_turn_stabiliser | ||
|
|
||
| d_sc_tf.dr_tf_hts_tape = ( |
There was a problem hiding this comment.
This can be input by the user so should we be overwriting it?
| self.data.superconducting_tfcoil.n_tf_turn_superconducting_strands = ( | ||
| self.calculate_stacked_tape_strand_count( | ||
| dr_tape_stack=self.data.superconducting_tfcoil.dx_tf_turn_tape_stack, | ||
| dr_hts_tape=self.data.superconducting_tfcoil.dx_tf_hts_tape_total, | ||
| ) |
There was a problem hiding this comment.
Are these the correct variables to be using? E.g. why not use dr_tf_turn_tape_stack?
| a_tf_turn_stabiliser: float = 0.0 | ||
| """Cross-sectional area of the stabiliser in the TF turn [m²]""" | ||
|
|
||
| n_tf_turn_superconducting_strands: int = 0.0 |
There was a problem hiding this comment.
| n_tf_turn_superconducting_strands: int = 0.0 | |
| n_tf_turn_superconducting_strands: int = 0 |
Typed as int but assigned a float
| # Area of inter-turn insulation: total [m²] | ||
| a_tf_coil_wp_turn_insulation = n_tf_coil_turns * a_tf_turn_insulation | ||
|
|
||
| a_tf_turn_steel = 0.0 |
There was a problem hiding this comment.
Why take this as an input if you are going to set it to 0?
| # Find the current density limited by the protection limit | ||
| # At present only valid for LTS windings (Nb3Sn properties assumed) |
There was a problem hiding this comment.
| # Find the current density limited by the protection limit | |
| # At present only valid for LTS windings (Nb3Sn properties assumed) | |
| # Find the current density limited by the protection limit | |
| # At present only valid for LTS windings (Nb3Sn properties assumed) |
| Parameters | ||
| ---------- | ||
| n_tf_coils: int : | ||
| n_tf_coils: Number of TF coils. | ||
| n_tf_coil_turns: int : | ||
| n_tf_coil_turns: Total number of turns in the TF coil winding pack. | ||
| len_tf_coil: | ||
| len_tf_coil: Length of a single TF coil (in meters). | ||
| n_tf_turn_superconducting_strands: int : | ||
| n_tf_turn_superconducting_strands: Number of superconducting tapes/strands | ||
| per turn in the TF coil. |
There was a problem hiding this comment.
| Parameters | |
| ---------- | |
| n_tf_coils: int : | |
| n_tf_coils: Number of TF coils. | |
| n_tf_coil_turns: int : | |
| n_tf_coil_turns: Total number of turns in the TF coil winding pack. | |
| len_tf_coil: | |
| len_tf_coil: Length of a single TF coil (in meters). | |
| n_tf_turn_superconducting_strands: int : | |
| n_tf_turn_superconducting_strands: Number of superconducting tapes/strands | |
| per turn in the TF coil. | |
| Parameters | |
| ---------- | |
| n_tf_coils: | |
| n_tf_coils: Number of TF coils. | |
| n_tf_coil_turns: | |
| n_tf_coil_turns: Total number of turns in the TF coil winding pack. | |
| len_tf_coil: | |
| len_tf_coil: Length of a single TF coil (in meters). | |
| n_tf_turn_superconducting_strands: | |
| n_tf_turn_superconducting_strands: Number of superconducting tapes/strands | |
| per turn in the TF coil. |
Description
This pull request adds support for a new "step-stacked tape" type to the superconducting toroidal field (TF) coil modeling, along with the necessary data fields and model registration. The changes ensure the new coil type is selectable, its parameters are tracked, and its model is properly invoked in the workflow.
Support for Step-Stacked Tape TF Coil:
STEPSuperconductingTFCoilto the imports and model registration inmain.py, and included it in the list of models for execution.caller.pyto call the newstep_sctfcoilmodel when theSTEP_STACKED_TAPEturn type is selected.3to thei_tf_turn_typechoices ininput.py.Checklist
I confirm that I have completed the following checks: