from math import sqrt,pi
from __future__ import division
n1=1.50## core refractive index
n2=1.48## cladding refractive index
y=1.3*10**-6#
m=1000## the no. of models
v=sqrt(2*m)#
a=(v*y)/(2*pi*(sqrt(n1**2-n2**2)))*10**6## core radius in micrometer
print "core radius=%0.2f micrometer"%(a)
from math import sqrt,pi
from __future__ import division
n1=1.505## core refractive index
n2=1.502## cladding refractive index
n_m=sqrt(n1**2-n2**2)## numerical aperture
y=1.3*10**-6#
v=2.4#
a=(v*y)/(2*pi*(sqrt(n1**2-n2**2)))*10**6## core radius in micrometer
print "numerical aperture=%0.2f"%(n_m)#
print "\n core radius=%0.2f micrometer"%(a)
from math import sqrt,pi
from __future__ import division
n1=1.5## core refractive index
dl=0.01##index difference
m=0## for the dominant mode
v=0## for the dominant mode
y=1.3## in micrometer
a=5## radius in micrometer
k=(2*pi)/y#
b=k**2*n1**2-(2*k*n1*sqrt(2*dl))/a#
B=sqrt(b)## propagation constant in rad/um
print "propagation constant=%0.2f rad/um"%(B)
from math import sqrt,pi,ceil
from __future__ import division
n1=3.6## core refractive index
n2=3.3## cladding refractive index
d=2.0## thickness in um
y=0.8## wavelength in um
m=(2*d*sqrt(n1**2-n2**2))/y## total no. of models allowed
M=ceil(m)## total no. of models allowed
print "total no. of models allowed=%d"%(M)
from math import sqrt,pi,ceil
from __future__ import division
n1=1.48## core refractive index
a=40*(10**-6)## core radius in meter
dl=0.015## index difference
y=0.85*(10**-6)## wavelength in um
v=(2*pi*a*n1*sqrt(2*dl))/y## normalised frequency
M=v**2/2#
m=ceil(M)## the total no. of guided modes
print "normalised frequency=%0.2f"%(v)#
print "\n the total no. of guided modess =%d"%(m)
from math import sqrt,pi
from __future__ import division
n1=1.46## core refractive index
dl=0.015## index difference
a=30*(10**-6)## core radius in meter
y=0.85*(10**-6)## wavelength in um
n2=n1-(n1*dl)## cladding refractive index
v=(2*pi*a*n1*sqrt(2*dl))/y## normalised frequency
M=v**2/2## the total no. of guided modes
print "cladding refractive index=%0.2f"%(n2)#
print "\n normalised frequency=%0.2f"%(v)#
print "\n the total no. of guided modess =%d"%(M)
from math import sqrt,pi
from __future__ import division
n1=1.5## core refractive index
dl=0.01## index difference
M=1100## the total no. of guided modes
y=1.3*(10**-6)## wavelength in um
v=sqrt(2*M)## normalised frequency
a=(v*y)/(2*pi*n1*sqrt(2*dl))*10**6## core radius in meter
print "normalised frequency=%0.2f"%(v)#
print "\n the diameter of the fiber core =%0.2f um"%(2*a)
from math import sqrt,pi
from __future__ import division
n1=1.45## core refractive index
n_m=0.16## numerical aperture
a=30*10**-6## core radius in micrometer
y=0.5*(10**-6)## wavelength in um
v=(2*pi*a*n_m)/y## normalised frequency
print "normalised frequency=%0.2f"%(v)
from math import sqrt,pi
from __future__ import division
n1=3.6## core refractive index
n2=3.56## cladding refractive index
y=0.85*(10**-6)## wavelength in um
m=1#
n=0#
v_c=2.405## for planner guide
a=(v_c*y)/(2*pi*sqrt(n1**2-n2**2))## core radius in micrometer
print "the max thickness=%0.2f um"%(a*10**6)
from math import pi,sqrt,ceil
from __future__ import division
n1=1.5 #core refractive index
y=1.3*(10**-6) #wavelength in um
M=1100 #total no. of models
dl=0.01 #index difference
v=sqrt(2*M) #
V=ceil(v) #
a=(V*y)/(2*pi*n1*sqrt(2*dl))*10**6 #core radius in micrometer
a1=ceil(a) #core radius in micrometer
print "the core diameter=%d um"%(2*a1)
from math import sqrt,pi
from __future__ import division
n1=1.45## core refractive index
dl=0.015## index difference
y=0.85*(10**-6)## wavelength in meter
v=2.4*(1+(2/2))**(0.5)## Max normalised frequency
a=(v*y)/(2*pi*n1*(2*dl)**(0.5))## Max core radius in m
d=2*a## The max core diameter in meter
print "The max core diameter in meter=%0.2f um"%( d*10**6)
from math import sqrt,pi
from __future__ import division
n1=1.48## core refractive index
n2=1.46## cladding refractive index
a=2.5## radius in um
y=0.85## wavelength in um
dl=(n1-n2)/n1## index difference
v=(2*pi*a*n1*(2*dl)**(0.5))/y## the normaised frequency
M=(v*v)/2## number of modes
print "The number of modes=%0.2f"%( M)
from math import sqrt,pi
from __future__ import division
a=25## radius in um
y=1.3## wavelength in um
v=26.6## the normaised frequency
NA=(v*y)/(2*pi*a)## Numerical aperture
a_c=pi*(NA)**2#
M=(v*v)/2#
print "The number of modes=%0.2f"%( NA)#
print "\n The number of modes=%0.2f"%( a_c)#
print "\n answer in textbook is wrong"#
print "\n The number of modes=%0.2f"%( M)
from __future__ import division
n1=1.49## core refractive index
n2=1.47## cladding refractive index
a=2## radius in um
dl=(n1-n2)/n1## index difference
v_c=2.405#
y_c=(2*3.14*a*n1*(2*dl)**(0.5))/v_c## cut off wavelength in um
Y=1.31## wavelength in um
A=(v_c*Y)/(2*3.14*n1*(2*dl)**(0.5))## min core radius in um
print "The cut off wavelength =%0.2f um"%( y_c)#
print "\n The min core radius =%0.2f um"%( A)
from math import sqrt,pi
from __future__ import division
a=25## radius in um
NA=0.3## Numerical aperture
y=1## wavelength in um
v=(2*pi*a*NA)/y## the normalised frequency
V=47.1## the normalised frequency
M=(V*V)/4## The mode volume
print "The normalised frequency =%0.2f"%( v)#
print "\n The mode volume =%d guided modes"%( M)
from __future__ import division
n1=1.46## core refractive index
a=4.5## radius in um
dl=0.0025## relative index difference
v_c=2.405#
y_c=(2*3.14*a*n1*(2*dl)**(0.5))/v_c## cut off wavelength in um
print "The cut off wavelength =%0.2f um"%( y_c)
from math import sqrt,pi
from __future__ import division
n1=1.5## core refractive index
n2=1.45## cladding refractive index
a=50## radius in um
y=1.3## operating wavelength in um
NA=sqrt(n1**2-n2**2)## numerical aperture
N_A=0.38#
v=(2*pi*a*N_A)/y## cut of numbers
M=v**2/2## number of modes
print "The cut of numbers =%0.2f"%( v)#
print "\n The number of modes =%0.2f"%( M)
from math import sqrt,pi
from __future__ import division
n1=1.53## core refractive index
n2=1.5## cladding refractive index
y=1.5## operating wavelength in um
NA=sqrt(n1**2-n2**2)## numerical aperture
a=(2.405*y)/(2*3.14*NA)## max radius in um
print "The max core radius =%0.2f um"%( a)
from math import sqrt,pi
from __future__ import division
a=25## max radius in um
y=0.8## operating wavelength in um
NA=0.343## numerical aperture
v=(2*pi*a*NA)/y## v-number
M=v**2/2##number of modes
print "The v-number =%0.2f"%( v)#
print "\n The number of modes =%0.2f"%( M)
from math import sqrt,pi
from __future__ import division
n1=1.5## core refractive index
NA=0.38## numerical aperture
v=75## v-number
y=1.3## operating wavelength in um
a=(v*y)/(2*pi*NA)## core radius in um
n2=sqrt(n1**2-NA**2)## cladding refractive index
print "The core radius =%0.2f um"%( a)#
print "\n The cladding refractive index =%0.2f"%( n2)#
print "\n answer in textbook is wrong"
from math import sqrt,pi
from __future__ import division
y=1.2## operating wavelength in um
w=5## spot size in um
x=(2*y)/(pi*w)## the divergence angle in degree
print "The divergence angle =%0.2f degree"%( x)
from math import sqrt,pi
from __future__ import division
n1=1.46## core refractive index
a=4.5## core radius in um
dl=0.0025## relative index difference
NA=n1*(sqrt(2*dl))## numerical aperture
v=2.405#
y=(2*pi*a*NA)/(v)## cut off wavelength in um
print "The cut off wavelength =%0.2f um"%( y)
from math import sqrt,pi
from __future__ import division
n1=1.5## core refractive index
n2=1.47## cladding refractive index
y1=0.87## operating wavelength in um
y2=1.5## operating wavelength in um
a=25## max radius in um
NA=sqrt(n1**2-n2**2)## numerical aperture
v1=(2*pi*a*NA)/y1#
v2=(2*pi*a*NA)/y2#
al=2## parabolic index profile for GRIN
M1=(al/(al+2))*(v1**2/2)## number of modes
M2=(al/(al+2))*(v2**2/2)## number of modes
print "The number of modes at 870 nm =%0.2f um"%( M1)#
print "\n The number of modes =%0.2f um"%( M2)
from math import sqrt,pi
from __future__ import division
n1=1.5## core refractive index
n2=1.46## cladding refractive index
v=2.4## cut off parameter
y=0.85## operating wavelength in um
NA=sqrt(n1**2-n2**2)## numerical aperture
a=(v*y)/(2*3.14*NA)## max radius in um
w=v*a## spot size
x=(2*y)/(3.4*w)## divergence angle in degree
d=50## distance in meter
w_s=(y*d)/(pi*w)## spot size at 50 meter
print "The numerical aperture =%0.2f um"%( NA)#
print "\n The max core radius =%0.2f um"%( a)#
print "\n The spot size =%0.2f um"%( w)#
print "\n The divergence angle =%0.2f degree"%( x)#
print "\n The spot size at 50 meter =%0.2f m"%( w_s)
from math import sqrt,pi
from __future__ import division
n1=1.53## core refractive index
n2=1.50## cladding refractive index
y=1.2## wavelength in um
v=2.405#
a=(v*y)/(2*3.14*(sqrt(n1**2-n2**2)))## core radius in micrometer
print "The max diameter=%0.2f um"%(2*a)
from math import sqrt,pi
from __future__ import division
n1=1.47## core refractive index
n2=1.46## cladding refractive index
y=1.3## wavelength in um
dl=(n1-n2)/n1## fractional refractive index diff
NA=sqrt(n1**2-n2**2)#
v=2.405#
a=(v*y)/(2*3.14*(sqrt(n1**2-n2**2)))## largest core radius in micrometer
n_eff=n1-(NA/(2*3.14*(a/y)))## fractional refractive index
print "The largest core radius =%0.2f um"%( a)#
print "\n The fractional refractive index=%0.2f"%(n_eff)
from math import sqrt,pi
from __future__ import division
n1=1.50## core refractive index
n2=1.48## cladding refractive index
NA=sqrt(n1**2-n2**2)## numerical aperture
a=25## core radius in um
y=0.85## wavelength in um
v=(2*3.14*a*NA)/y## cut off parameter
M=v**2/2## number of modes
print "The cut off parameter =%0.2f"%( v)#
print "\n The number of modes =%d"%(M)
from __future__ import division
n1=1.50## core refractive index
a=25## core radius in um
y=1.5## wavelength in um
v=2.405#
NA=(v*y)/(2*3.14*a)## numerical aperture
D=(NA/n1)**2/(2)## max value of D
n2=n1-(D*n1)## cladding refractive index
print "The max value of D =%0.2f"%(D)#
print "\n The cladding refractive index =%0.2f"%(n2)
from math import sqrt,pi,asin
from __future__ import division
n1=1.52## core refractive index
n2=1.48## cladding refractive index
a=45## core radius in um
y=0.85## wavelength in um
dl=(n1-n2)/n1## relative refractive index
x=(asin(n2/n1))*(180/3.14)## critical angle in degree
NA=sqrt(n1**2-n2**2)## numerical aperture
a_c=(asin(NA))*(180/3.14)## acceptance angle in degree
a_s=3.14*(n1**2-n2**2)## solid acceptance angle
v=(2*3.14*a*0.34)/y## normalise v-number
M=v**2/2## number of guided modes
a1=5## for single mode step fiber
v1=(2*3.14*a1*0.34)/y#
M1=v1**2/2#
R=M-M1## reduction in modes
print "The max value of D =%0.2f"%(dl)#
print "\n The critical angle =%0.2f degree"%(x)#
print "\n The acceptance angle =%0.2f degree"%(2*a_c)#
print "\n The solid acceptance angle =%0.2f degree"%(a_s)#
print "\n The numerical aperture =%0.2f"%(NA)#
print "\n The normalise v-number =%0.2f"%(v)#
print "\n The number of guided modes =%d"%(M)#
print "\n The reduction in modes =%d"%(R)
from __future__ import division
n1=1.46## core refractive index
a=45/2## max radius in um
y=0.85## operating wavelength in um
NA=0.17## numerical aperture
v=(2*3.14*a*NA)/y##normalised frequency
M=v**2/2## number of modes
print "The normalised frequency =%0.2f"%( v)#
print "\n The number of modes =%d"%( M)