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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter2 - Ray propagation in optical fiber"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2.1 : Page 21"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"part (a)\n",
"numerical aperture is 0.244\n",
"part (b)\n",
"angle αm = 14.13 degree\n",
"angle Om = 9.37 degree\n",
"angle Φc = 80.63 degree\n",
"part (c)\n",
"pulse broadning per unit length = 6.76e-11 sm**-1\n"
]
}
],
"source": [
"from math import degrees, asin, sqrt\n",
"#NA ,angles and pulse broadning\n",
"print \"part (a)\"\n",
"n1=1.5##core refrative index\n",
"n2=1.48##claddin refractive index\n",
"a=100/2##radius in micro meter\n",
"na=1##air refrative index\n",
"NA=sqrt(n1**2-n2**2)##numerical aperture\n",
"print \"numerical aperture is %0.3f\"%NA\n",
"print \"part (b)\"\n",
"am=(asin(NA))##\n",
"tm=asin(NA/n1)##\n",
"tc=asin(n2/n1)##\n",
"print \"angle αm = %0.2f degree\"%degrees(am)\n",
"print \"angle Om = %0.2f degree\"%degrees(tm)\n",
"print \"angle Φc = %0.2f degree\"%degrees(tc)\n",
"print \"part (c)\"\n",
"c=3*10**8##speed of light in m/s\n",
"dtl=((n1/n2)*(n1-n2)/c)##pulse broadning per unit length\n",
"print \"pulse broadning per unit length = %0.2e sm**-1\"%dtl"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2.2 : Page 22"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"all other rays will suffer reflections between these two extremes of : 0 and 1650.0 m**-1\n"
]
}
],
"source": [
"from math import tan\n",
"#minimum and maximum number of reflections\n",
"n1=1.5##core refrative index\n",
"n2=1.48##claddin refractive index\n",
"a=100/2##radius in micro meter\n",
"na=1##air refrative index\n",
"NA=sqrt(n1**2-n2**2)##numerical aperture\n",
"am=(asin(NA))##\n",
"tm=asin(NA/n1)##\n",
"tc=asin(n2/n1)##\n",
"L=((a*10**-6)/(tan(tm)))##length in meter\n",
"x=(1/(2*L))##maximum number of reflections per meter\n",
"print \"all other rays will suffer reflections between these two extremes of :\",(0),\" and \",round(x),\" m**-1\"\n",
"#answer is wrong in the textbook"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2.3 : Page 27"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"pulse broadning = 2.45 ns km**-1\n"
]
}
],
"source": [
"#pulse broadning\n",
"h=0.85##WAVELENGTH IN MICRO METER\n",
"y=0.035##spectral width\n",
"c=0.021##constant\n",
"cl=3##speed of light in m/s\n",
"dtl=(y/cl)*c##\n",
"print \"pulse broadning = %0.2f ns km**-1\"%(dtl*10**4)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2.4 : Page 27"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"part (a)\n",
"material dispersion = 253.20 ns when h=850nm\n",
"part (b)\n",
"material dispersion = 6.72 ns when h=1300nm\n"
]
}
],
"source": [
"#pulse broadning\n",
"print \"part (a)\"\n",
"h=850##WAVELENGTH IN NANO METER\n",
"l=80##fiber length in Km\n",
"dh=30##in Nano Meter\n",
"m1=105.5##material dispersion for h=850nm in ps/nm-Km\n",
"m2=2.8##material dispersion for h=1300nm in ps/nm-Km\n",
"t=m1*l*dh*10**-3##material dispersion in ns when h=850nm\n",
"print \"material dispersion = %0.2f ns when h=850nm\"%t\n",
"print \"part (b)\"\n",
"h=1300##WAVELENGTH IN NANO METER\n",
"l=80##fiber length in Km\n",
"dh=30##in Nano Meter\n",
"m1=105.5##material dispersion for h=850nm in ps/nm-Km\n",
"m2=2.8##material dispersion for h=1300nm in ps/nm-Km\n",
"t=m2*l*dh*10**-3##material dispersion in ns when h=850nm\n",
"print \"material dispersion = %0.2f ns when h=1300nm\"%t"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2.5 : Page 28"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"part (a)\n",
"material dispersion = 16.88 ns when h=850nm\n",
"part (b)\n",
"material dispersion = 0.448 ns when h=1300nm\n"
]
}
],
"source": [
"# pulse broadning\n",
"print \"part (a)\"\n",
"h=850##WAVELENGTH IN NANO METER\n",
"l=80##fiber length in Km\n",
"dh=2##in Nano Meter\n",
"m1=105.5##material dispersion for h=850nm in ps/nm-Km\n",
"m2=2.8##material dispersion for h=1300nm in ps/nm-Km\n",
"t=m1*l*dh*10**-3##material dispersion in ns when h=850nm\n",
"print \"material dispersion = %0.2f ns when h=850nm\"%t\n",
"print \"part (b)\"\n",
"h=1300##WAVELENGTH IN NANO METER\n",
"l=80##fiber length in Km\n",
"dh=2##in Nano Meter\n",
"m1=105.5##material dispersion for h=850nm in ps/nm-Km\n",
"m2=2.8##material dispersion for h=1300nm in ps/nm-Km\n",
"t=m2*l*dh*10**-3##material dispersion in ns when h=850nm\n",
"print \"material dispersion = %0.3f ns when h=1300nm\"%t"
]
}
],
"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.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|