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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter3 - Wave propagation in planor waveguides"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.1 : Page 45"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"range of propagation constant is 1.10880e+07 to 1.1014e+07 m**-1\n",
"number of modes are 4.0\n"
]
}
],
"source": [
"from math import pi, sqrt\n",
"#range of propagation constants and maximum no. of modes\n",
"n1=1.5##core refractive index\n",
"n2=1.49##cladding refrative index\n",
"t=9.83##thickness of guided layer in micro meter\n",
"h=0.85##wavelength in µm\n",
"b1=((2*pi*n1)/(h*10**-6))##phase propagation constant in m**-1\n",
"b2=((2*pi*n2)/(h*10**-6))##phase propagation constant in m**-1\n",
"m=((4*t)/h)*(sqrt(n1**2-n2**2))##number of modes\n",
"print \"range of propagation constant is %0.5e\"%(b1),\" to %0.4e\"%(b2),\" m**-1\"\n",
"print\"number of modes are\",round(m/2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.2 : Page 51"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"thicknes of the slab should not be greater than 0.794 µm\n"
]
}
],
"source": [
"from math import sqrt\n",
"#thickness\n",
"n1=3.6##core refractive index\n",
"n2=3.56##cladding refrative index\n",
"h=0.85##wavelength in µm\n",
"a=((h/(2*sqrt(n1**2-n2**2))))##thickness in µm\n",
"print \"thicknes of the slab should not be greater than %0.3f\"%(a),\" µm\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.3 : Page 52"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"part (a)\n",
"number of modes are : 5.0\n",
"part (b)\n",
"m \tuma(rad) \tum(m**-1) \twma(rad) \twm(m**-1) \tbm((wma/v)**2] \t\n",
"\n",
"0 1.30644 2.5845e+05 4.8263 9.5476e+05 0.93077\n",
"1 2.59574 5.1350e+05 4.27342 8.4538e+05 0.72974\n",
"2 3.83747 7.5914e+05 3.20529 6.3408e+05 0.41053\n",
"3 4.9063 9.7058e+05 0.963466 1.9060e+05 0.03709\n"
]
}
],
"source": [
"from math import pi, sqrt\n",
"#no. of modes\n",
"print \"part (a)\"\n",
"n1=1.5##core refractive index\n",
"n2=1.48##cladding refrative index\n",
"t=10.11##thickness of guided layer in micro meter\n",
"h=1.55##wavelength in µm\n",
"b1=((2*pi*n1)/(h*10**-6))##phase propagation constant in m**-1\n",
"b2=((2*pi*n2)/(h*10**-6))##phase propagation constant in m**-1\n",
"m=((2*pi*t)/h)*(sqrt(n1**2-n2**2))##number of modes\n",
"print \"number of modes are : \",round(m/2)\n",
"\n",
"print \"part (b)\"\n",
"t1=10.11##thickness of guided layer in micro meter\n",
"t=t1/2#\n",
"h=1.55##wavelength in µm\n",
"b1=((2*pi*n1)/(h*10**-6))##phase propagation constant in m**-1\n",
"b2=((2*pi*n2)/(h*10**-6))##phase propagation constant in m**-1\n",
"mo=(((2*pi*t1)/h)*(sqrt(n1**2-n2**2)))/2##number of modes\n",
"uma0=1.30644## for m=0 from the curve\n",
"uma1=2.59574## for m=1 from the curve\n",
"uma2=3.83747## for m=2 from the curve\n",
"uma3=4.9063## for m=3 from the curve\n",
"wma0=4.8263## for m=0 from the curve\n",
"wma1=4.27342## for m=1 from the curve\n",
"wma2=3.20529## for m=2 from the curve\n",
"wma3=0.963466## for m=3 from the curve\n",
"um0=uma0/(t*10**-6)##in m**-1\n",
"um1=uma1/(t*10**-6)##in m**-1\n",
"um2=uma2/(t*10**-6)##in m**-1\n",
"um3=uma3/(t*10**-6)##in m**-1\n",
"wm0=wma0/(t*10**-6)##in m**-1\n",
"wm1=wma1/(t*10**-6)##in m**-1\n",
"wm2=wma2/(t*10**-6)##in m**-1\n",
"wm3=wma3/(t*10**-6)##in m**-1\n",
"bm0=((wm0*t*10**-6)/mo)**2##for m=0 \n",
"bm1=((wm1*t*10**-6)/mo)**2##for m=1\n",
"bm2=((wm2*t*10**-6)/mo)**2##for m=2 \n",
"bm3=((wm3*t*10**-6)/mo)**2##for m=3\n",
"m0=sqrt((bm0*(b1**2-b2**2))+b2**2)##for m=0 in m**-1\n",
"m1=sqrt((bm1*(b1**2-b2**2))+b2**2)##for m=1 in m**-1\n",
"m2=sqrt((bm2*(b1**2-b2**2))+b2**2)##for m=2 in m**-1\n",
"m3=sqrt((bm3*(b1**2-b2**2))+b2**2)##for m=3 in m**-1\n",
"params = [\"m\", \"uma(rad)\", \"um(m**-1)\", \"wma(rad)\", \"wm(m**-1)\", \"bm((wma/v)**2]\" ]\n",
"for x in params:\n",
" print x,'\\t',\n",
"\n",
"print '\\n'\n",
"a = range(0,4)\n",
"b = [uma0, uma1, uma2, uma3]\n",
"c = [um0, um1, um2, um3]\n",
"d = [wma0, wma1, wma2, wma3]\n",
"e = [wm0, wm1, wm2, wm3]\n",
"f = [bm0, bm1, bm2, bm3]\n",
"from numpy import nditer\n",
"for k,l,m,n,o,p in nditer([a,b,c,d,e,f]) :\n",
" print k,' ',l,' %0.4e'%m,' ',n,' %0.4e'%o,' %0.5f'%p\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.4 : Page 56"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"G factor is 0.5622\n"
]
}
],
"source": [
"from math import sin, cos, pi\n",
"#G factor\n",
"d=0.793##in micro meter\n",
"v=pi/2##point of intersection\n",
"ua=0.934##\n",
"wa=1.262##\n",
"Y=(wa*(1+(sin(ua*pi/180))*(cos(ua*pi/180))/ua))\n",
"G=(1+((cos(ua*pi/180))**2)/Y)**(-1)\n",
"print \"G factor is %0.4f\"%G\n",
"#answer is wrong in the textbook"
]
}
],
"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
}
|