slightly changed geometry

This commit is contained in:
schoener 2022-01-07 15:03:10 +01:00
parent 7dc0bf1c78
commit b69540b136
7 changed files with 108 additions and 34 deletions

View File

@ -28,6 +28,10 @@ HH_Coil = BC.BCoil(HH = 1, distance = 54, radius = 48, layers = 8, windings = 8,
print(f"HH N = {HH_Coil.get_N()}")
I = 1.33 # 64 / HH_Coil.get_N() * 1.25
print(HH_Coil.resistance(20))
print(HH_Coil.induct_perry())
print(HH_Coil.resistance(190))
# 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)

View File

@ -29,15 +29,17 @@ 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.set_R_outer(50.5 - HH_Coil.get_tot_wire_width()*1e3)
HH_Coil.set_R_inner(45.6)
HH_Coil.set_d_min(47.15+2*0.5)
# 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))
D_max = 2 * (HH_Coil.get_R_inner()*1e3 - 0.5) * 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,

View File

@ -11,7 +11,7 @@ def main():
wire_height=0.5, wire_width=0.5, insulation_thickness=0.068 / 2,
is_round=True, winding_scheme=2)
step = 0.03
step = 0.05
xlim_mm = 30
xlim = int(xlim_mm/step) + 1
ylim_mm = 30
@ -30,7 +30,7 @@ def main():
b_plot = np.load('output/B_quarter.npy')
b_raw = np.load('output/final/b_cart_1Gcm.npy')
#b_raw = np.load('output/b_cart_1_step_5.npy')
#b_raw = np.load('output/b_full_test.npy')

View File

@ -7,21 +7,27 @@ import numpy as np
from scipy.io import savemat
def main():
# b_full = np.load('output/b_full_test.npy')
step = 0.05
xlim_mm = 30
xlim = int(xlim_mm / step) + 1
print(xlim)
ylim_mm = 30
ylim = int(ylim_mm / step) + 1
zlim_mm = 20
zlim = int(zlim_mm / step) + 1
b_1qu = np.load('output/final/b_cart_1Gcm.npy')
#
# bx_txt = open("output/Bx.txt", "w+")
# xx = 0
# yy = 0
# str = np.array2string(b_full[xx, yy, :, 0])
# bx_txt.write(str)
b_full = np.load('output/final/b_full.npy')
# mdic = {"B": b_full}
# del b_full
# savemat("b_full_matlab.mat",b_full)
np.savetxt("b_x.csv", b_full[:,:,0,0])
bx_txt = open("output/Bz.txt", "w+")
xx = 50
yy = 50
# str = np.array2string(b_1qu[xx, yy, :, 0])
for xx in range(0,xlim):
for yy in range(0,ylim):
str_1 = ' '.join(map(str,b_1qu[xx, yy, :, 2]))
bx_txt.writelines(str_1)
bx_txt.close()

View File

