# Finding Numerical aperture
import math;
# Variable Declaration
n1 = 1.6; # Refractive index of core
n2 = 1.5; # Refractive index of cladding
# Calculations
NA = math.sqrt(n1**2 - n2**2); # Numerical Aperture of optical fiber
# Result
print 'Numerical Aperture of the optical fiber = %3.4f' %NA;
# Finding Numerical aperture and acceptance Angle
import math;
# Variable declaration
n1 = 1.55; # Refractive index of core
n2 = 1.5; # Refractive index of cladding
# Calculations
NA = math.sqrt(n1**2 - n2**2); # Numerical Aperture of optical fiber
im = math.asin(NA); # Acceptance angle
im_d = im*180/math.pi # radian to degree conversion
# Result
print 'Numerical Aperture of the optical fiber = %3.4f'%NA,' Acceptance angle = %3.2f' %im_d,'degrees ';
# Finding Refractive index of cladding
import math;
# Variable declaration
NA = 0.26; # Numerical aperture
n1 = 1.5 ; # Refractive index of core
d = 100*10^-6; # diameter of the core in m
# Calculations
n2 = math.sqrt( n1**2 - NA**2); # Refractive index of cladding
# Result
print 'Refractive index of cladding = %3.4f' %n2;
# Finding Numerical aperture
import math;
# variable Declaration
n1 = 1.54; # Refractive index of core
n2 = 1.5; # Refractive index of cladding
# Calculations
NA = math.sqrt(n1**2 - n2**2); # Numerical Aperture of optical fiber
# Result
print 'Numerical Aperture of the optical fiber = %3.4f' %NA
# Finding Refractive index, Acceptance angle, Maximum number of modes that fibre allows
import math;
# Variable Declaration
n1 = 1.5; # Refractive index of core
NA = float(0.26); # Numerical aperture
d = 100*10**-6 # core diameter
lamda = float(10**-6); # wavelength in m
# Calculations
n2 = math.sqrt( n1**2 - NA**2); # Refractive index of cladding
im = math.asin(NA); # Acceptance angle
im_d = im*180/math.pi # radian to degree conversion
N = 4.9*(d*NA/lamda)**2; # maximum no of modes
# Result
print ' Refractive index of cladding n2 = %3.4f' %n2,'\n Acceptance angle = %3.2f' %im_d, 'degrees','\n Maximum number of modes that fibre allows = %d '%N;
# Finding Numerical aperture and Critical angle
import math;
# Varible Declaration
delta = 0.02; # relative refractive index
n1 = 1.48; # refractive index of core
# Calculations
NA = n1*(2*delta)**0.5; # Numerical aperture
n2 = math.sqrt( n1**2 - NA**2); # Refractive index of cladding
cri_ang = math.asin(n2/n1); # critical angle
cri_ang_d = cri_ang*180/math.pi; # critical angle in degrees
# Result
print ' Numerical Aperture = %3.3f'%NA,'\n The Critical angle = %3.2f' %cri_ang_d,' degrees';
# Finding Refractive Index
import math
# Variable declaration
delta = 0.015; # relative refractive index
NA = 0.27; # Numerical aperture
# Calculations
# we know that NA = n1*sqrt(2*Δ)
n1 = NA/math.sqrt(2*delta) # refractive index of core
n2 = math.sqrt( n1**2 - NA**2); # Refractive index of cladding
# Result
print ' Refractive index of the core = %3.3f' %n1,'\n Refractive index of the cladding = %3.3f\n' %n2;
# No. of total modes propagating in a multimode step index fibre
import math;
# variable Declaration
NA = 0.25; # Numerical aperture
d = 60*10**-6 # core diameter
lamda = 2.7*10**-6; # wavelength in m
# calculations
N = 4.9*(d*NA/lamda)**2; # no of modes for step index fibre
# Result
print 'No. of total modes propagating in a multimode step index fibre = %d' %N;
# Finding No. of total modes propagating in the fibre
import math;
# Variable Declaration
NA = 0.25; # Numerical aperture
d = 6*10**-6 # core diameter
lamda = 1.5*10**-6; # wavelength of laser source
n1 = 1.47; # refractive index of core
n2 = 1.43 # refractive index of cladding
# calculations
NA = math.sqrt( n1**2 - n2**2); # Numerical Aperture
N = 4.9*(d*NA/lamda)**2; # no of modes for step index fibre
# Result
print 'No. of total modes propagating in the fibre = %d' %N;