summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_PV_Naik/Chapter8.ipynb
blob: b3ec194e7fcc79785b7734ed3610912e0ff7c484 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:a95b407b682939fdad30498a4e63981a88538f3262f7c6d2067bc16aa9ba5b35"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "8: Magnetic materials and Spectroscopy"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.1, Page number 153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "mew=0.9*10**-23;             #magnetic dipole moment(J/T)\n",
      "B=0.72;                     #magnetic field applied(T)\n",
      "k=1.38*10**-23;             #boltzmann constant\n",
      "\n",
      "#Calculation                        \n",
      "T=(2*mew*B)/(3*k);          #temperature(K)\n",
      "\n",
      "#Result\n",
      "print \"The temperature is\",round(T,2),\"K\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The temperature is 0.31 K\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.2, Page number 153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "#(C=mew0*M*T)/B.\n",
      "#Therefore M=(C*B)/(mew0*T)\n",
      "C=2*10**-3;            #C is curies constant(K)\n",
      "B=0.4;                #applied magnetic field(T)\n",
      "mew0=4*math.pi*10**-7;\n",
      "T=300;                #temperature(K)\n",
      "\n",
      "#Calculation                        \n",
      "M=(C*B)/(mew0*T);     #magnetisation(A/m)\n",
      "\n",
      "#Result\n",
      "print \"magnetisation is\",round(M,2),\"A/m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "magnetisation is 2.12 A/m\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.3, Page number 153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "e=1.6*10**-19;\n",
      "B=0.35;                  #magnetic field(T)\n",
      "lamda=500*10**-9;       #wavelength(m)\n",
      "m=9.1*10**-31;\n",
      "c=3*10**8;         #speed of light \n",
      "\n",
      "#Calculation                        \n",
      "deltalambda=(e*B*(lamda)**2)/(4*(math.pi)*m*c*10**-9);      #Zeeman shift in wave length(nm)\n",
      "\n",
      "#Result\n",
      "print \"Zeeman shift in wave length is\",round(deltalambda,5),\"nm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Zeeman shift in wave length is 0.00408 nm\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.4, Page number 154"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "#T=(C*B)/(mew0*B)\n",
      "C=2.1*10**-3;           #C is curie's constant(K)\n",
      "B=0.38;                #magnetic field(T)\n",
      "mew0=4*math.pi*10**-7;   #molecular magnetic moment\n",
      "M=2.15;               #magnetisation(A/m)\n",
      "\n",
      "#Calculation                        \n",
      "T=(C*B)/(mew0*M);     #temperature(K)\n",
      "\n",
      "#Result\n",
      "print \"Temperature is\",round(T,1),\"K\"\n",
      "print \"answer in the book varies due to rounding off errors\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Temperature is 295.4 K\n",
        "answer in the book varies due to rounding off errors\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.5, Page number 154"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "#(M1*T1)=(M2*T2).Therefore M2=(M1*T1)/T2\n",
      "M1=2;                 #Initial magnetisation(A/m)\n",
      "T1=305;               #Initial temperature(K)\n",
      "T2=321;\t\t      #final temperature(K)\t\n",
      "\n",
      "#Calculation                        \n",
      "M2=(M1*T1)/T2;        #magnetisation at 321K(A/m)\n",
      "\n",
      "#Result\n",
      "print \"Magnetisation at 321 K is\",round(M2,1),\"A/m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetisation at 321 K is 1.9 A/m\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.6, Page number 154"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "mew0=4*math.pi*10**-7;        #molecular magnetic moment\n",
      "M=4;                          #magnetisation(A/m)\n",
      "T=310;                        #temperature(K)\n",
      "C=1.9*10**-3;                 #Curie's constant(K)\n",
      "\n",
      "#Calculation                        \n",
      "B=(mew0*M*T)/C;              #magnetic field(T)\n",
      "\n",
      "#Result\n",
      "print \"Magnetic field is\",round(B,2),\"T\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetic field is 0.82 T\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.7, Page number 154"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "#e/m is gyromagnetic ratio.\n",
      "deltalambda=0.01*10**-9;                         #Zeeman shift(m)\n",
      "c=3*10**8;                                       #speed of light in  vacuum(m/s)\n",
      "lamda=600*10**-9;                              #wavelength(m)\n",
      "e=1.6*10**-19;\n",
      "m=9.1*10**-31;\n",
      "\n",
      "#Calculation                        \n",
      "B=(deltalambda*4*math.pi*m*c)/(e*(lamda)**2);    #uniform magnetic field(T)\n",
      "\n",
      "#Result\n",
      "print \"Magnetic field is\",round(B,4),\"T\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetic field is 0.5956 T\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.8, Page number 154"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "deltalambda=0.01*10**-9;                           #Zeeman shift(m)\n",
      "c=3*10**8;                                      #speed of light in vacuum(m/s)\n",
      "B=0.78;                                          #magnetic field(T)\n",
      "lamda=550*10**-9;                              #wavelength(m)\n",
      "\n",
      "#Calculation    \n",
      "Y=(deltalambda*4*math.pi*3*10**8)/(B*(lamda)**2);    #e/m ratio(C/kg)\n",
      "\n",
      "#Result\n",
      "print \"e/m ratio is\",round(Y/10**11,1),\"*10**11 C/kg\"\n",
      "print \"answer in the book varies due to rounding off errors\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "e/m ratio is 1.6 *10**11 C/kg\n",
        "answer in the book varies due to rounding off errors\n"
       ]
      }
     ],
     "prompt_number": 21
    }
   ],
   "metadata": {}
  }
 ]
}