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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
|
{
"metadata": {
"name": "",
"signature": "sha256:3a0360df3c22e5e4c6f88ae6f9ab32945c496822bb8898446d53149d9f1116ec"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h1>Chapter 8: Magnetic Forces, Materials and Devices<h1>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 8.1, Page number: 308<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"import scipy\n",
"from numpy import *\n",
"\n",
"#Variable Declaration\n",
"\n",
"m=2 #mass in kg\n",
"q=3 #charge in C\n",
"v=array([4,0,3]) #initial velocity in m/s\n",
"E=array([12,10,0]) #electric field in V/m\n",
"t=1 #time in sec\n",
"\n",
"#Calculations\n",
"\n",
"a=q*E/m #acceleration in m/s^2 after 1 sec\n",
"u=array([18*t+4,15*t,3]) #velocity in m/s after 1 sec\n",
"modofu=scipy.sqrt(dot(u,u))\n",
"KE=0.5*m*(modofu)**2 #kinetic energy in J at t=1 sec\n",
"s=array([9*t**2+4*t+1,7.5*t**2-2,3*t]) #position after 1 sec in m\n",
"\n",
"#Results\n",
"\n",
"print 'At time t=1 sec,'\n",
"print' The acceleration of the particle =',a,'m/s^2'\n",
"print 'Its velocity =',u,'m/s' \n",
"print 'Its kinetic energy =',KE,'J'\n",
"print 'Its position =',s,'m'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"At time t=1 sec,\n",
" The acceleration of the particle = [18 15 0] m/s^2\n",
"Its velocity = [22 15 3] m/s\n",
"Its kinetic energy = 718.0 J\n",
"Its position = [ 14. 5.5 3. ] m\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 8.6, Page number: 322"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"\n",
"import scipy\n",
"\n",
"#Variable Declaration\n",
"\n",
"ar=array([1,0,0]) #Unit vector along radial direction\n",
"ath=array([0,1,0]) #Unit vector along theta direction\n",
"aph=array([0,0,1]) #Unit vector along phi direction \n",
"x=4\n",
"y=-3\n",
"z=10\n",
"muo=4*scipy.pi*10**-7 #permeability of free space\n",
"m1=5 #magnetic moment in A/m^2\n",
"\n",
"#Calculations\n",
"\n",
"r=scipy.sqrt(x**2+y**2+z**2)\n",
"p=scipy.sqrt(x**2+y**2)\n",
"sinphi=y/p\n",
"cosphi=x/p\n",
"sintheta=1/scipy.sqrt(5)\n",
"costheta=2/scipy.sqrt(5)\n",
"B1=muo*m1*(2*costheta*ar+sintheta*ath)/(4*scipy.pi*r**3)\n",
"m2=3*(sintheta*sinphi*ar+costheta*sinphi*ath+cosphi*aph)\n",
"T2=cross(m2,B1)*10**9\n",
"T2x=round(dot(T2,ar),3)\n",
"T2y=round(dot(T2,ath),3)\n",
"T2z=round(dot(T2,aph),3)\n",
"T2r=array([T2x,T2y,T2z]) #torque in nNm\n",
"\n",
"#Result\n",
"\n",
"print 'Torque T2 =',T2r,'nNm'\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Torque T2 = [-0.384 1.536 0.902]\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 8.7, Page number: 330"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"import scipy\n",
"\n",
"#Variable Declaration\n",
"\n",
"muo=4*scipy.pi*10**-7 #permeability of free space\n",
"mur=2 #relative permeability\n",
"ax=array([1,0,0]) #Unit vector along x direction\n",
"ay=array([0,1,0]) #Unit vector along y direction\n",
"az=array([0,0,1]) #Unit vector along z direction\n",
"\n",
"\n",
"#Calculations\n",
"\n",
"J=(-5-10)*10**-6/(4*scipy.pi*10**-7*2.5) #in kA/m^2\n",
"Jb=1.5*J #in kA/m^2\n",
"MbyB=(1.5)*10**4/(4*scipy.pi*2.5) \n",
"Mv=MbyB*10*10**-3*ax+MbyB*5*10**-3*ay\n",
"Kb=cross(az,Mv)\n",
"\n",
"#Results\n",
"\n",
"print 'J =',round(J,3),'kA/m^2'\n",
"print 'Jb =',round(Jb,3),'kA/m^2'\n",
"print 'M =(',round(dot(Mv,ax),3),'y,',round(dot(Mv,ay),3),'x, 0) kA/m'\n",
"print 'Kb =(',round(dot(Kb,ax),3),'x,',round(dot(Kb,ay),3),'y, 0) kA/m' \n",
" \n",
"\n",
" \n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"J = -4.775 kA/m^2\n",
"Jb = -7.162 kA/m^2\n",
"M =( 4.775 y, 2.387 x, 0) kA/m\n",
"Kb =( -2.387 x, 4.775 y, 0) kA/m\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 8.8, Page number: 332<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"import scipy\n",
"from numpy import *\n",
"\n",
"#Variable Declaration\n",
"\n",
"ax=array([1,0,0]) #Unit vector along x direction\n",
"ay=array([0,1,0]) #Unit vector along y direction\n",
"az=array([0,0,1]) #Unit vector along z direction \n",
"H1=array([-2,6,4]) #in A/m\n",
"mu0=4*scipy.pi*10**-7 #permeability of free space\n",
"mur1=5 #relative permeabililty in region 1\n",
"mur2=2 #relative permeabililty in region 2\n",
"an=array([-1,1,0])/scipy.sqrt(2)\n",
"\n",
"#Calculatios\n",
"\n",
"mu1=mu0*mur1\n",
"mu2=mu0*mur2\n",
"M1=(mur1-1)*H1 # magnetisation in region 1 in A/m\n",
"B1=mu1*H1*10**6 # field in micro Wb/m^2\n",
"B1x=round(dot(B1,ax),2) # x component of B1\n",
"B1y=round(dot(B1,ay),1) # y component of B1\n",
"B1z=round(dot(B1,az),2) # z component of B1\n",
"B1r=array([B1x,B1y,B1z]) # B1 rounded to 2 decimal places\n",
"H1n=dot(H1,an)*an \n",
"H1t=H1-H1n\n",
"H2t=H1t # using transverse boundary condition\n",
"H2n=(mu1/mu2)*H1n # using normal boundary condition\n",
"H2=H2t+H2n # in A/m\n",
"B2=mu2*H2*10**6 # field in micro Wb/m^2\n",
"B2x=round(dot(B2,ax),2) # x component of B2\n",
"B2y=round(dot(B2,ay),2) # y component of B2\n",
"B2z=round(dot(B2,az),2) # z component of B2\n",
"B2r=array([B2x,B2y,B2z]) # B2 rounded to 2 decimal places\n",
"\n",
"#Results\n",
"\n",
"print 'M1= ',M1,'A/m'\n",
"print 'B1= ',B1r,'micro Wb/m^2'\n",
"print 'H2= ',H2,'A/m'\n",
"print 'B2= ',B2r,'micro Wb/m^2'\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"M1= [-8 24 16] A/m\n",
"B1= [-12.57 37.7 25.13] micro Wb/m^2\n",
"H2= [ -8. 12. 4.] A/m\n",
"B2= [-20.11 30.16 10.05] micro Wb/m^2\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 8.14, Page number: 350<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"import scipy\n",
"from numpy import *\n",
"\n",
"#Variable declaration\n",
"\n",
"p=10*10**-2 #in m\n",
"a=1*10**-2 #in m\n",
"Ur=1000 #relative permeability\n",
"Uo=4*scipy.pi*10**-7 #permeability of free space\n",
"n=200 #number of turns\n",
"phi=0.5*10**-3 #flux in the core in Wb\n",
"U=Uo*Ur #permeability of steel core\n",
"\n",
"#Calculation\n",
"\n",
"I=phi*2*scipy.pi*p/(U*n*scipy.pi*a*a) #current in A\n",
"\n",
"#Result\n",
"\n",
"print 'The current that will produce a flux of 0.5 mWb =',round(I,3),'A'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The current that will produce a flux of 0.5 mWb = 3.979 A\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 8.15, Page number: 351<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"\n",
"import scipy\n",
"from numpy import *\n",
"\n",
"#Variable Declaration\n",
"\n",
"Uo=4*scipy.pi*10**-7 #permeability of free space\n",
"Ur=50 #relative permeability of coil\n",
"l1=30*10**-2\n",
"s=10*10**-4 \n",
"l3=9*10**-2\n",
"la=1*10**-2 \n",
"B=1.5 #flux density in Wb/m^2\n",
"N=400 #number of turns\n",
"\n",
"#Calculations\n",
"\n",
"R1=l1/(Uo*Ur*s)\n",
"R2=R1\n",
"R3=l3/(Uo*Ur*s)\n",
"Ra=la/(Uo*s)\n",
"R=R1*R2/(R1+R2)\n",
"Req=R3+Ra+R\n",
"I=B*s*Req/N #current in A\n",
"\n",
"#Result\n",
"\n",
"print 'The current required =',round(I,3),'A'\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The current required = 44.165 A\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 8.16, Page number: 353<h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"\n",
"import scipy\n",
"from numpy import *\n",
"\n",
"#Variable Declaration\n",
"\n",
"m=400 #mass in kg\n",
"g=9.8 #acceleration due to gravity in m/s^2\n",
"Ur=3000 #relative permeability of the iron yoke\n",
"Uo=4*scipy.pi*10**-7 #permeability of free space\n",
"S=40*10**-4 #cross sectional area of iron yoke in m^2\n",
"la=1*10**-4 #air gaps in m\n",
"li=50*10**-2 #mean length of yoke in m\n",
"I=1 #excitation current in A \n",
"\n",
"#Calculations\n",
"\n",
"B=scipy.sqrt(m*g*Uo/S) #field in Wb/m^2\n",
"Ra=2*la/(Uo*S) \n",
"Ri=li/(Uo*Ur*S) \n",
"N=(Ra+Ri)/(Ra*Uo)*B*la #number of turns\n",
"\n",
"#Result\n",
"\n",
"print 'The nmber of turns in the coil when the excitation current is 1 A ='\n",
"print round(N,0)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The nmber of turns in the coil when the excitation current is 1 A =\n",
"162.0\n"
]
}
],
"prompt_number": 5
}
],
"metadata": {}
}
]
}
|