-fixed inductance calculation
-added measured value of wire resistance -checking simulation vs BoDy's coils -final coil configuration
This commit is contained in:
parent
0652565aca
commit
2cc6bb1dfc
2327357
coil_design/2025_06_02 (FINAL config).ipynb
Normal file
2327357
coil_design/2025_06_02 (FINAL config).ipynb
Normal file
File diff suppressed because one or more lines are too long
2372504
coil_design/2025_06_02 (reproduce BoDy).ipynb
Normal file
2372504
coil_design/2025_06_02 (reproduce BoDy).ipynb
Normal file
File diff suppressed because one or more lines are too long
@ -25,21 +25,35 @@ def circular_HH(HH, radius, distance, layers, windings,
|
|||||||
HH_Coil.print_info()
|
HH_Coil.print_info()
|
||||||
print(f"N = {HH_Coil.get_N()}")
|
print(f"N = {HH_Coil.get_N()}")
|
||||||
print(f"wire length = {HH_Coil.get_wire_length()} m")
|
print(f"wire length = {HH_Coil.get_wire_length()} m")
|
||||||
print(f"R = {HH_Coil.resistance(25)} Ohm")
|
|
||||||
print(f"L = {HH_Coil.induct_perry()*1e3} mH")
|
|
||||||
print(f"tau = {HH_Coil.tau() *1e3} ms")
|
|
||||||
|
|
||||||
HH_Coil.plot_raster()
|
HH_Coil.plot_raster()
|
||||||
|
|
||||||
|
#### total inductance from Lenny's code ####
|
||||||
|
def Self_Inductance_Abbot(alpha, beta, gamma, N):
|
||||||
|
"""
|
||||||
|
Formula for self inductance of circular coil by J.J.Abbott
|
||||||
|
"""
|
||||||
|
L = (7.9e-6 * alpha**2 * N**2) / (3*alpha + 9*beta + 10*gamma)
|
||||||
|
return L
|
||||||
|
|
||||||
|
alpha = 2*radius
|
||||||
|
beta = HH_Coil.get_coil_width()
|
||||||
|
gamma = HH_Coil.get_coil_height()
|
||||||
|
N = HH_Coil.get_N()
|
||||||
|
dist = distance
|
||||||
|
|
||||||
|
L_pair = Self_Inductance_Abbot(alpha, dist + beta, gamma, N) +Self_Inductance_Abbot(alpha, dist - beta, gamma, N) - 2 * Self_Inductance_Abbot(alpha, dist, gamma, N) + 2 * Self_Inductance_Abbot(alpha, beta, gamma, N)
|
||||||
|
R_pair = 2*HH_Coil.get_wire_length() * 0.08708
|
||||||
|
|
||||||
print("Pair in series:")
|
print("Pair in series:")
|
||||||
print(f"wire length = {2*HH_Coil.get_wire_length()} m")
|
print(f"wire length = {2*HH_Coil.get_wire_length()} m")
|
||||||
print(f"R = {2*HH_Coil.resistance(25)} Ohm")
|
print(f"R = {2*HH_Coil.resistance(25)} Ohm")
|
||||||
print(f"L = {2*HH_Coil.induct_perry()*1e3} mH")
|
print(f"L = {L_pair*1e3} mH")
|
||||||
print(f"tau = {HH_Coil.tau() *1e3} ms")
|
print(f"tau = {L_pair/R_pair*1e3} ms")
|
||||||
|
|
||||||
print(f"\nat {I} A:")
|
print(f"\nat {I} A:")
|
||||||
print(f"V = {2*HH_Coil.resistance(25)*I} V")
|
print(f"V = {R_pair*I} V")
|
||||||
print(f"P = {2*HH_Coil.resistance(25)*I**2} W")
|
print(f"P = {R_pair*I**2} W")
|
||||||
|
|
||||||
#### calculate field properties ####
|
#### calculate field properties ####
|
||||||
|
|
||||||
@ -138,32 +152,45 @@ def rectangular_HH(HH, a, b, distance, corner_radius, layers, windings,
|
|||||||
|
|
||||||
wire_length = N*(2*a - 4*corner_radius + 2*b - 4*corner_radius + 2*np.pi*corner_radius)
|
wire_length = N*(2*a - 4*corner_radius + 2*b - 4*corner_radius + 2*np.pi*corner_radius)
|
||||||
print(f"wire length = {wire_length} m")
|
print(f"wire length = {wire_length} m")
|
||||||
R = HH_Coil.resistivity_copper(25) * wire_length / HH_Coil.get_wire_area()
|
|
||||||
print(f"R = {R} Ohm")
|
|
||||||
|
|
||||||
#use abbotts formula to get upper bound on inductivity
|
|
||||||
L = 1e-5*max(a,b)**2 * N**2 /(3*max(a,b) +
|
|
||||||
9*HH_Coil.get_coil_height() +
|
|
||||||
10*HH_Coil.get_coil_width())
|
|
||||||
print(f"L = {L*1e3} mH")
|
|
||||||
|
|
||||||
tau = L/R
|
|
||||||
print(f"tau = {tau *1e3} ms")
|
|
||||||
|
|
||||||
HH_Coil.plot_raster()
|
HH_Coil.plot_raster()
|
||||||
|
|
||||||
|
|
||||||
|
#### total inductance from Lenny's code ####
|
||||||
|
#convert to centimeters
|
||||||
|
a *= 100
|
||||||
|
b *= 100
|
||||||
|
distance *= 100
|
||||||
|
p1 = (a + np.sqrt(a ** 2 + distance ** 2)) * np.sqrt(b ** 2 + distance ** 2) / ((a + np.sqrt(a ** 2 + b ** 2 + distance ** 2)) * distance)
|
||||||
|
p2 = (b + np.sqrt(b ** 2 + distance ** 2)) * np.sqrt(a ** 2 + distance ** 2) / ((b + np.sqrt(a ** 2 + b ** 2 + distance ** 2)) * distance)
|
||||||
|
p3 = np.sqrt(a ** 2 + b ** 2 + distance ** 2) - np.sqrt(a ** 2 + distance ** 2) - np.sqrt(b ** 2 + distance ** 2) + distance
|
||||||
|
M = 4 * (a * np.log(p1) + b * np.log(p2)) + 8 * p3
|
||||||
|
M *= N**2 * 1e-9 #Conversion to SI and accounting for N wires
|
||||||
|
|
||||||
|
r = (wire_width/2 + insulation_thickness) * 100
|
||||||
|
diag = np.sqrt(a**2 + b**2)
|
||||||
|
L_self = 4 * ( (a+b) * np.log(2*a*b / r) - a * np.log(a+diag) - b * np.log(b+diag) - 7/4 * (a+b) + 2 * (diag + r) )
|
||||||
|
L_self *= N**2 * 1e-9 #Conversion to SI and accounting for N wires
|
||||||
|
|
||||||
|
L_pair = 2 * (L_self+M)
|
||||||
|
|
||||||
|
R_pair = 2*wire_length * 0.08708
|
||||||
|
|
||||||
print("Pair in series:")
|
print("Pair in series:")
|
||||||
print(f"wire length = {2*wire_length} m")
|
print(f"wire length = {2*wire_length} m")
|
||||||
print(f"R = {2*R} Ohm")
|
print(f"R = {R_pair} Ohm")
|
||||||
print(f"L = {2*L*1e3} mH")
|
print(f"L = {L_pair*1e3} mH")
|
||||||
print(f"tau = {tau *1e3} ms")
|
print(f"tau = {L_pair/R_pair *1e3} ms")
|
||||||
|
|
||||||
print(f"\nat {I} A:")
|
print(f"\nat {I} A:")
|
||||||
print(f"V = {2*R*I} V")
|
print(f"V = {R_pair*I} V")
|
||||||
print(f"P = {2*R*I**2} W")
|
print(f"P = {R_pair*I**2} W")
|
||||||
|
|
||||||
#### calculate field properties ####
|
#### calculate field properties ####
|
||||||
|
#convert back to meters
|
||||||
|
a /= 100
|
||||||
|
b /= 100
|
||||||
|
distance /= 100
|
||||||
|
|
||||||
#define coils
|
#define coils
|
||||||
winding_offsets = HH_Coil.full_raster(raster_value=1)[:,0]
|
winding_offsets = HH_Coil.full_raster(raster_value=1)[:,0]
|
||||||
|
Loading…
Reference in New Issue
Block a user