From 19b7c1d4e8e9c6fd7a1d2c21747091029d0cb679 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 14:27:45 +0100 Subject: [PATCH 01/24] =?UTF-8?q?=F0=9F=94=84=20-=20Rename=20variable=20'c?= =?UTF-8?q?roco=5Fod'=20to=20'dia=5Fcroco=5Fstrand'=20for=20improved=20cla?= =?UTF-8?q?rity=20and=20consistency=20across=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/rebco_variables.py | 6 +++--- process/superconducting_tf_coil.py | 16 ++++++++-------- process/superconductors.py | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 4cc508f5cd..525f01c88d 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -13,7 +13,7 @@ tape_thickness: float = None """thickness of tape, inc. all layers (hts, copper, substrate, etc.) (m)""" -croco_od: float = None +dia_croco_strand: float = None """Outer diameter of CroCo strand (m)""" croco_id: float = None @@ -64,7 +64,7 @@ def init_rebco_variables(): global copper_thick global hastelloy_thickness global tape_width - global croco_od + global dia_croco_strand global croco_id global croco_thick global copper_rrr @@ -87,7 +87,7 @@ def init_rebco_variables(): copper_thick = 100.0e-6 hastelloy_thickness = 50.0e-6 tape_width = 4.0e-3 - croco_od = 0.0 + dia_croco_strand = 0.0 croco_id = 0.0 croco_thick = 2.5e-3 copper_rrr = 100.0 diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index f60eea9e1b..8488d3557e 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -448,14 +448,14 @@ def supercon_croco( # Find critical current density in superconducting cable, j_crit_cable j_crit_sc, _ = superconductors.jcrit_rebco(thelium, b_tf_inboard_peak_symmetric) # tfcoil_variables.a_tf_turn_cable_space_no_void : Cable space - inside area (m2) - # Set new rebco_variables.croco_od - # allowing for scaling of rebco_variables.croco_od - rebco_variables.croco_od = ( + # Set new rebco_variables.dia_croco_strand + # allowing for scaling of rebco_variables.dia_croco_strand + rebco_variables.dia_croco_strand = ( tfcoil_variables.t_conductor / 3.0e0 - tfcoil_variables.dx_tf_turn_steel * (2.0e0 / 3.0e0) ) superconducting_tf_coil_variables.conductor_acs = ( - 9.0e0 / 4.0e0 * np.pi * rebco_variables.croco_od**2 + 9.0e0 / 4.0e0 * np.pi * rebco_variables.dia_croco_strand**2 ) tfcoil_variables.a_tf_turn_cable_space_no_void = ( superconducting_tf_coil_variables.conductor_acs @@ -494,7 +494,7 @@ def supercon_croco( ) = superconductors.croco( j_crit_sc, superconducting_tf_coil_variables.conductor_area, - rebco_variables.croco_od, + rebco_variables.dia_croco_strand, rebco_variables.croco_thick, ) @@ -581,9 +581,9 @@ def supercon_croco( ) po.ovarre( self.outfile, - "Outer diameter of CroCo copper tube (m) ", - "(croco_od)", - rebco_variables.croco_od, + "Diameter of a CroCo strand (m) ", + "(dia_croco_strand)", + rebco_variables.dia_croco_strand, "OP ", ) po.ovarre( diff --git a/process/superconductors.py b/process/superconductors.py index 430d7fc13d..ba9ca48542 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -850,12 +850,12 @@ def bottura_scaling( return j_scaling, b_critical, temp_critical -def croco(j_crit_sc, conductor_area, croco_od, croco_thick): +def croco(j_crit_sc, conductor_area, dia_croco_strand, croco_thick): """'CroCo' (cross-conductor) strand and cable design for 'REBCO' 2nd generation HTS superconductor Updated 13/11/18 using data from Lewandowska et al 2018. """ - d = croco_od + d = dia_croco_strand # d = conductor_width / 3.0d0 - dx_tf_turn_steel * ( 2.0d0 / 3.0d0 ) croco_id = d - 2.0 * croco_thick # scaling * 5.4d-3 From bb256445ecb09b35bb1d2f236b5dc678b709701f Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 14:45:42 +0100 Subject: [PATCH 02/24] =?UTF-8?q?=F0=9F=94=84=20-=20Rename=20'croco=5Fthic?= =?UTF-8?q?k'=20to=20'dx=5Fcroco=5Fstrand=5Fcopper'=20for=20improved=20cla?= =?UTF-8?q?rity=20and=20consistency=20across=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/numerics.py | 2 +- process/data_structure/rebco_variables.py | 8 ++++---- process/input.py | 2 +- process/iteration_variables.py | 2 +- process/superconducting_tf_coil.py | 8 ++++---- process/superconductors.py | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/process/data_structure/numerics.py b/process/data_structure/numerics.py index e3a94efa25..31aa738a0b 100644 --- a/process/data_structure/numerics.py +++ b/process/data_structure/numerics.py @@ -353,7 +353,7 @@ * (155) pfusife : IFE input fusion power (MW) (ifedrv=3 only) * (156) rrin : Input IFE repetition rate (Hz) (ifedrv=3 only) * (157) fvs_cs_pf_total_ramp : F-value for available to required start up flux (con. 51) -* (158) croco_thick : Thickness of CroCo copper tube (m) +* (158) dx_croco_strand_copper : Thickness of CroCo copper tube (m) * (159) ftoroidalgap : F-value for toroidalgap > dx_tf_inboard_out_toroidal constraint (con. 82) * (160) f_avspace (f-value for equation 83) * (161) fbeta_min (f-value for equation 84) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 525f01c88d..483368ead2 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -19,8 +19,8 @@ croco_id: float = None """Inner diameter of CroCo copper tube (m)""" -croco_thick: float = None -"""Thickness of CroCo copper tube (m) (`iteration variable 158`)""" +dx_croco_strand_copper: float = None +"""Thickness of CroCo strand copper tube (m) (`iteration variable 158`)""" copper_rrr: float = None """residual resistivity ratio copper in TF superconducting cable""" @@ -66,7 +66,7 @@ def init_rebco_variables(): global tape_width global dia_croco_strand global croco_id - global croco_thick + global dx_croco_strand_copper global copper_rrr global coppera_m2_max global f_coppera_m2 @@ -89,7 +89,7 @@ def init_rebco_variables(): tape_width = 4.0e-3 dia_croco_strand = 0.0 croco_id = 0.0 - croco_thick = 2.5e-3 + dx_croco_strand_copper = 2.5e-3 copper_rrr = 100.0 coppera_m2_max = 1.0e8 f_coppera_m2 = 1.0 diff --git a/process/input.py b/process/input.py index f5f7ed8404..3b59327f62 100644 --- a/process/input.py +++ b/process/input.py @@ -417,7 +417,7 @@ def __post_init__(self): "crane_clrnc_v": InputVariable( data_structure.buildings_variables, float, range=(0.0, 10.0) ), - "croco_thick": InputVariable( + "dx_croco_strand_copper": InputVariable( data_structure.rebco_variables, float, range=(0.001, 0.1) ), "cryomag_h": InputVariable( diff --git a/process/iteration_variables.py b/process/iteration_variables.py index e7e86ac400..cde40d50f6 100644 --- a/process/iteration_variables.py +++ b/process/iteration_variables.py @@ -388,7 +388,7 @@ class IterationVariable: "fvs_cs_pf_total_ramp", data_structure.pfcoil_variables, 1.0e-3, 1.0e1 ), 158: IterationVariable( - "croco_thick", data_structure.rebco_variables, 1.0e-3, 1.0e-1 + "dx_croco_strand_copper", data_structure.rebco_variables, 1.0e-3, 1.0e-1 ), 159: IterationVariable( "ftoroidalgap", data_structure.tfcoil_variables, 1.0e-4, 1.0 diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index 8488d3557e..ad130f7069 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -495,7 +495,7 @@ def supercon_croco( j_crit_sc, superconducting_tf_coil_variables.conductor_area, rebco_variables.dia_croco_strand, - rebco_variables.croco_thick, + rebco_variables.dx_croco_strand_copper, ) rebco_variables.coppera_m2 = ( @@ -595,9 +595,9 @@ def supercon_croco( ) po.ovarre( self.outfile, - "Thickness of CroCo copper tube (m) ", - "(croco_thick)", - rebco_variables.croco_thick, + "Thickness of of o copper tube (m) ", + "(dx_croco_strand_copper)", + rebco_variables.dx_croco_strand_copper, ) po.ovarre( diff --git a/process/superconductors.py b/process/superconductors.py index ba9ca48542..ea3052b8b0 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -850,7 +850,7 @@ def bottura_scaling( return j_scaling, b_critical, temp_critical -def croco(j_crit_sc, conductor_area, dia_croco_strand, croco_thick): +def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): """'CroCo' (cross-conductor) strand and cable design for 'REBCO' 2nd generation HTS superconductor Updated 13/11/18 using data from Lewandowska et al 2018. @@ -858,7 +858,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, croco_thick): d = dia_croco_strand # d = conductor_width / 3.0d0 - dx_tf_turn_steel * ( 2.0d0 / 3.0d0 ) - croco_id = d - 2.0 * croco_thick # scaling * 5.4d-3 + croco_id = d - 2.0 * dx_croco_strand_copper # scaling * 5.4d-3 if croco_id <= 0.0: logger.error("Negitive inner croco diameter") @@ -876,8 +876,8 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, croco_thick): tapes = stack_thickness / tape_thickness copper_area = ( - np.pi * croco_thick * d - - np.pi * croco_thick**2 + np.pi * dx_croco_strand_copper * d + - np.pi * dx_croco_strand_copper**2 + rebco_variables.copper_thick * tape_width * tapes # copper tube # copper in tape From 9eb4e56584585fd1484fe3cfcb86e3ace75ff9b4 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 14:53:25 +0100 Subject: [PATCH 03/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'rebco=5Fthicknes?= =?UTF-8?q?s'=20to=20'dx=5Fhts=5Ftape=5Frebco'=20for=20improved=20clarity?= =?UTF-8?q?=20and=20consistency=20across=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/numerics.py | 2 +- process/data_structure/rebco_variables.py | 6 +++--- process/input.py | 2 +- process/iteration_variables.py | 2 +- process/pfcoil.py | 2 +- process/superconducting_tf_coil.py | 6 +++--- process/superconductors.py | 14 +++++++------- tests/regression/input_files/st_regression.IN.DAT | 2 +- tests/unit/test_superconductors.py | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/process/data_structure/numerics.py b/process/data_structure/numerics.py index 31aa738a0b..c6121b0696 100644 --- a/process/data_structure/numerics.py +++ b/process/data_structure/numerics.py @@ -333,7 +333,7 @@ * (135) f_nd_impurity_electrons(13) : Xenon density fraction relative to electron density * (136) f_nd_impurity_electrons(14) : Tungsten density fraction relative to electron density * (137) fplhsep (f-value for equation 73) -* (138) rebco_thickness : thickness of REBCO layer in tape (m) +* (138) dx_hts_tape_rebco : thickness of REBCO layer in tape (m) * (139) copper_thick : thickness of copper layer in tape (m) * (140) dr_tf_wp_with_insulation : radial thickness of TFC winding pack (m) * (141) ftemp_croco_quench_max : TF coil quench temperature < temp_croco_quench_max (f-value for equation 74) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 483368ead2..7ecd257709 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -1,4 +1,4 @@ -rebco_thickness: float = None +dx_hts_tape_rebco: float = None """thickness of REBCO layer in tape (m) (`iteration variable 138`)""" copper_thick: float = None @@ -60,7 +60,7 @@ def init_rebco_variables(): """Initialise the REBCO variables""" - global rebco_thickness + global dx_hts_tape_rebco global copper_thick global hastelloy_thickness global tape_width @@ -83,7 +83,7 @@ def init_rebco_variables(): global f_copperaoh_m2 global copperaoh_m2 - rebco_thickness = 1.0e-6 + dx_hts_tape_rebco = 1.0e-6 copper_thick = 100.0e-6 hastelloy_thickness = 50.0e-6 tape_width = 4.0e-3 diff --git a/process/input.py b/process/input.py index 3b59327f62..06134cc011 100644 --- a/process/input.py +++ b/process/input.py @@ -1448,7 +1448,7 @@ def __post_init__(self): "reactor_wall_thk": InputVariable( data_structure.buildings_variables, float, range=(0.25, 25.0) ), - "rebco_thickness": InputVariable( + "dx_hts_tape_rebco": InputVariable( data_structure.rebco_variables, float, range=(1e-08, 0.0001), diff --git a/process/iteration_variables.py b/process/iteration_variables.py index cde40d50f6..3bfd619a49 100644 --- a/process/iteration_variables.py +++ b/process/iteration_variables.py @@ -346,7 +346,7 @@ class IterationVariable: ), 137: IterationVariable("fplhsep", data_structure.physics_variables, 0.001, 1.0), 138: IterationVariable( - "rebco_thickness", data_structure.physics_variables, 0.01e-6, 100.0e-6 + "dx_hts_tape_rebco", data_structure.physics_variables, 0.01e-6, 100.0e-6 ), 139: IterationVariable( "copper_thick", data_structure.rebco_variables, 1.0e-6, 1.0e-3 diff --git a/process/pfcoil.py b/process/pfcoil.py index d3badb0191..5eb062478d 100644 --- a/process/pfcoil.py +++ b/process/pfcoil.py @@ -4171,7 +4171,7 @@ def superconpf(bmax, fhe, fcu, jwp, isumat, fhts, strain, thelium, bcritsc, tcri bc20m, tc0m, rcv.tape_width, - rcv.rebco_thickness, + rcv.dx_hts_tape_rebco, rcv.tape_thickness, ) # A0 calculated for tape cross section already diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index ad130f7069..52d9edafad 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -556,8 +556,8 @@ def supercon_croco( po.ovarre( self.outfile, "Thickness of REBCO layer in tape (m)", - "(rebco_thickness)", - rebco_variables.rebco_thickness, + "(dx_hts_tape_rebco)", + rebco_variables.dx_hts_tape_rebco, ) po.ovarre( self.outfile, @@ -1251,7 +1251,7 @@ def tf_cable_in_conduit_superconductor_properties( b_c20max=bc20m, t_c0=tc0m, tape_width=rebco_variables.tape_width, - rebco_thickness=rebco_variables.rebco_thickness, + dx_hts_tape_rebco=rebco_variables.dx_hts_tape_rebco, tape_thickness=rebco_variables.tape_thickness, ) # Scale for the copper area fraction of the cable diff --git a/process/superconductors.py b/process/superconductors.py index ea3052b8b0..34d368cf03 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -523,7 +523,7 @@ def hijc_rebco( b_c20max: float, t_c0: float, tape_width: float, - rebco_thickness: float, + dx_hts_tape_rebco: float, tape_thickness: float, ) -> tuple[float, float, float]: """ @@ -541,8 +541,8 @@ def hijc_rebco( :type t_c0: float :param tape_width: Width of the tape (m). :type tape_width: float - :param rebco_thickness: Thickness of the REBCO layer (m). - :type rebco_thickness: float + :param dx_hts_tape_rebco: Thickness of the REBCO layer (m). + :type dx_hts_tape_rebco: float :param tape_thickness: Total thickness of the tape (m). :type tape_thickness: float :return: Tuple containing: @@ -625,7 +625,7 @@ def hijc_rebco( # between tape stacks and CORC cable layouts. j_critical = ( - j_critical * (tape_width * rebco_thickness) / (tape_width * tape_thickness) + j_critical * (tape_width * dx_hts_tape_rebco) / (tape_width * tape_thickness) ) return j_critical, b_critical, temp_critical @@ -868,7 +868,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): tape_width = scaling * 3.75e-3 # Properties of a single strand tape_thickness = ( - rebco_variables.rebco_thickness + rebco_variables.dx_hts_tape_rebco + rebco_variables.copper_thick + rebco_variables.hastelloy_thickness ) @@ -885,7 +885,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): hastelloy_area = rebco_variables.hastelloy_thickness * tape_width * tapes solder_area = np.pi / 4.0 * croco_id**2 - stack_thickness * tape_width - rebco_area = rebco_variables.rebco_thickness * tape_width * tapes + rebco_area = rebco_variables.dx_hts_tape_rebco * tape_width * tapes croco_strand_area = np.pi / 4.0 * d**2 croco_strand_critical_current = j_crit_sc * rebco_area @@ -999,7 +999,7 @@ def superconductor_current_density_margin( bc20m, tc0m, rebco_variables.tape_width, - rebco_variables.rebco_thickness, + rebco_variables.dx_hts_tape_rebco, rebco_variables.tape_thickness, )[0], } diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index 77f88eb97b..602d536a57 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -923,7 +923,7 @@ i_tf_sc_mat = 9 * JUSTIFICATION: *ixc = 138 -*rebco_thickness = 1.0E-6 +*dx_hts_tape_rebco = 1.0E-6 *boundl(138) = *boundu(138) = * DESCRIPTION: Thickness of REBCO layer in tape (m) (iteration variable 138) (default = 1.0E-6) diff --git a/tests/unit/test_superconductors.py b/tests/unit/test_superconductors.py index 63da8cd460..ae29a9973b 100644 --- a/tests/unit/test_superconductors.py +++ b/tests/unit/test_superconductors.py @@ -194,7 +194,7 @@ def test_hijc_rebco(): b_c20max=30.0, t_c0=25.0, tape_width=4.0e-3, - rebco_thickness=1.0e-6, + dx_hts_tape_rebco=1.0e-6, tape_thickness=6.5e-5, ) From f7dae9bc830947f6c6d06ebf2125521e17d49cce Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 14:58:13 +0100 Subject: [PATCH 04/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'copper=5Fthick'?= =?UTF-8?q?=20to=20'dx=5Fhts=5Ftape=5Fcopper'=20for=20improved=20clarity?= =?UTF-8?q?=20and=20consistency=20across=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/numerics.py | 2 +- process/data_structure/rebco_variables.py | 6 +++--- process/input.py | 2 +- process/iteration_variables.py | 2 +- process/superconducting_tf_coil.py | 4 ++-- process/superconductors.py | 4 ++-- tests/regression/input_files/st_regression.IN.DAT | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/process/data_structure/numerics.py b/process/data_structure/numerics.py index c6121b0696..c52ba408e0 100644 --- a/process/data_structure/numerics.py +++ b/process/data_structure/numerics.py @@ -334,7 +334,7 @@ * (136) f_nd_impurity_electrons(14) : Tungsten density fraction relative to electron density * (137) fplhsep (f-value for equation 73) * (138) dx_hts_tape_rebco : thickness of REBCO layer in tape (m) -* (139) copper_thick : thickness of copper layer in tape (m) +* (139) dx_hts_tape_copper : thickness of copper layer in tape (m) * (140) dr_tf_wp_with_insulation : radial thickness of TFC winding pack (m) * (141) ftemp_croco_quench_max : TF coil quench temperature < temp_croco_quench_max (f-value for equation 74) * (142) nd_plasma_separatrix_electron : electron density at separatrix [m-3] diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 7ecd257709..598579f248 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -1,7 +1,7 @@ dx_hts_tape_rebco: float = None """thickness of REBCO layer in tape (m) (`iteration variable 138`)""" -copper_thick: float = None +dx_hts_tape_copper: float = None """thickness of copper layer in tape (m) (`iteration variable 139`)""" hastelloy_thickness: float = None @@ -61,7 +61,7 @@ def init_rebco_variables(): """Initialise the REBCO variables""" global dx_hts_tape_rebco - global copper_thick + global dx_hts_tape_copper global hastelloy_thickness global tape_width global dia_croco_strand @@ -84,7 +84,7 @@ def init_rebco_variables(): global copperaoh_m2 dx_hts_tape_rebco = 1.0e-6 - copper_thick = 100.0e-6 + dx_hts_tape_copper = 100.0e-6 hastelloy_thickness = 50.0e-6 tape_width = 4.0e-3 dia_croco_strand = 0.0 diff --git a/process/input.py b/process/input.py index 06134cc011..53c83948aa 100644 --- a/process/input.py +++ b/process/input.py @@ -360,7 +360,7 @@ def __post_init__(self): "copper_rrr": InputVariable( data_structure.rebco_variables, float, range=(1.0, 10000.0) ), - "copper_thick": InputVariable( + "dx_hts_tape_copper": InputVariable( data_structure.rebco_variables, float, range=(0.0, 0.001) ), "copperaoh_m2": InputVariable( diff --git a/process/iteration_variables.py b/process/iteration_variables.py index 3bfd619a49..6880205110 100644 --- a/process/iteration_variables.py +++ b/process/iteration_variables.py @@ -349,7 +349,7 @@ class IterationVariable: "dx_hts_tape_rebco", data_structure.physics_variables, 0.01e-6, 100.0e-6 ), 139: IterationVariable( - "copper_thick", data_structure.rebco_variables, 1.0e-6, 1.0e-3 + "dx_hts_tape_copper", data_structure.rebco_variables, 1.0e-6, 1.0e-3 ), 140: IterationVariable( "dr_tf_wp_with_insulation", data_structure.tfcoil_variables, 0.001, 2.0 diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index 52d9edafad..e4b5dfcb7a 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -562,8 +562,8 @@ def supercon_croco( po.ovarre( self.outfile, "Thickness of copper layer in tape (m)", - "(copper_thick )", - rebco_variables.copper_thick, + "(dx_hts_tape_copper )", + rebco_variables.dx_hts_tape_copper, ) po.ovarre( self.outfile, diff --git a/process/superconductors.py b/process/superconductors.py index 34d368cf03..33225f7e88 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -869,7 +869,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): # Properties of a single strand tape_thickness = ( rebco_variables.dx_hts_tape_rebco - + rebco_variables.copper_thick + + rebco_variables.dx_hts_tape_copper + rebco_variables.hastelloy_thickness ) stack_thickness = np.sqrt(croco_id**2 - tape_width**2) @@ -878,7 +878,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): copper_area = ( np.pi * dx_croco_strand_copper * d - np.pi * dx_croco_strand_copper**2 - + rebco_variables.copper_thick + + rebco_variables.dx_hts_tape_copper * tape_width * tapes # copper tube # copper in tape ) diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index 602d536a57..1c4b2769f1 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -930,7 +930,7 @@ i_tf_sc_mat = 9 * JUSTIFICATION: *ixc = 139 -*copper_thick = +*dx_hts_tape_copper = *boundl(139) = *boundu(139) = * DESCRIPTION: Thickness of copper layer in tape (m) (iteration variable 139) (default = 100.0E-6) From fd15dee67e59a704f114786bdb458024653e0242 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 14:59:25 +0100 Subject: [PATCH 05/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'hastelloy=5Fthic?= =?UTF-8?q?kness'=20to=20'dx=5Fhts=5Ftape=5Fhastelloy'=20for=20improved=20?= =?UTF-8?q?clarity=20and=20consistency=20across=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/rebco_variables.py | 6 +++--- process/input.py | 2 +- process/superconducting_tf_coil.py | 4 ++-- process/superconductors.py | 4 ++-- tests/regression/input_files/st_regression.IN.DAT | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 598579f248..2e7c7caddf 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -4,7 +4,7 @@ dx_hts_tape_copper: float = None """thickness of copper layer in tape (m) (`iteration variable 139`)""" -hastelloy_thickness: float = None +dx_hts_tape_hastelloy: float = None """thickness of Hastelloy layer in tape (m)""" tape_width: float = None @@ -62,7 +62,7 @@ def init_rebco_variables(): """Initialise the REBCO variables""" global dx_hts_tape_rebco global dx_hts_tape_copper - global hastelloy_thickness + global dx_hts_tape_hastelloy global tape_width global dia_croco_strand global croco_id @@ -85,7 +85,7 @@ def init_rebco_variables(): dx_hts_tape_rebco = 1.0e-6 dx_hts_tape_copper = 100.0e-6 - hastelloy_thickness = 50.0e-6 + dx_hts_tape_hastelloy = 50.0e-6 tape_width = 4.0e-3 dia_croco_strand = 0.0 croco_id = 0.0 diff --git a/process/input.py b/process/input.py index 53c83948aa..fc0a1365ec 100644 --- a/process/input.py +++ b/process/input.py @@ -1057,7 +1057,7 @@ def __post_init__(self): "n_ecrh_harmonic": InputVariable( data_structure.current_drive_variables, float, range=(1.0, 10.0) ), - "hastelloy_thickness": InputVariable( + "dx_hts_tape_hastelloy": InputVariable( data_structure.rebco_variables, float, range=(1e-08, 0.001) ), "hccl": InputVariable(data_structure.buildings_variables, float, range=(0.0, 10.0)), diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index e4b5dfcb7a..1eeed1525c 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -568,8 +568,8 @@ def supercon_croco( po.ovarre( self.outfile, "Thickness of Hastelloy layer in tape (m) ", - "(hastelloy_thickness)", - rebco_variables.hastelloy_thickness, + "(dx_hts_tape_hastelloy)", + rebco_variables.dx_hts_tape_hastelloy, ) po.ovarre( diff --git a/process/superconductors.py b/process/superconductors.py index 33225f7e88..45a861c985 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -870,7 +870,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): tape_thickness = ( rebco_variables.dx_hts_tape_rebco + rebco_variables.dx_hts_tape_copper - + rebco_variables.hastelloy_thickness + + rebco_variables.dx_hts_tape_hastelloy ) stack_thickness = np.sqrt(croco_id**2 - tape_width**2) tapes = stack_thickness / tape_thickness @@ -882,7 +882,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): * tape_width * tapes # copper tube # copper in tape ) - hastelloy_area = rebco_variables.hastelloy_thickness * tape_width * tapes + hastelloy_area = rebco_variables.dx_hts_tape_hastelloy * tape_width * tapes solder_area = np.pi / 4.0 * croco_id**2 - stack_thickness * tape_width rebco_area = rebco_variables.dx_hts_tape_rebco * tape_width * tapes diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index 1c4b2769f1..e9494e4f75 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -918,7 +918,7 @@ i_tf_sc_mat = 9 * DESCRIPTION: Thickness of tape, inc. all layers (hts, copper, substrate, etc.) (m) (default = 6.5E-5) * JUSTIFICATION: -*hastelloy_thickness = +*dx_hts_tape_hastelloy = * DESCRIPTION: Thickness of Hastelloy layer in HTS tape (m) (default = 50.0E-6) * JUSTIFICATION: From 8a867b2dd5c99f7f9ac4f0a63683bd4314a92ccb Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 15:02:28 +0100 Subject: [PATCH 06/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'stack=5Fthicknes?= =?UTF-8?q?s'=20to=20'dx=5Fcroco=5Fstrand=5Ftape=5Fstack'=20for=20improved?= =?UTF-8?q?=20clarity=20and=20consistency=20across=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/rebco_variables.py | 6 +++--- process/superconducting_tf_coil.py | 4 ++-- process/superconductors.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 2e7c7caddf..33b6dc14ca 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -43,7 +43,7 @@ f_copperaoh_m2: float = None """f-value for constraint 88: CS coil current / copper area < copperA_m2_max""" -stack_thickness: float = None +dx_croco_strand_tape_stack: float = None tapes: float = None @@ -71,7 +71,7 @@ def init_rebco_variables(): global coppera_m2_max global f_coppera_m2 global tape_thickness - global stack_thickness + global dx_croco_strand_tape_stack global tapes global rebco_area global copper_area @@ -94,7 +94,7 @@ def init_rebco_variables(): coppera_m2_max = 1.0e8 f_coppera_m2 = 1.0 tape_thickness = 6.5e-5 - stack_thickness = 0.0 + dx_croco_strand_tape_stack = 0.0 tapes = 0.0 rebco_area = 0.0 copper_area = 0.0 diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index 1eeed1525c..88167ac3ac 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -610,8 +610,8 @@ def supercon_croco( po.ovarre( self.outfile, "Thickness of stack of rebco_variables.tapes (m) ", - "(stack_thickness)", - rebco_variables.stack_thickness, + "(dx_croco_strand_tape_stack)", + rebco_variables.dx_croco_strand_tape_stack, "OP ", ) po.ovarre( diff --git a/process/superconductors.py b/process/superconductors.py index 45a861c985..2f7bae2420 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -872,8 +872,8 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): + rebco_variables.dx_hts_tape_copper + rebco_variables.dx_hts_tape_hastelloy ) - stack_thickness = np.sqrt(croco_id**2 - tape_width**2) - tapes = stack_thickness / tape_thickness + dx_croco_strand_tape_stack = np.sqrt(croco_id**2 - tape_width**2) + tapes = dx_croco_strand_tape_stack / tape_thickness copper_area = ( np.pi * dx_croco_strand_copper * d @@ -883,7 +883,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): * tapes # copper tube # copper in tape ) hastelloy_area = rebco_variables.dx_hts_tape_hastelloy * tape_width * tapes - solder_area = np.pi / 4.0 * croco_id**2 - stack_thickness * tape_width + solder_area = np.pi / 4.0 * croco_id**2 - dx_croco_strand_tape_stack * tape_width rebco_area = rebco_variables.dx_hts_tape_rebco * tape_width * tapes croco_strand_area = np.pi / 4.0 * d**2 From 34d44c5ff6aca5b8b905a2f4974662fc495e89d0 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 15:06:08 +0100 Subject: [PATCH 07/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'tape=5Fthickness?= =?UTF-8?q?'=20to=20'dx=5Fhts=5Ftape=5Ftotal'=20for=20improved=20clarity?= =?UTF-8?q?=20and=20consistency=20across=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/rebco_variables.py | 6 +++--- process/input.py | 2 +- process/pfcoil.py | 2 +- process/superconducting_tf_coil.py | 6 +++--- process/superconductors.py | 14 +++++++------- tests/regression/input_files/st_regression.IN.DAT | 2 +- tests/unit/test_superconductors.py | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 33b6dc14ca..8d358a211b 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -10,7 +10,7 @@ tape_width: float = None """Mean width of tape (m)""" -tape_thickness: float = None +dx_hts_tape_total: float = None """thickness of tape, inc. all layers (hts, copper, substrate, etc.) (m)""" dia_croco_strand: float = None @@ -70,7 +70,7 @@ def init_rebco_variables(): global copper_rrr global coppera_m2_max global f_coppera_m2 - global tape_thickness + global dx_hts_tape_total global dx_croco_strand_tape_stack global tapes global rebco_area @@ -93,7 +93,7 @@ def init_rebco_variables(): copper_rrr = 100.0 coppera_m2_max = 1.0e8 f_coppera_m2 = 1.0 - tape_thickness = 6.5e-5 + dx_hts_tape_total = 6.5e-5 dx_croco_strand_tape_stack = 0.0 tapes = 0.0 rebco_area = 0.0 diff --git a/process/input.py b/process/input.py index fc0a1365ec..71096f0b01 100644 --- a/process/input.py +++ b/process/input.py @@ -1639,7 +1639,7 @@ def __post_init__(self): "t_turn_tf_max": InputVariable( data_structure.tfcoil_variables, float, range=(0.0, 1.0) ), - "tape_thickness": InputVariable( + "dx_hts_tape_total": InputVariable( data_structure.rebco_variables, float, range=(0.0, 0.1) ), "tape_width": InputVariable( diff --git a/process/pfcoil.py b/process/pfcoil.py index 5eb062478d..8b281304d8 100644 --- a/process/pfcoil.py +++ b/process/pfcoil.py @@ -4172,7 +4172,7 @@ def superconpf(bmax, fhe, fcu, jwp, isumat, fhts, strain, thelium, bcritsc, tcri tc0m, rcv.tape_width, rcv.dx_hts_tape_rebco, - rcv.tape_thickness, + rcv.dx_hts_tape_total, ) # A0 calculated for tape cross section already # j_crit_cable = j_crit_sc * non-copper fraction of conductor * conductor fraction of cable diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index 88167ac3ac..c9ee07047a 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -603,8 +603,8 @@ def supercon_croco( po.ovarre( self.outfile, "Thickness of each HTS tape ", - "(tape_thickness)", - rebco_variables.tape_thickness, + "(dx_hts_tape_total)", + rebco_variables.dx_hts_tape_total, "OP ", ) po.ovarre( @@ -1252,7 +1252,7 @@ def tf_cable_in_conduit_superconductor_properties( t_c0=tc0m, tape_width=rebco_variables.tape_width, dx_hts_tape_rebco=rebco_variables.dx_hts_tape_rebco, - tape_thickness=rebco_variables.tape_thickness, + dx_hts_tape_total=rebco_variables.dx_hts_tape_total, ) # Scale for the copper area fraction of the cable j_cables_critical = j_superconductor_critical * ( diff --git a/process/superconductors.py b/process/superconductors.py index 2f7bae2420..99db8baa3f 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -524,7 +524,7 @@ def hijc_rebco( t_c0: float, tape_width: float, dx_hts_tape_rebco: float, - tape_thickness: float, + dx_hts_tape_total: float, ) -> tuple[float, float, float]: """ Calculates the critical current density, critical field, and critical temperature @@ -543,8 +543,8 @@ def hijc_rebco( :type tape_width: float :param dx_hts_tape_rebco: Thickness of the REBCO layer (m). :type dx_hts_tape_rebco: float - :param tape_thickness: Total thickness of the tape (m). - :type tape_thickness: float + :param dx_hts_tape_total: Total thickness of the tape (m). + :type dx_hts_tape_total: float :return: Tuple containing: - j_critical: Critical current density in superconductor (A/m²). - b_critical: Critical field (T). @@ -625,7 +625,7 @@ def hijc_rebco( # between tape stacks and CORC cable layouts. j_critical = ( - j_critical * (tape_width * dx_hts_tape_rebco) / (tape_width * tape_thickness) + j_critical * (tape_width * dx_hts_tape_rebco) / (tape_width * dx_hts_tape_total) ) return j_critical, b_critical, temp_critical @@ -867,13 +867,13 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): scaling = croco_id / 5.4e-3 tape_width = scaling * 3.75e-3 # Properties of a single strand - tape_thickness = ( + dx_hts_tape_total = ( rebco_variables.dx_hts_tape_rebco + rebco_variables.dx_hts_tape_copper + rebco_variables.dx_hts_tape_hastelloy ) dx_croco_strand_tape_stack = np.sqrt(croco_id**2 - tape_width**2) - tapes = dx_croco_strand_tape_stack / tape_thickness + tapes = dx_croco_strand_tape_stack / dx_hts_tape_total copper_area = ( np.pi * dx_croco_strand_copper * d @@ -1000,7 +1000,7 @@ def superconductor_current_density_margin( tc0m, rebco_variables.tape_width, rebco_variables.dx_hts_tape_rebco, - rebco_variables.tape_thickness, + rebco_variables.dx_hts_tape_total, )[0], } diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index e9494e4f75..eb886d2e5d 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -914,7 +914,7 @@ i_tf_sc_mat = 9 * DESCRIPTION: Mean width of tape (m) (default = 4.0E-3) * JUSTIFICATION: -*tape_thickness = +*dx_hts_tape_total = * DESCRIPTION: Thickness of tape, inc. all layers (hts, copper, substrate, etc.) (m) (default = 6.5E-5) * JUSTIFICATION: diff --git a/tests/unit/test_superconductors.py b/tests/unit/test_superconductors.py index ae29a9973b..45b139f841 100644 --- a/tests/unit/test_superconductors.py +++ b/tests/unit/test_superconductors.py @@ -195,7 +195,7 @@ def test_hijc_rebco(): t_c0=25.0, tape_width=4.0e-3, dx_hts_tape_rebco=1.0e-6, - tape_thickness=6.5e-5, + dx_hts_tape_total=6.5e-5, ) assert jcrit == pytest.approx(111046017.5) From 6c360f769e5a3dbcc389ce6fdd5d68b96d286414 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 15:07:27 +0100 Subject: [PATCH 08/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'tape=5Fwidth'=20?= =?UTF-8?q?to=20'dr=5Fhts=5Ftape'=20for=20improved=20clarity=20and=20consi?= =?UTF-8?q?stency=20across=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/rebco_variables.py | 6 ++--- process/input.py | 2 +- process/pfcoil.py | 2 +- process/superconducting_tf_coil.py | 6 ++--- process/superconductors.py | 24 ++++++++++--------- .../input_files/st_regression.IN.DAT | 2 +- tests/unit/test_superconductors.py | 2 +- 7 files changed, 23 insertions(+), 21 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 8d358a211b..0b79fb6b0e 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -7,7 +7,7 @@ dx_hts_tape_hastelloy: float = None """thickness of Hastelloy layer in tape (m)""" -tape_width: float = None +dr_hts_tape: float = None """Mean width of tape (m)""" dx_hts_tape_total: float = None @@ -63,7 +63,7 @@ def init_rebco_variables(): global dx_hts_tape_rebco global dx_hts_tape_copper global dx_hts_tape_hastelloy - global tape_width + global dr_hts_tape global dia_croco_strand global croco_id global dx_croco_strand_copper @@ -86,7 +86,7 @@ def init_rebco_variables(): dx_hts_tape_rebco = 1.0e-6 dx_hts_tape_copper = 100.0e-6 dx_hts_tape_hastelloy = 50.0e-6 - tape_width = 4.0e-3 + dr_hts_tape = 4.0e-3 dia_croco_strand = 0.0 croco_id = 0.0 dx_croco_strand_copper = 2.5e-3 diff --git a/process/input.py b/process/input.py index 71096f0b01..264f199b15 100644 --- a/process/input.py +++ b/process/input.py @@ -1642,7 +1642,7 @@ def __post_init__(self): "dx_hts_tape_total": InputVariable( data_structure.rebco_variables, float, range=(0.0, 0.1) ), - "tape_width": InputVariable( + "dr_hts_tape": InputVariable( data_structure.rebco_variables, float, range=(0.0, 0.1) ), "tauee_in": InputVariable( diff --git a/process/pfcoil.py b/process/pfcoil.py index 8b281304d8..4da06af40f 100644 --- a/process/pfcoil.py +++ b/process/pfcoil.py @@ -4170,7 +4170,7 @@ def superconpf(bmax, fhe, fcu, jwp, isumat, fhts, strain, thelium, bcritsc, tcri bmax, bc20m, tc0m, - rcv.tape_width, + rcv.dr_hts_tape, rcv.dx_hts_tape_rebco, rcv.dx_hts_tape_total, ) diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index c9ee07047a..aac147f855 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -575,8 +575,8 @@ def supercon_croco( po.ovarre( self.outfile, "Mean width of tape (m)", - "(tape_width)", - rebco_variables.tape_width, + "(dr_hts_tape)", + rebco_variables.dr_hts_tape, "OP ", ) po.ovarre( @@ -1250,7 +1250,7 @@ def tf_cable_in_conduit_superconductor_properties( b_conductor=b_tf_inboard_peak, b_c20max=bc20m, t_c0=tc0m, - tape_width=rebco_variables.tape_width, + dr_hts_tape=rebco_variables.dr_hts_tape, dx_hts_tape_rebco=rebco_variables.dx_hts_tape_rebco, dx_hts_tape_total=rebco_variables.dx_hts_tape_total, ) diff --git a/process/superconductors.py b/process/superconductors.py index 99db8baa3f..0cd129012a 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -522,7 +522,7 @@ def hijc_rebco( b_conductor: float, b_c20max: float, t_c0: float, - tape_width: float, + dr_hts_tape: float, dx_hts_tape_rebco: float, dx_hts_tape_total: float, ) -> tuple[float, float, float]: @@ -539,8 +539,8 @@ def hijc_rebco( :type b_c20max: float :param t_c0: Critical temperature (K) at zero field and strain. :type t_c0: float - :param tape_width: Width of the tape (m). - :type tape_width: float + :param dr_hts_tape: Width of the tape (m). + :type dr_hts_tape: float :param dx_hts_tape_rebco: Thickness of the REBCO layer (m). :type dx_hts_tape_rebco: float :param dx_hts_tape_total: Total thickness of the tape (m). @@ -625,7 +625,9 @@ def hijc_rebco( # between tape stacks and CORC cable layouts. j_critical = ( - j_critical * (tape_width * dx_hts_tape_rebco) / (tape_width * dx_hts_tape_total) + j_critical + * (dr_hts_tape * dx_hts_tape_rebco) + / (dr_hts_tape * dx_hts_tape_total) ) return j_critical, b_critical, temp_critical @@ -865,27 +867,27 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): # Define the scaling factor for the input REBCO variable # Ratio of new croco inner diameter and fixed base line value scaling = croco_id / 5.4e-3 - tape_width = scaling * 3.75e-3 + dr_hts_tape = scaling * 3.75e-3 # Properties of a single strand dx_hts_tape_total = ( rebco_variables.dx_hts_tape_rebco + rebco_variables.dx_hts_tape_copper + rebco_variables.dx_hts_tape_hastelloy ) - dx_croco_strand_tape_stack = np.sqrt(croco_id**2 - tape_width**2) + dx_croco_strand_tape_stack = np.sqrt(croco_id**2 - dr_hts_tape**2) tapes = dx_croco_strand_tape_stack / dx_hts_tape_total copper_area = ( np.pi * dx_croco_strand_copper * d - np.pi * dx_croco_strand_copper**2 + rebco_variables.dx_hts_tape_copper - * tape_width + * dr_hts_tape * tapes # copper tube # copper in tape ) - hastelloy_area = rebco_variables.dx_hts_tape_hastelloy * tape_width * tapes - solder_area = np.pi / 4.0 * croco_id**2 - dx_croco_strand_tape_stack * tape_width + hastelloy_area = rebco_variables.dx_hts_tape_hastelloy * dr_hts_tape * tapes + solder_area = np.pi / 4.0 * croco_id**2 - dx_croco_strand_tape_stack * dr_hts_tape - rebco_area = rebco_variables.dx_hts_tape_rebco * tape_width * tapes + rebco_area = rebco_variables.dx_hts_tape_rebco * dr_hts_tape * tapes croco_strand_area = np.pi / 4.0 * d**2 croco_strand_critical_current = j_crit_sc * rebco_area @@ -998,7 +1000,7 @@ def superconductor_current_density_margin( b_superconductor, bc20m, tc0m, - rebco_variables.tape_width, + rebco_variables.dr_hts_tape, rebco_variables.dx_hts_tape_rebco, rebco_variables.dx_hts_tape_total, )[0], diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index eb886d2e5d..2112d6b28a 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -910,7 +910,7 @@ i_tf_sc_mat = 9 * REBCO HTS SETTINGS * *--------------------* -*tape_width = +*dr_hts_tape = * DESCRIPTION: Mean width of tape (m) (default = 4.0E-3) * JUSTIFICATION: diff --git a/tests/unit/test_superconductors.py b/tests/unit/test_superconductors.py index 45b139f841..0503085b49 100644 --- a/tests/unit/test_superconductors.py +++ b/tests/unit/test_superconductors.py @@ -193,7 +193,7 @@ def test_hijc_rebco(): b_conductor=7.0, b_c20max=30.0, t_c0=25.0, - tape_width=4.0e-3, + dr_hts_tape=4.0e-3, dx_hts_tape_rebco=1.0e-6, dx_hts_tape_total=6.5e-5, ) From ece23f1c10e7f0171cd17cab8817ec3f613809dc Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 15:10:25 +0100 Subject: [PATCH 09/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'tapes'=20to=20'n?= =?UTF-8?q?=5Fcroco=5Fstrand=5Fhts=5Ftapes'=20for=20improved=20clarity=20a?= =?UTF-8?q?nd=20consistency=20across=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/rebco_variables.py | 7 ++++--- process/superconducting_tf_coil.py | 8 ++++---- process/superconductors.py | 12 ++++++++---- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 0b79fb6b0e..a7432005f4 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -45,7 +45,8 @@ dx_croco_strand_tape_stack: float = None -tapes: float = None +n_croco_strand_hts_tapes: float = None +"Number of HTS tapes in CroCo strand" rebco_area: float = None @@ -72,7 +73,7 @@ def init_rebco_variables(): global f_coppera_m2 global dx_hts_tape_total global dx_croco_strand_tape_stack - global tapes + global n_croco_strand_hts_tapes global rebco_area global copper_area global hastelloy_area @@ -95,7 +96,7 @@ def init_rebco_variables(): f_coppera_m2 = 1.0 dx_hts_tape_total = 6.5e-5 dx_croco_strand_tape_stack = 0.0 - tapes = 0.0 + n_croco_strand_hts_tapes = 0.0 rebco_area = 0.0 copper_area = 0.0 hastelloy_area = 0.0 diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index aac147f855..c8a499f35e 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -609,16 +609,16 @@ def supercon_croco( ) po.ovarre( self.outfile, - "Thickness of stack of rebco_variables.tapes (m) ", + "Thickness of stack of rebco_variables.n_croco_strand_hts_tapes (m) ", "(dx_croco_strand_tape_stack)", rebco_variables.dx_croco_strand_tape_stack, "OP ", ) po.ovarre( self.outfile, - "Number of rebco_variables.tapes in strand", - "(tapes)", - rebco_variables.tapes, + "Number of rebco_variables.n_croco_strand_hts_tapes in strand", + "(n_croco_strand_hts_tapes)", + rebco_variables.n_croco_strand_hts_tapes, "OP ", ) po.oblnkl(self.outfile) diff --git a/process/superconductors.py b/process/superconductors.py index 0cd129012a..407e7a2c56 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -875,19 +875,23 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): + rebco_variables.dx_hts_tape_hastelloy ) dx_croco_strand_tape_stack = np.sqrt(croco_id**2 - dr_hts_tape**2) - tapes = dx_croco_strand_tape_stack / dx_hts_tape_total + n_croco_strand_hts_tapes = dx_croco_strand_tape_stack / dx_hts_tape_total copper_area = ( np.pi * dx_croco_strand_copper * d - np.pi * dx_croco_strand_copper**2 + rebco_variables.dx_hts_tape_copper * dr_hts_tape - * tapes # copper tube # copper in tape + * n_croco_strand_hts_tapes # copper tube # copper in tape + ) + hastelloy_area = ( + rebco_variables.dx_hts_tape_hastelloy * dr_hts_tape * n_croco_strand_hts_tapes ) - hastelloy_area = rebco_variables.dx_hts_tape_hastelloy * dr_hts_tape * tapes solder_area = np.pi / 4.0 * croco_id**2 - dx_croco_strand_tape_stack * dr_hts_tape - rebco_area = rebco_variables.dx_hts_tape_rebco * dr_hts_tape * tapes + rebco_area = ( + rebco_variables.dx_hts_tape_rebco * dr_hts_tape * n_croco_strand_hts_tapes + ) croco_strand_area = np.pi / 4.0 * d**2 croco_strand_critical_current = j_crit_sc * rebco_area From fd813801b6e25cbfcab11bada4ae3fe73945455f Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 15:12:08 +0100 Subject: [PATCH 10/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'rebco=5Farea'=20?= =?UTF-8?q?to=20'a=5Fcroco=5Fstrand=5Fhts=5Ftapes'=20for=20improved=20clar?= =?UTF-8?q?ity=20and=20consistency=20across=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/rebco_variables.py | 7 ++++--- process/superconducting_tf_coil.py | 8 ++++---- process/superconductors.py | 6 +++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index a7432005f4..adaf6bd559 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -48,7 +48,8 @@ n_croco_strand_hts_tapes: float = None "Number of HTS tapes in CroCo strand" -rebco_area: float = None +a_croco_strand_hts_tapes: float = None +"Area of HTS tapes in CroCo strand (m2)" copper_area: float = None @@ -74,7 +75,7 @@ def init_rebco_variables(): global dx_hts_tape_total global dx_croco_strand_tape_stack global n_croco_strand_hts_tapes - global rebco_area + global a_croco_strand_hts_tapes global copper_area global hastelloy_area global solder_area @@ -97,7 +98,7 @@ def init_rebco_variables(): dx_hts_tape_total = 6.5e-5 dx_croco_strand_tape_stack = 0.0 n_croco_strand_hts_tapes = 0.0 - rebco_area = 0.0 + a_croco_strand_hts_tapes = 0.0 copper_area = 0.0 hastelloy_area = 0.0 solder_area = 0.0 diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index c8a499f35e..0f22141834 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -625,8 +625,8 @@ def supercon_croco( po.ovarre( self.outfile, "Area of REBCO in strand (m2)", - "(rebco_area)", - rebco_variables.rebco_area, + "(a_croco_strand_hts_tapes)", + rebco_variables.a_croco_strand_hts_tapes, "OP ", ) po.ovarre( @@ -661,7 +661,7 @@ def supercon_croco( abs( superconducting_tf_coil_variables.croco_strand_area - ( - rebco_variables.rebco_area + rebco_variables.a_croco_strand_hts_tapes + rebco_variables.copper_area + rebco_variables.hastelloy_area + rebco_variables.solder_area @@ -711,7 +711,7 @@ def supercon_croco( po.ovarre( self.outfile, "REBCO area of conductor (mm2)", - "(rebco_area)", + "(a_croco_strand_hts_tapes)", superconducting_tf_coil_variables.conductor_rebco_area, "OP ", ) diff --git a/process/superconductors.py b/process/superconductors.py index 407e7a2c56..b8f7e58548 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -889,11 +889,11 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): ) solder_area = np.pi / 4.0 * croco_id**2 - dx_croco_strand_tape_stack * dr_hts_tape - rebco_area = ( + a_croco_strand_hts_tapes = ( rebco_variables.dx_hts_tape_rebco * dr_hts_tape * n_croco_strand_hts_tapes ) croco_strand_area = np.pi / 4.0 * d**2 - croco_strand_critical_current = j_crit_sc * rebco_area + croco_strand_critical_current = j_crit_sc * a_croco_strand_hts_tapes # Conductor properties # conductor%number_croco = conductor%acs*(1.0-cable_helium_fraction-copper_bar)/croco_strand_area @@ -914,7 +914,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): conductor_solder_area = solder_area * 6.0 conductor_solder_fraction = conductor_solder_area / conductor_area - conductor_rebco_area = rebco_area * 6.0 + conductor_rebco_area = a_croco_strand_hts_tapes * 6.0 conductor_rebco_fraction = conductor_rebco_area / conductor_area return ( From 74d609a270743e8349c01834b93b775090791463 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 15:14:34 +0100 Subject: [PATCH 11/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'hastelloy=5Farea?= =?UTF-8?q?'=20to=20'a=5Fcroco=5Fstrand=5Fhastelloy'=20for=20improved=20cl?= =?UTF-8?q?arity=20and=20consistency=20across=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/rebco_variables.py | 7 ++++--- process/superconducting_tf_coil.py | 8 ++++---- process/superconductors.py | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index adaf6bd559..e23891da0f 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -53,7 +53,8 @@ copper_area: float = None -hastelloy_area: float = None +a_croco_strand_hastelloy: float = None +"Area of Hastelloy in CroCo strand (m2)" solder_area: float = None @@ -77,7 +78,7 @@ def init_rebco_variables(): global n_croco_strand_hts_tapes global a_croco_strand_hts_tapes global copper_area - global hastelloy_area + global a_croco_strand_hastelloy global solder_area global croco_area global copperA_m2 @@ -100,7 +101,7 @@ def init_rebco_variables(): n_croco_strand_hts_tapes = 0.0 a_croco_strand_hts_tapes = 0.0 copper_area = 0.0 - hastelloy_area = 0.0 + a_croco_strand_hastelloy = 0.0 solder_area = 0.0 croco_area = 0.0 copperA_m2 = 0.0 diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index 0f22141834..c6a7815b58 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -639,8 +639,8 @@ def supercon_croco( po.ovarre( self.outfile, "Area of hastelloy substrate in strand (m2) ", - "(hastelloy_area)", - rebco_variables.hastelloy_area, + "(a_croco_strand_hastelloy)", + rebco_variables.a_croco_strand_hastelloy, "OP ", ) po.ovarre( @@ -663,7 +663,7 @@ def supercon_croco( - ( rebco_variables.a_croco_strand_hts_tapes + rebco_variables.copper_area - + rebco_variables.hastelloy_area + + rebco_variables.a_croco_strand_hastelloy + rebco_variables.solder_area ) ) @@ -732,7 +732,7 @@ def supercon_croco( po.ovarre( self.outfile, "Hastelloy area of conductor (mm2)", - "(hastelloy_area)", + "(a_croco_strand_hastelloy)", superconducting_tf_coil_variables.conductor_hastelloy_area, "OP ", ) diff --git a/process/superconductors.py b/process/superconductors.py index b8f7e58548..24f8ec894f 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -884,7 +884,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): * dr_hts_tape * n_croco_strand_hts_tapes # copper tube # copper in tape ) - hastelloy_area = ( + a_croco_strand_hastelloy = ( rebco_variables.dx_hts_tape_hastelloy * dr_hts_tape * n_croco_strand_hts_tapes ) solder_area = np.pi / 4.0 * croco_id**2 - dx_croco_strand_tape_stack * dr_hts_tape @@ -908,7 +908,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): conductor_helium_area = np.pi / 2.0 * d**2 conductor_helium_fraction = conductor_helium_area / conductor_area - conductor_hastelloy_area = hastelloy_area * 6.0 + conductor_hastelloy_area = a_croco_strand_hastelloy * 6.0 conductor_hastelloy_fraction = conductor_hastelloy_area / conductor_area conductor_solder_area = solder_area * 6.0 From 3fcb6860dbb29a9f187624771887466ffda49ed1 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 15:18:06 +0100 Subject: [PATCH 12/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'solder=5Farea'?= =?UTF-8?q?=20to=20'a=5Fcroco=5Fstrand=5Fsolder'=20and=20update=20referenc?= =?UTF-8?q?es=20for=20improved=20clarity=20and=20consistency=20across=20th?= =?UTF-8?q?e=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/rebco_variables.py | 8 +++++--- process/superconducting_tf_coil.py | 8 ++++---- process/superconductors.py | 6 ++++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index e23891da0f..d90421e252 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -44,6 +44,7 @@ """f-value for constraint 88: CS coil current / copper area < copperA_m2_max""" dx_croco_strand_tape_stack: float = None +"Width / thickness of tape stack in CroCo strand (m)" n_croco_strand_hts_tapes: float = None "Number of HTS tapes in CroCo strand" @@ -56,7 +57,8 @@ a_croco_strand_hastelloy: float = None "Area of Hastelloy in CroCo strand (m2)" -solder_area: float = None +a_croco_strand_solder: float = None +"Area of solder in CroCo strand (m2)" croco_area: float = None @@ -79,7 +81,7 @@ def init_rebco_variables(): global a_croco_strand_hts_tapes global copper_area global a_croco_strand_hastelloy - global solder_area + global a_croco_strand_solder global croco_area global copperA_m2 global copperaoh_m2_max @@ -102,7 +104,7 @@ def init_rebco_variables(): a_croco_strand_hts_tapes = 0.0 copper_area = 0.0 a_croco_strand_hastelloy = 0.0 - solder_area = 0.0 + a_croco_strand_solder = 0.0 croco_area = 0.0 copperA_m2 = 0.0 copperaoh_m2_max = 1.0e8 diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index c6a7815b58..ab4032d45a 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -646,8 +646,8 @@ def supercon_croco( po.ovarre( self.outfile, "Area of solder in strand (m2) ", - "(solder_area)", - rebco_variables.solder_area, + "(a_croco_strand_solder)", + rebco_variables.a_croco_strand_solder, "OP ", ) po.ovarre( @@ -664,7 +664,7 @@ def supercon_croco( rebco_variables.a_croco_strand_hts_tapes + rebco_variables.copper_area + rebco_variables.a_croco_strand_hastelloy - + rebco_variables.solder_area + + rebco_variables.a_croco_strand_solder ) ) > 1e-6 @@ -739,7 +739,7 @@ def supercon_croco( po.ovarre( self.outfile, "Solder area of conductor (mm2)", - "(solder_area)", + "(a_croco_strand_solder)", superconducting_tf_coil_variables.conductor_solder_area, "OP ", ) diff --git a/process/superconductors.py b/process/superconductors.py index 24f8ec894f..08fe999c37 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -887,7 +887,9 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): a_croco_strand_hastelloy = ( rebco_variables.dx_hts_tape_hastelloy * dr_hts_tape * n_croco_strand_hts_tapes ) - solder_area = np.pi / 4.0 * croco_id**2 - dx_croco_strand_tape_stack * dr_hts_tape + a_croco_strand_solder = ( + np.pi / 4.0 * croco_id**2 - dx_croco_strand_tape_stack * dr_hts_tape + ) a_croco_strand_hts_tapes = ( rebco_variables.dx_hts_tape_rebco * dr_hts_tape * n_croco_strand_hts_tapes @@ -911,7 +913,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): conductor_hastelloy_area = a_croco_strand_hastelloy * 6.0 conductor_hastelloy_fraction = conductor_hastelloy_area / conductor_area - conductor_solder_area = solder_area * 6.0 + conductor_solder_area = a_croco_strand_solder * 6.0 conductor_solder_fraction = conductor_solder_area / conductor_area conductor_rebco_area = a_croco_strand_hts_tapes * 6.0 From 5779a8f651d1f01f9aa5203247c8d70b368b3559 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 15:20:32 +0100 Subject: [PATCH 13/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'croco=5Fid'=20to?= =?UTF-8?q?=20'dia=5Fcroco=5Fstrand=5Ftape=5Fregion'=20for=20improved=20cl?= =?UTF-8?q?arity=20and=20consistency=20across=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/rebco_variables.py | 8 ++++---- process/superconducting_tf_coil.py | 4 ++-- process/superconductors.py | 13 ++++++++----- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index d90421e252..28941ee0eb 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -16,8 +16,8 @@ dia_croco_strand: float = None """Outer diameter of CroCo strand (m)""" -croco_id: float = None -"""Inner diameter of CroCo copper tube (m)""" +dia_croco_strand_tape_region: float = None +"""Inner diameter of CroCo strand tape region (m)""" dx_croco_strand_copper: float = None """Thickness of CroCo strand copper tube (m) (`iteration variable 158`)""" @@ -70,7 +70,7 @@ def init_rebco_variables(): global dx_hts_tape_hastelloy global dr_hts_tape global dia_croco_strand - global croco_id + global dia_croco_strand_tape_region global dx_croco_strand_copper global copper_rrr global coppera_m2_max @@ -93,7 +93,7 @@ def init_rebco_variables(): dx_hts_tape_hastelloy = 50.0e-6 dr_hts_tape = 4.0e-3 dia_croco_strand = 0.0 - croco_id = 0.0 + dia_croco_strand_tape_region = 0.0 dx_croco_strand_copper = 2.5e-3 copper_rrr = 100.0 coppera_m2_max = 1.0e8 diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index ab4032d45a..a1aa5dc485 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -589,8 +589,8 @@ def supercon_croco( po.ovarre( self.outfile, "Inner diameter of CroCo copper tube (m) ", - "(croco_id)", - rebco_variables.croco_id, + "(dia_croco_strand_tape_region)", + rebco_variables.dia_croco_strand_tape_region, "OP ", ) po.ovarre( diff --git a/process/superconductors.py b/process/superconductors.py index 08fe999c37..2e23a4f3f6 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -860,13 +860,13 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): d = dia_croco_strand # d = conductor_width / 3.0d0 - dx_tf_turn_steel * ( 2.0d0 / 3.0d0 ) - croco_id = d - 2.0 * dx_croco_strand_copper # scaling * 5.4d-3 - if croco_id <= 0.0: + dia_croco_strand_tape_region = d - 2.0 * dx_croco_strand_copper # scaling * 5.4d-3 + if dia_croco_strand_tape_region <= 0.0: logger.error("Negitive inner croco diameter") # Define the scaling factor for the input REBCO variable # Ratio of new croco inner diameter and fixed base line value - scaling = croco_id / 5.4e-3 + scaling = dia_croco_strand_tape_region / 5.4e-3 dr_hts_tape = scaling * 3.75e-3 # Properties of a single strand dx_hts_tape_total = ( @@ -874,7 +874,9 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): + rebco_variables.dx_hts_tape_copper + rebco_variables.dx_hts_tape_hastelloy ) - dx_croco_strand_tape_stack = np.sqrt(croco_id**2 - dr_hts_tape**2) + dx_croco_strand_tape_stack = np.sqrt( + dia_croco_strand_tape_region**2 - dr_hts_tape**2 + ) n_croco_strand_hts_tapes = dx_croco_strand_tape_stack / dx_hts_tape_total copper_area = ( @@ -888,7 +890,8 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): rebco_variables.dx_hts_tape_hastelloy * dr_hts_tape * n_croco_strand_hts_tapes ) a_croco_strand_solder = ( - np.pi / 4.0 * croco_id**2 - dx_croco_strand_tape_stack * dr_hts_tape + np.pi / 4.0 * dia_croco_strand_tape_region**2 + - dx_croco_strand_tape_stack * dr_hts_tape ) a_croco_strand_hts_tapes = ( From 1a75269d9ac0106773757a524b13d4449f23dc27 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 15:26:48 +0100 Subject: [PATCH 14/24] :fire: Remove unused variable 'croco_area' and its references for code cleanliness --- process/data_structure/rebco_variables.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 28941ee0eb..8c57c3330d 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -60,8 +60,6 @@ a_croco_strand_solder: float = None "Area of solder in CroCo strand (m2)" -croco_area: float = None - def init_rebco_variables(): """Initialise the REBCO variables""" @@ -82,7 +80,6 @@ def init_rebco_variables(): global copper_area global a_croco_strand_hastelloy global a_croco_strand_solder - global croco_area global copperA_m2 global copperaoh_m2_max global f_copperaoh_m2 @@ -105,7 +102,7 @@ def init_rebco_variables(): copper_area = 0.0 a_croco_strand_hastelloy = 0.0 a_croco_strand_solder = 0.0 - croco_area = 0.0 + copperA_m2 = 0.0 copperaoh_m2_max = 1.0e8 f_copperaoh_m2 = 1.0 From b4bf60b026b2fa9de3f9055ca9628f60474765aa Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 15:32:13 +0100 Subject: [PATCH 15/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'copper=5Farea'?= =?UTF-8?q?=20to=20'a=5Fcroco=5Fstrand=5Fcopper=5Ftotal'=20and=20update=20?= =?UTF-8?q?references=20for=20improved=20clarity=20and=20consistency=20acr?= =?UTF-8?q?oss=20the=20codebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/rebco_variables.py | 7 ++++--- process/superconducting_tf_coil.py | 8 ++++---- process/superconductors.py | 6 ++++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 8c57c3330d..24467c6ec0 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -52,7 +52,8 @@ a_croco_strand_hts_tapes: float = None "Area of HTS tapes in CroCo strand (m2)" -copper_area: float = None +a_croco_strand_copper_total: float = None +"Area of copper in CroCo strand (includes tapes and outer tube) (m2)" a_croco_strand_hastelloy: float = None "Area of Hastelloy in CroCo strand (m2)" @@ -77,7 +78,7 @@ def init_rebco_variables(): global dx_croco_strand_tape_stack global n_croco_strand_hts_tapes global a_croco_strand_hts_tapes - global copper_area + global a_croco_strand_copper_total global a_croco_strand_hastelloy global a_croco_strand_solder global copperA_m2 @@ -99,7 +100,7 @@ def init_rebco_variables(): dx_croco_strand_tape_stack = 0.0 n_croco_strand_hts_tapes = 0.0 a_croco_strand_hts_tapes = 0.0 - copper_area = 0.0 + a_croco_strand_copper_total = 0.0 a_croco_strand_hastelloy = 0.0 a_croco_strand_solder = 0.0 diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index a1aa5dc485..6791ea2369 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -632,8 +632,8 @@ def supercon_croco( po.ovarre( self.outfile, "Area of copper in strand (m2)", - "(copper_area)", - rebco_variables.copper_area, + "(a_croco_strand_copper_total)", + rebco_variables.a_croco_strand_copper_total, "OP ", ) po.ovarre( @@ -662,7 +662,7 @@ def supercon_croco( superconducting_tf_coil_variables.croco_strand_area - ( rebco_variables.a_croco_strand_hts_tapes - + rebco_variables.copper_area + + rebco_variables.a_croco_strand_copper_total + rebco_variables.a_croco_strand_hastelloy + rebco_variables.a_croco_strand_solder ) @@ -725,7 +725,7 @@ def supercon_croco( po.ovarre( self.outfile, "Total copper area of conductor, total (mm2)", - "(copper_area)", + "(a_croco_strand_copper_total)", superconducting_tf_coil_variables.conductor_copper_area, "OP ", ) diff --git a/process/superconductors.py b/process/superconductors.py index 2e23a4f3f6..f96e099f8a 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -879,7 +879,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): ) n_croco_strand_hts_tapes = dx_croco_strand_tape_stack / dx_hts_tape_total - copper_area = ( + a_croco_strand_copper_total = ( np.pi * dx_croco_strand_copper * d - np.pi * dx_croco_strand_copper**2 + rebco_variables.dx_hts_tape_copper @@ -905,7 +905,9 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): conductor_critical_current = croco_strand_critical_current * 6.0 # Area of core = area of strand conductor_copper_bar_area = croco_strand_area - conductor_copper_area = copper_area * 6.0 + conductor_copper_bar_area + conductor_copper_area = ( + a_croco_strand_copper_total * 6.0 + conductor_copper_bar_area + ) conductor_copper_fraction = conductor_copper_area / conductor_area # Helium area is set by the user. From 4446a137e2f23bb146c38a0873401f4db2b07e15 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 16:02:33 +0100 Subject: [PATCH 16/24] :sparkle: Add 'calculate_croco_cable_geometry' function to compute geometry and areas for CroCo cable strand --- process/superconductors.py | 92 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/process/superconductors.py b/process/superconductors.py index f96e099f8a..bec5035031 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -852,6 +852,98 @@ def bottura_scaling( return j_scaling, b_critical, temp_critical +def calculate_croco_cable_geometry( + dia_croco_strand: float, + dx_croco_strand_copper: float, + dx_hts_tape_rebco: float, + dx_hts_tape_copper: float, + dx_hts_tape_hastelloy: float, + dr_hts_tape: float, +) -> tuple[ + float, # dia_croco_strand_tape_region + float, # n_croco_strand_hts_tapes + float, # a_croco_strand_copper_total + float, # a_croco_strand_hastelloy + float, # a_croco_strand_solder + float, # a_croco_strand_hts_tapes + float, # croco_strand_area +]: + """ + Calculate geometry and areas for a CroCo cable strand. + + :param dia_croco_strand: Diameter of CroCo strand (m) + :type dia_croco_strand: float + :param dx_croco_strand_copper: Thickness of copper layer in CroCo strand (m) + :type dx_croco_strand_copper: float + :param dx_hts_tape_rebco: Thickness of REBCO layer in HTS tape (m) + :type dx_hts_tape_rebco: float + :param dx_hts_tape_copper: Thickness of copper layer in HTS tape (m) + :type dx_hts_tape_copper: float + :param dx_hts_tape_hastelloy: Thickness of Hastelloy layer in HTS tape (m) + :type dx_hts_tape_hastelloy: float + :param dr_hts_tape: Width of HTS tape (m) + :type dr_hts_tape: float + + :return: Tuple containing: + - dia_croco_strand_tape_region: Inner diameter of CroCo strand tape region (m) + - n_croco_strand_hts_tapes: Number of HTS tapes in CroCo strand + - a_croco_strand_copper_total: Total copper area in CroCo strand (m²) + - a_croco_strand_hastelloy: Total Hastelloy area in CroCo strand (m²) + - a_croco_strand_solder: Total solder area in CroCo strand (m²) + - a_croco_strand_hts_tapes: Total REBCO area in CroCo strand (m²) + - croco_strand_area: Total area of CroCo strand (m²) + :rtype: tuple[float, float, float, float, float, float, float] + """ + + # Calculate the inner diameter of the CroCo strand tape region + dia_croco_strand_tape_region = dia_croco_strand - 2.0 * dx_croco_strand_copper + if dia_croco_strand_tape_region <= 0.0: + logger.error("Negative inner CroCo cable diameter") + + # Total thickness of HTS tape + dx_hts_tape_total = dx_hts_tape_rebco + dx_hts_tape_copper + dx_hts_tape_hastelloy + + # Calculate the height of HTS tapes in the CroCo strand + dx_croco_strand_tape_stack = np.sqrt( + dia_croco_strand_tape_region**2 - dr_hts_tape**2 + ) + # Number of HTS tapes in the CroCo strand + n_croco_strand_hts_tapes = dx_croco_strand_tape_stack / dx_hts_tape_total + + # + a_croco_strand_copper_total = ( + np.pi * dx_croco_strand_copper * dia_croco_strand + - np.pi * dx_croco_strand_copper**2 + + dx_hts_tape_copper * dr_hts_tape * n_croco_strand_hts_tapes + ) + # Area of Hastelloy in the CroCo strand + a_croco_strand_hastelloy = ( + dx_hts_tape_hastelloy * dr_hts_tape * n_croco_strand_hts_tapes + ) + # Area of solder in the CroCo strand surrounding the HTS tapes + a_croco_strand_solder = ( + np.pi / 4.0 * dia_croco_strand_tape_region**2 + - dx_croco_strand_tape_stack * dr_hts_tape + ) + + # Area of REBCO in the CroCo strand + a_croco_strand_hts_tapes = ( + dx_hts_tape_rebco * dr_hts_tape * n_croco_strand_hts_tapes + ) + # Total area of the CroCo strand + croco_strand_area = np.pi / 4.0 * dia_croco_strand**2 + + return ( + dia_croco_strand_tape_region, + n_croco_strand_hts_tapes, + a_croco_strand_copper_total, + a_croco_strand_hastelloy, + a_croco_strand_solder, + a_croco_strand_hts_tapes, + croco_strand_area, + ) + + def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): """'CroCo' (cross-conductor) strand and cable design for 'REBCO' 2nd generation HTS superconductor From d6eea32fc71471867f86b11b9babc04cc9efafd2 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 16:04:10 +0100 Subject: [PATCH 17/24] :sparkle: Add 'a_croco_strand' variable to store total area of CroCo strand and update references in 'calculate_croco_cable_geometry' function for consistency --- process/data_structure/rebco_variables.py | 5 +++++ process/superconductors.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 24467c6ec0..54716f2485 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -61,6 +61,9 @@ a_croco_strand_solder: float = None "Area of solder in CroCo strand (m2)" +a_croco_strand: float = None +"Total area of a CroCo strand (m2)" + def init_rebco_variables(): """Initialise the REBCO variables""" @@ -81,6 +84,7 @@ def init_rebco_variables(): global a_croco_strand_copper_total global a_croco_strand_hastelloy global a_croco_strand_solder + global a_croco_strand global copperA_m2 global copperaoh_m2_max global f_copperaoh_m2 @@ -103,6 +107,7 @@ def init_rebco_variables(): a_croco_strand_copper_total = 0.0 a_croco_strand_hastelloy = 0.0 a_croco_strand_solder = 0.0 + a_croco_strand = 0.0 copperA_m2 = 0.0 copperaoh_m2_max = 1.0e8 diff --git a/process/superconductors.py b/process/superconductors.py index bec5035031..04ab257820 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -931,7 +931,7 @@ def calculate_croco_cable_geometry( dx_hts_tape_rebco * dr_hts_tape * n_croco_strand_hts_tapes ) # Total area of the CroCo strand - croco_strand_area = np.pi / 4.0 * dia_croco_strand**2 + a_croco_strand = np.pi / 4.0 * dia_croco_strand**2 return ( dia_croco_strand_tape_region, @@ -940,7 +940,7 @@ def calculate_croco_cable_geometry( a_croco_strand_hastelloy, a_croco_strand_solder, a_croco_strand_hts_tapes, - croco_strand_area, + a_croco_strand, ) From 19554ccb4361dedda7ba262c2f4d8513a512dcee Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 16:49:39 +0100 Subject: [PATCH 18/24] :memo: Create docs page --- documentation/eng-models/superconductors.md | 68 +++++++++++++++++++++ process/superconductors.py | 12 ++-- 2 files changed, 76 insertions(+), 4 deletions(-) diff --git a/documentation/eng-models/superconductors.md b/documentation/eng-models/superconductors.md index d1d014901c..cbf303c754 100644 --- a/documentation/eng-models/superconductors.md +++ b/documentation/eng-models/superconductors.md @@ -375,6 +375,74 @@ The critical current density for a single REBCO strand can be seen below: ------------------------- + +### CroCo Cable Geometry | `calculate_croco_cable_geometry()` + +The geometry of a single CroCo cable is calculated as follows: + +1. The diameter of the circular internal tape region is given by the outer copper diameter minus its thickness: + + $$ + \overbrace{D_{\text{cable,internal}}}^{\texttt{dia_croco_strand_tape_region}} = \overbrace{D_{\text{cable}}}^{\texttt{dia_croco_strand}} - \overbrace{dx_{\text{cable,copper}}}^{\texttt{dx_croco_strand_copper}} + $$ + +2. The total thickness of the HTS tape is found: + + $$ + \overbrace{dx_{\text{tape}}}^{\texttt{dx_hts_tape_total}} = \overbrace{dx_{\text{tape,REBCO}}}^{\texttt{dx_hts_tape_rebco}} + \overbrace{dx_{\text{tape,copper}}}^{\texttt{dx_hts_tape_copper}} + \overbrace{dx_{\text{tape,Hastelloy}}}^{\texttt{dx_hts_tape_hastelloy}} + $$ + +3. The width of the tape is scaled to be: + + $$ + \overbrace{dr_{\text{tape}}^2}^{\texttt{dr_hts_tape}} = \frac{D_{\text{cable,internal}}\times 0.00375}{0.0054} + $$ + +4. The height of the tape stack at the centre of the cable is found using the tape width and diameter of the region: + + $$ + \overbrace{dx_{\text{tape,stack}}}^{\texttt{dx_croco_strand_tape_stack}} = \sqrt{D_{\text{cable,internal}}^2-\overbrace{dr_{\text{tape}}^2}^{\texttt{dr_hts_tape}}} + $$ + +5. The number of tapes in the stack is thus: + + $$ + \overbrace{N_{\text{cable,tapes}}}^{\texttt{n_croco_strand_hts_tapes}} = \frac{dx_{\text{tape,stack}}}{dx_{\text{tape}}} + $$ + +6. The total copper area in the strand (from the copper sheath and inside the tapes) is: + + $$ + \overbrace{A_{\text{cable,copper}}}^{\texttt{a_croco_strand_copper_total}} = \left(\left(\pi D_{\text{cable}} dx_{\text{cable,copper}}\right) - \pi dx_{\text{cable,copper}}^2\right)\\ + + \left(dx_{\text{tape,copper}}dr_{\text{tape}}N_{\text{cable,tapes}}\right) + $$ + +7. The total Hastelloy area in the strand is: + + $$ + \overbrace{A_{\text{cable,Hastelloy}}}^{\texttt{a_croco_strand_hastelloy}} = dx_{\text{tape,Hastelloy}}dr_{\text{tape}}N_{\text{cable,tapes}} + $$ + +8. The area of the solder surrounding the tape stack is: + + $$ + \overbrace{A_{\text{cable,solder}}}^{\texttt{a_croco_strand_solder}} = \frac{\pi}{4}D_{\text{cable,internal}}^2 - dx_{\text{tape,stack}}dr_{\text{tape}} + $$ + +9. The total area of REBCO in the tape stack is: + + $$ + \overbrace{A_{\text{cable,REBCO}}}^{\texttt{a_croco_strand_hts_tapes}} = dx_{\text{tape,REBCO}}dr_{\text{tape}}N_{\text{cable,tapes}} + $$ + +10. The total area of the cable is thus: + + $$ + \overbrace{A_{\text{cable}}}^{\texttt{a_croco_strand}} = \frac{\pi}{4}D_{\text{cable}}^2 + $$ + +------------------------ + ### Durham Ginzburg-Landau Model Derivation The Durham scaling law [^6] is derived from the well-known equation for the volume pinning force $F_p$: diff --git a/process/superconductors.py b/process/superconductors.py index 04ab257820..72b55b89d1 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -867,6 +867,7 @@ def calculate_croco_cable_geometry( float, # a_croco_strand_solder float, # a_croco_strand_hts_tapes float, # croco_strand_area + float, # dr_hts_tape ]: """ Calculate geometry and areas for a CroCo cable strand. @@ -881,8 +882,6 @@ def calculate_croco_cable_geometry( :type dx_hts_tape_copper: float :param dx_hts_tape_hastelloy: Thickness of Hastelloy layer in HTS tape (m) :type dx_hts_tape_hastelloy: float - :param dr_hts_tape: Width of HTS tape (m) - :type dr_hts_tape: float :return: Tuple containing: - dia_croco_strand_tape_region: Inner diameter of CroCo strand tape region (m) @@ -892,7 +891,8 @@ def calculate_croco_cable_geometry( - a_croco_strand_solder: Total solder area in CroCo strand (m²) - a_croco_strand_hts_tapes: Total REBCO area in CroCo strand (m²) - croco_strand_area: Total area of CroCo strand (m²) - :rtype: tuple[float, float, float, float, float, float, float] + - dr_hts_tape: Width of the tape (m) + :rtype: tuple[float, float, float, float, float, float, float, float] """ # Calculate the inner diameter of the CroCo strand tape region @@ -903,6 +903,9 @@ def calculate_croco_cable_geometry( # Total thickness of HTS tape dx_hts_tape_total = dx_hts_tape_rebco + dx_hts_tape_copper + dx_hts_tape_hastelloy + scaling = dia_croco_strand_tape_region / 5.4e-3 + dr_hts_tape = scaling * 3.75e-3 + # Calculate the height of HTS tapes in the CroCo strand dx_croco_strand_tape_stack = np.sqrt( dia_croco_strand_tape_region**2 - dr_hts_tape**2 @@ -910,7 +913,7 @@ def calculate_croco_cable_geometry( # Number of HTS tapes in the CroCo strand n_croco_strand_hts_tapes = dx_croco_strand_tape_stack / dx_hts_tape_total - # + # Area of copper in the CroCo strand (copper tube + copper in HTS tapes) a_croco_strand_copper_total = ( np.pi * dx_croco_strand_copper * dia_croco_strand - np.pi * dx_croco_strand_copper**2 @@ -941,6 +944,7 @@ def calculate_croco_cable_geometry( a_croco_strand_solder, a_croco_strand_hts_tapes, a_croco_strand, + dr_hts_tape, ) From c28f6d60c1002d4981aacacff8aa4a083d80bb22 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Thu, 9 Oct 2025 16:52:11 +0100 Subject: [PATCH 19/24] =?UTF-8?q?=F0=9F=94=84=20Rename=20'a=5Fcroco=5Fstra?= =?UTF-8?q?nd=5Fhts=5Ftapes'=20to=20'a=5Fcroco=5Fstrand=5Frebco'=20and=20u?= =?UTF-8?q?pdate=20references=20for=20clarity=20in=20CroCo=20strand=20area?= =?UTF-8?q?=20calculations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process/data_structure/rebco_variables.py | 8 ++++---- process/superconducting_tf_coil.py | 8 ++++---- process/superconductors.py | 16 +++++++--------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index 54716f2485..fe2de39259 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -49,8 +49,8 @@ n_croco_strand_hts_tapes: float = None "Number of HTS tapes in CroCo strand" -a_croco_strand_hts_tapes: float = None -"Area of HTS tapes in CroCo strand (m2)" +a_croco_strand_rebco: float = None +"Area of REBCO in CroCo strand (m2)" a_croco_strand_copper_total: float = None "Area of copper in CroCo strand (includes tapes and outer tube) (m2)" @@ -80,7 +80,7 @@ def init_rebco_variables(): global dx_hts_tape_total global dx_croco_strand_tape_stack global n_croco_strand_hts_tapes - global a_croco_strand_hts_tapes + global a_croco_strand_rebco global a_croco_strand_copper_total global a_croco_strand_hastelloy global a_croco_strand_solder @@ -103,7 +103,7 @@ def init_rebco_variables(): dx_hts_tape_total = 6.5e-5 dx_croco_strand_tape_stack = 0.0 n_croco_strand_hts_tapes = 0.0 - a_croco_strand_hts_tapes = 0.0 + a_croco_strand_rebco = 0.0 a_croco_strand_copper_total = 0.0 a_croco_strand_hastelloy = 0.0 a_croco_strand_solder = 0.0 diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index 6791ea2369..3224c03a0b 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -625,8 +625,8 @@ def supercon_croco( po.ovarre( self.outfile, "Area of REBCO in strand (m2)", - "(a_croco_strand_hts_tapes)", - rebco_variables.a_croco_strand_hts_tapes, + "(a_croco_strand_rebco)", + rebco_variables.a_croco_strand_rebco, "OP ", ) po.ovarre( @@ -661,7 +661,7 @@ def supercon_croco( abs( superconducting_tf_coil_variables.croco_strand_area - ( - rebco_variables.a_croco_strand_hts_tapes + rebco_variables.a_croco_strand_rebco + rebco_variables.a_croco_strand_copper_total + rebco_variables.a_croco_strand_hastelloy + rebco_variables.a_croco_strand_solder @@ -711,7 +711,7 @@ def supercon_croco( po.ovarre( self.outfile, "REBCO area of conductor (mm2)", - "(a_croco_strand_hts_tapes)", + "(a_croco_strand_rebco)", superconducting_tf_coil_variables.conductor_rebco_area, "OP ", ) diff --git a/process/superconductors.py b/process/superconductors.py index 72b55b89d1..f4e53825d4 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -865,7 +865,7 @@ def calculate_croco_cable_geometry( float, # a_croco_strand_copper_total float, # a_croco_strand_hastelloy float, # a_croco_strand_solder - float, # a_croco_strand_hts_tapes + float, # a_croco_strand_rebco float, # croco_strand_area float, # dr_hts_tape ]: @@ -889,7 +889,7 @@ def calculate_croco_cable_geometry( - a_croco_strand_copper_total: Total copper area in CroCo strand (m²) - a_croco_strand_hastelloy: Total Hastelloy area in CroCo strand (m²) - a_croco_strand_solder: Total solder area in CroCo strand (m²) - - a_croco_strand_hts_tapes: Total REBCO area in CroCo strand (m²) + - a_croco_strand_rebco: Total REBCO area in CroCo strand (m²) - croco_strand_area: Total area of CroCo strand (m²) - dr_hts_tape: Width of the tape (m) :rtype: tuple[float, float, float, float, float, float, float, float] @@ -930,9 +930,7 @@ def calculate_croco_cable_geometry( ) # Area of REBCO in the CroCo strand - a_croco_strand_hts_tapes = ( - dx_hts_tape_rebco * dr_hts_tape * n_croco_strand_hts_tapes - ) + a_croco_strand_rebco = dx_hts_tape_rebco * dr_hts_tape * n_croco_strand_hts_tapes # Total area of the CroCo strand a_croco_strand = np.pi / 4.0 * dia_croco_strand**2 @@ -942,7 +940,7 @@ def calculate_croco_cable_geometry( a_croco_strand_copper_total, a_croco_strand_hastelloy, a_croco_strand_solder, - a_croco_strand_hts_tapes, + a_croco_strand_rebco, a_croco_strand, dr_hts_tape, ) @@ -990,11 +988,11 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): - dx_croco_strand_tape_stack * dr_hts_tape ) - a_croco_strand_hts_tapes = ( + a_croco_strand_rebco = ( rebco_variables.dx_hts_tape_rebco * dr_hts_tape * n_croco_strand_hts_tapes ) croco_strand_area = np.pi / 4.0 * d**2 - croco_strand_critical_current = j_crit_sc * a_croco_strand_hts_tapes + croco_strand_critical_current = j_crit_sc * a_croco_strand_rebco # Conductor properties # conductor%number_croco = conductor%acs*(1.0-cable_helium_fraction-copper_bar)/croco_strand_area @@ -1017,7 +1015,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): conductor_solder_area = a_croco_strand_solder * 6.0 conductor_solder_fraction = conductor_solder_area / conductor_area - conductor_rebco_area = a_croco_strand_hts_tapes * 6.0 + conductor_rebco_area = a_croco_strand_rebco * 6.0 conductor_rebco_fraction = conductor_rebco_area / conductor_area return ( From ea5bbd86e844188fcf0727c7acf94341b270b77c Mon Sep 17 00:00:00 2001 From: mn3981 Date: Mon, 13 Oct 2025 17:19:33 +0100 Subject: [PATCH 20/24] :sparkle: Add 'plot_corc_cable_geometry' function to visualize CroCo strand cable geometry with detailed parameters --- process/io/plot_proc.py | 84 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/process/io/plot_proc.py b/process/io/plot_proc.py index b2a418eae5..42540791ec 100644 --- a/process/io/plot_proc.py +++ b/process/io/plot_proc.py @@ -10695,6 +10695,90 @@ def plot_plasma_poloidal_pressure_contours( axis.set_title("Plasma Poloidal Pressure Contours") +def plot_corc_cable_geometry( + axis, + dia_croco_strand: float, + dx_croco_strand_copper: float, + dr_hts_tape: float, + dx_croco_strand_tape_stack: float, + n_croco_strand_hts_tapes: int, +): + """ + Plot the geometry of a CroCo strand cable. + + :param axis: The matplotlib axis to plot on. + :type axis: matplotlib.axes._axes.Axes + :param dia_croco_strand: Diameter of the CroCo strand (in meters). + :type dia_croco_strand: float + :param dx_croco_strand_copper: Thickness of the copper layer (in meters). + :type dx_croco_strand_copper: float + :param dr_hts_tape: Radius of the HTS tape stack (in meters). + :type dr_hts_tape: float + :param dx_croco_strand_tape_stack: Height of the HTS tape stack (in meters). + :type dx_croco_strand_tape_stack: float + :param n_croco_strand_hts_tapes: Number of HTS tape layers in the stack. + :type n_croco_strand_hts_tapes: int + """ + # Plot a circle with the given diameter and copper edges + circle = Circle( + (0, 0), + radius=(dia_croco_strand / 2) * 1000, + edgecolor="#B87333", + facecolor="#B87333", + linewidth=2, + label="Copper jacket", + ) + axis.add_patch(circle) + + # Plot an inner circle with copper edges + circle = Circle( + (0, 0), + radius=((dia_croco_strand / 2) - dx_croco_strand_copper) * 1000, + edgecolor="grey", + facecolor="grey", + linewidth=2, + label="Solder", + ) + axis.add_patch(circle) + + # Plot a rectangular tape stack in the middle + rect = Rectangle( + (-dr_hts_tape / 2 * 1000, -(dx_croco_strand_tape_stack / 2) * 1000), + width=dr_hts_tape * 1000, + height=dx_croco_strand_tape_stack * 1000, + edgecolor="blue", + facecolor="blue", + linewidth=2, + label="HTS Tape Stack", + ) + axis.add_patch(rect) + + # Slice the tape stack into n_croco_strand_hts_tapes layers + for i in range(int(n_croco_strand_hts_tapes)): + y_start = -(dx_croco_strand_tape_stack / 2) * 1000 + i * ( + dx_croco_strand_tape_stack / n_croco_strand_hts_tapes * 1000 + ) + rect = Rectangle( + (-dr_hts_tape / 2 * 1000, y_start), + width=dr_hts_tape * 1000, + height=(dx_croco_strand_tape_stack / n_croco_strand_hts_tapes) * 1000, + edgecolor="black", + facecolor="blue", + linewidth=1, + ) + axis.add_patch(rect) + + axis.set_xlim(-dia_croco_strand * 0.75 * 1000, dia_croco_strand * 0.75 * 1000) + axis.set_ylim(-dia_croco_strand * 1000, dia_croco_strand * 1000) + axis.set_aspect("equal", adjustable="datalim") + axis.set_title("CroCo Strand Geometry") + axis.grid(True) + axis.set_xlabel("X-axis (mm)") + axis.set_ylabel("Y-axis (mm)") + axis.minorticks_on() + axis.legend(loc="upper right") + + def main_plot( fig0, fig1, From f33df0019adb1f8fa0104b474026b2c75cf08aa7 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Mon, 13 Oct 2025 17:36:30 +0100 Subject: [PATCH 21/24] :sparkle: Update obsolete variable mappings in 'obsolete_vars.py' for consistency in input validation --- process/io/obsolete_vars.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/process/io/obsolete_vars.py b/process/io/obsolete_vars.py index 4af269207d..081e405ac8 100644 --- a/process/io/obsolete_vars.py +++ b/process/io/obsolete_vars.py @@ -451,6 +451,12 @@ "t_structural_vertical": "dz_cs_turn_conduit", "t_cable_tf": "dx_tf_turn_cable_space_general", "t_turn_tf": "dx_tf_turn_general", + "copper_thick": "dx_hts_tape_copper", + "croco_thick": "dx_croco_strand_copper", + "hastelloy_thickness": "dx_hts_tape_hastelloy", + "rebco_thickness": "dx_hts_tape_rebco", + "tape_thickness": "dx_hts_tape_total", + "tape_width": "dr_hts_tape", } OBS_VARS_HELP = { From 5366813dfb678e960ef0e28ddb034fe8075fbcb6 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 14 Oct 2025 09:03:03 +0100 Subject: [PATCH 22/24] :sparkle: Remove unused parameter 'dr_hts_tape' from 'calculate_croco_cable_geometry' function for clarity --- process/superconductors.py | 1 - tests/unit/test_superconductors.py | 64 ++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/process/superconductors.py b/process/superconductors.py index f4e53825d4..60168bde16 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -858,7 +858,6 @@ def calculate_croco_cable_geometry( dx_hts_tape_rebco: float, dx_hts_tape_copper: float, dx_hts_tape_hastelloy: float, - dr_hts_tape: float, ) -> tuple[ float, # dia_croco_strand_tape_region float, # n_croco_strand_hts_tapes diff --git a/tests/unit/test_superconductors.py b/tests/unit/test_superconductors.py index 0503085b49..baf97ded33 100644 --- a/tests/unit/test_superconductors.py +++ b/tests/unit/test_superconductors.py @@ -201,3 +201,67 @@ def test_hijc_rebco(): assert jcrit == pytest.approx(111046017.5) assert bcrit == pytest.approx(22.335736687814954) assert tcrit == pytest.approx(24.999125) + + +@pytest.mark.parametrize( + "dia_croco_strand, dx_croco_strand_copper, dx_hts_tape_rebco, dx_hts_tape_copper, dx_hts_tape_hastelloy, expected", + [ + ( + 0.010, # 10 mm + 0.001, # 1 mm + 1e-6, # 1 um + 2e-6, # 2 um + 3e-6, # 3 um + ( + 0.008, # dia_croco_strand_tape_region + pytest.approx(959.3950997769347, rel=1e-3), # n_croco_strand_hts_tapes + pytest.approx( + 3.8934279435385194e-05, rel=1e-3 + ), # a_croco_strand_copper_total + pytest.approx( + 1.5989918329615573e-05, rel=1e-3 + ), # a_croco_strand_hastelloy + pytest.approx( + 1.8285645798205533e-05, rel=1e-3 + ), # a_croco_strand_solder + pytest.approx(5.329972776538525e-06, rel=1e-3), # a_croco_strand_rebco + pytest.approx(7.85398e-5, rel=1e-3), # croco_strand_area + pytest.approx(5.5556e-3, rel=1e-3), # dr_hts_tape + ), + ), + ( + 0.0054, # baseline diameter + 0.0005, # baseline copper thickness + 1e-6, + 2e-6, + 3e-6, + ( + 0.0044, + pytest.approx(527.6673048773141, rel=1e-6), + pytest.approx(1.0921535531100803e-05, rel=1e-6), + pytest.approx(4.836950294708712e-06, rel=1e-6), + pytest.approx(5.531407853957174e-06, rel=1e-6), + pytest.approx(1.612316764902904e-06, rel=1e-6), + pytest.approx(2.2902210444669593e-05, rel=1e-6), + pytest.approx(0.0030555555555555553, rel=1e-6), + ), + ), + ], +) +def test_calculate_croco_cable_geometry( + dia_croco_strand, + dx_croco_strand_copper, + dx_hts_tape_rebco, + dx_hts_tape_copper, + dx_hts_tape_hastelloy, + expected, +): + result = superconductors.calculate_croco_cable_geometry( + dia_croco_strand, + dx_croco_strand_copper, + dx_hts_tape_rebco, + dx_hts_tape_copper, + dx_hts_tape_hastelloy, + ) + for r, e in zip(result, expected, strict=False): + assert r == e From 2eb1c554f564dc684389f12da6ea6a7fc23bfad0 Mon Sep 17 00:00:00 2001 From: mn3981 Date: Tue, 14 Oct 2025 09:13:03 +0100 Subject: [PATCH 23/24] Incorporate new croco strand calc into old function --- process/superconductors.py | 69 ++++++++++++++------------------------ 1 file changed, 26 insertions(+), 43 deletions(-) diff --git a/process/superconductors.py b/process/superconductors.py index 60168bde16..a800b8f1c0 100644 --- a/process/superconductors.py +++ b/process/superconductors.py @@ -865,7 +865,7 @@ def calculate_croco_cable_geometry( float, # a_croco_strand_hastelloy float, # a_croco_strand_solder float, # a_croco_strand_rebco - float, # croco_strand_area + float, # a_croco_strand float, # dr_hts_tape ]: """ @@ -889,7 +889,7 @@ def calculate_croco_cable_geometry( - a_croco_strand_hastelloy: Total Hastelloy area in CroCo strand (m²) - a_croco_strand_solder: Total solder area in CroCo strand (m²) - a_croco_strand_rebco: Total REBCO area in CroCo strand (m²) - - croco_strand_area: Total area of CroCo strand (m²) + - a_croco_strand: Total area of CroCo strand (m²) - dr_hts_tape: Width of the tape (m) :rtype: tuple[float, float, float, float, float, float, float, float] """ @@ -950,54 +950,37 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): 'REBCO' 2nd generation HTS superconductor Updated 13/11/18 using data from Lewandowska et al 2018. """ - d = dia_croco_strand - # d = conductor_width / 3.0d0 - dx_tf_turn_steel * ( 2.0d0 / 3.0d0 ) - dia_croco_strand_tape_region = d - 2.0 * dx_croco_strand_copper # scaling * 5.4d-3 - if dia_croco_strand_tape_region <= 0.0: - logger.error("Negitive inner croco diameter") - - # Define the scaling factor for the input REBCO variable - # Ratio of new croco inner diameter and fixed base line value - scaling = dia_croco_strand_tape_region / 5.4e-3 - dr_hts_tape = scaling * 3.75e-3 - # Properties of a single strand - dx_hts_tape_total = ( - rebco_variables.dx_hts_tape_rebco - + rebco_variables.dx_hts_tape_copper - + rebco_variables.dx_hts_tape_hastelloy - ) - dx_croco_strand_tape_stack = np.sqrt( - dia_croco_strand_tape_region**2 - dr_hts_tape**2 + ( + rebco_variables.dia_croco_strand_tape_region, + rebco_variables.n_croco_strand_hts_tapes, + a_croco_strand_copper_total, + a_croco_strand_hastelloy, + a_croco_strand_solder, + a_croco_strand_rebco, + a_croco_strand, + rebco_variables.dr_hts_tape, + ) = calculate_croco_cable_geometry( + dia_croco_strand, + dx_croco_strand_copper, + rebco_variables.dx_hts_tape_rebco, + rebco_variables.dx_hts_tape_copper, + rebco_variables.dx_hts_tape_hastelloy, ) - n_croco_strand_hts_tapes = dx_croco_strand_tape_stack / dx_hts_tape_total - a_croco_strand_copper_total = ( - np.pi * dx_croco_strand_copper * d - - np.pi * dx_croco_strand_copper**2 - + rebco_variables.dx_hts_tape_copper - * dr_hts_tape - * n_croco_strand_hts_tapes # copper tube # copper in tape - ) - a_croco_strand_hastelloy = ( - rebco_variables.dx_hts_tape_hastelloy * dr_hts_tape * n_croco_strand_hts_tapes - ) - a_croco_strand_solder = ( - np.pi / 4.0 * dia_croco_strand_tape_region**2 - - dx_croco_strand_tape_stack * dr_hts_tape - ) + rebco_variables.a_croco_strand_copper_total = a_croco_strand_copper_total + rebco_variables.a_croco_strand_hastelloy = a_croco_strand_hastelloy + rebco_variables.a_croco_strand_solder = a_croco_strand_solder + rebco_variables.a_croco_strand_rebco = a_croco_strand_rebco + rebco_variables.a_croco_strand = a_croco_strand - a_croco_strand_rebco = ( - rebco_variables.dx_hts_tape_rebco * dr_hts_tape * n_croco_strand_hts_tapes - ) - croco_strand_area = np.pi / 4.0 * d**2 croco_strand_critical_current = j_crit_sc * a_croco_strand_rebco # Conductor properties - # conductor%number_croco = conductor%acs*(1.0-cable_helium_fraction-copper_bar)/croco_strand_area + # conductor%number_croco = conductor%acs*(1.0-cable_helium_fraction-copper_bar)/a_croco_strand conductor_critical_current = croco_strand_critical_current * 6.0 # Area of core = area of strand - conductor_copper_bar_area = croco_strand_area + conductor_copper_bar_area = a_croco_strand conductor_copper_area = ( a_croco_strand_copper_total * 6.0 + conductor_copper_bar_area ) @@ -1005,7 +988,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): # Helium area is set by the user. # conductor_helium_area = cable_helium_fraction * conductor_acs - conductor_helium_area = np.pi / 2.0 * d**2 + conductor_helium_area = np.pi / 2.0 * dia_croco_strand**2 conductor_helium_fraction = conductor_helium_area / conductor_area conductor_hastelloy_area = a_croco_strand_hastelloy * 6.0 @@ -1018,7 +1001,7 @@ def croco(j_crit_sc, conductor_area, dia_croco_strand, dx_croco_strand_copper): conductor_rebco_fraction = conductor_rebco_area / conductor_area return ( - croco_strand_area, + a_croco_strand, croco_strand_critical_current, conductor_copper_area, conductor_copper_fraction, From 69ab458cd3e9606f07b7e3a77cbb0c45883dbb5d Mon Sep 17 00:00:00 2001 From: mn3981 Date: Wed, 15 Oct 2025 08:43:02 +0100 Subject: [PATCH 24/24] Review request changes --- process/data_structure/rebco_variables.py | 14 +++++++------- process/superconducting_tf_coil.py | 2 +- tests/unit/test_superconductors.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/process/data_structure/rebco_variables.py b/process/data_structure/rebco_variables.py index fe2de39259..420999564d 100644 --- a/process/data_structure/rebco_variables.py +++ b/process/data_structure/rebco_variables.py @@ -44,25 +44,25 @@ """f-value for constraint 88: CS coil current / copper area < copperA_m2_max""" dx_croco_strand_tape_stack: float = None -"Width / thickness of tape stack in CroCo strand (m)" +"""Width / thickness of tape stack in CroCo strand (m)""" n_croco_strand_hts_tapes: float = None -"Number of HTS tapes in CroCo strand" +"""Number of HTS tapes in CroCo strand""" a_croco_strand_rebco: float = None -"Area of REBCO in CroCo strand (m2)" +"""Area of REBCO in CroCo strand (m2)""" a_croco_strand_copper_total: float = None -"Area of copper in CroCo strand (includes tapes and outer tube) (m2)" +"""Area of copper in CroCo strand (includes tapes and outer tube) (m2)""" a_croco_strand_hastelloy: float = None -"Area of Hastelloy in CroCo strand (m2)" +"""Area of Hastelloy in CroCo strand (m2)""" a_croco_strand_solder: float = None -"Area of solder in CroCo strand (m2)" +"""Area of solder in CroCo strand (m2)""" a_croco_strand: float = None -"Total area of a CroCo strand (m2)" +"""Total area of a CroCo strand (m2)""" def init_rebco_variables(): diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index 3224c03a0b..aa99dda4df 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -562,7 +562,7 @@ def supercon_croco( po.ovarre( self.outfile, "Thickness of copper layer in tape (m)", - "(dx_hts_tape_copper )", + "(dx_hts_tape_copper)", rebco_variables.dx_hts_tape_copper, ) po.ovarre( diff --git a/tests/unit/test_superconductors.py b/tests/unit/test_superconductors.py index baf97ded33..018c05c0e6 100644 --- a/tests/unit/test_superconductors.py +++ b/tests/unit/test_superconductors.py @@ -263,5 +263,5 @@ def test_calculate_croco_cable_geometry( dx_hts_tape_copper, dx_hts_tape_hastelloy, ) - for r, e in zip(result, expected, strict=False): + for r, e in zip(result, expected, strict=True): assert r == e