summaryrefslogtreecommitdiff
path: root/Engineering_Physics_Malik/Chapter_4.ipynb
blob: 981a3d821789bcf03633ea47378d3077a25ba5b8 (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 4: Lasers and Holography"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.1, Page 4.23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import exp\n",
      "\n",
      "# Given \n",
      "l = 5.5e-7 # wavelength of light in meter\n",
      "c = 3e+8 # speed of light in m/sec\n",
      "h = 6.63e-34 # Planck constant in j/sec\n",
      "e = 1.6e-19 # charge on electron in coulomb \n",
      "k = 8.62e-5 # Boltzmann constant in eV/K\n",
      "T = 300 # temperature in kelvin\n",
      "\n",
      "#Calculations\n",
      "delta_E = (h * c) / (l * e) # calculation for energy difference \n",
      "r = exp(-delta_E / (k * T)) # calculation for ratio of population of upper level to the lower energy level\n",
      "T_ = (delta_E / (k * 0.693)) # calculation for temperature for the second condition\n",
      "\n",
      "#Result\n",
      "print \"Ratio of population of upper level to the lower energy level = %.1e. \\nTemperature for the second condition = %.f K. \"%(r,T_)\n",
      "#Incorrect answer in the textbook"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ratio of population of upper level to the lower energy level = 1.1e-38. \n",
        "Temperature for the second condition = 37837 K. \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.2, Page 4.24"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi\n",
      "\n",
      "# Given \n",
      "lambda1 = 6.328e-7 # wavelength of light in first case in meter\n",
      "lambda2 =2e-7 # wavelength of light in second case in meter\n",
      "r1 = 2.3e-4 # the radius of internal beam of laser in first case in meter\n",
      "r2 = 2.4e-3 # the radius of internal beam of laser in second case in meter\n",
      "\n",
      "#Calculations\n",
      "theta1 = lambda1 / (pi * r1) # calculation for beam divergence angle in first case\n",
      "theta2 = lambda2 / (pi * r2) # calculation for beam divergence angle in second case\n",
      "\n",
      "#Result\n",
      "print \"Beam divergence angle in first case = %.2e radian. \\nBeam divergence angle in second case = %.2e radian. \"%(theta1,theta2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Beam divergence angle in first case = 8.76e-04 radian. \n",
        "Beam divergence angle in second case = 2.65e-05 radian. \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.3, Page 4.25"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi,ceil\n",
      "\n",
      "# Given \n",
      "l = 6.0*10**-2 # length of laser in meter\n",
      "D = 1.0*10**-2 # diameter of laser in meter\n",
      "L = 6.944e-7 # wavelength of light in meter\n",
      "d = 3700 # density of aluminium oxide in kg/meter cube\n",
      "Na = 6e+23 # Avogadro number\n",
      "M = 0.102 # molar mass of aluminium oxide in kg/meter cube\n",
      "h = 4.1e-15 # Planck constant in eV-sec\n",
      "c = 3e+8 # speed of light in meter/sec\n",
      "\n",
      "#Calculations\n",
      "v = (pi * (D**2) * l) / 4 # calculation for volume \n",
      "N = (2 * Na * d * v) / M # calculation for no. of aluminium ions\n",
      "N_ = N / 3500 # calculation for the no. of chromium ions\n",
      "E = (h * c) / L # calculation for the energy of stimulated emission photon \n",
      "Et = N_ * E * (1.6e-19) # calculation for total energy\n",
      "\n",
      "#Result\n",
      "print \"Total energy = %.f J\"%(ceil(Et))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total energy = 17 J\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.4, Page 4.26"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi\n",
      "\n",
      "# Given \n",
      "p = 4e-3 # energy of laser pulse in meter\n",
      "r = 1.5e-5 # radius of spot in meter\n",
      "t = 1e-9 # pulse length in time in sec\n",
      "\n",
      "#Calculations\n",
      "p_ = p / t# calculation for  power in watt\n",
      "I = p_ / (pi * r**2)# calculation for power per unit area delivered by the laser\n",
      "\n",
      "#Result\n",
      "print \"Power per unit area delivered by the laser = %.1e watt/square meter\"%I"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Power per unit area delivered by the laser = 5.7e+15 watt/square meter\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.5, Page 4.26"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "D = 5e-3 # diameter of laser in meter\n",
      "l = 7.2e-7 # wavelength of light in meter\n",
      "d = 4e8 # distance at moon from earth in meter\n",
      "\n",
      "#Calculations\n",
      "r = (D / 2) # calculation for radius\n",
      "theta = (0.637 * l) / r # calculation for angular spread\n",
      "areal_spread = (d * theta)**2 # calculation for areal spread\n",
      "\n",
      "#Result\n",
      "print \"Angular spread = %.3e radian ,\\nAreal spread = %.2e square meter\"%(theta,areal_spread)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Angular spread = 1.835e-04 radian ,\n",
        "Areal spread = 5.38e+09 square meter\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.6, Page 4.27\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "D = 5.0e-3 # diameter of laser in meter\n",
      "l = 6.943e-7 # wavelength of light in meter\n",
      "f =0.1 # focal length in meter\n",
      "P = 0.1 # power of laser in watt\n",
      "\n",
      "#Calculations\n",
      "r = (D / 2)# calculation for \n",
      "theta = (0.637 * l) / r# calculation for angular spread\n",
      "areal_spread = (f * theta)**2# calculation for areal spread\n",
      "I = P / areal_spread# calculation for intensity\n",
      "\n",
      "#Result\n",
      "print \"Areal spread = %.3e square meter,\\nIntensity = %.3e watt/square meter\"%(areal_spread,I)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Areal spread = 3.130e-10 square meter,\n",
        "Intensity = 3.195e+08 watt/square meter\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.7, Page 4.28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "tou = 1e-10 # coherence time in sec\n",
      "l = 5.4e-7 # wavelength of light in meter\n",
      "\n",
      "#Calculations\n",
      "delta_v = 1 / tou \n",
      "v_ = (3e+8) / l # calculation for frequency\n",
      "d = delta_v / v_ # calculation for degree of non-monochromaticity\n",
      "\n",
      "#Result\n",
      "print \"Degree of non-monochromaticity = %f \"%d"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Degree of non-monochromaticity = 0.000018 \n"
       ]
      }
     ],
     "prompt_number": 9
    }
   ],
   "metadata": {}
  }
 ]
}