@@ -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,64 @@ 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+ i_tf_sc_mat = tfcoil_variables .i_tf_sc_mat ,
1970+ dx_tf_turn_general = tfcoil_variables .dx_tf_turn_general ,
1971+ c_tf_turn = tfcoil_variables .c_tf_turn ,
1972+ i_dx_tf_turn_general_input = tfcoil_variables .i_dx_tf_turn_general_input ,
1973+ i_dx_tf_turn_cable_space_general_input = tfcoil_variables .i_dx_tf_turn_cable_space_general_input ,
1974+ dx_tf_turn_cable_space_general = tfcoil_variables .dx_tf_turn_cable_space_general ,
1975+ layer_ins = tfcoil_variables .layer_ins ,
1976+ a_tf_wp_no_insulation = superconducting_tf_coil_variables .a_tf_wp_no_insulation ,
1977+ dia_tf_turn_coolant_channel = tfcoil_variables .dia_tf_turn_coolant_channel ,
1978+ f_a_tf_turn_cable_space_extra_void = tfcoil_variables .f_a_tf_turn_cable_space_extra_void ,
1979+ )
19491980
19501981 else :
19511982 # Integer number of turns
@@ -2628,12 +2659,110 @@ def tf_wp_currents(self):
26282659 ),
26292660 )
26302661
2662+ def tf_croco_averaged_turn_geometry (
2663+ self ,
2664+ j_tf_wp ,
2665+ dx_tf_turn_steel ,
2666+ dx_tf_turn_insulation ,
2667+ dx_tf_turn_general ,
2668+ c_tf_turn ,
2669+ i_dx_tf_turn_general_input ,
2670+ i_dx_tf_turn_cable_space_general_input ,
2671+ dx_tf_turn_cable_space_general ,
2672+ layer_ins ,
2673+ a_tf_wp_no_insulation ,
2674+ ):
2675+ """
2676+ subroutine straight from Python, see comments in tf_averaged_turn_geom_wrapper
2677+ Authors : J. Morris, CCFE
2678+ Authors : S. Kahn, CCFE
2679+ Setting the TF WP turn geometry for SC magnets from the number
2680+ the current per turn.
2681+ This calculation has two purposes, first to check if a turn can exist
2682+ (positive cable space) and the second to provide its dimensions,
2683+ areas and the (float) number of turns
2684+ """
2685+
2686+ # Turn dimension is a an input
2687+ if i_dx_tf_turn_general_input :
2688+ # Turn area [m2]
2689+ a_tf_turn = dx_tf_turn_general ** 2
2690+
2691+ # Current per turn [A]
2692+ c_tf_turn = a_tf_turn * j_tf_wp
2693+
2694+ # Turn cable dimension is an input
2695+ elif i_dx_tf_turn_cable_space_general_input :
2696+ # Turn squared dimension [m]
2697+ dx_tf_turn_general = dx_tf_turn_cable_space_general + 2.0e0 * (
2698+ dx_tf_turn_insulation + dx_tf_turn_steel
2699+ )
2700+
2701+ # Turn area [m2]
2702+ a_tf_turn = dx_tf_turn_general ** 2
2703+
2704+ # Current per turn [A]
2705+ c_tf_turn = a_tf_turn * j_tf_wp
2706+
2707+ # Current per turn is an input
2708+ else :
2709+ # Turn area [m2]
2710+ # Allow for additional inter-layer insulation MDK 13/11/18
2711+ # Area of turn including conduit and inter-layer insulation
2712+ a_tf_turn = c_tf_turn / j_tf_wp
2713+
2714+ # Dimension of square cross-section of each turn including inter-turn insulation [m]
2715+ dx_tf_turn_general = np .sqrt (a_tf_turn )
2716+
2717+ # Square turn assumption
2718+ dr_tf_turn = dx_tf_turn_general
2719+ dx_tf_turn = dx_tf_turn_general
2720+
2721+ # See derivation in the following document
2722+ # k:\power plant physics and technology\process\hts\hts coil module for process.docx
2723+ t_conductor = (
2724+ - layer_ins + np .sqrt (layer_ins ** 2 + 4.0e00 * a_tf_turn )
2725+ ) / 2 - 2.0e0 * dx_tf_turn_insulation
2726+
2727+ # Total number of turns per TF coil (not required to be an integer)
2728+ n_tf_coil_turns = a_tf_wp_no_insulation / a_tf_turn
2729+
2730+ # Area of inter-turn insulation: single turn [m2]
2731+ a_tf_turn_insulation = a_tf_turn - t_conductor ** 2
2732+
2733+ # NOTE: Fortran has a_tf_turn_cable_space_no_void as an intent(out) variable that was outputting
2734+ # into tfcoil_variables.a_tf_turn_cable_space_no_void. The local variable, however, appears to
2735+ # initially hold the value of tfcoil_variables.a_tf_turn_cable_space_no_void despite not being
2736+ # intent(in). I have replicated this behaviour in Python for now.
2737+ a_tf_turn_cable_space_no_void = copy .copy (
2738+ tfcoil_variables .a_tf_turn_cable_space_no_void
2739+ )
2740+
2741+ # Diameter of circular cable space inside conduit [m]
2742+ dx_tf_turn_cable_space_average = t_conductor - 2.0e0 * dx_tf_turn_steel
2743+
2744+ # Cross-sectional area of conduit jacket per turn [m2]
2745+ a_tf_turn_steel = t_conductor ** 2 - a_tf_turn_cable_space_no_void
2746+
2747+ return (
2748+ a_tf_turn_cable_space_no_void ,
2749+ a_tf_turn_steel ,
2750+ a_tf_turn_insulation ,
2751+ n_tf_coil_turns ,
2752+ dx_tf_turn_general ,
2753+ c_tf_turn ,
2754+ dx_tf_turn_general ,
2755+ dr_tf_turn ,
2756+ dx_tf_turn ,
2757+ t_conductor ,
2758+ dx_tf_turn_cable_space_average ,
2759+ )
2760+
26312761 def tf_cable_in_conduit_averaged_turn_geometry (
26322762 self ,
26332763 j_tf_wp ,
26342764 dx_tf_turn_steel ,
26352765 dx_tf_turn_insulation ,
2636- i_tf_sc_mat ,
26372766 dx_tf_turn_general ,
26382767 c_tf_turn ,
26392768 i_dx_tf_turn_general_input ,
@@ -2710,65 +2839,55 @@ def tf_cable_in_conduit_averaged_turn_geometry(
27102839 tfcoil_variables .a_tf_turn_cable_space_no_void
27112840 )
27122841
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
2842+ # Radius of rounded corners of cable space inside conduit [m]
2843+ radius_tf_turn_cable_space_corners = dx_tf_turn_steel * 0.75e0
27202844
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- )
2845+ # Dimension of square cable space inside conduit [m]
2846+ dx_tf_turn_cable_space_average = t_conductor - 2.0e0 * dx_tf_turn_steel
27272847
2728- # Calculate the true effective cable space by taking away the cooling
2729- # channel and the extra void fraction
2848+ # Cross-sectional area of cable space per turn
2849+ # taking account of rounded inside corners [m2]
2850+ a_tf_turn_cable_space_no_void = (
2851+ dx_tf_turn_cable_space_average ** 2
2852+ - (4.0e0 - np .pi ) * radius_tf_turn_cable_space_corners ** 2
2853+ )
27302854
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- )
2855+ # Calculate the true effective cable space by taking away the cooling
2856+ # channel and the extra void fraction
27432857
2744- f_a_tf_turn_cable_space_cooling = 1 - (
2745- a_tf_turn_cable_space_effective / a_tf_turn_cable_space_no_void
2858+ a_tf_turn_cable_space_effective = (
2859+ a_tf_turn_cable_space_no_void
2860+ -
2861+ # Coolant channel area
2862+ (
2863+ (np .pi / 4.0e0 )
2864+ * dia_tf_turn_coolant_channel
2865+ * dia_tf_turn_coolant_channel
27462866 )
2867+ # Additional void area deduction
2868+ - (a_tf_turn_cable_space_no_void * f_a_tf_turn_cable_space_extra_void )
2869+ )
27472870
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
2871+ f_a_tf_turn_cable_space_cooling = 1 - (
2872+ a_tf_turn_cable_space_effective / a_tf_turn_cable_space_no_void
2873+ )
27642874
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
2875+ if a_tf_turn_cable_space_no_void <= 0.0e0 :
2876+ if t_conductor < 0.0e0 :
2877+ logger .error (
2878+ f"Negative cable space dimension. { a_tf_turn_cable_space_no_void = } "
2879+ f"{ dx_tf_turn_cable_space_average = } "
2880+ )
2881+ else :
2882+ logger .error (
2883+ "Cable space area problem; artificially set rounded corner radius to 0. "
2884+ f"{ a_tf_turn_cable_space_no_void = } { dx_tf_turn_cable_space_average = } "
2885+ )
2886+ radius_tf_turn_cable_space_corners = 0.0e0
2887+ a_tf_turn_cable_space_no_void = dx_tf_turn_cable_space_average ** 2
27692888
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
2889+ # Cross-sectional area of conduit jacket per turn [m2]
2890+ a_tf_turn_steel = t_conductor ** 2 - a_tf_turn_cable_space_no_void
27722891
27732892 return (
27742893 a_tf_turn_cable_space_no_void ,
0 commit comments