@@ -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.
@@ -1855,7 +1857,9 @@ def peak_b_tf_inboard_with_ripple(
18551857 * b_tf_inboard_peak_symmetric
18561858 )
18571859
1858- def sc_tf_internal_geom (self , i_tf_wp_geom , i_tf_case_geom , i_tf_turns_integer ):
1860+ def sc_tf_internal_geom (
1861+ self , i_tf_wp_geom , i_tf_case_geom , i_tf_turns_integer , i_tf_sc_mat
1862+ ):
18591863 """
18601864 Author : S. Kahn, CCFE
18611865 Seting the WP, case and turns geometry for SC magnets
@@ -1915,37 +1919,63 @@ def sc_tf_internal_geom(self, i_tf_wp_geom, i_tf_case_geom, i_tf_turns_integer):
19151919
19161920 # Setting the WP turn geometry / areas
19171921 if i_tf_turns_integer == 0 :
1918- # Non-ingeger number of turns
1919- (
1920- tfcoil_variables .a_tf_turn_cable_space_no_void ,
1921- tfcoil_variables .a_tf_turn_steel ,
1922- tfcoil_variables .a_tf_turn_insulation ,
1923- tfcoil_variables .n_tf_coil_turns ,
1924- tfcoil_variables .dx_tf_turn_general ,
1925- tfcoil_variables .c_tf_turn ,
1926- tfcoil_variables .dx_tf_turn_general ,
1927- superconducting_tf_coil_variables .dr_tf_turn ,
1928- superconducting_tf_coil_variables .dx_tf_turn ,
1929- tfcoil_variables .t_conductor ,
1930- superconducting_tf_coil_variables .radius_tf_turn_cable_space_corners ,
1931- superconducting_tf_coil_variables .dx_tf_turn_cable_space_average ,
1932- superconducting_tf_coil_variables .a_tf_turn_cable_space_effective ,
1933- superconducting_tf_coil_variables .f_a_tf_turn_cable_space_cooling ,
1934- ) = self .tf_cable_in_conduit_averaged_turn_geometry (
1935- j_tf_wp = tfcoil_variables .j_tf_wp ,
1936- dx_tf_turn_steel = tfcoil_variables .dx_tf_turn_steel ,
1937- dx_tf_turn_insulation = tfcoil_variables .dx_tf_turn_insulation ,
1938- i_tf_sc_mat = tfcoil_variables .i_tf_sc_mat ,
1939- dx_tf_turn_general = tfcoil_variables .dx_tf_turn_general ,
1940- c_tf_turn = tfcoil_variables .c_tf_turn ,
1941- i_dx_tf_turn_general_input = tfcoil_variables .i_dx_tf_turn_general_input ,
1942- i_dx_tf_turn_cable_space_general_input = tfcoil_variables .i_dx_tf_turn_cable_space_general_input ,
1943- dx_tf_turn_cable_space_general = tfcoil_variables .dx_tf_turn_cable_space_general ,
1944- layer_ins = tfcoil_variables .layer_ins ,
1945- a_tf_wp_no_insulation = superconducting_tf_coil_variables .a_tf_wp_no_insulation ,
1946- dia_tf_turn_coolant_channel = tfcoil_variables .dia_tf_turn_coolant_channel ,
1947- f_a_tf_turn_cable_space_extra_void = tfcoil_variables .f_a_tf_turn_cable_space_extra_void ,
1948- )
1922+ # Non-integer number of turns
1923+ if i_tf_sc_mat == 6 :
1924+ # Specific case for REBCO
1925+ (
1926+ tfcoil_variables .a_tf_turn_cable_space_no_void ,
1927+ tfcoil_variables .a_tf_turn_steel ,
1928+ tfcoil_variables .a_tf_turn_insulation ,
1929+ tfcoil_variables .n_tf_coil_turns ,
1930+ tfcoil_variables .dx_tf_turn_general ,
1931+ tfcoil_variables .c_tf_turn ,
1932+ tfcoil_variables .dx_tf_turn_general ,
1933+ superconducting_tf_coil_variables .dr_tf_turn ,
1934+ superconducting_tf_coil_variables .dx_tf_turn ,
1935+ tfcoil_variables .t_conductor ,
1936+ superconducting_tf_coil_variables .dx_tf_turn_cable_space_average ,
1937+ ) = self .tf_croco_averaged_turn_geometry (
1938+ j_tf_wp = tfcoil_variables .j_tf_wp ,
1939+ dx_tf_turn_steel = tfcoil_variables .dx_tf_turn_steel ,
1940+ dx_tf_turn_insulation = tfcoil_variables .dx_tf_turn_insulation ,
1941+ dx_tf_turn_general = tfcoil_variables .dx_tf_turn_general ,
1942+ c_tf_turn = tfcoil_variables .c_tf_turn ,
1943+ i_dx_tf_turn_general_input = tfcoil_variables .i_dx_tf_turn_general_input ,
1944+ i_dx_tf_turn_cable_space_general_input = tfcoil_variables .i_dx_tf_turn_cable_space_general_input ,
1945+ dx_tf_turn_cable_space_general = tfcoil_variables .dx_tf_turn_cable_space_general ,
1946+ layer_ins = tfcoil_variables .layer_ins ,
1947+ a_tf_wp_no_insulation = superconducting_tf_coil_variables .a_tf_wp_no_insulation ,
1948+ )
1949+ elif i_tf_sc_mat != 6 :
1950+ (
1951+ tfcoil_variables .a_tf_turn_cable_space_no_void ,
1952+ tfcoil_variables .a_tf_turn_steel ,
1953+ tfcoil_variables .a_tf_turn_insulation ,
1954+ tfcoil_variables .n_tf_coil_turns ,
1955+ tfcoil_variables .dx_tf_turn_general ,
1956+ tfcoil_variables .c_tf_turn ,
1957+ tfcoil_variables .dx_tf_turn_general ,
1958+ superconducting_tf_coil_variables .dr_tf_turn ,
1959+ superconducting_tf_coil_variables .dx_tf_turn ,
1960+ tfcoil_variables .t_conductor ,
1961+ superconducting_tf_coil_variables .radius_tf_turn_cable_space_corners ,
1962+ superconducting_tf_coil_variables .dx_tf_turn_cable_space_average ,
1963+ superconducting_tf_coil_variables .a_tf_turn_cable_space_effective ,
1964+ superconducting_tf_coil_variables .f_a_tf_turn_cable_space_cooling ,
1965+ ) = self .tf_cable_in_conduit_averaged_turn_geometry (
1966+ j_tf_wp = tfcoil_variables .j_tf_wp ,
1967+ dx_tf_turn_steel = tfcoil_variables .dx_tf_turn_steel ,
1968+ dx_tf_turn_insulation = tfcoil_variables .dx_tf_turn_insulation ,
1969+ dx_tf_turn_general = tfcoil_variables .dx_tf_turn_general ,
1970+ c_tf_turn = tfcoil_variables .c_tf_turn ,
1971+ i_dx_tf_turn_general_input = tfcoil_variables .i_dx_tf_turn_general_input ,
1972+ i_dx_tf_turn_cable_space_general_input = tfcoil_variables .i_dx_tf_turn_cable_space_general_input ,
1973+ dx_tf_turn_cable_space_general = tfcoil_variables .dx_tf_turn_cable_space_general ,
1974+ layer_ins = tfcoil_variables .layer_ins ,
1975+ a_tf_wp_no_insulation = superconducting_tf_coil_variables .a_tf_wp_no_insulation ,
1976+ dia_tf_turn_coolant_channel = tfcoil_variables .dia_tf_turn_coolant_channel ,
1977+ f_a_tf_turn_cable_space_extra_void = tfcoil_variables .f_a_tf_turn_cable_space_extra_void ,
1978+ )
19491979
19501980 else :
19511981 # Integer number of turns
@@ -2628,12 +2658,110 @@ def tf_wp_currents(self):
26282658 ),
26292659 )
26302660
2661+ def tf_croco_averaged_turn_geometry (
2662+ self ,
2663+ j_tf_wp ,
2664+ dx_tf_turn_steel ,
2665+ dx_tf_turn_insulation ,
2666+ dx_tf_turn_general ,
2667+ c_tf_turn ,
2668+ i_dx_tf_turn_general_input ,
2669+ i_dx_tf_turn_cable_space_general_input ,
2670+ dx_tf_turn_cable_space_general ,
2671+ layer_ins ,
2672+ a_tf_wp_no_insulation ,
2673+ ):
2674+ """
2675+ subroutine straight from Python, see comments in tf_averaged_turn_geom_wrapper
2676+ Authors : J. Morris, CCFE
2677+ Authors : S. Kahn, CCFE
2678+ Setting the TF WP turn geometry for SC magnets from the number
2679+ the current per turn.
2680+ This calculation has two purposes, first to check if a turn can exist
2681+ (positive cable space) and the second to provide its dimensions,
2682+ areas and the (float) number of turns
2683+ """
2684+
2685+ # Turn dimension is a an input
2686+ if i_dx_tf_turn_general_input :
2687+ # Turn area [m2]
2688+ a_tf_turn = dx_tf_turn_general ** 2
2689+
2690+ # Current per turn [A]
2691+ c_tf_turn = a_tf_turn * j_tf_wp
2692+
2693+ # Turn cable dimension is an input
2694+ elif i_dx_tf_turn_cable_space_general_input :
2695+ # Turn squared dimension [m]
2696+ dx_tf_turn_general = dx_tf_turn_cable_space_general + 2.0e0 * (
2697+ dx_tf_turn_insulation + dx_tf_turn_steel
2698+ )
2699+
2700+ # Turn area [m2]
2701+ a_tf_turn = dx_tf_turn_general ** 2
2702+
2703+ # Current per turn [A]
2704+ c_tf_turn = a_tf_turn * j_tf_wp
2705+
2706+ # Current per turn is an input
2707+ else :
2708+ # Turn area [m2]
2709+ # Allow for additional inter-layer insulation MDK 13/11/18
2710+ # Area of turn including conduit and inter-layer insulation
2711+ a_tf_turn = c_tf_turn / j_tf_wp
2712+
2713+ # Dimension of square cross-section of each turn including inter-turn insulation [m]
2714+ dx_tf_turn_general = np .sqrt (a_tf_turn )
2715+
2716+ # Square turn assumption
2717+ dr_tf_turn = dx_tf_turn_general
2718+ dx_tf_turn = dx_tf_turn_general
2719+
2720+ # See derivation in the following document
2721+ # k:\power plant physics and technology\process\hts\hts coil module for process.docx
2722+ t_conductor = (
2723+ - layer_ins + np .sqrt (layer_ins ** 2 + 4.0e00 * a_tf_turn )
2724+ ) / 2 - 2.0e0 * dx_tf_turn_insulation
2725+
2726+ # Total number of turns per TF coil (not required to be an integer)
2727+ n_tf_coil_turns = a_tf_wp_no_insulation / a_tf_turn
2728+
2729+ # Area of inter-turn insulation: single turn [m2]
2730+ a_tf_turn_insulation = a_tf_turn - t_conductor ** 2
2731+
2732+ # NOTE: Fortran has a_tf_turn_cable_space_no_void as an intent(out) variable that was outputting
2733+ # into tfcoil_variables.a_tf_turn_cable_space_no_void. The local variable, however, appears to
2734+ # initially hold the value of tfcoil_variables.a_tf_turn_cable_space_no_void despite not being
2735+ # intent(in). I have replicated this behaviour in Python for now.
2736+ a_tf_turn_cable_space_no_void = copy .copy (
2737+ tfcoil_variables .a_tf_turn_cable_space_no_void
2738+ )
2739+
2740+ # Diameter of circular cable space inside conduit [m]
2741+ dx_tf_turn_cable_space_average = t_conductor - 2.0e0 * dx_tf_turn_steel
2742+
2743+ # Cross-sectional area of conduit jacket per turn [m2]
2744+ a_tf_turn_steel = t_conductor ** 2 - a_tf_turn_cable_space_no_void
2745+
2746+ return (
2747+ a_tf_turn_cable_space_no_void ,
2748+ a_tf_turn_steel ,
2749+ a_tf_turn_insulation ,
2750+ n_tf_coil_turns ,
2751+ dx_tf_turn_general ,
2752+ c_tf_turn ,
2753+ dx_tf_turn_general ,
2754+ dr_tf_turn ,
2755+ dx_tf_turn ,
2756+ t_conductor ,
2757+ dx_tf_turn_cable_space_average ,
2758+ )
2759+
26312760 def tf_cable_in_conduit_averaged_turn_geometry (
26322761 self ,
26332762 j_tf_wp ,
26342763 dx_tf_turn_steel ,
26352764 dx_tf_turn_insulation ,
2636- i_tf_sc_mat ,
26372765 dx_tf_turn_general ,
26382766 c_tf_turn ,
26392767 i_dx_tf_turn_general_input ,
@@ -2710,65 +2838,55 @@ def tf_cable_in_conduit_averaged_turn_geometry(
27102838 tfcoil_variables .a_tf_turn_cable_space_no_void
27112839 )
27122840
2713- # ITER like turn structure
2714- if i_tf_sc_mat != 6 :
2715- # Radius of rounded corners of cable space inside conduit [m]
2716- radius_tf_turn_cable_space_corners = dx_tf_turn_steel * 0.75e0
2717-
2718- # Dimension of square cable space inside conduit [m]
2719- dx_tf_turn_cable_space_average = t_conductor - 2.0e0 * dx_tf_turn_steel
2841+ # Radius of rounded corners of cable space inside conduit [m]
2842+ radius_tf_turn_cable_space_corners = dx_tf_turn_steel * 0.75e0
27202843
2721- # Cross-sectional area of cable space per turn
2722- # taking account of rounded inside corners [m2]
2723- a_tf_turn_cable_space_no_void = (
2724- dx_tf_turn_cable_space_average ** 2
2725- - (4.0e0 - np .pi ) * radius_tf_turn_cable_space_corners ** 2
2726- )
2844+ # Dimension of square cable space inside conduit [m]
2845+ dx_tf_turn_cable_space_average = t_conductor - 2.0e0 * dx_tf_turn_steel
27272846
2728- # Calculate the true effective cable space by taking away the cooling
2729- # channel and the extra void fraction
2847+ # Cross-sectional area of cable space per turn
2848+ # taking account of rounded inside corners [m2]
2849+ a_tf_turn_cable_space_no_void = (
2850+ dx_tf_turn_cable_space_average ** 2
2851+ - (4.0e0 - np .pi ) * radius_tf_turn_cable_space_corners ** 2
2852+ )
27302853
2731- a_tf_turn_cable_space_effective = (
2732- a_tf_turn_cable_space_no_void
2733- -
2734- # Coolant channel area
2735- (
2736- (np .pi / 4.0e0 )
2737- * dia_tf_turn_coolant_channel
2738- * dia_tf_turn_coolant_channel
2739- )
2740- # Additional void area deduction
2741- - (a_tf_turn_cable_space_no_void * f_a_tf_turn_cable_space_extra_void )
2742- )
2854+ # Calculate the true effective cable space by taking away the cooling
2855+ # channel and the extra void fraction
27432856
2744- f_a_tf_turn_cable_space_cooling = 1 - (
2745- a_tf_turn_cable_space_effective / a_tf_turn_cable_space_no_void
2857+ a_tf_turn_cable_space_effective = (
2858+ a_tf_turn_cable_space_no_void
2859+ -
2860+ # Coolant channel area
2861+ (
2862+ (np .pi / 4.0e0 )
2863+ * dia_tf_turn_coolant_channel
2864+ * dia_tf_turn_coolant_channel
27462865 )
2866+ # Additional void area deduction
2867+ - (a_tf_turn_cable_space_no_void * f_a_tf_turn_cable_space_extra_void )
2868+ )
27472869
2748- if a_tf_turn_cable_space_no_void <= 0.0e0 :
2749- if t_conductor < 0.0e0 :
2750- logger .error (
2751- f"Negative cable space dimension. { a_tf_turn_cable_space_no_void = } "
2752- f"{ dx_tf_turn_cable_space_average = } "
2753- )
2754- else :
2755- logger .error (
2756- "Cable space area problem; artificially set rounded corner radius to 0. "
2757- f"{ a_tf_turn_cable_space_no_void = } { dx_tf_turn_cable_space_average = } "
2758- )
2759- radius_tf_turn_cable_space_corners = 0.0e0
2760- a_tf_turn_cable_space_no_void = dx_tf_turn_cable_space_average ** 2
2761-
2762- # Cross-sectional area of conduit jacket per turn [m2]
2763- a_tf_turn_steel = t_conductor ** 2 - a_tf_turn_cable_space_no_void
2870+ f_a_tf_turn_cable_space_cooling = 1 - (
2871+ a_tf_turn_cable_space_effective / a_tf_turn_cable_space_no_void
2872+ )
27642873
2765- # REBCO turn structure
2766- elif i_tf_sc_mat == 6 :
2767- # Diameter of circular cable space inside conduit [m]
2768- dx_tf_turn_cable_space_average = t_conductor - 2.0e0 * dx_tf_turn_steel
2874+ if a_tf_turn_cable_space_no_void <= 0.0e0 :
2875+ if t_conductor < 0.0e0 :
2876+ logger .error (
2877+ f"Negative cable space dimension. { a_tf_turn_cable_space_no_void = } "
2878+ f"{ dx_tf_turn_cable_space_average = } "
2879+ )
2880+ else :
2881+ logger .error (
2882+ "Cable space area problem; artificially set rounded corner radius to 0. "
2883+ f"{ a_tf_turn_cable_space_no_void = } { dx_tf_turn_cable_space_average = } "
2884+ )
2885+ radius_tf_turn_cable_space_corners = 0.0e0
2886+ a_tf_turn_cable_space_no_void = dx_tf_turn_cable_space_average ** 2
27692887
2770- # Cross-sectional area of conduit jacket per turn [m2]
2771- a_tf_turn_steel = t_conductor ** 2 - a_tf_turn_cable_space_no_void
2888+ # Cross-sectional area of conduit jacket per turn [m2]
2889+ a_tf_turn_steel = t_conductor ** 2 - a_tf_turn_cable_space_no_void
27722890
27732891 return (
27742892 a_tf_turn_cable_space_no_void ,
0 commit comments