Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
35bcf2f
✨ Add strand packing functions for rectangular spaces with obstacles …
chris-ashe Aug 20, 2025
eaaa388
✨ Enhance strand packing algorithm with hexagonal arrangement and inc…
chris-ashe Aug 21, 2025
2c9421f
✨ Add method to calculate maximum superconducting strand count in cab…
chris-ashe Oct 3, 2025
c344d15
✨ Add variable for number of superconducting cables in TF turn
chris-ashe Oct 3, 2025
4b531e2
✨ Update superconducting cable diameter and integrate cable count cal…
chris-ashe Oct 3, 2025
b284688
✨ Add input variable for superconducting cable diameter in TF coil co…
chris-ashe Oct 3, 2025
4c6abd4
✨ Refactor TF coil turn plotting to support cable-in-conduit configur…
chris-ashe Oct 3, 2025
d11bfe6
✨ Update TF cable-in-conduit turn plotting to use dynamic strand diam…
chris-ashe Oct 3, 2025
b47fb89
✨ Adjust TF cable-in-conduit turn plot positions and update subplot c…
chris-ashe Oct 6, 2025
ae61c49
✨ Add function to plot TF coil CICC cable cross-section and integrate…
chris-ashe Oct 6, 2025
4d90b0e
✨ Add method to calculate total length of superconducting material fo…
chris-ashe Oct 6, 2025
8259e1b
✨ Add variable to store length of superconducting cable in TF coil an…
chris-ashe Oct 6, 2025
108077b
✨ Add variable for total length of superconducting cable in all TF co…
chris-ashe Oct 6, 2025
4bb2a27
✨ Add calculations for lengths of superconductors in TF coils and log…
chris-ashe Oct 6, 2025
0934340
✨ Refactor cable-in-conduit strand count calculation to exclude void …
chris-ashe Oct 7, 2025
e79f066
Add diameter of superconducting cable to integration mfile for tests
chris-ashe Oct 17, 2025
04fa6a2
✨ Update plotting functions to include additional figures and adjust …
chris-ashe Oct 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion process/data_structure/superconducting_tf_coil_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@
dia_tf_turn_superconducting_cable: float = None
"""Diameter of the superconducting cable in the TF turn [m]"""

n_tf_turn_superconducting_cables: int = None
"""Number of superconducting cables in the TF turn"""

len_tf_coil_superconductor: float = None
"""Length of superconducting cable in one TF coil [m]"""

len_tf_superconductor_total: float = None
"""Total length of superconducting cable in all TF coils [m]"""

j_tf_superconductor_critical: float = None
"""Critical current density of the superconducting cable [A/m^2]"""

Expand Down Expand Up @@ -300,6 +309,9 @@ def init_superconducting_tf_coil_variables():
global a_tf_turn_cable_space_effective
global dr_tf_wp_no_insulation
global dia_tf_turn_superconducting_cable
global n_tf_turn_superconducting_cables
global len_tf_coil_superconductor
global len_tf_superconductor_total
global j_tf_superconductor_critical
global f_c_tf_turn_operating_critical
global j_tf_coil_turn
Expand Down Expand Up @@ -356,7 +368,10 @@ def init_superconducting_tf_coil_variables():
radius_tf_turn_cable_space_corners = 0.0
a_tf_turn_cable_space_effective = 0.0
dr_tf_wp_no_insulation = 0.0
dia_tf_turn_superconducting_cable = 0.0
dia_tf_turn_superconducting_cable = 0.00073
n_tf_turn_superconducting_cables = 0
len_tf_coil_superconductor = 0.0
len_tf_superconductor_total = 0.0
j_tf_superconductor_critical = 0.0
f_c_tf_turn_operating_critical = 0.0
j_tf_coil_turn = 0.0
Expand Down
3 changes: 3 additions & 0 deletions process/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ def __post_init__(self):
"dia_tf_turn_coolant_channel": InputVariable(
data_structure.tfcoil_variables, float, range=(0.0, 0.1)
),
"dia_tf_turn_superconducting_cable": InputVariable(
data_structure.superconducting_tf_coil_variables, float, range=(0.0001, 0.01)
),
"dintrt": InputVariable(data_structure.cost_variables, float, range=(0.0, 0.1)),
"discount_rate": InputVariable(
data_structure.cost_variables, float, range=(0.0, 0.5)
Expand Down
485 changes: 404 additions & 81 deletions process/io/plot_proc.py

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions process/superconducting_tf_coil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,64 @@ def tf_cable_in_conduit_superconductor_properties(
c_turn_cables_critical,
)

def calculate_cable_in_conduit_strand_count(
self,
a_cable_space: float,
dia_superconductor_strand: float,
) -> int:
"""
Calculates the maximum number of superconducting strands that can fit into a cable-in-conduit conductor,
based on the available cable space, strand diameter, and desired void fraction.

:param a_cable_space: Total cross-sectional area available for the cable (in m²).
:type a_cable_space: float
:param dia_superconductor_strand: Diameter of a single superconducting strand (in meters).
:type dia_superconductor_strand: float

:returns: The maximum number of strands that can fit in the available space, accounting for the void fraction.
:rtype: int
"""

# Effective area available for strands (excluding voids)
effective_area = a_cable_space

# Area per strand (circular)
strand_area = np.pi * (dia_superconductor_strand / 2) ** 2

# Number of strands that fit
return int(effective_area / strand_area)

def calculate_cable_in_conduit_superconductor_length(
self,
n_tf_coils: int,
n_tf_coil_turns: int,
len_tf_coil: float,
n_tf_turn_superconducting_cables: int,
) -> float:
"""
Calculates the total length of superconducting material required for the TF coils.

:param int n_tf_coils: Number of TF coils.
:param int n_tf_coil_turns: Total number of turns in the TF coil winding pack.
:param float len_tf_coil: Length of a single TF coil (in meters).
:param int n_tf_turn_superconducting_cables: Number of superconducting cables per turn in the TF coil.

:returns: Tuple containing:
- Length of superconductor in one TF coil (in meters).
- Total length of superconductor in all TF coils (in meters).
:rtype: tuple[float, float]
"""

# Length of superconductor in one TF coil
len_tf_coil_superconductor = (
n_tf_coil_turns * len_tf_coil * n_tf_turn_superconducting_cables
)

# Total length of superconductor in all TF coils
len_tf_superconductor_total = len_tf_coil_superconductor * n_tf_coils

return len_tf_coil_superconductor, len_tf_superconductor_total

def output_tf_superconductor_info(self):
"""Output TF superconductor information"""

Expand Down Expand Up @@ -1976,6 +2034,24 @@ def sc_tf_internal_geom(self, i_tf_wp_geom, i_tf_case_geom, i_tf_turns_integer):
dx_tf_turn_insulation=tfcoil_variables.dx_tf_turn_insulation,
)