@ -26,40 +26,50 @@ 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 = 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)
R = HH_Coil.resistance(22.5)
print(f"U = {1 * R}")
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 - 0.5)
HH_Coil.set_d_min(47.15+1)
#HH_Coil.set_R_outer(50.5 - HH_Coil.get_tot_wire_width()*1e3 - 0.5)
HH_Coil.set_R_outer(49.93)
additional_space = 0.3
HH_Coil.set_R_outer(49.93-additional_space)
HH_Coil.set_R_inner(45.6)
#HH_Coil.set_R_inner(45.9-0.1)
# 0.4 to get from +-30300
HH_Coil.set_d_min(47.15+0.4+ 2*additional_space)
print(f"height = {HH_Coil.get_coil_height()}")
HH_Coil.print_info()
Bz, Bx = HH_Coil.B_field(I_current, x, z, raster = 7)
#Bz, Bx = HH_Coil.B_field(I_current, x, z, raster = 7)
B_tot_z, B_tot_x = HH_Coil.B_field(I_current, x, z, raster = 7)
Bz, B_tot_x = HH_Coil.B_tot_along_axis(I_current, x, z, raster = 7)
Bz_curv = BC.BCoil.curv(Bz, z)
HH_Coil.cooling(I_current,28)
#HH_Coil.cooling(I_current,28)
print(f"Bz(0) = {Bz[15000]} G")
print(f"B_z_curvature(0) = {Bz_curv[15000]:.10f} G/cm^2")
print(f"Bz(1 μm) = {Bz[15001]}")
print(f"Bz(1 mm) = {Bz[16000]}")
#print(f"Bz(1 μm) = {Bz[15001]}")
#print(f"Bz(1 mm) = {Bz[16000]}")
print(f"Diff B 1 μm: {Bz[15001] - Bz[15000]}, relative: {(Bz[15001] - Bz[15000])/Bz[15000]}")
print(f"Diff B +/- 1 μm: {Bz[15001] - Bz[15000]}, relative: {(Bz[15001] - Bz[15000])/Bz[15000]}")
print(f"Diff B +/- 0.5 mm: {Bz[15500] - Bz[15000]}, relative: {(Bz[15500] - Bz[15000])/Bz[15000]}")
print(f"Diff B 1 mm: {Bz[16000] - Bz[15000]}, relative: {(Bz[16000] - Bz[15000])/Bz[15000]}")
print(f"Diff B 0.5 mm: {Bz[15500] - Bz[15000]}, relative: {(Bz[15500] - Bz[15000])/Bz[15000]}")
print(f"Diff B 15 mm: {Bz[30000] - Bz[15000]}, relative: {(Bz[30000] - Bz[15000])/Bz[15000]}")
print(f"Diff B +/- 1 mm: {Bz[16000] - Bz[15000]}, relative: {(Bz[16000] - Bz[15000])/Bz[15000]}")
#print(f"Diff B +/- 15 mm: {Bz[30000] - Bz[15000]}, relative: {(Bz[30000] - Bz[15000])/Bz[15000]}")
"""
plt.figure(300)
@ -95,7 +105,7 @@ plt.legend()#bbox_to_anchor=(1.05, 1), loc='upper left')
#plt.savefig("output/first_compensation_idea.png")
plt.show()
"""

View File

@ -0,0 +1,48 @@
import matplotlib.pyplot as plt
import numpy as np
#from src import B_field_calculation as bf
from src import coil_class as BC
from src import physical_constants as cs
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 = 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)
e_cu = 3e-2 # emissivity copper, polished
rho_cu = 1.7 * 1e-8
I = 3 # A
surface = 10e-4
# S_coil = S_coil/2
print(f"Surface area = {surface}")
def power_bal(T, h_air):
T_0 = 22.5
P = 100e-3
f = h_air * surface * (T - T_0) - 0.5 * P
return f
print(e_cu * surface * cs.sigma_B ** 4 * (50 ** 4 - 22.5 ** 4))
T = np.linspace(20, 120, 500)
T_calc = np.linspace(20, 2200, 1000)
for h_air in [2.5, 10, 25]:
pos_min = np.argmin(np.abs(power_bal(T_calc, h_air)))
T_SS = T_calc[pos_min]
print(f"T_ss = {T_SS} °C")
plt.plot(T, power_bal(T, h_air), label=f"$h_{{air}} = {h_air} \; W/m^2 K$ , $T_{{SS}}$ = {T_SS:.2f}°C")
plt.ylabel("Power balance [W]")
plt.xlabel("temparature [°C]")
plt.title(f"Power balance, free convection, AHH coil, I = {I} A, windings: 4 x 4")
plt.legend()
plt.show()
print(AHH_opt.power(I, 25) / 2)

View File

@ -9,8 +9,12 @@ import matplotlib.pyplot as plt
def main():
print(2e8/4.9e-3)
#print(zlim*35921/(1024)**2)
r = 45.92e-3
d = 2*r
d_w = 0.569e-3
a = 51.52 * d**(-0.41) + 11.31 * d**(-0.33) * np.log(d_w)
print(a)
print(8.96 * 5)