#importing modules
import math
from __future__ import division
#Variable declaration
n2=1.47; #refractive index of cladding
n1=1.5; #refractive index of core
#Calculation
phi_c=math.asin(n2/n1); #critical angle(radian)
phi_c=phi_c*180/math.pi; #critical angle(degrees)
NA=math.sqrt(n1**2-n2**2); #numerical aperture
phi_max=math.asin(NA); #acceptance angle(radian)
phi_max=phi_max*180/math.pi; #acceptance angle(degrees)
#Result
print "critical angle is",round(phi_c,1),"degrees"
print "numerical aperture is",round(NA,1)
print "acceptance angle is",round(phi_max,1),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
d=50*10**-6; #diameter(m)
NA=0.2; #numerical aperture(m)
lamda=1*10**-6; #wavelength(m)
#Calculation
N=4.9*(d*NA/lamda)**2; #total number of guided modes
Nf=N/2; #number of modes propagated inside fibre
#Result
print "total number of guided modes is",int(N)
print "number of modes propagated inside fibre is",int(Nf)
#importing modules
import math
from __future__ import division
#Variable declaration
d=5*10**-6; #diameter(m)
n2=1.447; #refractive index of cladding
n1=1.45; #refractive index of core
lamda=1*10**-6; #wavelength(m)
#Calculation
NA=math.sqrt(n1**2-n2**2); #numerical aperture
N=4.9*(d*NA/lamda)**2; #total number of guided modes
#Result
print "total number of guided modes is",int(N)
print "it is a single mode propagation"
#importing modules
import math
from __future__ import division
#Variable declaration
n1=1.46; #refractive index of core
delta=0.05; #refractive index difference
#Calculation
NA=n1*math.sqrt(2*delta); #numerical aperture
#Result
print "numerical aperture is",round(NA,2)
#importing modules
import math
from __future__ import division
#Variable declaration
a=50;
n2=1.5; #refractive index of cladding
n1=1.53; #refractive index of core
lamda0=1; #wavelength(micro m)
#Calculation
V_number=round(2*math.pi*a*math.sqrt(n1**2-n2**2)/lamda0,2); #V number
n=V_number**2/2; #maximum number of modes
#Result
print "V number is",V_number
print "maximum number of modes is",int(round(n))
#importing modules
import math
from __future__ import division
#Variable declaration
a=100*10**-6;
NA=0.3; #numerical aperture(m)
lamda=850*10**-9; #wavelength(m)
#Calculation
V_number=round(2*math.pi**2*a**2*NA**2/lamda**2); #number of modes
#Result
print "total number of modes is",int(2*V_number)
#importing modules
import math
from __future__ import division
#Variable declaration
a=25*10**-6;
n1=1.48; #refractive index of core
delta=0.01; #refractive index difference
V=25; #Vnumber
#Calculation
lamda=2*math.pi*a*n1*math.sqrt(2*delta)/V; #cutoff wavelength(m)
#Result
print "cutoff wavelength is",round(lamda*10**6,3),"micro m"
#importing modules
import math
from __future__ import division
#Variable declaration
V=2.405; #Vnumber
lamda=1.3; #wavelength(micro m)
NA=0.05; #numerical aperture(m)
#Calculation
amax=V*lamda/(2*math.pi*NA); #maximum value of core radius(micro m)
#Result
print "maximum value of core radius is",round(amax,2),"micro m"
#importing modules
import math
from __future__ import division
#Variable declaration
NA=0.3; #numerical aperture(m)
gama=45*math.pi/180; #angle(radian)
#Calculation
thetaa=math.asin(NA); #acceptance angle for meridional rays(radian)
thetaa=thetaa*180/math.pi; #acceptance angle for meridional rays(degrees)
thetaas=math.asin(NA/math.cos(gama)); #acceptance angle for skew rays(radian)
thetaas=thetaas*180/math.pi; #acceptance angle for skew rays(degrees)
#Result
print "acceptance angle for meridional rays is",round(thetaa,2),"degrees"
print "acceptance angle for skew rays is",round(thetaas,3),"degrees"
print "answer for acceptance angle for skew rays given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
delta=0.0196; #relative refractive index difference
n1=1.53; #refractive index of core
#Calculation
NA=n1*math.sqrt(2*delta); #numerical aperture
theta=math.asin(NA); #acceptance angle(radian)
theta=theta*180/math.pi; #acceptance angle(degrees)
#Result
print "numerical aperture is",round(NA,3)
print "acceptance angle is",round(theta,3),"degrees"
print "answer for angle given in the book varies due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
n2=1.465; #refractive index of cladding
n1=1.480; #refractive index of core
lamda=850*10**-9; #wavelength(m)
#Calculation
delta=(n1**2-n2**2)/(2*n1**2); #relative refractive index difference
a=2.405*lamda*10**6/(2*math.pi*n1*math.sqrt(2*delta)); #core radius(micro m)
#Result
print "core radius is",round(a,3),"micro m"
print "answer given in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
n2=1.49; #refractive index of cladding
n1=1.5; #refractive index of core
a=25; #core radius(micro m)
#Calculation
phic=math.asin(n2/n1); #angle(degrees)
l=2*a*math.tan(phic); #fibre length covered in 1 reflection(micro m)
n=10**6/l; #total number of reflections per metre
d=1/math.sin(phic); #total distance travelled by light(m)
#Result
print "total number of reflections per metre is",int(n)
print "total distance travelled by light is",round(d,4),"m"
#importing modules
import math
from __future__ import division
#Variable declaration
alpha=1.85; #index profile
a=25; #core radius(micro m)
NA=0.21; #numerical aperture
lamda=1.3; #wavelength(micro m)
#Calculation
n=(alpha*2*math.pi**2*a**2*NA**2)/(lamda**2*(alpha+2)); #number of modes
N=2*n; #total number of modes
#Result
print "total number of modes is",int(N)
#importing modules
import math
from __future__ import division
#Variable declaration
L=10; #transmission distance(km)
Pi=100; #optical power(micro W)
Po=2; #optical power output(micro W)
#Calculation
sa=round(10*math.log10(Pi/Po)/L,1); #signal attenuation per unit length(dB km-1)
osa=sa*L; #overall signal attenuation(dB)
#Result
print "signal attenuation per unit length is",sa,"dB km-1"
print "overall signal attenuation is",int(osa),"dB"
#importing modules
import math
from __future__ import division
#Variable declaration
L=10; #transmission distance(km)
n1=1.55; #refractive index of core
delta=0.026; #relative refractive index difference
C=3*10**5;
#Calculation
deltaT=L*n1*delta/C; #dispersion(s)
blp=L/deltaT; #bandwidth length product(Hz-km)
#Result
print "dispersion is",round(deltaT*10**9,1),"ns"
print "bandwidth length product is",round(blp/10**6,2),"*10**6 Hz-km"
print "answer for bandwidth given in the book is wrong"