summaryrefslogtreecommitdiff
path: root/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_1.ipynb
blob: 1bf810615bd996e4830772ad91b7fd84637fafbe (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 10:Optical Properties of Materials"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 10.1,Page No:10.25"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Wavelength of the photon = 6211 Å\n",
      " The colour of the photon is red\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "E2     = 5.56*10**-19;          # Higher Energy level in J\n",
    "E1     = 2.36*10**-19;          # Lower Energy level in J\n",
    "h      = 6.626*10**-34;         # plancks constant in J.s\n",
    "c      = 3*10**8;               # velocity of light in m\n",
    "\n",
    "# Calculations\n",
    "dE    = E2 - E1;              # Energy difference in J\n",
    "lamda = (h*c)/float(dE);             # wavelength in m\n",
    " \n",
    "\n",
    "# Result\n",
    "\n",
    "print'Wavelength of the photon = %d'%(lamda*10**10),'Å';\n",
    "print' The colour of the photon is red';"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 10.2,Page No:10.25"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Maximum Wavelength for which diamond is opaque is Imax = 2219  Å\n",
      "\n",
      " Note: Imax is wrongly printed as 220 Å in textbook\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "# Variable declaration\n",
    "h   = 6.63*10**-34;         # plancks constant in J.s\n",
    "c   = 3*10**8;              # velocity of light in m\n",
    "E   = 5.6;                  # bandgap in eV\n",
    "e   = 1.6*10**-19;           # charge of electron coulombs\n",
    "\n",
    "# Calculations\n",
    "lamda    = (h*c)/float(E*e)         # wavelength in m\n",
    "\n",
    "#output\n",
    "print'Maximum Wavelength for which diamond is opaque is Imax = %d '%(lamda*10**10),'Å';\n",
    "print'\\n Note: Imax is wrongly printed as 220 Å in textbook';\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 10.3,Page No:10.26"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Energy of radiation = 2.0719 eV\n",
      "Rate of energy gap varies with addition of GaP is 0.00830 eV/mol %\n",
      "mol percent to be added to get an energy gap of 2.0719 eV is 78.54 mol %\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "h     = 6.63*10**-34;            # plancks constant\n",
    "c     = 3*10**8;                 # velocity of light\n",
    "lamda = 0.6*10**-6;             # wavelength in m\n",
    "e     = 1.6*10**-19;              # charge of electron\n",
    "EGap  = 2.25;                    # energy in eV\n",
    "EGas  = 1.42;                    # energy in eV\n",
    "\n",
    "#Calculations\n",
    "E        = (h*c)/float(lamda*e);            # Energy in eV\n",
    "p_change = (EGap - EGas)/float(100);        #rate of energy gap\n",
    "x        = (E-EGas)/float(p_change);        #mol % of GaP to be added to get an energy gap of E\n",
    "\n",
    "# Result\n",
    "print'Energy of radiation = %3.4f'%E,'eV';\n",
    "print'Rate of energy gap varies with addition of GaP is %3.5f'%p_change,'eV/mol %';\n",
    "print'mol percent to be added to get an energy gap of %3.4f'%E,'eV','is %3.2f'%x,'mol %';\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 10.4,Page No:10.26"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Energy of the metastable state E3 = 2.2e-19 J\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "h     = 6.63*10**-34;          #plancks constant in J.s\n",
    "c     = 3*10**8;               # velocity of light in m\n",
    "lamda = 1.1*10**-6;             # wavelength in m\n",
    "e     = 1.6*10**-19;           # charge of electron in coulombs\n",
    "E2    = 0.4*10**-19;           # energy level in joules\n",
    "\n",
    "\n",
    "#Calculations\n",
    "E3  = E2 + ((h*c)/float(lamda));          #energy in J\n",
    "\n",
    "#Result\n",
    "print'Energy of the metastable state E3 = %3.1e'%E3,'J';"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 10.5,Page No:10.26"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Number of Optical modes =  15\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "c   = 3*10**8;               # velocity of light in m\n",
    "L   = 1.5;                   #length in m\n",
    "n   = 1.0204;               # refractive index \n",
    "BW  = 1.5*10**9;             # Bandwidth in Hz\n",
    "\n",
    "# Calculations\n",
    "dV  = c/float(2*L*n);             #frequency in Hz\n",
    "N   = BW/float(dV);               # Number of optical nodes\n",
    "\n",
    "# Result\n",
    "print'Number of Optical modes = % d'%N;"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 10.6,Page No:10.31"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Numerical aperture = 0.248\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "n1  = 1.55;         # refractive index of core\n",
    "n2  = 1.53;         # refractive index of cladding\n",
    "\n",
    "\n",
    "# Calculations\n",
    "NA  = math.sqrt(n1**2 - n2**2);\n",
    "\n",
    "\n",
    "#Result\n",
    "print'Numerical aperture = %3.3f'%NA;"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 10.7,Page No:10.31"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "For angles above 48.75° ,there will be total internal reflection in water\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "n1      = 1.33;         #refractive index of water\n",
    "n2      = 1;            # refractive index of air\n",
    "\n",
    "# Calculations\n",
    "theta_c = math.asin((n2/n1))\n",
    "theta_c_deg = theta_c*(180/float(math.pi));        # radian to degree conversion\n",
    "\n",
    "# Result\n",
    "print'For angles above %3.2f° ,there will be total internal reflection in water'%theta_c_deg ;\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}