summaryrefslogtreecommitdiff
path: root/Applied_Physics_by_P_K_Palanisamy/Chapter7_1.ipynb
blob: e3eb080fb317a6902e8e0978e0655030a87bb8f0 (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
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
{
 "metadata": {
  "name": "",
  "signature": "sha256:1ba9d8e44f464fdd4be85263413cd33050741f89efba47984e88555948ca8361"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "7: Magnetic Properties"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.1, Page number 7.3"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "M = 1.4      #field(T)\n",
      "H = 6.5*10**-4      #magnetic field(T)\n",
      "\n",
      "#Calculation\n",
      "chi = M/H      #susceptibility\n",
      "mew_r = 1+chi       #relative permeability\n",
      "\n",
      "#Result\n",
      "print \"relative permeability of iron is\",round(mew_r)\n",
      "print \"answer given in the book is wrong\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "relative permeability of iron is 2155.0\n",
        "answer given in the book is wrong\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.2, Page number 7.3"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "M = 3300     #magnetisation(amp/m)\n",
      "H = 220      #field strength(amp/m)\n",
      "\n",
      "#Calculation\n",
      "mew_r = (M/H)+1      #relative permeability\n",
      "\n",
      "#Result\n",
      "print \"relative permeability of material is\",mew_r"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "relative permeability of material is 16.0\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.3, Page number 7.4"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "H = 10**6      #magnetic field intensity(amp/m)\n",
      "chi = 1.5*10**-3     #susceptibility\n",
      "\n",
      "#Calculation\n",
      "mew0 = 4*math.pi*10**-7\n",
      "M = chi*H      #magnetisation(A/m)\n",
      "B = mew0*(M+H)      #flux density(T)\n",
      "M = M*10**-3\n",
      "B = math.ceil(B*10**3)/10**3   #rounding off to 3 decimals\n",
      "\n",
      "#Result\n",
      "print \"magnetisation of material is\",M,\"*10**3 A/m\"\n",
      "print \"flux density is\",B,\"T\"\n",
      "print \"answer for flux density B given in the book is wrong\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "magnetisation of material is 1.5 *10**3 A/m\n",
        "flux density is 1.259 T\n",
        "answer for flux density B given in the book is wrong\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.4, Page number 7.5"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "H = 10**4      #magnetic field intensity(amp/m)\n",
      "chi = 3.7*10**-3     #susceptibility\n",
      "\n",
      "#Calculation\n",
      "mew0 = 4*math.pi*10**-7\n",
      "M = chi*H      #magnetisation(A/m)\n",
      "B = mew0*(M+H)      #flux density(Wb/m**2)\n",
      "B = math.ceil(B*10**5)/10**5   #rounding off to 5 decimals\n",
      "\n",
      "#Result\n",
      "print \"magnetisation of material is\",M,\"A/m\"\n",
      "print \"flux density is\",B,\"Wb/m**2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "magnetisation of material is 37.0 A/m\n",
        "flux density is 0.01262 Wb/m**2\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.5, Page number 7.14"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "I = 500     #current(mA)\n",
      "d = 10     #diameter(cm)\n",
      "\n",
      "#Calculation\n",
      "I = I*10**-3     #current(A)\n",
      "r = d/2    #radius(cm)\n",
      "r = r*10**-2    #radius(m)\n",
      "A = 2*math.pi*r**2   #area(m**2)\n",
      "mew_m = I*A     #magnetic moment(Am**2)\n",
      "mew_m = mew_m*10**3\n",
      "mew_m = math.ceil(mew_m*10**3)/10**3   #rounding off to 3 decimals\n",
      "\n",
      "#Result\n",
      "print \"magnetic moment associated with the loop is\",mew_m,\"*10**-3 Am**2\"\n",
      "print \"answer given in the book is wrong in the 3rd decimal\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "magnetic moment associated with the loop is 7.854 *10**-3 Am**2\n",
        "answer given in the book is wrong in the 3rd decimal\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.6, Page number 7.19"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "r = 5.29*10**-11    #radius of orbit(m)\n",
      "B = 2     #field applied(T)\n",
      "e = 1.602*10**-19     #charge of electron(coulomb)\n",
      "m = 9.108*10**-31    #mass of electron(kg)\n",
      "\n",
      "#Calculation\n",
      "mew_ind = e**2*r**2*B/(4*m)      #change in magnetic moment(Am^2)\n",
      "\n",
      "#Result\n",
      "print \"change in magnetic moment is\",round(mew_ind/1e-29,3),\"*10^-29 Am**2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "change in magnetic moment is 3.943 *10^-29 Am**2\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.7, Page number 7.22"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "chi_1 = 2.8*10**-4     #susceptibility\n",
      "T1 = 350      #temperature(K)\n",
      "T2 = 300      #temperature(K)\n",
      "\n",
      "#Calculation\n",
      "#chi = C/T where C is curie constant\n",
      "chi_2 = chi_1*T1/T2     #susceptibility at 300 K\n",
      "chi_2 = chi_2*10**4\n",
      "chi_2 = math.ceil(chi_2*10**3)/10**3   #rounding off to 3 decimals\n",
      "\n",
      "#Result\n",
      "print \"susceptibility at 300 K is\",chi_2,\"*10**-4\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "susceptibility at 300 K is 3.267 *10**-4\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.8, Page number 7.28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "d = 8906     #density(kg/m**3)\n",
      "n = 6.025*10**26     #avagadro number\n",
      "AW = 58.7     #atomic weight\n",
      "Bs = 0.65     #magnetic induction(Wb/m**2)\n",
      "mewB = 9.27*10**-24 \n",
      "\n",
      "#Calculation\n",
      "N = d*n/AW     #number of atoms(per m**3)\n",
      "mew0 = 4*math.pi*10**-7\n",
      "mew_m = Bs/(N*mew0)      #magnetic moment(Am**2)\n",
      "mew_m = mew_m/mewB       #magnetic moment(mewB)\n",
      "mew_m = math.ceil(mew_m*10**3)/10**3   #rounding off to 3 decimals\n",
      "\n",
      "#Result\n",
      "print \"the magnetic moment of Ni is\",mew_m,\"mewB\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the magnetic moment of Ni is 0.611 mewB\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.9, Page number 7.29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "H = 2     #magnetic field(Wb/m**2)\n",
      "mew = 9.4*10**-24\n",
      "k = 1.38*10**-23\n",
      "\n",
      "#Calculation\n",
      "#np = C*n0*math.exp(mew*H/(k*T))\n",
      "#na = C*n0*math.exp(-mew*H/(k*T))\n",
      "#np/na = exp(mew*H/(k*T))/exp(-mew*H/(k*T)) = exp(2*mew*H/(k*T))\n",
      "#given np/na = 2. therefore exp(2*mew*H/(k*T)) = 2\n",
      "T = 2*mew*H/(k*math.log(2))    #temperature(K)\n",
      "T = math.ceil(T*10**2)/10**2   #rounding off to 2 decimals\n",
      "\n",
      "#Result\n",
      "print \"temperature is\",T,\"K\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "temperature is 3.94 K\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.10, Page number 7.30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "AW = 157.26      #atomic weight\n",
      "d = 7.8*10**3     #density(kg/m**3)\n",
      "A = 6.025*10**26     #avagadro number\n",
      "mew0 = 4*math.pi*10**-7\n",
      "N = d*A/AW      #number of atoms 1 kg contains\n",
      "g = N/10**3      #number of atoms 1 g contains\n",
      "mew_B = 7.1      #bohr magneton\n",
      "mew_m = 9.27*10**-24\n",
      "mew_mg = g*mew_B*mew_m     #magnetic moment per gram(Am**2)\n",
      "mew_mg = math.ceil(mew_mg*10**3)/10**3   #rounding off to 3 decimals\n",
      "print \"magnetic moment per gram is\",mew_mg,\"Am**2\"\n",
      "Bs = N*mew0*mew_m      #saturation magnetisation(Wb/m**2)\n",
      "Bs = math.ceil(Bs*10**4)/10**4   #rounding off to 4 decimals\n",
      "print \"saturation magnetisation is\",Bs,\"Wb/m**2\"\n",
      "print \"answers given in the book are wrong\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "magnetic moment per gram is 1966.852 Am**2\n",
        "saturation magnetisation is 0.3482 Wb/m**2\n",
        "answers given in the book are wrong\n"
       ]
      }
     ],
     "prompt_number": 16
    }
   ],
   "metadata": {}
  }
 ]
}