summaryrefslogtreecommitdiff
path: root/Engineering_Physics_/Chapter7.ipynb
blob: d504316365868ae301f7b328d05df12624e8b762 (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
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
{
 "metadata": {
  "name": "",
  "signature": "sha256:faf80c20562ef1fa5d737b0d74b9cf873ec0d412505987698b0fa170ec356db4"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "7: Thin film interference and diffraction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.1, Page number 158"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "alpha=0.01;    #angle(radian)\n",
      "n=10;        #number of fringe\n",
      "lamda=6000*10**-8;  #wavelength(cm)\n",
      "\n",
      "#Calculation\n",
      "#for dark fringe 2*u*t*cos(alpha)=n*lam\n",
      "#t=xtan(alpha)\n",
      "x=(n*lamda)/(2*alpha);    #distance of 10th fringe from edge of wedge(cm)\n",
      "\n",
      "#Result\n",
      "print \"distance of 10th fringe from edge of wedge is\",x,\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "distance of 10th fringe from edge of wedge is 0.03 cm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.2, Page number 159"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "t=5*10**-5;    #thickness of soap film(cm)\n",
      "u=1.33; \n",
      "\n",
      "#Calculation\n",
      "#for constructive interference of reflected light\n",
      "#2*u*t*cos(r)=(2*n+1)(lam/2), where n=0,1,2,3\n",
      "#for normal incidence r=0, cos(r)=1\n",
      "#for n=0 lamda=lamda1\n",
      "lamda1=4*u*t;    #wavelength for zero order(cm)\n",
      "#for n=1 lamda=lamda2\n",
      "lamda2=4*u*t*(1/3);    #wavelength for first order(cm)\n",
      "#for n=2 lamda=lamda3\n",
      "lamda3=4*u*t*(1/5);    #wavelength for second order(cm)\n",
      "#for n=3 lamda=lamda4\n",
      "lamda4=4*u*t*(1/7);    #wavelength for third order(cm)\n",
      "\n",
      "#Result\n",
      "print \"wavelength that is strongly reflected in visible spectrum is\",lamda3*10**8,\"angstrom\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "wavelength that is strongly reflected in visible spectrum is 5320.0 angstrom\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.3, Page number 159"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n=10;   #10th dark ring\n",
      "D10=0.5;    #diameter of ring(cm)\n",
      "lamda=5000*10**-8;    #wavelength of light(cm)   \n",
      "\n",
      "#Calculation\n",
      "R=(D10**2)/(4*n*lamda);    #radius of curvature of lens(cm)\n",
      "D50=math.sqrt(4*50*R*lamda);   #diameter of 50th dark ring(cm)\n",
      "r50=D50/2;        #radius of 50th dark ring(cm)\n",
      "\n",
      "#Result\n",
      "print \"radius of 50th dark ring is\",round(r50,2),\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "radius of 50th dark ring is 0.56 cm\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.4, Page number 160"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "i=45;     #angle of incidence(degrees)\n",
      "mew=1.33;   #refractive index\n",
      "lamda=5000;    #wavelength(angstrom)\n",
      "\n",
      "#Calculation\n",
      "i=i*(math.pi/180);    #angle of incidence(radian)\n",
      "sin_r=math.sin(i)/mew;    #value of sin(r)\n",
      "r=math.asin(sin_r);    #angle of refraction(radian) \n",
      "r1=r*(180/math.pi);     #angle of refraction(degrees)\n",
      "#for bright fringe 2*u*t*cos(r)=(2*n+1)(lamda/2)\n",
      "#for minimum thickness n=0\n",
      "t=lamda/(4*mew*math.cos(r));    #minimum thickness(angstrom)\n",
      "\n",
      "#Result\n",
      "print \"minimum thickness of film is\",int(t),\"angstrom\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "minimum thickness of film is 1109 angstrom\n"
       ]
      }
     ],
     "prompt_number": 32
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.5, Page number 160"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda=5500*10**-8;     #wavelength(cm)\n",
      "V=0.2;      #volume of oil drop(cc)\n",
      "A=100*100;   #surface area(sq.cm)\n",
      "\n",
      "#Calculation\n",
      "#since both reflections occur at surface of denser medium\n",
      "#condition for brightness for min thickness, n=1\n",
      "#for normal incidence r=0, cos(r)=1\n",
      "t=V/A;    #thickness of film(cm)\n",
      "mew0=lamda/(2*t);   #refractive index of oil\n",
      "\n",
      "#Result\n",
      "print \"refractive index of oil is\",mew0"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "refractive index of oil is 1.375\n"
       ]
      }
     ],
     "prompt_number": 28
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.6, Page number 161"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda=6300;    #wavelength of light(angstrom)\n",
      "mew=1.5;       #refractive index\n",
      "n=10;\n",
      "\n",
      "#Calculation\n",
      "#condition for dark 2*u*t=n*lam\n",
      "#condition for bright 2*u*t=(2*n-1)(lam/2)\n",
      "#when t=0 n=0 order dark band will come and at edge 10th bright band will come \n",
      "t=(((2*n)-1)*(lamda))/(4*mew);   #thickness of air film(angstrom)\n",
      "\n",
      "#Result\n",
      "print \"thickness of air film is\",t,\"angstrom\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "thickness of air film is 19950.0 angstrom\n"
       ]
      }
     ],
     "prompt_number": 29
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.7, Page number 161"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "mewg=1.5;    #refractive index of glass\n",
      "mewo=1.3;    #refractive index of oil\n",
      "lamda1=7000;   #wavelength(angstrom)\n",
      "lamda2=5000;   #wavelength(angstrom)\n",
      "r=0;     #for nth minimum\n",
      "\n",
      "#Calculation\n",
      "#here reflection occurs both time at surface of denser medium\n",
      "#condition for distructive interference in reflected side\n",
      "#2*u*t*cos(r)=(2*n-1)(lam1/2), for nth min.\n",
      "#2*u*t=(2*n+1)(lam1/2), n=0,1,2,3\n",
      "#for (n+1)th min.\n",
      "#2*u*t=(2*(n+1)+1)(lam2/2), n=0,1,2,3\n",
      "t=(2/(4*mewo))*((lamda1*lamda2)/(lamda1-lamda2));      #thickness of layer(angstrom)\n",
      "\n",
      "#Result\n",
      "print \"thickness of layer is\",int(t),\"angstrom\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "thickness of layer is 6730 angstrom\n"
       ]
      }
     ],
     "prompt_number": 31
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.8, Page number 162"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "Dn=1.40;    #diameter of 10th ring(cm)\n",
      "D=1.27;     #changed diameter(cm)\n",
      "\n",
      "#Calculation\n",
      "#when mew=1\n",
      "#(Dn^2)=4*n*lam*R=(1.40^2)\n",
      "#when mew=mew1\n",
      "#(D^2)=(4*n*lam*R)/u1=(1.27^2)\n",
      "mewl=((Dn**2)/(D**2));      #refractive index of liquid \n",
      "\n",
      "#Result\n",
      "print \"refractive index of liquid is\",round(mewl,4)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "refractive index of liquid is 1.2152\n"
       ]
      }
     ],
     "prompt_number": 34
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.9, Page number 162"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "B=0.5;   #fringe width(cm)\n",
      "mew=1.4;    #refractive index\n",
      "\n",
      "#Calculation\n",
      "alpha=((math.pi*10)/(60*60*180));   #converting into radian\n",
      "lamda=2*B*alpha*mew;   #wavelength of light(cm)\n",
      "\n",
      "#Result\n",
      "print \"wavelength of light used is\",int(lamda*10**8),\"angstrom\"\n",
      "print \"answer given in the book varies due to rounding off errors\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "wavelength of light used is 6787 angstrom\n",
        "answer given in the book varies due to rounding off errors\n"
       ]
      }
     ],
     "prompt_number": 40
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.10, Page number 163"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda=6000*10**-8;    #wavelengh of light(cm)\n",
      "mew=1.5;    #refractive index\n",
      "\n",
      "#Calculation\n",
      "#condition for dark fringe is 2*t=n*lam\n",
      "#but B=(lam/(2*alpha*u))\n",
      "#delta_t=alpha*x\n",
      "delta_t=(10*lamda)/(2*mew);     #difference t2-t1(cm)\n",
      "\n",
      "#Result\n",
      "print \"difference t2-t1 is\",delta_t,\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "difference t2-t1 is 0.0002 cm\n"
       ]
      }
     ],
     "prompt_number": 41
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.11, Page number 163"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda=5890;   #wavelength of light(angstrom)\n",
      "mew=1.5;    #refractive index\n",
      "r=60;       #angle of refraction(degrees)\n",
      "\n",
      "#Calculation\n",
      "#condition for dark is 2*mew*t*cos(r)=n*lamda\n",
      "r=60*(math.pi/180);    #angle of refraction(radian)\n",
      "#for n=1\n",
      "t=(lamda)/(2*mew*math.cos(r));    #smallest thickness of glass plate(angstrom)\n",
      "\n",
      "#Result\n",
      "print \"smallest thickness of glass plate is\",int(t),\"angstrom\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "smallest thickness of glass plate is 3926 angstrom\n"
       ]
      }
     ],
     "prompt_number": 43
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.13, Page number 180"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "aplusb=1/1250;    #transmission grating(lines/cm)\n",
      "n=2;     #order of spectral line\n",
      "theta=30;    #deviation angle(degrees)\n",
      "\n",
      "#Calculation\n",
      "theta=theta*(math.pi/180);   #deviation angle(radian)\n",
      "#(a+b)sin(theta)=n*lamda\n",
      "lamda=(aplusb*math.sin(theta))/n;   #wavelength of spectral line(cm)\n",
      "\n",
      "#Result\n",
      "print \"wavelength of spectral line is\",lamda,\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "wavelength of spectral line is 0.0002 cm\n"
       ]
      }
     ],
     "prompt_number": 45
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.14, Page number 180"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda=5893*10**-8;    #wavelength(cm)\n",
      "aplusb=2.54/2540;  #grating(lines/cm)\n",
      "\n",
      "#Calculation\n",
      "#n=nmax, if sin(theta)=1\n",
      "nmax=(aplusb/lamda);      #maximum order\n",
      "\n",
      "#Result\n",
      "print \"maximum order is\",int(nmax)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "maximum order is 16\n"
       ]
      }
     ],
     "prompt_number": 47
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.15, Page number 180"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n=2;   #second order\n",
      "aplusb=1/5000;   #transmission grating(lines/cm)\n",
      "lamda=5893*10**-8;      #wavelength(cm)\n",
      "f=30;    #focal length(cm)\n",
      "\n",
      "#Calculation\n",
      "dtheta=(2.5*3.14)/(180*60);    #change in angular displacement(radian)\n",
      "#dlamda=((a+b)cos(theta)/n)dtheta\n",
      "costheta=math.sqrt(1-(((n*lamda)/aplusb)**2));\n",
      "dlamda=(dtheta*aplusb*costheta)/n;  #difference in wavelength(cm)\n",
      "dl=f*dtheta;   #linear separation(cm)\n",
      "\n",
      "#Result\n",
      "print \"difference in wavelength of two yellow lines\",round(dlamda*10**8),\"angstrom\"\n",
      "print \"linear separation is\",round(dl*10**2,2),\"*10**-2 cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "difference in wavelength of two yellow lines 6.0 angstrom\n",
        "linear separation is 2.18 *10**-2 cm\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 7.16, Page number 181"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "lamda1=5400*10**-8;    #wavelength1(cm)\n",
      "lamda2=4050*10**-8;    #wavelength(cm)\n",
      "theta=30;      #angle of diffraction(degrees)\n",
      "\n",
      "#Calculation\n",
      "#nth order of lamda1 is superimposed on (n+1)th order of lamda2 for theta=30\n",
      "#(a+b)sin(30)=n*5400*10^-8=(n+1)*4050*10^-8\n",
      "n=(lamda2/(lamda1-lamda2));    #nth order\n",
      "theta=30*(math.pi/180);     #angle of diffraction(radian)\n",
      "N=math.sin(theta)/(n*lamda1);      #lines/cm in grating\n",
      "\n",
      "#Result\n",
      "print \"lines/cm in grating is\",int(N),\"lines/cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "lines/cm in grating is 3086 lines/cm\n"
       ]
      }
     ],
     "prompt_number": 51
    }
   ],
   "metadata": {}
  }
 ]
}