# Chapter2 - Ray propagation in optical fiber¶

## Example 2.1 : Page 21¶

In [3]:
from math import degrees, asin, sqrt
print "part (a)"
n1=1.5##core refrative index
na=1##air refrative index
NA=sqrt(n1**2-n2**2)##numerical aperture
print "numerical aperture is %0.3f"%NA
print "part (b)"
am=(asin(NA))##
tm=asin(NA/n1)##
tc=asin(n2/n1)##
print "angle αm = %0.2f degree"%degrees(am)
print "angle Om = %0.2f degree"%degrees(tm)
print "angle Φc = %0.2f degree"%degrees(tc)
print "part (c)"
c=3*10**8##speed of light in m/s
print "pulse broadning per unit length = %0.2e sm**-1"%dtl

part (a)
numerical aperture is 0.244
part (b)
angle αm = 14.13 degree
angle Om = 9.37 degree
angle Φc = 80.63 degree
part (c)
pulse broadning per unit length = 6.76e-11 sm**-1


## Example 2.2 : Page 22¶

In [3]:
from math import tan,sqrt,asin
#minimum and maximum number of reflections
n1=1.5##core refrative index
na=1##air refrative index
NA=sqrt(n1**2-n2**2)##numerical aperture
am=(asin(NA))##
tm=asin(NA/n1)##
tc=asin(n2/n1)##
L=((a*10**-6)/(tan(tm)))##length in meter
x=(1/(2*L))##maximum number of reflections per meter
print "all other rays will suffer reflections between these two extremes of :",(0)," and ",round(x)," m**-1"
#answer is wrong in the textbook

all other rays will suffer reflections between these two extremes of : 0  and  1650.0  m**-1


## Example 2.3 : Page 27¶

In [6]:
#pulse broadning
h=0.85##WAVELENGTH IN MICRO METER
y=0.035##spectral width
c=0.021##constant
cl=3##speed of light in m/s
dtl=(y/cl)*c##
print "pulse broadning = %0.2f ns km**-1"%(dtl*10**4)

pulse broadning = 2.45 ns km**-1


## Example 2.4 : Page 27¶

In [2]:
#pulse broadning
print "part (a)"
h=850##WAVELENGTH IN NANO METER
l=80##fiber length in Km
dh=30##in Nano Meter
m1=105.5##material dispersion for h=850nm in ps/nm-Km
m2=2.8##material dispersion for h=1300nm in ps/nm-Km
t=m1*l*dh*10**-3##material dispersion in ns when h=850nm
print "material dispersion = %0.2f ns when h=850nm"%t
print "part (b)"
h=1300##WAVELENGTH IN NANO METER
l=80##fiber length in Km
dh=30##in Nano Meter
m1=105.5##material dispersion for h=850nm in ps/nm-Km
m2=2.8##material dispersion for h=1300nm in ps/nm-Km
t=m2*l*dh*10**-3##material dispersion in ns when h=850nm
print "material dispersion = %0.2f ns when h=1300nm"%t

part (a)
material dispersion = 253.20 ns when h=850nm
part (b)
material dispersion = 6.72 ns when h=1300nm


## Example 2.5 : Page 28¶

In [3]:
# pulse broadning
print "part (a)"
h=850##WAVELENGTH IN NANO METER
l=80##fiber length in Km
dh=2##in Nano Meter
m1=105.5##material dispersion for h=850nm in ps/nm-Km
m2=2.8##material dispersion for h=1300nm in ps/nm-Km
t=m1*l*dh*10**-3##material dispersion in ns when h=850nm
print "material dispersion = %0.2f ns when h=850nm"%t
print "part (b)"
h=1300##WAVELENGTH IN NANO METER
l=80##fiber length in Km
dh=2##in Nano Meter
m1=105.5##material dispersion for h=850nm in ps/nm-Km
m2=2.8##material dispersion for h=1300nm in ps/nm-Km
t=m2*l*dh*10**-3##material dispersion in ns when h=850nm
print "material dispersion = %0.3f ns when h=1300nm"%t

part (a)
material dispersion = 16.88 ns when h=850nm
part (b)
material dispersion = 0.448 ns when h=1300nm