#importing modules
import math
from __future__ import division
#Variable declaration
n1=1.5; #core refractive index
n2=1.48; #cladding refractive index
n=1;
#Calculations
NA=math.sqrt(n1**2-n2**2); #numerical aperture
i0=math.asin(NA/n); #maximum entrance angle(radian)
i0=i0*180/math.pi; #maximum entrance angle(degrees)
#Result
print "numerical aperture is",round(NA,5)
print "maximum entrance angle is",round(i0,2),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
n0=1.33; #water refractive index
n2=1.59; #cladding refractive index
NA=0.2; #numerical aperture
#Calculations
n1=math.sqrt(NA**2+n2**2); #core refractive index
NA=math.sqrt(n1**2-n2**2)/n0; #numerical aperture
i0=math.asin(NA); #acceptance angle(radian)
i0=i0*180/math.pi; #acceptance angle(degrees)
#Result
print "core refractive index is",round(n1,4)
print "acceptance angle is",round(i0,1),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
n1=1.36; #core refractive index
delta=0.025; #relative difference
#Calculations
NA=n1*math.sqrt(2*delta); #numerical aperture
i0=math.asin(NA); #acceptance angle(radian)
i0=i0*180/math.pi; #acceptance angle(degrees)
#Result
print "numerical aperture is",round(NA,3)
print "acceptance angle is",round(i0,1),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
n1=1.5; #core refractive index
n2=1.45; #cladding refractive index
#Calculations
delta=(n1-n2)/n1; #relative difference
NA=n1*math.sqrt(2*delta); #numerical aperture
i0=math.asin(NA); #acceptance angle(radian)
i0=i0*180/math.pi; #acceptance angle(degrees)
theta_c=math.asin(n2/n1); #critical angle(radian)
theta_c=theta_c*180/math.pi; #critical angle(degrees)
#Result
print "numerical aperture is",round(NA,4)
print "acceptance angle is",round(i0,2),"degrees"
print "critical angle is",round(theta_c,2),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
NA=0.22; #numerical aperture
delta=0.012; #relative difference
#Calculations
N=1-delta;
n1=math.sqrt(NA**2/(1-N**2)); #core refractive index
n2=N*n1; #cladding refractive index
#Result
print "core refractive index is",round(n1,2)
print "cladding refractive index is",round(n2,3)
#importing modules
import math
from __future__ import division
#Variable declaration
NA=0.40; #numerical aperture
delta=1/100; #relative difference
#Calculations
i0=math.asin(NA); #acceptance angle(radians)
i0=i0*180/math.pi; #acceptance angle(degrees)
N=1-delta;
thetac=math.asin(N); #critical angle(radians)
thetac=thetac*180/math.pi; #critical angle(degrees)
#Result
print "acceptance angle is",round(i0,1),"degrees"
print "critical angle is",round(thetac,1),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
vf=3*10**8; #velocity of light in free space(m/s)
vc=2*10**8; #velocity of light in core(m/s)
thetac=60*math.pi/180; #critical angle(radians)
#Calculations
n1=vf/vc; #core refractive index
n2=n1*math.sin(thetac); #cladding refractive index
NA=math.sqrt(n1**2-n2**2); #numerical aperture
#Result
print "core refractive index is",n1
print "cladding refractive index is",round(n2,1)
print "numerical aperture is",NA
print "answer for numerical aperture varies due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
n1=1.55; #core refractive index
n2=1.50; #cladding refractive index
d=50*10**-6; #core diameter(micro m)
#Calculations
NA=math.sqrt(n1**2-n2**2); #numerical aperture
i0=math.asin(NA); #acceptance angle(radians)
i0=i0*180/math.pi; #acceptance angle(degrees)
thetac=math.asin(n2/n1); #critical angle(radians)
theta_c=thetac*180/math.pi; #critical angle(degrees)
x=d*math.tan(thetac);
n=1/x; #number of reflections per metre
#Result
print "numerical aperture is",round(NA,4)
print "acceptance angle is",round(i0),"degrees"
print "critical angle is",round(theta_c,1),"degrees"
print "number of reflections per metre is",int(n)
print "answer for number of reflections in the textbook is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
delta=0.03; #relative difference
i0=22*math.pi/180; #acceptance angle(radians)
#Calculations
NA=math.sin(i0); #numerical aperture
N=1-delta;
thetac=math.asin(N); #critical angle(radians)
theta_c=thetac*180/math.pi; #critical angle(degrees)
#Result
print "numerical aperture is",round(NA,3)
print "critical angle is",round(theta_c,2),"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
delta=0.0045; #relative difference
i0=0.115; #acceptance angle(radians)
v=3*10**8; #velocity of light(m/s)
#Calculations
NA=math.sin(i0); #numerical aperture
n1=NA/math.sqrt(2*delta); #core refractive index
vcore=v/n1; #velocity of light in fibre core(m/s)
#Result
print "velocity of light in fibre core is",round(vcore/10**8,3),"*10**8 m/s"
#importing modules
import math
from __future__ import division
#Variable declaration
V=2.405; #V-number
lamda=8500*10**-10; #wavelength(m)
n1=1.48; #core refractive index
n2=1.47; #cladding refractive index
#Calculations
d=V*lamda/(math.pi*math.sqrt(n1**2-n2**2)); #diameter of core(m)
#Result
print "diameter of core is",round(d*10**6,2),"*10**-6 m"
#importing modules
import math
from __future__ import division
#Variable declaration
V=2.405; #V-number
lamda=1300*10**-3; #wavelength(micro m)
n1=1.466; #core refractive index
n2=1.46; #cladding refractive index
#Calculations
r=V*lamda/(2*math.pi*math.sqrt(n1**2-n2**2)); #maximum radius for fibre(micro m)
#Result
print "maximum radius for fibre is",round(r,2),"micro m"
print "answer varies due to rounding off errors"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=1.3; #wavelength(micro m)
n1=1.5; #core refractive index
Nm=1100; #number of modes
delta=0.01; #refractive index difference
#Calculations
d=lamda*math.sqrt(Nm/delta)/(math.pi*n1); #diameter of fibre core(micro m)
#Result
print "diameter of fibre core is",round(d,1),"micro m"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=1.1*10**-6; #wavelength(m)
r=60/2*10**-6; #radius(m)
NA=0.25; #numerical aperture
#Calculations
V=2*math.pi*r*NA/lamda;
Nm=V**2/4; #number of guided modes
#Result
print "number of guided modes is",round(Nm)
#importing modules
import math
from __future__ import division
#Variable declaration
L=500/1000; #length(km)
P0byPi=25/100; #optical power
#Calculations
dB=-10*math.log10(P0byPi)/L; #fibre loss(dB/km)
#Result
print "fibre loss is",round(dB,4),"dB/km"
#importing modules
import math
from __future__ import division
#Variable declaration
L=10; #length(km)
dB=2.3; #fibre loss(dB/km)
Pi=400; #input power(micro W)
#Calculations
P0=10**(-dB*L/10)*Pi; #output power(micro W)
#Result
print "output power is",round(P0,3),"micro W"
print "answer given in the textbook is wrong"