# Fibre Optics and Applications¶

## Example number 3.1, Page number 84¶

In :
#To calculate the numerical aperture, critical angle,acceptance angle

#importing modules
import math

#Variable declaration
n1 = 1.5;          #refractive index of core
n2 = 1.47;         #refractive index of cladding
n0 = 1;            #refractive index of air
a = 180/math.pi;        #conversion factor of radian to degree

#Calculation
NA = math.sqrt((n1**2)-(n2**2));     #numerical aperture
NA=math.ceil(NA*10)/10;   #rounding off to 1 decimal
alpha_m = alpha_m*a;                #acceptance angle(degrees)
alpha_m=math.ceil(alpha_m*10**2)/10**2;   #rounding off to 2 decimals
phi_m = phi_m*a;                    #phase angle(degrees)
phi_m=math.ceil(phi_m*10**2)/10**2;   #rounding off to 2 decimals
theta_c = theta_c*a;                #critical angle(degrees)
theta_c=math.ceil(theta_c*10**3)/10**3;   #rounding off to 3 decimals

#Result
print "numerical aperture is",NA
print "acceptance angle is",alpha_m,"degrees"
print "phase angle is",phi_m,"degrees"
print "critical angle is",theta_c,"degrees"

numerical aperture is 0.3
acceptance angle is 17.46 degrees
phase angle is 11.54 degrees
critical angle is 78.522 degrees


## Example number 3.2, Page number 85¶

In :
#To calculate the pulse broadening

#importing modules
import math

#Variable declaration
n1 = 1.5;          #refractive index of core
n2 = 1.47;         #refractive index of cladding
c = 3*10**8;       #velocity of light(m/sec)

#Calculation
deltatbyL = (n1/n2)*((n1-n2)/c);

#Result
print "pulse broadening per unit length is",deltatbyL,"s/m"

pulse broadening per unit length is 1.02040816327e-10 s/m


## Example number 3.3, Page number 85¶

In :
#To calculate the minimum and maximum number of total internal reflections

#importing modules
import math

#Variable declaration
phi_m = 11.54;       #phase angle(degrees)
a = 0.5*10**-4;
x = math.pi/180;       #conversion factor from degrees to radians

#Calculation

rays travelling with alpha = 0 suffer no reflection. therefore minimum number of reflections per metre is 0.