summaryrefslogtreecommitdiff
path: root/A_Textbook_Of_Engineering_Physics/Chapter24_1.ipynb
blob: 67066c0744d30cbc7d9bbe6458017e9e8beff5fd (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:1cf24b70876a8aeb6aa008651e71d8cde215c5cbb4fe65495bcd461a3cc2b49b"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter24-Fibre Optics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg701"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 24.1\n",
      "##Fiber optics\n",
      "\n",
      "##given values\n",
      "n=1.5;##refractive index\n",
      "x=.0005;##fractional index difference\n",
      "\n",
      "##calculation\n",
      "u=n*(1-x);\n",
      "print'%s %.2f %s'%('cladding index is',u,'');\n",
      "alpha=math.asin(u/n)*180/math.pi;\n",
      "print'%s %.2f %s'%('critical internal reflection angle(in degree) is',alpha,'');\n",
      "theta=math.asin(math.sqrt(n**2-u**2))*180/math.pi;\n",
      "print'%s %.2f %s'%('critical acceptance angle(in degree) is',theta,'');\n",
      "N=n*math.sqrt(2.*x);\n",
      "print'%s %.2f %s'%('numerical aperture is',N,'');"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "cladding index is 1.50 \n",
        "critical internal reflection angle(in degree) is 88.19 \n",
        "critical acceptance angle(in degree) is 2.72 \n",
        "numerical aperture is 0.05 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg701"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 24.2\n",
      "##calculation of acceptance angle\n",
      "\n",
      "##given values\n",
      "n=1.59;##cladding refractive index\n",
      "u=1.33;##refractive index of water\n",
      "N=.20;##numerical aperture offibre\n",
      "##calculation\n",
      "x=math.sqrt(N**2+n**2.);##index of fibre\n",
      "N1=math.sqrt(x**2-n**2.)/u;##numerical aperture when fibre is in water\n",
      "alpha=math.asin(N1)*180./math.pi;\n",
      "print'%s %.2f %s'%('acceptance angle in degree is',alpha,'');"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "acceptance angle in degree is 8.65 \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg705"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 24.3\n",
      "##calculation of normalised frequency\n",
      "\n",
      "##given values\n",
      "n=1.45;##core refractive index\n",
      "d=.6;##core diametre in m\n",
      "N=.16;##numerical aperture of fibre\n",
      "l=.9*10**-6.;##wavelength of light\n",
      "\n",
      "##calculation\n",
      "u=math.sqrt(n**2.+N**2.);##index of glass fibre\n",
      "V=math.pi*d*math.sqrt(u**2.-n**2.)/l;\n",
      "print'%s %.2f %s'%('normalised frequency is',V,'');"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "normalised frequency is 335103.22 \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg705"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 24.4\n",
      "##calculation of normailsed frequency and no of modes\n",
      "\n",
      "##given values\n",
      "n=1.52;##core refractive index\n",
      "d=29*10**-6.;##core diametre in m\n",
      "l=1.3*10**-6.;##wavelength of light\n",
      "x=.0007;##fractional refractive index\n",
      "\n",
      "##calculation\n",
      "u=n*(1.-x);##index of glass fibre\n",
      "V=math.pi*d*math.sqrt(n**2-u**2)/l;\n",
      "print'%s %.2f %s'%('normalised frequency is',V,'');\n",
      "N=V**2./2.;\n",
      "print'%s %.2f %s'%('no of modes is',N,'');"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "normalised frequency is 3.99 \n",
        "no of modes is 7.94 \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg706"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 24.5\n",
      "##calculation of numerical aperture and maximum acceptance angle\n",
      "\n",
      "##given values\n",
      "n=1.480;##core refractive index\n",
      "u=1.47;##index of glass\n",
      "l=850*10**-9.;##wavelength of light\n",
      "V=2.405;##V-number\n",
      "\n",
      "##calculation\n",
      "r=V*l/math.sqrt(n**2-u**2)/math.pi/2;##in m\n",
      "print'%s %.2f %s'%('core radius in micrometre is',r*10**6,'');\n",
      "N=math.sqrt(n**2-u**2);\n",
      "print'%s %.2f %s'%('numerical aperture is',N,'');\n",
      "alpha=math.asin(N)*180/math.pi;\n",
      "print'%s %.2f %s'%('max acceptance angle is',alpha,'');"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "core radius in micrometre is 1.89 \n",
        "numerical aperture is 0.17 \n",
        "max acceptance angle is 9.89 \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg712"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 24.6\n",
      "##calculation of power level\n",
      "\n",
      "##given values\n",
      "a=3.5;##attenuation in dB/km\n",
      "Pi=.5*10**-3.;##initial power level in W\n",
      "l=4.;##length of cable in km\n",
      "\n",
      "##calculation\n",
      "Po=Pi*10**6./(10**(a*l/10.));\n",
      "print'%s %.2f %s'%('power level after km(in microwatt) is',Po,'');\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "power level after km(in microwatt) is 19.91 \n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex7-pg712"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 24.7\n",
      "##calculation of power loss\n",
      "\n",
      "##given values\n",
      "Pi=1*10**-3.;##initial power level in W\n",
      "l=.5;##length of cable in km\n",
      "Po=.85*Pi\n",
      "\n",
      "##calculation\n",
      "a=(10./l)*math.log10(Pi/Po);\n",
      "print'%s %.2f %s'%('loss in dB/km is',a,'');\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "loss in dB/km is 1.41 \n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}