#Given
import math
n1= 1.5 # for glass
n2= 1.33 # for water
phi1= (math.pi/6) # phi1 is the angel of incidence
# According to Snell's law...
# n1*sin(phi1)= n2*sin(phi2)
sinphi2= (n1/n2)*math.sin(phi1) # phi2 is the angle of refraction..
phi2 = math.asin(sinphi2)
temp= math.degrees(phi2)
print " The angel of refraction in degrees =",round(temp,2)
# Given
import math
n1= 1.50 # RI of glass..
n2 = 1.0 # RI of air...
# According to Snell's law...
# n1*sin(phi1)= n2*sin(phi2)
# From definition of critical angel phi2 = 90 degrees and phi1 will be critical angel
t1=(n2/n1)*math.sin(math.pi/2)
phiC=math.asin(t1)
temp= math.degrees(phiC)
print " The Critical angel in degrees =",round(temp,2)
# Given
# To find RI of glass
# To find the critical angle for glass...
phi1 = 33 # Angle of incidence..
phi2 = 90 # Angle of refraction..
n2= 1.0
n1 = round(sin(math.radians(phi2))/sin(math.radians(phi1)),3)
print " The Refractive Index is =",n1
#phiC = math.asin((n2/n1)*math.sin(90))
phiC=math.asin(0.54)
print " \n\nThe Critical angel in degrees =",round(math.degrees(phiC),2)
# Given
import math
n1= 1.5 # TheRi of medium 1
n2= 1.36 # the RI of medium 2
phi1= 30 # The angle of incidence
# According to Snell's law...
# n1*sin(phi1)= n2*sin(phi2)
phi2 = math.asin((n1/n2)*math.sin(math.radians(phi1)))
print " The angel of refraction is in degrees from normal = ",round(math.degrees(phi2),2)
# Given
import math
n1 = 3.6 # RI of GaAs..
n2 = 3.4 # RI of AlGaAs..
phi1 = 80 # Angle of Incidence..
# According to Snell's law...
# n1*sin(phi1)= n2*sin(phi2)
# At critical angle phi2 = 90...
phiC = math.asin((n2/n1)*sin(math.radians(90)) )
print " The Critical angel in degrees =",round(math.degrees(phiC),2)
# Given
import math
n1= 1.5 # RI of medium 1
n2 =1.45 # RI of medium 2
delt= (n1-n2)/n1
NA = n1*(math.sqrt(2*delt))
print " The Numerical aperture =",round(NA,2)
phiA = math.asin(NA)
print " \n\nThe Acceptance angel in degrees =",round(math.degrees(phiA),2)
phiC = math.asin(n2/n1)
print " \n\nThe Critical angel in degrees =",round(degrees(phiC),2)
# Given
import math
n1= 1.5 # RI of core
n2 = 1.48 # RI of cladding..
NA = math.sqrt((n1**2)-(n2**2))
print " The Numerical Aperture =",round(NA,2)
phiA = math.asin(NA)
print " \n\nThe Critical angel =",round(math.degrees(phiA),2)
# Given
import math
NA = 0.35 # Numerical Aperture
delt = 0.01
# NA= n1*(math.sqrt(2*delt) n1 is RI of core
n1 = 0.35/(math.sqrt(2*delt))
print "The RI of core =",round(n1,4)
# Numerical Aperture is also given by
# NA = math.sqrt(n1**2 - n2**2) # n2 is RI of cladding
n2 = math.sqrt((n1**2-NA**2))
print " \n\nThe RI of Cladding =",round(n2,3)
# Given
import math
Vc = 2.01*10**8 # velocity of light in core in m/sec...
phiC= 80.0 # Critical angle in degrees...
# RI of Core (n1) is given by (Velocity of light in air/ velocity of light in air)...
n1= 3*10**8/Vc
# From critical angle and the value of n1 we calculate n2...
n2 = sin(math.radians(phiC))*n1 # RI of cladding...
NA = math.sqrt(n1**2-n2**2)
print " The Numerical Aperture =",round(NA,2)
phiA = math.asin(NA) # Acceptance angle...
print " \n\nThe Acceptance angel in degrees =",round(math.degrees(phiA),2)
# Given
import math
n1 = 1.4 # RI of Core..
n2 = 1.35 # RI of Cladding
phiC = math.asin(n2/n1) # Critical angle..
print " The Critical angel in degrees =",round(math.degrees(phiC),2)
NA = math.sqrt(n1**2-n2**2) # numerical Aperture...
print " \n\nThe Numerical Aperture is =",round(NA,2)
phiA = math.asin(NA) # Acceptance angle...
print " \n\nThe Acceptance angel in degrees =",round(math.degrees(phiA),2)
# Given
import math
n1 = 1.48 # RI of core..
n2 = 1.46 # RI of Cladding..
NA = math.sqrt(n1**2-n2**2) # Numerical Aperture..
print " The Numerical Aperture is =",round(NA,3)
theta = math.pi*NA**2 # The entrance angle theta..
print " \n\nThe Entrance angel in degrees =",round(theta,3)
# Given
import math
delt = 0.007 # relative refractive index difference
n1 = 1.45 # RI of core...
NA = n1* math.sqrt((2*delt))
print " The Numerical Aperture is =",round(NA,4)
# Given
import math
phiA = 8 # accepatance angle in degrees...
n1 =1.52 # RI of core...
NA = sin(math.radians(phiA)) # Numerical Aperture...
delt = NA**2/(2*(n1**2)) # Relative RI difference...
print " The relative refractive index difference =",round(delt,5)
# Given
import math
delt = 0.01 # relative RI difference..
n1 = 1.48 # RI of core...
NA = n1*(math.sqrt(2*delt)) # Numerical Aperture..
print " The Numerical Aperture =",round(NA,3)
theta = math.pi*NA**2 # Solid Acceptance angle...
print " \n\nThe Solid Acceptance angel in degrees =",round(theta,4)
n2 = (1-delt)*n1
phiC = math.asin(n2/n1) # Critical Angle...
print " \n\nThe Critical angel in degrees =",round(math.degrees(phiC),2)
print " \n\nCritical angle wrong due to rounding off errors in trignometric functions..\n Actual value is 90.98 in book."
# Given
import math
d = 50*10**-6 # diameter of fibre...
n1 = 1.48 # RI of core..
n2 = 1.46 # RI of cladding..
lamda = 0.82*10**-6 # wavelength of light..
NA = math.sqrt(n1**2-n2**2) # Numerical Aperture..
Vn= math.pi*d*NA/lamda # normalised frequency...
M = Vn**2/2 # number of modes...
print " The number of modes in the fibre are =",int(M)
# Given
import math
V = 26.6 # Normalised frequency..
lamda = 1300*10**-9 # wavelenght of operation
a = 25*10**-6 # radius of fibre.
NA = V*lamda/(2*math.pi*a) # Numerical Aperture..
print " The Numerical Aperture =",round(NA,3)
# Given
import math
a = 40*10**-6 # radius of core...
delt = 0.015 # relative RI difference..
lamda= 0.85*10**-6 # wavelength of operation..
n1=1.48 # RI of core..
NA = n1*math.sqrt(2*delt) # Numerical Aperture..
print " The Numerical Aperture =", round(NA,4)
V = 2*math.pi*a*NA/lamda # normalised frequency
print " \n\nThe Normalised frequency =",round(V,2)
M = V**2/2 # number of modes..
print " \n\nThe number of modes in the fibre are =",int(M)
# Given
import math
NA = 0.20 # Numerical Aperture..
M = 1000 # number of modes..
lamda = 850*10**-9 # wavelength of operation..
a = math.sqrt(M*2*lamda**2/(math.pi**2*NA**2)) # radius of core..
a=a*10**6 # converting in um for displaying...
print " The radius of the core in um =",round(a,2)
a=a*10**-6
M1= ((math.pi*a*NA/(1320*10**-9))**2)/2
print " \n\nThe number of modes in the fibre at 1320um =",int(M1)
print " \n\n***The number of modes in the fibre at 1320um is calculated wrongly in book"
M2= ((math.pi*a*NA/(1550*10**-9))**2)/2
print " \n\nThe number of modes in the fibre at 1550um =",int(M2)
# Given
import math
NA = 0.2 # Numerical Aperture..
n2= 1.59 # RI of cladding..
n0= 1.33 # RI of water..
lamda = 1300*10**-9 # wavelength..
a = 25*10**-6 # radius of core..
n1 = math.sqrt(NA**2+n2**2) # RI of core..
phiA= math.asin(math.sqrt(n1**2-n2**2)/n0) # Acceptance angle..
print " The Acceptance angle is =",round(math.degrees(phiA),2)
phiC= math.asin(n2/n1) # Critical angle..
print " \n\nThe critical angle is =",round(math.degrees(phiC),2)
V = 2*math.pi*a*NA/lamda # normalisd frequency
M= V**2/2 # number of modes
print " \n\nThe number of modes in the fibre are =",int(M)
print " \n\n***The value of the angle differ from the book because of round off errors."
# Given
import math
V= 26.6 # Normalised frequency..
lamda= 1300*10**-9 # wavelength of operation..
a= 25*10**-6 # radius of core..
NA = V*lamda/(2*math.pi*a) # Numerical Aperture..
print " The Numerical Aperture =",round(NA,2)
theta = math.pi*NA**2 # solid Acceptance Angle..
print " \n\nThe solid acceptance angle in radians =",round(theta,3)
M= V**2/2 # number of modes..
print " \n\nThe number of modes in the fibre =",round(M,2)
# Given
import math
n1= 1.49 # RI of core.
n2=1.47 # RI of cladding..
a= 2 # radius of core in um..
NA= math.sqrt(n1**2-n2**2) # Numerical Aperture..
# The maximum V number for single mode operation is 2.4...
V= 2.4 # Normalised frequency..
lamda = 2*math.pi*a*NA/V # Cutoff wavelength...
print " The cutoff wavelength in um =",round(lamda,2)
lamda1 = 1.310 # Givenn cutoff wavelength in um..
d= V*lamda1/(math.pi*NA) # core diameter..
print " \n\nThe core diameter in um =",round(d,2)
# Given
import math
n1= 1.48 # RI of core..
a= 4.5 # core radius in um..
delt= 0.0025 # Relative RI difference..
V= 2.405 # For step index fibre..
lamda= (2*math.pi*a*n1*math.sqrt(2*delt))/V # cutoff wavelength..
print " The cutoff wavelength in um =",round(lamda,2)
# Given
import math
lamda= 0.82*10**-6 # wavelength ofoperation.
a= 2.5*10**-6 # Radius of core..
n1= 1.48 # RI of core..
n2= 1.46 # RI of cladding
NA= math.sqrt(n1**2-n2**2) # Numerical Aperture..
V= 2*math.pi*a*NA/lamda # Normalisd frequency..
print " The normalised frequency =",round(V,3)
M= V**2/2 # The number of modes..
print " \n\nThe number of modes in the fibre are =",round(M,2)
# Given
import math
delt= 0.01 # Relative RI difference..
n1= 1.5
M= 1100 # Number of modes...
lamda= 1.3 # wavelength of operation in um..
V= math.sqrt(2*M) # Normalised frequency...
d= V*lamda/(math.pi*n1*math.sqrt(2*delt)) # diameter of core..
print " The diameter of the core in um =",round(d,2)
# Given
import math
n1= 1.5 # RI of core..
n2= 1.38 # RI of cladding..
a= 25*10**-6 # radius of core..
lamda= 1300*10**-9 # wavelength of operation...
NA= math.sqrt(n1**2-n2**2) # Numerical Aperture..
print " The Numerical Aperture of the given fibre =",round(NA,4)
V= 2*math.pi*a*NA/lamda # Normalised frequency..
print " \n\nThe normalised frequency =",round(V,2)
theta= math.asin(NA) # Solid acceptance anglr..
print " \n\nThe Solid acceptance angle in degrees =",int(math.degrees(theta))
M= V**2/2 # Number of modes..
print " \n\nThe number of modes in the fibre are =",int(M)
print " \n\n***Number of modes wrongly calculated in the book.."
# Given
import math
lamda= 850*10**-9 # wavelength of operation.
a= 25*10**-6 # Radius of core
n1= 1.48 # RI of Core...
n2= 1.46 # RI of cladding..
NA= math.sqrt(n1**2-n2**2) # Numerical Aperture
V= 2*math.pi*a*NA/lamda # Normalised frequency..
print " The normalised frequency =",round(V,2)
lamda1= 1320*10**-9 # wavelength changed...
V1= 2*math.pi*a*NA/lamda1 # Normalised frequency at new wavelength..
M= V1**2/2 # Number of modes at new wavelength..
print " \n\nThe number of modes in the fibre at 1320um =",int(M)
lamda2= 1550*10**-9 # wavelength 2...
V2= 2*math.pi*a*NA/lamda2 # New normalised frequency..
M1= V2**2/2 # number of modes..
print " \n\nThe number of modes in the fibre at 1550um =",int(M1 )
# Given
import math
n1= 1.48 # RI of core..
delt= 0.015 # relative RI differencr..
lamda= 0.85 # wavelength of operation..
V= 2.4 # for single mode of operation..
a= V*lamda/(2*math.pi*n1*math.sqrt(2*delt)) # radius of core..
print " The raduis of core in um =",round(a,2)
print " \n\nThe maximum possible core diameter in um =",round(2*a,2)
# Given
import math
n1= 1.5 # RI of core..
delt= 0.01 # Relative RI difference...
lamda= 1.3 # Wavelength of operation...
V= 2.4*math.sqrt(2) # Maximum value of V for GRIN...
a= V*lamda/(2*math.pi*n1*math.sqrt(2*delt)) # radius of core..
print " The radius of core in um =",round(a,2)
print " \n\nThe maximum possible core diameter in um =",round(2*a,2)
# Given
import math
n1= 1.46 # RI of core..
a = 4.5 # radius of core in um..
delt= 0.0025 # relative RI difference..
V= 2.405 # Normalisd frequency for single mode..
lamda= 2*math.pi*a*n1*math.sqrt(2*delt)/V # cutoff wavelength...
print " The cut off wavelength for the given fibre in um =",round(lamda,3)