import math
# Variable declaration
n1=1.55 # core refractive index
n2=1.50 #cladding refractive index
# Calculations
x=math.asin(n2/n1) #Critical angle in radians
x1=x*180/math.pi #Critical angle in degree
n_a=math.sqrt(math.pow(n1,2)-math.pow(n2,2)) # Numerical aperture
x_a=math.asin(n_a)*180/math.pi
x_a1=math.ceil(x_a) # Acceptance angle in Degree
# Results
print ('%s %.2f %s' %(" Critical angle in degree= ", x1,"degree"))
print ('%s %.2f ' %("\n Numerical aperture= ",n_a))
print ('%s %.1f %s' %("\n Acceptance angle in degree= ",x_a1,"degree"))
import math
# Variable declaration
c=3*math.pow(10,8) #speed of light in m/s
v=2*math.pow(10,8) # in m/s
# calculations
n1=c/v
x=75 # in degree
n2=n1*math.sin((x*math.pi/180))
n_2=1.44
n_a=math.sqrt(math.pow(n1,2)-math.pow(n_2,2)) # numerical aperture
# Results
print ('%s %.2f' %(" Numerical aperture = ",n_a))
import math
# Variable declaration
n1=1.50 # core refractive index
n2=1.47 # cladding refractive index
# Calculations
dl=(n1-n2)/n1
n_a=n1*(math.sqrt(2*dl))# numerical aperture
x_a=(math.asin(n_a))*180/math.pi #acceptance angle in degree
# Results
print ('%s %.2f' %(" Numerical aperture = ",n_a))
print ('%s %.2f %s' %("\n Acceptance angle in degree = ",x_a,"degree"))
import math
# Variable declaration
n1=1.50 # core refractive index
n2=1.45 # cladding refractive index
# Calculations
dl=(n1-n2)/n1
n_a=n1*(math.sqrt(2*dl)) # numerical aperture
x_a=(math.asin(n_a))*180/math.pi # acceptance angle in degree
x_c=(math.asin(n2/n1))*180/math.pi # critical angle in degree
# Results
print ('%s %.2f' %(" Numerical aperture = ",n_a))
print ('%s %.2f %s' %("\n acceptance angle in degree = ",x_a,"degree"))
print ('%s %.2f %s' %("\n critical angle in degree = ",x_c,"degree"))
import math
# Variable declaration
dl=0.012
n_a=0.22 # numerical aperture
# Calculations
n1=n_a/(math.sqrt(2*dl)) # core refractive index
n2=n1-(dl*n1)# cladding refractive index
# Results
print ('%s %.2f' %(" core refractive index = ",n1))
print ('%s %.2f' %("\n cladding refractive index = ",n2))
import math
# Variable declaration
dl=0.012
n_a=0.22 # numerical aperture
# Calculations
n1=n_a/(math.sqrt(2*dl)) # core refractive index
n2=n1-(dl*n1)# cladding refractive index
# Results
print ('%s %.2f' %(" core refractive index = ",n1))
print ('%s %.2f' %("\n cladding refractive index = ",n2))
import math
# Variable declaration
n2=1.59 # cladding refractive index
n_a=0.2 # numerical aperture
n_1=1.60 # core refractive index
n_o=1.33
# Calculations
n1=math.sqrt(math.pow(n2,2)+math.pow(n_a,2)) # core refractive index
A=(math.sqrt(math.pow(n_1,2)-math.pow(n2,2)))/n_o
x_a=(math.asin(A))*180/math.pi # acceptance angle in degree
x_c=(math.asin(n2/n1))*180/math.pi #critical angle in degree
y=1300*math.pow(10,(-9)) # in meter
a=25*math.pow(10,(-6)) # in meter
v=(2*math.pi*a*n_a)/y
V=math.floor(v)
M=math.pow(V,2)/2 # number of modes transmitted
# Results
print ('%s %.2f %s' %(" acceptance angle in degree = ",x_a,"degree"))
print ('%s %.2f %s' %("\n critical angle in degree = ",x_c,"degree"))
print ('%s %d' %("\n number of modes transmitted = ",M))
import math
# Variable declaration
n1=1.50 # core refractive index
n2=1.47 # cladding refractive index
# Calculations
dl=(n1-n2)/n1
n_a=n1*(math.sqrt(2*dl)) # numerical aperture
x_e=(math.asin(n_a))*180/math.pi # the maximum entrance angle in degree
# Results
print ('%s %.1f' %(" Numerical aperture = ",n_a))
print ('%s %.2f %s' %("\n The maximum entrance angle in degree = ",x_e,"degree"))
import math
# Variable declaration
n1=1.44 # core refractive index
dl=0.02
# Calculations
n_a=n1*math.sqrt(2*dl)
n_a=n1*(math.sqrt(2*dl)) # numerical aperture
x_a=(math.asin(n_a))*180/math.pi # acceptance angle in degree
# Results
print " Numerical aperture = ",n_a
print ('%s %.2f %s'%("\n acceptance angle in degree = ",x_a,"degree"))
import math
# Variable declaration
n1=1.50 # core refractive index
n2=(99.0/100.0)*1.50 # cladding refractive index
# Calculations
x_c=math.asin(n2/n1)*(180/math.pi) # critical angle in degree
n_m=math.sqrt(math.pow(n1,2)-math.pow(n2,2)) # numerical aperture
# Results
print ('%s %.2f %s' %(" critical angle = ",x_c,"degree"))
print ('%s %.2f' %("\n numerical aperture = ",n_m))
import math
# Variable declaration
n1=1.50 # core refractive index
n2=1.45 # cladding refractive index
# Calculations
n_m=math.sqrt(math.pow(n1,2)-math.pow(n2,2)) # numerical aperture
dl=(n1-n2)/n1 # fractional difference
# Results
print ('%s %.2f' %(" numerical aperture = ",n_m))
print ('%s %.2f' %("\n fractional difference = ",dl))
import math
# Variable declaration
n1=1.46 # core refractive index
n2=1.45 # cladding refractive index
# Calculations
x_c=(math.asin(n2/n1))*180/math.pi # critical angle in degree
n_m=math.sqrt(math.pow(n1,2)-math.pow(n2,2)) # numerical aperture
x_a=(math.asin(n_m))*180/math.pi # acceptance angle in degree
# Results
print ('%s %.2f %s' %(" critical angle = ",x_c,"degree"))
print ('%s %.2f %s' %("\n acceptance angle = ",x_a,"degree"))
print ('%s %.2f' %("\n numerical aperture = ",n_m))
import math
# Variable declaration
n_m=0.204 #numerical aperture
dl=0.01 # index difference
# Calculations
n1=n_m/(math.sqrt(2*dl)) # core refractive index
n2=n1*(1-dl) # cladding refractive index
# Results
print ('%s %.2f' %(" core refractive index = ",n1))
print ('%s %.2f' %("\n cladding refractive index = ",n2))
import math
# Variable declaration
n1=1.46 #core refractive index
dl=0.01 # index difference
# Calculations
n_2=n1-(n1*dl) # cladding refractive index
x_c=(math.asin(n_2/n1))*180/math.pi #critical angle in degree
n_m=math.sqrt(math.pow(n1,2)-math.pow(n_2,2)) # numerical aperture
# Results
print ('%s %.2f %s' %(" critical angle = ",x_c,"degree"))
print ('%s %.2f' %("\n numerical aperture = ",n_m))
import math
# Variable declaration
n1=1.50 # core refractive index
n2=1.45 # cladding refractive index
# Calculations
x_c=(math.asin(n2/n1))*180/math.pi # critical angle in degree
n_m=math.sqrt(math.pow(n1,2)-math.pow(n2,2)) # numerical aperture
x_a=(math.asin(n_m))*180/math.pi # acceptance angle in degree
n_c=math.pow((n_m),2)*100 # percentage of light
# Results
print ('%s %.2f %s' %(" critical angle= ",x_c,"degree"))
print ('%s %.2f %s' %("\n acceptance angle= ",x_a,"degree"))
print ('%s %.2f' %("\n numerical aperture= ",n_m))
print ('%s %.2f %s'%("\n percentage of light= ",n_c,"%"))
import math
# Variable declaration
n1=1.50 # core refractive index
dl=0.01 # index difference
# Calculations
n_m=n1*(math.sqrt(2*dl)) # numerical aperture
x_a=math.pi*math.pow((n_m),2) # acceptance angle in radian
n2_1=(1-dl) # the ratio of n2 to n1
x_c=(math.asin(n2_1))*180/math.pi # critical angle in degree
# Results
print ('%s %.2f'%(" numerical aperture= ",n_m))
print ('%s %.2f %s' %("\n acceptance angle= ",x_a,"radian"))
print ('%s %.2f %s'%("\n critical angle= ",x_c,"degree"))