import math
#Variable declaration
n1=1.50 #core refractive index
n2=1.47 #cladding refractive index
#Calculation
phic=math.asin(n2/n1)*180/(math.pi) #critical angle at core cladding
NA=math.sqrt(n1**2-n2**2) #numerical aperture
phia=math.asin(NA)*180/math.pi #acceptance angle in air
#Result
print'(a) Critical angle at the core-cladding = %.1f°'%phic
print'(b) NA for the fiber = %.2f'%NA
print'(c) Acceptance angle in air for the fiber = %.1f°'%phia
import math
#Variable declaration
delta=0.01 #relative refractive index = 1%
n1=1.46 #core index
#Calculation
NA=n1*math.sqrt(2*delta) #numerical aperture
zeta=math.pi*(NA)**2 #solid acceptance angle
n12=1-delta #ratio of(n2/n1)
phic=math.asin(n12)*180/math.pi #critical angle
#Result
print'Numerical aperture (NA) = %.2f'%NA
print'Solid acceptance angle = ',round((zeta),2),'rad'
print'Critical angle at core-cladding = %.1f°'%phic
import math
#variable declaration
NA=0.4 #numerical aperture
y=50*math.pi/180 #angle between projection of the ray and radius of fibre of core (radians)
#Calculation
phia1=math.asin(NA)*180/math.pi #acceptance angle for meridional rays
phia2=math.asin(NA/(math.cos(y)))*180/math.pi #acceptance angle for skew rays
#Result
print'Acceptance angle for meridional rays = %.1f°'%phia1
print'Acceptance angle for skew rays = %.1f°'%phia2
print"Therefore, acceptance angle for the skew rays is about 15° greater thanthe corresponding angle for meridional rays"
import math
#variable declaration
n1=1.48 #core index
a=40*10**-6 #radius of core
delta=1.5/100 #relative refractive index = 1.5%
h=0.85*10**-6 #operating wavelength
#Calculation
V=(2*math.pi*a*n1*math.sqrt(2*delta))/h #normalized frequency for the fiber
Ms=(V**2)/2 #no of guided modes
#Result
print 'Normalised frequency, V = %.1f'%V
print'Total number of guided modes, Ms = %d'%round(Ms)
import math
#variable declaration
NA=0.2 #numerical aperture
a=25*10**-6 #radius of core
h=1*10**-6 #operating wavelength
#Calculation
V=(2*math.pi*a*NA)/h #normalized frequency for the fiber
Mg=(V**2)/4 #no of guided modes gor parabolic profile
#Result
print 'Normalised frequency, V = %.1f'%V
print'Total number of guided modes, Mg = %d'%round(Mg)
import math
#variable declaration
n1=1.48 #core index
h=0.85*10**-6 #operating wavelength
V=2.4 #normalized frequency for the fiber
delta=1.5/100 #relative refractive index (RRI)= 1.5%
delta1=delta/10 #RRI difference reduced by 10
#Calculation
a=(V*h)/(2*math.pi*n1*math.sqrt(2*delta)) #radius of core
d=2*a
a1=(V*h)/(2*math.pi*n1*math.sqrt(2*delta1)) #new radius of core
d1=2*a1
#Result
print 'Maximum core diameter for relative refractive index of 1.5 percent = ',round((d*10**6),2),"um"
print "Maximum core diameter for relative refractive index = ",round(d1*10**6),"um"
import math
#variable declaration
n1=1.5 #core index
delta=0.01 #relative refractive index (RRI)= 1%
h=1.3*10**-6 #operating wavelength
alph=2
#Calculation
V=(2.4)*math.sqrt(1+(2/alph)) #normalized frequency for the fiber
a=(V*h)/(2*math.pi*n1*math.sqrt(2*delta)) #radius of core
d=2*a
#Result
print "Maximum core diameter for relative refractive index = ",round(d*10**6,1),"um"
import math
#Variable declaration
a=4.5*10**-6 #radius of core
n1=1.46 #core index
delta=0.25/100 #relative refractive index (RRI)= 0.25%
#Calculation
hc=(2*math.pi*a*n1*math.sqrt(2*delta))/2.405 #cutoff wavelength
#Result
print 'Fibre is single moded to a wavelength = ',round(hc*10**9),'nm'
import math
#Variable declaration
wo=5.8*10**-6 #spot size
V=2.2 #normalized frequency
#Calculation
a=wo/((0.65+1.619*V**(-1.5))+(2.879*V**-6)) #radius of the core
d=2*a
#Result
print'Fibre core diameter = ',round(d*10**6,1),"um"
import math
#Variable declaration
h=1.30*10**-6 #operating wavelength
hc=1.08*10**-6 #cutoff wavelength
theta=12 #in angle (degree)
#Calculation
aeff=3.832*h/(2*math.pi*math.sin(theta)) #effective core radius
Veff=2.405*hc/h #effective normalised frequency
wo=3.81*10**-6*(0.6043+(1.755*Veff**-1.5)+(2.78*Veff**-6)) #spot size
#Result
print 'Spot size = ',round(wo*10**6,2),'um'
import math
#Variable declaration
wo=5.2*10**-6 #spot size
n1=1.485 #core index
hc=1.190*10**-6 #cutoff wavelength
#Calculation
aesi=1.820*wo #ESI core radius
D=(0.293/n1**2)*(hc/aesi)**2 #ESI relative index difference
#Result
print'ESI relative refractive index difference = ',round(D*10**2,2),'%'