Skip to content

Commit df5626e

Browse files
committed
❇️ Create new method for creating CRoCo TF turn type
1 parent b709cbd commit df5626e

2 files changed

Lines changed: 212 additions & 99 deletions

File tree

process/superconducting_tf_coil.py

Lines changed: 212 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def run(self, output: bool):
5555
tfcoil_variables.i_tf_wp_geom,
5656
tfcoil_variables.i_tf_case_geom,
5757
tfcoil_variables.i_tf_turns_integer,
58+
i_tf_sc_mat=tfcoil_variables.i_tf_sc_mat,
5859
)
5960

6061
tfcoil_variables.ind_tf_coil = self.tf_coil_self_inductance(
@@ -353,16 +354,17 @@ def run(self, output: bool):
353354
else:
354355
strain = tfcoil_variables.str_wp
355356

356-
tfcoil_variables.temp_tf_superconductor_margin = self.calculate_superconductor_temperature_margin(
357-
i_tf_superconductor=tfcoil_variables.i_tf_sc_mat,
358-
j_superconductor=superconducting_tf_coil_variables.j_tf_superconductor,
359-
b_tf_inboard_peak=tfcoil_variables.b_tf_inboard_peak_with_ripple,
360-
strain=strain,
361-
bc20m=superconducting_tf_coil_variables.b_tf_superconductor_critical_zero_temp_strain,
362-
tc0m=superconducting_tf_coil_variables.temp_tf_superconductor_critical_zero_field_strain,
363-
c0=1.0e10,
364-
temp_tf_coolant_peak_field=tfcoil_variables.tftmp,
365-
)
357+
if tfcoil_variables.i_tf_sc_mat != 6:
358+
tfcoil_variables.temp_tf_superconductor_margin = self.calculate_superconductor_temperature_margin(
359+
i_tf_superconductor=tfcoil_variables.i_tf_sc_mat,
360+
j_superconductor=superconducting_tf_coil_variables.j_tf_superconductor,
361+
b_tf_inboard_peak=tfcoil_variables.b_tf_inboard_peak_with_ripple,
362+
strain=strain,
363+
bc20m=superconducting_tf_coil_variables.b_tf_superconductor_critical_zero_temp_strain,
364+
tc0m=superconducting_tf_coil_variables.temp_tf_superconductor_critical_zero_field_strain,
365+
c0=1.0e10,
366+
temp_tf_coolant_peak_field=tfcoil_variables.tftmp,
367+
)
366368

367369
# Do current density protection calculation
368370
# Only setup for Nb3Sn at present.
@@ -1913,7 +1915,9 @@ def peak_b_tf_inboard_with_ripple(
19131915
* b_tf_inboard_peak_symmetric
19141916
)
19151917

1916-
def sc_tf_internal_geom(self, i_tf_wp_geom, i_tf_case_geom, i_tf_turns_integer):
1918+
def sc_tf_internal_geom(
1919+
self, i_tf_wp_geom, i_tf_case_geom, i_tf_turns_integer, i_tf_sc_mat
1920+
):
19171921
"""
19181922
Author : S. Kahn, CCFE
19191923
Seting the WP, case and turns geometry for SC magnets
@@ -1973,37 +1977,63 @@ def sc_tf_internal_geom(self, i_tf_wp_geom, i_tf_case_geom, i_tf_turns_integer):
19731977

19741978
# Setting the WP turn geometry / areas
19751979
if i_tf_turns_integer == 0:
1976-
# Non-ingeger number of turns
1977-
(
1978-
tfcoil_variables.a_tf_turn_cable_space_no_void,
1979-
tfcoil_variables.a_tf_turn_steel,
1980-
tfcoil_variables.a_tf_turn_insulation,
1981-
tfcoil_variables.n_tf_coil_turns,
1982-
tfcoil_variables.dx_tf_turn_general,
1983-
tfcoil_variables.c_tf_turn,
1984-
tfcoil_variables.dx_tf_turn_general,
1985-
superconducting_tf_coil_variables.dr_tf_turn,
1986-
superconducting_tf_coil_variables.dx_tf_turn,
1987-
tfcoil_variables.t_conductor,
1988-
superconducting_tf_coil_variables.radius_tf_turn_cable_space_corners,
1989-
superconducting_tf_coil_variables.dx_tf_turn_cable_space_average,
1990-
superconducting_tf_coil_variables.a_tf_turn_cable_space_effective,
1991-
superconducting_tf_coil_variables.f_a_tf_turn_cable_space_cooling,
1992-
) = self.tf_cable_in_conduit_averaged_turn_geometry(
1993-
j_tf_wp=tfcoil_variables.j_tf_wp,
1994-
dx_tf_turn_steel=tfcoil_variables.dx_tf_turn_steel,
1995-
dx_tf_turn_insulation=tfcoil_variables.dx_tf_turn_insulation,
1996-
i_tf_sc_mat=tfcoil_variables.i_tf_sc_mat,
1997-
dx_tf_turn_general=tfcoil_variables.dx_tf_turn_general,
1998-
c_tf_turn=tfcoil_variables.c_tf_turn,
1999-
i_dx_tf_turn_general_input=tfcoil_variables.i_dx_tf_turn_general_input,
2000-
i_dx_tf_turn_cable_space_general_input=tfcoil_variables.i_dx_tf_turn_cable_space_general_input,
2001-
dx_tf_turn_cable_space_general=tfcoil_variables.dx_tf_turn_cable_space_general,
2002-
layer_ins=tfcoil_variables.layer_ins,
2003-
a_tf_wp_no_insulation=superconducting_tf_coil_variables.a_tf_wp_no_insulation,
2004-
dia_tf_turn_coolant_channel=tfcoil_variables.dia_tf_turn_coolant_channel,
2005-
f_a_tf_turn_cable_space_extra_void=tfcoil_variables.f_a_tf_turn_cable_space_extra_void,
2006-
)
1980+
# Non-integer number of turns
1981+
if i_tf_sc_mat == 6:
1982+
# Specific case for REBCO
1983+
(
1984+
tfcoil_variables.a_tf_turn_cable_space_no_void,
1985+
tfcoil_variables.a_tf_turn_steel,
1986+
tfcoil_variables.a_tf_turn_insulation,
1987+
tfcoil_variables.n_tf_coil_turns,
1988+
tfcoil_variables.dx_tf_turn_general,
1989+
tfcoil_variables.c_tf_turn,
1990+
tfcoil_variables.dx_tf_turn_general,
1991+
superconducting_tf_coil_variables.dr_tf_turn,
1992+
superconducting_tf_coil_variables.dx_tf_turn,
1993+
tfcoil_variables.t_conductor,
1994+
superconducting_tf_coil_variables.dx_tf_turn_cable_space_average,
1995+
) = self.tf_croco_averaged_turn_geometry(
1996+
j_tf_wp=tfcoil_variables.j_tf_wp,
1997+
dx_tf_turn_steel=tfcoil_variables.dx_tf_turn_steel,
1998+
dx_tf_turn_insulation=tfcoil_variables.dx_tf_turn_insulation,
1999+
dx_tf_turn_general=tfcoil_variables.dx_tf_turn_general,
2000+
c_tf_turn=tfcoil_variables.c_tf_turn,
2001+
i_dx_tf_turn_general_input=tfcoil_variables.i_dx_tf_turn_general_input,
2002+
i_dx_tf_turn_cable_space_general_input=tfcoil_variables.i_dx_tf_turn_cable_space_general_input,
2003+
dx_tf_turn_cable_space_general=tfcoil_variables.dx_tf_turn_cable_space_general,
2004+
layer_ins=tfcoil_variables.layer_ins,
2005+
a_tf_wp_no_insulation=superconducting_tf_coil_variables.a_tf_wp_no_insulation,
2006+
)
2007+
elif i_tf_sc_mat != 6:
2008+
(
2009+
tfcoil_variables.a_tf_turn_cable_space_no_void,
2010+
tfcoil_variables.a_tf_turn_steel,
2011+
tfcoil_variables.a_tf_turn_insulation,
2012+
tfcoil_variables.n_tf_coil_turns,
2013+
tfcoil_variables.dx_tf_turn_general,
2014+
tfcoil_variables.c_tf_turn,
2015+
tfcoil_variables.dx_tf_turn_general,
2016+
superconducting_tf_coil_variables.dr_tf_turn,
2017+
superconducting_tf_coil_variables.dx_tf_turn,
2018+
tfcoil_variables.t_conductor,
2019+
superconducting_tf_coil_variables.radius_tf_turn_cable_space_corners,
2020+
superconducting_tf_coil_variables.dx_tf_turn_cable_space_average,
2021+
superconducting_tf_coil_variables.a_tf_turn_cable_space_effective,
2022+
superconducting_tf_coil_variables.f_a_tf_turn_cable_space_cooling,
2023+
) = self.tf_cable_in_conduit_averaged_turn_geometry(
2024+
j_tf_wp=tfcoil_variables.j_tf_wp,
2025+
dx_tf_turn_steel=tfcoil_variables.dx_tf_turn_steel,
2026+
dx_tf_turn_insulation=tfcoil_variables.dx_tf_turn_insulation,
2027+
dx_tf_turn_general=tfcoil_variables.dx_tf_turn_general,
2028+
c_tf_turn=tfcoil_variables.c_tf_turn,
2029+
i_dx_tf_turn_general_input=tfcoil_variables.i_dx_tf_turn_general_input,
2030+
i_dx_tf_turn_cable_space_general_input=tfcoil_variables.i_dx_tf_turn_cable_space_general_input,
2031+
dx_tf_turn_cable_space_general=tfcoil_variables.dx_tf_turn_cable_space_general,
2032+
layer_ins=tfcoil_variables.layer_ins,
2033+
a_tf_wp_no_insulation=superconducting_tf_coil_variables.a_tf_wp_no_insulation,
2034+
dia_tf_turn_coolant_channel=tfcoil_variables.dia_tf_turn_coolant_channel,
2035+
f_a_tf_turn_cable_space_extra_void=tfcoil_variables.f_a_tf_turn_cable_space_extra_void,
2036+
)
20072037

20082038
else:
20092039
# Integer number of turns
@@ -2704,12 +2734,110 @@ def tf_wp_currents(self):
27042734
),
27052735
)
27062736

2737+
def tf_croco_averaged_turn_geometry(
2738+
self,
2739+
j_tf_wp,
2740+
dx_tf_turn_steel,
2741+
dx_tf_turn_insulation,
2742+
dx_tf_turn_general,
2743+
c_tf_turn,
2744+
i_dx_tf_turn_general_input,
2745+
i_dx_tf_turn_cable_space_general_input,
2746+
dx_tf_turn_cable_space_general,
2747+
layer_ins,
2748+
a_tf_wp_no_insulation,
2749+
):
2750+
"""
2751+
subroutine straight from Python, see comments in tf_averaged_turn_geom_wrapper
2752+
Authors : J. Morris, CCFE
2753+
Authors : S. Kahn, CCFE
2754+
Setting the TF WP turn geometry for SC magnets from the number
2755+
the current per turn.
2756+
This calculation has two purposes, first to check if a turn can exist
2757+
(positive cable space) and the second to provide its dimensions,
2758+
areas and the (float) number of turns
2759+
"""
2760+
2761+
# Turn dimension is a an input
2762+
if i_dx_tf_turn_general_input:
2763+
# Turn area [m2]
2764+
a_tf_turn = dx_tf_turn_general**2
2765+
2766+
# Current per turn [A]
2767+
c_tf_turn = a_tf_turn * j_tf_wp
2768+
2769+
# Turn cable dimension is an input
2770+
elif i_dx_tf_turn_cable_space_general_input:
2771+
# Turn squared dimension [m]
2772+
dx_tf_turn_general = dx_tf_turn_cable_space_general + 2.0e0 * (
2773+
dx_tf_turn_insulation + dx_tf_turn_steel
2774+
)
2775+
2776+
# Turn area [m2]
2777+
a_tf_turn = dx_tf_turn_general**2
2778+
2779+
# Current per turn [A]
2780+
c_tf_turn = a_tf_turn * j_tf_wp
2781+
2782+
# Current per turn is an input
2783+
else:
2784+
# Turn area [m2]
2785+
# Allow for additional inter-layer insulation MDK 13/11/18
2786+
# Area of turn including conduit and inter-layer insulation
2787+
a_tf_turn = c_tf_turn / j_tf_wp
2788+
2789+
# Dimension of square cross-section of each turn including inter-turn insulation [m]
2790+
dx_tf_turn_general = np.sqrt(a_tf_turn)
2791+
2792+
# Square turn assumption
2793+
dr_tf_turn = dx_tf_turn_general
2794+
dx_tf_turn = dx_tf_turn_general
2795+
2796+
# See derivation in the following document
2797+
# k:\power plant physics and technology\process\hts\hts coil module for process.docx
2798+
t_conductor = (
2799+
-layer_ins + np.sqrt(layer_ins**2 + 4.0e00 * a_tf_turn)
2800+
) / 2 - 2.0e0 * dx_tf_turn_insulation
2801+
2802+
# Total number of turns per TF coil (not required to be an integer)
2803+
n_tf_coil_turns = a_tf_wp_no_insulation / a_tf_turn
2804+
2805+
# Area of inter-turn insulation: single turn [m2]
2806+
a_tf_turn_insulation = a_tf_turn - t_conductor**2
2807+
2808+
# NOTE: Fortran has a_tf_turn_cable_space_no_void as an intent(out) variable that was outputting
2809+
# into tfcoil_variables.a_tf_turn_cable_space_no_void. The local variable, however, appears to
2810+
# initially hold the value of tfcoil_variables.a_tf_turn_cable_space_no_void despite not being
2811+
# intent(in). I have replicated this behaviour in Python for now.
2812+
a_tf_turn_cable_space_no_void = copy.copy(
2813+
tfcoil_variables.a_tf_turn_cable_space_no_void
2814+
)
2815+
2816+
# Diameter of circular cable space inside conduit [m]
2817+
dx_tf_turn_cable_space_average = t_conductor - 2.0e0 * dx_tf_turn_steel
2818+
2819+
# Cross-sectional area of conduit jacket per turn [m2]
2820+
a_tf_turn_steel = t_conductor**2 - a_tf_turn_cable_space_no_void
2821+
2822+
return (
2823+
a_tf_turn_cable_space_no_void,
2824+
a_tf_turn_steel,
2825+
a_tf_turn_insulation,
2826+
n_tf_coil_turns,
2827+
dx_tf_turn_general,
2828+
c_tf_turn,
2829+
dx_tf_turn_general,
2830+
dr_tf_turn,
2831+
dx_tf_turn,
2832+
t_conductor,
2833+
dx_tf_turn_cable_space_average,
2834+
)
2835+
27072836
def tf_cable_in_conduit_averaged_turn_geometry(
27082837
self,
27092838
j_tf_wp,
27102839
dx_tf_turn_steel,
27112840
dx_tf_turn_insulation,
2712-
i_tf_sc_mat,
27132841
dx_tf_turn_general,
27142842
c_tf_turn,
27152843
i_dx_tf_turn_general_input,
@@ -2786,65 +2914,55 @@ def tf_cable_in_conduit_averaged_turn_geometry(
27862914
tfcoil_variables.a_tf_turn_cable_space_no_void
27872915
)
27882916

2789-
# ITER like turn structure
2790-
if i_tf_sc_mat != 6:
2791-
# Radius of rounded corners of cable space inside conduit [m]
2792-
radius_tf_turn_cable_space_corners = dx_tf_turn_steel * 0.75e0
2793-
2794-
# Dimension of square cable space inside conduit [m]
2795-
dx_tf_turn_cable_space_average = t_conductor - 2.0e0 * dx_tf_turn_steel
2917+
# Radius of rounded corners of cable space inside conduit [m]
2918+
radius_tf_turn_cable_space_corners = dx_tf_turn_steel * 0.75e0
27962919

2797-
# Cross-sectional area of cable space per turn
2798-
# taking account of rounded inside corners [m2]
2799-
a_tf_turn_cable_space_no_void = (
2800-
dx_tf_turn_cable_space_average**2
2801-
- (4.0e0 - np.pi) * radius_tf_turn_cable_space_corners**2
2802-
)
2920+
# Dimension of square cable space inside conduit [m]
2921+
dx_tf_turn_cable_space_average = t_conductor - 2.0e0 * dx_tf_turn_steel
28032922

2804-
# Calculate the true effective cable space by taking away the cooling
2805-
# channel and the extra void fraction
2923+
# Cross-sectional area of cable space per turn
2924+
# taking account of rounded inside corners [m2]
2925+
a_tf_turn_cable_space_no_void = (
2926+
dx_tf_turn_cable_space_average**2
2927+
- (4.0e0 - np.pi) * radius_tf_turn_cable_space_corners**2
2928+
)
28062929

2807-
a_tf_turn_cable_space_effective = (
2808-
a_tf_turn_cable_space_no_void
2809-
-
2810-
# Coolant channel area
2811-
(
2812-
(np.pi / 4.0e0)
2813-
* dia_tf_turn_coolant_channel
2814-
* dia_tf_turn_coolant_channel
2815-
)
2816-
# Additional void area deduction
2817-
- (a_tf_turn_cable_space_no_void * f_a_tf_turn_cable_space_extra_void)
2818-
)
2930+
# Calculate the true effective cable space by taking away the cooling
2931+
# channel and the extra void fraction
28192932

2820-
f_a_tf_turn_cable_space_cooling = 1 - (
2821-
a_tf_turn_cable_space_effective / a_tf_turn_cable_space_no_void
2933+
a_tf_turn_cable_space_effective = (
2934+
a_tf_turn_cable_space_no_void
2935+
-
2936+
# Coolant channel area
2937+
(
2938+
(np.pi / 4.0e0)
2939+
* dia_tf_turn_coolant_channel
2940+
* dia_tf_turn_coolant_channel
28222941
)
2942+
# Additional void area deduction
2943+
- (a_tf_turn_cable_space_no_void * f_a_tf_turn_cable_space_extra_void)
2944+
)
28232945

2824-
if a_tf_turn_cable_space_no_void <= 0.0e0:
2825-
if t_conductor < 0.0e0:
2826-
logger.error(
2827-
f"Negative cable space dimension. {a_tf_turn_cable_space_no_void=} "
2828-
f"{dx_tf_turn_cable_space_average=}"
2829-
)
2830-
else:
2831-
logger.error(
2832-
"Cable space area problem; artificially set rounded corner radius to 0. "
2833-
f"{a_tf_turn_cable_space_no_void=} {dx_tf_turn_cable_space_average=}"
2834-
)
2835-
radius_tf_turn_cable_space_corners = 0.0e0
2836-
a_tf_turn_cable_space_no_void = dx_tf_turn_cable_space_average**2
2837-
2838-
# Cross-sectional area of conduit jacket per turn [m2]
2839-
a_tf_turn_steel = t_conductor**2 - a_tf_turn_cable_space_no_void
2946+
f_a_tf_turn_cable_space_cooling = 1 - (
2947+
a_tf_turn_cable_space_effective / a_tf_turn_cable_space_no_void
2948+
)
28402949

2841-
# REBCO turn structure
2842-
elif i_tf_sc_mat == 6:
2843-
# Diameter of circular cable space inside conduit [m]
2844-
dx_tf_turn_cable_space_average = t_conductor - 2.0e0 * dx_tf_turn_steel
2950+
if a_tf_turn_cable_space_no_void <= 0.0e0:
2951+
if t_conductor < 0.0e0:
2952+
logger.error(
2953+
f"Negative cable space dimension. {a_tf_turn_cable_space_no_void=} "
2954+
f"{dx_tf_turn_cable_space_average=}"
2955+
)
2956+
else:
2957+
logger.error(
2958+
"Cable space area problem; artificially set rounded corner radius to 0. "
2959+
f"{a_tf_turn_cable_space_no_void=} {dx_tf_turn_cable_space_average=}"
2960+
)
2961+
radius_tf_turn_cable_space_corners = 0.0e0
2962+
a_tf_turn_cable_space_no_void = dx_tf_turn_cable_space_average**2
28452963

2846-
# Cross-sectional area of conduit jacket per turn [m2]
2847-
a_tf_turn_steel = t_conductor**2 - a_tf_turn_cable_space_no_void
2964+
# Cross-sectional area of conduit jacket per turn [m2]
2965+
a_tf_turn_steel = t_conductor**2 - a_tf_turn_cable_space_no_void
28482966

28492967
return (
28502968
a_tf_turn_cable_space_no_void,

0 commit comments

Comments
 (0)