blob: da49df13d99fe6069b49813a6db715d45aee8e97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
scale = 30
qel = 1.602*10^(-19) # elementary charge in Coulombs
pi = 4*a(1)
mu0 = 4*pi * 10^(-7)
print "Weekly Practice 11\n"
vz = 4.8*10^7 # m/s
print "nonzero term on the first one\n"
-mu0/(4*pi) * qel*vz*.02/.02^3
print "nonzero term on the third one\n"
mu0/(4*pi) * qel*vz*.02/sqrt(.02^2+.02^2)^3
print "#2\n"
vy = 2*10^7
print mu0/(4*pi) * qel*vy*.02/sqrt(.02^2+.02^2)^3
print "k\n"
print "#3 (T)\n"
#params
i = 4.8 # A
d = 1.9 # cm
d = d/100 # m
r = d/2 # m
loopmag = mu0/(4*pi) * i*(pi*d)/r^2
wiremag = mu0*i/(2*pi*r)
loopmag + wiremag
print "#4 (T, pos = into screen, neg = out of screen)\n"
#params
i = 4 # A
r1 = .9 # cm
r2 = 1.8 # cm
r1 = r1/100 # m
r2 = r2/100 # m
# mu0/4pi Idl/r1^2
(mu0 * i * (pi*r1)/r1^2 - mu0 * i * (pi*r2)/r2^2)/(4*pi)
print "#5\n"
#params
l = 30 # cm
mf = 4.8 # mT
diamg18 = 1.02 # mm
ig18 = 6 # A
diamg26 = .41 # mm
ig26 = 1 # A
# B*diamg18 = mu0*I
print "To reach necessary magnetic field with #26, current is\n"
mf*diamg26/mu0/10^6
print "Therefore, we should use #18 with current (A)\n"
mf*diamg18/mu0/10^6
print "#7\n"
#params
l = 1.3 # m
mf = 1.4 # mT
i = 1.5 # A
# Biot-Savart: mu0/4pi * idl/r^2 = B
# mu0/4pi * i * l / B = r^2
print "Diameter is (m)\n"
sqrt(mu0/(4*pi) * i * l / mf * 1000)*2
|