Calculations on wire decision

This commit is contained in:
schoener 2021-10-27 16:50:17 +02:00
parent b3c97e0049
commit 8595507a07
3 changed files with 35 additions and 9 deletions

View File

@ -11,25 +11,38 @@ import matplotlib
#matplotlib.use('Qt5Agg')
from src import coil_class as BC
scale = 1000
lim = 5
nr_points = (2 * lim) * scale + 1
x = np.linspace(-lim,lim,nr_points)
z = np.linspace(-lim,lim,nr_points)
I = 10/8
print(I)
def mu_it(x_pos):
it = nr_points//2 + x_pos
return it
Wire_1 = BC.BCoil(HH = 1, distance = 54, radius = 48, layers = 8, windings = 8, wire_height = 0.5, wire_width = 0.5, insulation_thickness= 0.06, is_round = True, winding_scheme= 2)
wire_radius = 0.475
Wire_1 = BC.BCoil(HH = 1, distance = 54, radius = 48, layers = 8, windings = 8, wire_height = wire_radius, wire_width = wire_radius, insulation_thickness= 0.068, is_round = True, winding_scheme= 2)
Wire_1.set_R_outer(49.8)
Wire_1.set_d_min(49.8)
Wire_1.print_info()
print(Wire_1.get_coil_width() * 1e3 * Wire_1.get_coil_height() * 1e3)
print(f"H = {Wire_1.get_coil_height() * 1e3}, W = {Wire_1.get_coil_width()*1e3}")
I = 64/Wire_1.get_N() *1.25
print(f"I = {I} A")
Wire_1.cooling(I,22.5)
Wire_1.plot_raster(30)
Wire_1.B_quick_plot(I)
Wire_1.B_curv_quick_plot(I,nr_points= 1000)
Bz, Bx = Wire_1.B_field(I,x,z, raster = 10)
Bz_curv = BC.BCoil.curv(Bz,z)
zero = mu_it(0)
print(z[zero])
print(f"Curvature = {Bz_curv[zero]}")
#Wire_1.B_quick_plot(I)
#Wire_1.B_curv_quick_plot(I,nr_points= 1000)

View File

@ -478,9 +478,11 @@ class BCoil:
plt.ylabel("z-axis [mm]")
plt.show()
@staticmethod
def curv(B_f, z):
return np.gradient(np.gradient(B_f, z), z) * 1e2
@staticmethod
def grad(B_f, z):
return np.gradient(B_f, z) * 1e1

View File

@ -22,4 +22,15 @@ print(10e-3/13.7)
a = 7
if (a == (7 or 3)):
print("true")
print("true")
print(40*1e-3*np.pi)
print(4/0.127)
print(30/0.3)
print(30/400)
print(4.3*4.8/(60*(0.475/2)**2 *np.pi))
print(1/1.94)