summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_Shyam_Singh_and_Rajeev_Singh/Chapter3.ipynb
blob: 171bcb0d76c47ddb92732642bb4e170c93521081 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:56795fefbe7b62ddb8818924d3943a71c60bd075d0e3f1778fec6ffb47c8906e"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "3: Polarization, Laser and Holography"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 3.1, Page number 103"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "x = 5;        #distance of 1st minimum(mm)\n",
      "D = 2;        #distance between lens and screen(m)\n",
      "a = 0.2;      #width of slit(mm)\n",
      "\n",
      "#Calculation\n",
      "x = x*10**-3;        #distance of 1st minimum(m)\n",
      "a = a*10**-3;        #width of slit(m)\n",
      "lamda = a*x/D;         #wavelength of light(m)\n",
      "\n",
      "#Result\n",
      "print \"wavelength of light is\",lamda,\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "wavelength of light is 5e-07 m\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 3.2, Page number 103"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "a = 0.2;       #width of slit(mm)\n",
      "lamda = 5*10**-7;       #wavelength(m)\n",
      "f = 50;        #focal length(cm)\n",
      "\n",
      "#Calculation\n",
      "a = a*10**-3;        #width of slit(m)\n",
      "f = f*10**-2;        #focal length(m)\n",
      "theta_1 = lamda/a;        #angular diffraction correcponding to 1st minima(radian)\n",
      "theta_2 = 2*lamda/a;          #angular diffraction correcponding to 2nd minima(radian)\n",
      "x = f*(theta_2-theta_1);       #separation between 1st and second minima(m)\n",
      "x = x*10**2;\n",
      "\n",
      "#Result\n",
      "print \"distance between first two minima on the screen is\",x,\"*10**-3 m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "distance between first two minima on the screen is 0.125 *10**-3 m\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 3.3, Page number 104"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "a = 0.16;       #1st slit width(mm)\n",
      "b = 0.8;        #2nd slit width(mm)\n",
      "\n",
      "#Calculation\n",
      "nbym = (a+b)/a;       #condition for missing orders\n",
      "\n",
      "#Result\n",
      "print \"n = \",nbym,\"m\"\n",
      "print \"n = \",nbym,\",\",2*nbym,\",\",3*nbym,\"etc for m = 1,2,3...\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "n =  6.0 m\n",
        "n =  6.0 , 12.0 , 18.0 etc for m = 1,2,3...\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 3.4, Page number 104"
     ]
    },
    {
     "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",
      "theta = 30;     #angle of diffraction(degrees)\n",
      "lamda = 5*10**-5;      #wavelength(cm)\n",
      "\n",
      "#Calculation\n",
      "theta = theta*math.pi/180;      #angle of diffraction(radian)\n",
      "aplusb = n*lamda/math.sin(theta);\n",
      "N = 1/aplusb;        #number of lines(per cm)\n",
      "\n",
      "#Result\n",
      "print \"number of lines on the grating surface is\",N,\"per cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "number of lines on the grating surface is 5000.0 per cm\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 3.5, Page number 105"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "aplusb = 1.5*10**-6;       #grating element(m)\n",
      "lamda = 550;         #wavelength(nm)\n",
      "\n",
      "#Calculation\n",
      "lamda = lamda*10**-9;        #wavelength(m)\n",
      "n = aplusb/lamda;         #maximum possible order\n",
      "n = math.ceil(n*10**3)/10**3;   #rounding off to 3 decimals\n",
      "\n",
      "\n",
      "#Result\n",
      "print \"maximum possible order is\",n,\". third and higher orders are not possible\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "maximum possible order is 2.728 . third and higher orders are not possible\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 3.6, Page number 105"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "dlamda = 0.6;      #difference in wavelength(nm)\n",
      "lamda = 589.3;     #wavelength(nm)\n",
      "n = 1;         #first order\n",
      "\n",
      "#Calculation\n",
      "N = lamda/(n*dlamda);         #number of lines on grating\n",
      "\n",
      "#Result\n",
      "print \"number of lines on grating is\",int(N)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "number of lines on grating is 982\n"
       ]
      }
     ],
     "prompt_number": 21
    }
   ],
   "metadata": {}
  }
 ]
}