# Calculate number of cables in turn if CICC conductor
# ---------------------------------------------------
if tfcoil_variables.i_tf_sc_mat != 6:
superconducting_tf_coil_variables.n_tf_turn_superconducting_cables = self.calculate_cable_in_conduit_strand_count(
a_cable_space=superconducting_tf_coil_variables.a_tf_turn_cable_space_effective,
dia_superconductor_strand=superconducting_tf_coil_variables.dia_tf_turn_superconducting_cable,
)

(
superconducting_tf_coil_variables.len_tf_coil_superconductor,
superconducting_tf_coil_variables.len_tf_superconductor_total,
) = self.calculate_cable_in_conduit_superconductor_length(
n_tf_coils=tfcoil_variables.n_tf_coils,
n_tf_coil_turns=tfcoil_variables.n_tf_coil_turns,
len_tf_coil=tfcoil_variables.len_tf_coil,
n_tf_turn_superconducting_cables=superconducting_tf_coil_variables.n_tf_turn_superconducting_cables,
)

# Areas and fractions
# -------------------
# Central helium channel down the conductor core [m2]
Expand Down
24 changes: 24 additions & 0 deletions process/tf_coil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,30 @@ def outtf(self):
"(dia_tf_turn_coolant_channel)",
tfcoil_variables.dia_tf_turn_coolant_channel,
)
po.ovarre(
self.outfile,
"Diameter of superconducting cable",
"(dia_tf_turn_superconducting_cable)",
superconducting_tf_coil_variables.dia_tf_turn_superconducting_cable,
)
po.ovarre(
self.outfile,
"Number of superconducting cables per turn",
"(n_tf_turn_superconducting_cables)",
superconducting_tf_coil_variables.n_tf_turn_superconducting_cables,
)
po.ovarre(
self.outfile,
"Length of superconductor in TF coil (m)",
"(len_tf_coil_superconductor)",
superconducting_tf_coil_variables.len_tf_coil_superconductor,
)
po.ovarre(
self.outfile,
"Total length of superconductor in all TF coils (m)",
"(len_tf_superconductor_total)",
superconducting_tf_coil_variables.len_tf_superconductor_total,
)
Comment thread
timothy-nunn marked this conversation as resolved.
po.ocmmnt(self.outfile, "Fractions by area")
po.ovarre(
self.outfile,
Expand Down
1 change: 1 addition & 0 deletions tests/integration/data/large_tokamak_1_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@
Steel_conduit_thickness_(m)_____________________________________________ (dx_tf_turn_steel)____________________ 8.0099E-03 ITV
Inter-turn_insulation_thickness_(m)_____________________________________ (dx_tf_turn_insulation)____________________ 8.0000E-04
Diameter_of_central_helium_channel_in_cable_____________________________ (dia_tf_turn_coolant_channel)_____________________ 1.0000E-02
Diameter_of_superconducting_cable_______________________________________ (dia_tf_turn_superconducting_cable)_ 7.29999999999999963e-04
internal_area_of_the_cable_space________________________________________ (a_tf_turn_cable_space_no_void)_______________________ 1.6999E-03
Coolant_fraction_in_conductor_excluding_central_channel_________________ (f_a_tf_turn_cable_space_extra_void)________________________ 3.0000E-01
Copper_fraction_of_conductor____________________________________________ (f_a_tf_turn_cable_copper)_____________________ 8.4212E-01 ITV
Expand Down
1 change: 1 addition & 0 deletions tests/integration/data/large_tokamak_2_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@
Steel_conduit_thickness_(m)_____________________________________________ (dx_tf_turn_steel)____________________ 8.0099E-03 ITV
Inter-turn_insulation_thickness_(m)_____________________________________ (dx_tf_turn_insulation)____________________ 8.0000E-04
Diameter_of_central_helium_channel_in_cable_____________________________ (dia_tf_turn_coolant_channel)_____________________ 1.0000E-02
Diameter_of_superconducting_cable________________________________________ (dia_tf_turn_superconducting_cable)_ 7.29999999999999963e-04
internal_area_of_the_cable_space________________________________________ (a_tf_turn_cable_space_no_void)_______________________ 1.6999E-03
Coolant_fraction_in_conductor_excluding_central_channel_________________ (f_a_tf_turn_cable_space_extra_void)________________________ 3.0000E-01
Copper_fraction_of_conductor____________________________________________ (f_a_tf_turn_cable_copper)_____________________ 8.4212E-01 ITV
Expand Down
1 change: 1 addition & 0 deletions tests/integration/data/large_tokamak_3_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@
Steel_conduit_thickness_(m)_____________________________________________ (dx_tf_turn_steel)____________________ 8.0099E-03 ITV
Inter-turn_insulation_thickness_(m)_____________________________________ (dx_tf_turn_insulation)____________________ 8.0000E-04
Diameter_of_central_helium_channel_in_cable_____________________________ (dia_tf_turn_coolant_channel)_____________________ 1.0000E-02
Diameter_of_superconducting_cable________________________________________ (dia_tf_turn_superconducting_cable)_ 7.29999999999999963e-04
internal_area_of_the_cable_space________________________________________ (a_tf_turn_cable_space_no_void)_______________________ 1.6999E-03
Coolant_fraction_in_conductor_excluding_central_channel_________________ (f_a_tf_turn_cable_space_extra_void)________________________ 3.0000E-01
Copper_fraction_of_conductor____________________________________________ (f_a_tf_turn_cable_copper)_____________________ 8.4212E-01 ITV
Expand Down
1 change: 1 addition & 0 deletions tests/integration/data/large_tokamak_4_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@
Steel_conduit_thickness_(m)_____________________________________________ (dx_tf_turn_steel)____________________ 8.0099E-03 ITV
Inter-turn_insulation_thickness_(m)_____________________________________ (dx_tf_turn_insulation)____________________ 8.0000E-04
Diameter_of_central_helium_channel_in_cable_____________________________ (dia_tf_turn_coolant_channel)_____________________ 1.0000E-02
Diameter_of_superconducting_cable________________________________________ (dia_tf_turn_superconducting_cable)_ 7.29999999999999963e-04
internal_area_of_the_cable_space________________________________________ (a_tf_turn_cable_space_no_void)_______________________ 1.6999E-03
Coolant_fraction_in_conductor_excluding_central_channel_________________ (f_a_tf_turn_cable_space_extra_void)________________________ 3.0000E-01
Copper_fraction_of_conductor____________________________________________ (f_a_tf_turn_cable_copper)_____________________ 8.4212E-01 ITV
Expand Down
1 change: 1 addition & 0 deletions tests/integration/data/large_tokamak_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@
Steel_conduit_thickness_(m)______________________________________________ (dx_tf_turn_steel)_____________ 8.00215764239549203e-03
Inter-turn_insulation_thickness_(m)______________________________________ (dx_tf_turn_insulation)________ 8.00000000000000038e-04
Diameter_of_central_helium_channel_in_cable______________________________ (dia_tf_turn_coolant_channel)__ 1.00000000000000002e-02
Diameter_of_superconducting_cable________________________________________ (dia_tf_turn_superconducting_cable)_ 7.29999999999999963e-04
internal_area_of_the_cable_space_________________________________________ (a_tf_turn_cable_space_no_void)_ 1.72972548472813317e-03
Coolant_fraction_in_conductor_excluding_central_channel__________________ (f_a_tf_turn_cable_space_extra_void)_ 2.99999999999999989e-01
Copper_fraction_of_conductor_____________________________________________ (f_a_tf_turn_cable_copper)______________________ 8.31847298851364769e-01
Expand Down
Loading