From 9e8fd02e19f88dee4be20dc4cb9521dd239847a1 Mon Sep 17 00:00:00 2001 From: schoener Date: Tue, 2 Nov 2021 10:02:55 +0100 Subject: [PATCH] FINAL FINAL Wire --- Coil_geometry/11_Final_HH.py | 11 ++++---- Coil_geometry_AHH/08_FINAL_AHH.py | 44 +++++++++++++++++++++++++++---- src/coil_class.py | 1 + 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/Coil_geometry/11_Final_HH.py b/Coil_geometry/11_Final_HH.py index 7bc11bd..21abf2d 100644 --- a/Coil_geometry/11_Final_HH.py +++ b/Coil_geometry/11_Final_HH.py @@ -21,12 +21,13 @@ x = np.linspace(-15, 15, 30001) z = np.linspace(-15, 15, 30001) -#New coil -Wire_1 = [0.5, 0.568] -I_current = 0.94 -HH_Coil = BC.BCoil(HH = 1, distance = 54, radius = 48, layers = 10, windings = 9, wire_height = Wire_1[0], wire_width = Wire_1[0], insulation_thickness=(Wire_1[1] - Wire_1[0]) / 2, is_round = True, winding_scheme= 2) +# New coil +# Wire_1 = [0.5, 0.568] +Wire_1 = [0.45, 0.514] +#I_current = 0.94 +HH_Coil = BC.BCoil(HH = 1, distance = 54, radius = 48, layers = 8, windings = 9, wire_height = Wire_1[0], wire_width = Wire_1[0], insulation_thickness=(Wire_1[1] - Wire_1[0]) / 2, is_round = True, winding_scheme= 2) -#I = 64 / HH_Coil.get_N() * 1.25 +I_current = 64 / HH_Coil.get_N() * 1.25 #set radius plus distance HH_Coil.set_R_outer(50.5 - HH_Coil.get_tot_wire_width()*1e3) HH_Coil.set_d_min(47.15) diff --git a/Coil_geometry_AHH/08_FINAL_AHH.py b/Coil_geometry_AHH/08_FINAL_AHH.py index ba9d0cd..637f38b 100644 --- a/Coil_geometry_AHH/08_FINAL_AHH.py +++ b/Coil_geometry_AHH/08_FINAL_AHH.py @@ -17,24 +17,30 @@ def mu_it(x_pos): Wires = [[0.45, 0.514],[0.475, 0.543],[0.5, 0.568]] -Wire_1 = Wires[0] +Wire_1 = Wires[2] #I_current = 0.94 -HH_Coil = BC.BCoil(HH = 1, distance = 54, radius = 48, layers = 8, windings = 9, wire_height = Wire_1[0], +HH_Coil = BC.BCoil(HH = 1, distance = 54, radius = 48, layers = 8, windings = 8, wire_height = Wire_1[0], wire_width = Wire_1[0], insulation_thickness=(Wire_1[1] - Wire_1[0]) / 2, is_round = True, winding_scheme= 2) + +print(f"HH N = {HH_Coil.get_N()}") I = 64 / HH_Coil.get_N() * 1.25 + # set radius plus distance HH_Coil.set_R_outer(50.5 - HH_Coil.get_tot_wire_width()*1e3) HH_Coil.set_d_min(47.15) +# HH_Coil.B_quick_plot(I) +# HH_Coil.B_curv_quick_plot(I) +# HH_Coil.plot_raster() HH_Coil.print_info() D_max = 2 * (HH_Coil.get_R_inner()*1e3 - 1) * np.tan(np.radians(41.11)) print(D_max) -AHH_Coil = BC.BCoil(HH = -1, distance = 54, radius = 48, layers = HH_Coil.get_layers, windings=2 * HH_Coil.get_windings-5, +AHH_Coil = BC.BCoil(HH = -1, distance = 54, radius = 48, layers = HH_Coil.get_layers, windings=2 * HH_Coil.get_windings, wire_height = Wire_1[0], wire_width=Wire_1[0], insulation_thickness=(Wire_1[1] - Wire_1[0]) / 2, is_round = True, winding_scheme= 2) @@ -42,7 +48,35 @@ AHH_Coil.set_R_inner(HH_Coil.get_R_inner() * 1e3) AHH_Coil.set_d_max(D_max) AHH_Coil.print_info() +print(f"AHH N = {AHH_Coil.get_N()}") +I_grad = I - 0.128 # 8 x 9#128 / AHH_Coil.get_N() * I -AHH_Coil.B_grad_quick_plot(I) +I_grad = I - 0.15 # 8 x 8 + +print(f"current @ 6G/cm: {I_grad} A") +AHH_Coil.B_grad_quick_plot(I_grad) #Bz, Bx = AHH_Coil.B_field(I) -AHH_Coil.cooling(I, 22.5) \ No newline at end of file +AHH_Coil.cooling(I_grad, 22.5) + +#Bz, Bx = AHH_Coil.B_field(I_grad, x, z, raster = 7) +# Bz_grad = BC.BCoil.grad(Bz,z) +# Bx_grad = BC.BCoil.grad(Bx,x) + +#AHH_Coil.B_quick_plot(I_grad) +#AHH_Coil.B_grad_quick_plot(I_grad) +AHH_Coil.plot_raster(raster_value= 11) + +# zero = mu_it(0) +# print(f"Bz_grad({z[zero]}) = {Bz_grad[zero]} G/cm") +# mu = mu_it(1) +# mm = mu_it(1000) +# mid = mu_it(5000) +# outer = mu_it(15000) +# # Bz0 = Bz_grad[zero] +# +# +# +# print(f"Bz_grad({z[mu]} mm) - Bz_grad (0) = {Bz0 - Bz_grad[mu]}, relative = {(Bz0 - Bz_grad[mu])/Bz0}") +# print(f"Bz_grad({z[mm]} mm) - Bz_grad (0) = {Bz0 - Bz_grad[mm]}, relative = {(Bz0 - Bz_grad[mm])/Bz0}") +# print(f"Bz_grad({z[mid]} mm) - Bz_grad (0) = {Bz0 - Bz_grad[mid]}, relative = {(Bz0 - Bz_grad[mid])/Bz0}") +# print(f"Bz_grad({z[outer]} mm) - Bz_grad (0) = {Bz0 - Bz_grad[outer]}, relative = {(Bz0 - Bz_grad[outer])/Bz0}") diff --git a/src/coil_class.py b/src/coil_class.py index db6df5b..137a3bc 100644 --- a/src/coil_class.py +++ b/src/coil_class.py @@ -563,6 +563,7 @@ class BCoil: plt.title("Gradient of B-field") plt.ylabel(r"B-field [G/cm]") plt.xlabel("x-axis / z-axis [mm]") + plt.title("Winding scheme AHH-coil") plt.legend() plt.show()