summaryrefslogtreecommitdiff
path: root/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter4_2.ipynb
blob: 0443e12732a33ce28fc6e137e8b1de56f4e4124a (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
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
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
{
 "metadata": {
  "name": "",
  "signature": "sha256:6ffebed5f6e8af47972c68c02b5c0d08a0cfa4d26af637f556f6c79bce1dec26"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter4:MAGNETIC PROPERTIES OF MATERIALS"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Eg1:pg-153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "phi_B=2.4e-5  #magnetic flux in weber\n",
      "A=0.2         #cross-sectional area in cm**2\n",
      "H=1600        #magnetising field in A/m\n",
      "mu_o=4*round(math.pi,2)*1e-7 #absolute permeability of air in N/A**2\n",
      "B=phi_B/(A*1e-4)\n",
      "mu=B/H\n",
      "Xm=mu/mu_o-1\n",
      "print\"Magnetic permeability of iron bar is \",\"{:.1e}\".format(mu),\"N/A**2\"\n",
      "print\"Magnetic susceptibility of iron bar is \",round(Xm,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetic permeability of iron bar is  7.5e-04 N/A**2\n",
        "Magnetic susceptibility of iron bar is  596.13\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Eg2:pg-154"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "Xm=948e-11      #magnetic susceptibility of a medium\n",
      "pi=1            #let\n",
      "mu_o=4*pi*1e-7  #absolute permeability of air in H/m\n",
      "mu_r=1+Xm\n",
      "mu=int(mu_r)*mu_o\n",
      "print\"Relative Permeability is =\",mu_r,\"=\",int(mu_r),\"or >\",int(mu_r)\n",
      "print\" Relative permeability is slightly greater than one.\"\n",
      "print\"Permeability is = %s*pi H/m\"%mu #answer in book is 4*(pi)*1e-7 H/m"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Relative Permeability is = 1.00000000948 = 1 or > 1\n",
        " Relative permeability is slightly greater than one.\n",
        "Permeability is = 4e-07*pi H/m\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Eg3:pg-154"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "mu_r=1200 #relative permeability of iron rod\n",
      "n=5       #number of turns per cm\n",
      "i=0.5     #current in ampere\n",
      "V=1e-3    #volume of iron rod in m**3\n",
      "I=(mu_r-1)*(n*1e2)*i\n",
      "M=I*V\n",
      "print\"Magnetic moment is \",\"{:.0e}\".format(M),\"Am**2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetic moment is  3e+02 Am**2\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Eg4:pg-155"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "mu_r=100  #relative permeability of iron rod\n",
      "n=300     #number of turns per meter\n",
      "i=0.5     #current in ampere\n",
      "D=10      #diameter of iron rod in mm\n",
      "r=D/2     #radius of iron rod in mm\n",
      "l=2       #length of iron rod in meter\n",
      "I=(mu_r-1)*n*i\n",
      "V=round(math.pi,2)*(r*1e-3)**2*l\n",
      "M=I*V\n",
      "print\"Magnetic moment is \",round(M,3),\"Am**2\"\n",
      "#answer in book is wrong as the value of l is taken wrong in calcultion.          "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetic moment is  2.331 Am**2\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Eg5:pg-163"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "n=1e29        #number of atoms per unit volume in atoms/m**3\n",
      "Pm=1.8e-23    #magnetic moment of one atom in A-m**2\n",
      "K=1.38e-23    #Boltzmann's constant in J/K\n",
      "T=300         #temperature in Kelvin\n",
      "mu_o=4*round(math.pi,2)*10**-7 #absolute permeability of air in N/A**2\n",
      "B=0.1         #magnetic flux density in weber/m**2\n",
      "A=1           #cross-section area in cm**2\n",
      "l=10          #length of iron bar in cm\n",
      "Xm=mu_o*n*Pm**2/(3*K*T) #magnetic susceptibility of iron bar\n",
      "P_m=Pm**2*B/(3*K*T)     #mean dipole moment of an iron atom in A-m**2\n",
      "V=(A*1e-4)*(l*1e-2)     #volume of iron bar in m**3\n",
      "n_o_a=V*n               \n",
      "dm=n_o_a*P_m            #dipole moment of the iron bar \n",
      "I=Pm*n                  \n",
      "m=I*V\n",
      "print\"Magnetic Susceptibility is \",\"{:.3e}\".format(Xm)\n",
      "print\"Dipole moment is \",\"{:.3e}\".format(dm),\"Am**2\"\n",
      "print\"Magnetisation is \",\"{:.1e}\".format(I),\"A/m\"\n",
      "print\"Magnetic moment is \",int(m),\"Am**2\"#this answer is wrong in book"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetic Susceptibility is  3.277e-03\n",
        "Dipole moment is  2.609e-03 Am**2\n",
        "Magnetisation is  1.8e+06 A/m\n",
        "Magnetic moment is  18 Am**2\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Eg6:pg-169"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "H=5e3  #Coercivity of bar magnet in ampere/m \n",
      "l=10   #length of solenoid in cm\n",
      "n=50   #number of turns in solenoid\n",
      "i=H*(l*1e-2)/n\n",
      "print\"Current is \",int(i),\"amp\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Current is  10 amp\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Eg8:pg-170"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "a=250    #area of B-H loop in J/m**3\n",
      "f=50     #frequency of a.c. in Hz\n",
      "m=9.0    #mass of iron core in Kg\n",
      "p=7500   #density of iron in Kg/m**3\n",
      "V=m/p\n",
      "n=50*60*60\n",
      "E=n*V*a\n",
      "print\"Hysteresis loss of energy E per hour is \",\"{:.1e}\".format(E),\"J\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Hysteresis loss of energy E per hour is  5.4e+04 J\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Eg10:pg-170"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "A=0.785e-4   #cross-sectional area of rowland ring in m**2\n",
      "Ri=5.0       #inner radius in cm\n",
      "Ro=6.0       #outer radius in cm\n",
      "N=400        #number of turns of wire\n",
      "Bo=2e-4      #magnetic flux density in weber/m**2\n",
      "mu_o=4*math.pi*10**-7 #absolute permeability of air in N/A**2\n",
      "Ns=50        #number of turns in secondary coil\n",
      "R=8.0        #resistance in ohm\n",
      "B1=800*Bo    #magnetic flux density in weber/m**2\n",
      "l=2*math.pi*(Ri+Ro)*1e-2/2\n",
      "i=Bo*l/(mu_o*N)\n",
      "q=Ns*B1*A/R\n",
      "print\"Required Current is \",i,\"amp\"\n",
      "print\"Charge passed is \",q,\"coulomb\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Required Current is  0.1375 amp\n",
        "Charge passed is  7.85e-05 coulomb\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Eg11:pg-171"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "mu_r=400 #relative permeability of iron ring\n",
      "r=0.1    #mean radius of iron ring in meter\n",
      "A=5e-4   #cross-sectional area of iron ring in m**2\n",
      "n=1000   #number of turns of wire\n",
      "i=4      #current in ampere\n",
      "mu_o=4*math.pi*10**-7  #absolute permeability of air in N/A**2\n",
      "B=mu_o*mu_r*n*i/(2*math.pi*r)\n",
      "phi=B*A \n",
      "print\"Flux in the ring is \",\"{:.2e}\".format(phi),\"weber\"\n",
      "n_o=500  #number of turns in secondary coil per meter\n",
      "R=10     #resistance in ohm\n",
      "q=2*n_o*A*B/R\n",
      "print\"Electricity discharged through the secondary coil is \",q,\"coulomb\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Flux in the ring is  1.60e-03 weber\n",
        "Electricity discharged through the secondary coil is  0.16 coulomb\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Eg12:pg-171"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "m=12    #weight of the iron core in Kg\n",
      "p=7.5   #density of iron core in gm/cc\n",
      "f=50    #frequency in cycles/sec\n",
      "a=3000  #area of hysteresis loop in ergs/cm**3 (unit is misprinted in question in book)\n",
      "V=(m*1e3)/p\n",
      "n=f*60*60\n",
      "E=n*V*a\n",
      "print\"Hourly loss of energy is \",E,\"erg\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Hourly loss of energy is  8.64e+11 erg\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Eg13:pg-172"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "a=0.5   #area of B-H loop in cm**2\n",
      "H=1e3   #value of 1 cm on X-axis in A/m\n",
      "B=1     #value of 1 cm on Y-axis in Tesla\n",
      "V=1e-3  #volume of specimen in m**3\n",
      "n=50    #frequency of a.c. in Hz\n",
      "area=a*H*B #area of B-H loop in J/m**3 (this is misprinted in solution in book)\n",
      "p=n*V*area\n",
      "print\"Hysteresis power loss is \",int(p),\"Watt\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Hysteresis power loss is  25 Watt\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}