#%% import matplotlib.pyplot as plt import numpy as np import matplotlib # matplotlib.use('Qt5Agg') from src import coil_class as BC scale = 10 lim = 20 nr_points = (2 * lim) * scale + 1 x = np.linspace(-lim, lim, nr_points) z = np.linspace(-lim, lim, nr_points) def mu_it(x_pos): it = nr_points // 2 + x_pos return it scale = 10 # I_current = 0.94 HH_Coil = BC.BCoil(HH=1, distance=79.968, radius=80.228, layers=8, windings=8, wire_height=0.5, wire_width=0.5, insulation_thickness=0.046 / 2, is_round=True, winding_scheme=2) AHH_Coil = BC.BCoil(HH=-1, distance=100.336, radius=85.016, layers=10, windings=10, wire_height=1.18, wire_width=1.18, insulation_thickness=0.06, is_round=True, winding_scheme=2) #%% AHH_Coil.print_basic_info() I = 1 AHH_Coil.max_gradient(I) HH_Coil.max_field(I) # %% HH_Coil.cooling(2, 30) AHH_Coil.cooling(3.6,30) HH_Coil.print_basic_info() AHH_Coil.print_basic_info() AHH_Coil.plot_raster() I = 0.75 #HH_Coil.B_quick_plot(I) #HH_Coil.B_curv_quick_plot(I) # Power #HH_Coil.cooling(I, 23) #AHH_Coil.cooling(I, 23) print(f"resistance = {HH_Coil.resistance(23)} Ohm") # rough Field I_HH = 1 HH_Coil.max_field(I_HH) I_AHH = 3.6 AHH_Coil.max_gradient(I_AHH) # Quick plot HH_Coil.B_quick_plot(I_HH) HH_Coil.B_curv_quick_plot(I_HH) AHH_Coil.B_quick_plot(I_AHH) AHH_Coil.B_grad_quick_plot(I_AHH, nr_points = 200) HH_Coil.plot_3d(I_HH, 50, 50) AHH_Coil.plot_3d(I_AHH, 50, 50) # Field calculation Bz_HH, Bx_HH = HH_Coil.B_field(I_HH, x, z) B_tot_z, B_tot_x = HH_Coil.B_tot_along_axis(I_HH, x, z) Bz_grad = BC.BCoil.grad(Bz_HH, z) # Position 2 # AHH_Coil.set_R_inner(62) # AHH_Coil.set_d_min(116) # # print(f"wire length = {AHH_Coil.get_wire_length()} m") # AHH_Coil.print_info() I = 1 # print(f"current I = {I} A") # AHH_Coil.B_quick_plot(I) # AHH_Coil.B_grad_quick_plot(I, nr_points = 200) # AHH_Coil.B_curv_quick_plot(I, nr_points = scale) # HH_Coil.print_info() # AHH_Coil.print_info()