summaryrefslogtreecommitdiff
path: root/Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter4.ipynb
blob: 8a02517e070209380fc756a8e54d8fa350e5312c (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter4 - Wave propagation in cylindrical waveguides"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 4.1 : Page 70"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "part (a)\n",
      "normalised frequency parameter = 3.01\n",
      "part (b)\n",
      "propogation constants are Bo1 = 5.911e+06  and B11 = 5.885e+06\n",
      "part (c)\n",
      "phase velocity are (Vp)01 = 2.06e+08   ms**-1 and (Vp)11 = 2.07e+08  ms**-1 \n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "from math import pi, sqrt\n",
    "#normalised frequency,propagation constants and phase velocity\n",
    "print \"part (a)\"\n",
    "n1=1.46#core refrative index\n",
    "di=7.2#core diameter \n",
    "n=1.46#core refrative index\n",
    "d=1#relative differnce\n",
    "h=1.55 # in micro meter\n",
    "v=((2*pi*(di*10**-6)/2)*n*sqrt(2*(d/100)))/(h*10**-6)#normalised frequency parameter\n",
    "print \"normalised frequency parameter = %0.2f\"%v\n",
    "print \"part (b)\"\n",
    "b1=(2*pi*n1)/(h*10**-6)# in m**-1\n",
    "n2=n1-(d/100)#cladding refrative index\n",
    "b2=(2*pi*n2)/(h*10**-6)# in m**-1\n",
    "bo1=0.82#\n",
    "b11=0.18#\n",
    "B01=(b2**2+(bo1*(b1**2-b2**2)))**(1/2)#\n",
    "B11=(b2**2+(b11*(b1**2-b2**2)))**(1/2)#\n",
    "print \"propogation constants are Bo1 = %0.3e\"%(B01),\" and B11 = %0.3e\"%(B11)\n",
    "#propogation constants are  calculated wrong in the text bOOK\n",
    "print \"part (c)\"\n",
    "c=3*10**8# in ms**-1\n",
    "vp1=(2*pi*c)/(h*10**-6*B01)#IN MS**-1\n",
    "vp2=(2*pi*c)/(h*10**-6*B11)#IN MS**-1\n",
    "print \"phase velocity are (Vp)01 = %0.2e \"%(vp1),\" ms**-1 and (Vp)11 = %0.2e\"%(vp2),\" ms**-1 \""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 4.2 : Page 73"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "power for LP01 mode is = 11 %\n",
      "power for LP11 mode is = 35 %\n"
     ]
    }
   ],
   "source": [
    "#frational power\n",
    "p01=0.11#from the graph\n",
    "p11=0.347#from the graph\n",
    "print \"power for LP01 mode is = %0.f %%\"%(p01*100)\n",
    "print \"power for LP11 mode is = %0.f %%\" %(p11*100)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 4.3 : Page 76"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Number of modes : 1974\n"
     ]
    }
   ],
   "source": [
    "#Number of the modes\n",
    "h= 0.85# Wavelenght in micrometers\n",
    "a= 50# Core radius in micrometers\n",
    "NA=0.17#\n",
    "v1=(2*pi*a*NA)/h#\n",
    "m2= round((v1**2)/2)#\n",
    "print \"Number of modes : %d\"%m2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 4.4 : Page 76"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "core diameter = 62 micro meter\n"
     ]
    }
   ],
   "source": [
    "#core diameter\n",
    "d=0.02#difference\n",
    "n1=1.5#core refrative index\n",
    "m=1000# number of modes\n",
    "h= 1.3# Wavelenght in micrometers\n",
    "a=((h/(pi*n1))*(m/d)**(1/2))#core diamter in micro meter\n",
    "print \"core diameter = %0.f micro meter\"%a"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 4.5 : Page 76"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "maximum core diameter = 4.82 micro meter\n"
     ]
    }
   ],
   "source": [
    "#core diameter\n",
    "d=0.02#difference\n",
    "a1=75#in micro meter\n",
    "n1=1.45#core refrative index\n",
    "m=700# number of modes\n",
    "v=sqrt(4*m)#\n",
    "h=((2*pi*(a1/2)*n1*sqrt(2*(d/100)))/v)#in micro meter\n",
    "vc=2.405*sqrt(2)#for single mode fiber\n",
    "a=((vc*h)/(pi*n1*sqrt(2*(d/100))))#core diamter in micro meter\n",
    "print \"maximum core diameter = %0.2f micro meter\"%a"
   ]
  }
 ],
 "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
}