# find increamental phase
import math
#variable declaration
n1=1.48 #refractive index of fibre
mu=0.2 #poisson's ratio
p=2.2*10**2 #pressure applied
lam=690.0*10**-9 #laser beam wavelength
Y=2.2*10**11 #young's modulus
#Calcaulation
delphi=((4*math.pi*n1*mu*p)/(lam*Y))
#Result
print("increamental phase:")
print("delphi = %.6f rad"%delphi)
#Answer is slightly different
# find additional length travelled
import math
#Variable declartion
r= 9 #radius of fibre loop
a=math.pi*((r/2)**2) #area of fibre loop
Q=1.0 #linear velocity(cm/s)
Co=3*10**8 #velocity of light(cm/s)
#Calculations
delL=((4*a*Q)/(Co)) #additional length travelled
#Results
print("additional length travelled:")
print("delL = %.1f * 10^-8 cm"%(delL*10**8))
#Answer is not matching with book
# find interacting length
import math
#Variable declaration
#(Po1/Po2)=1/2 and Po1+Po2=3Po2=Pi
Po2byPi=1.0/3.0 #(Po2/Pi)
#Calculations
kL=math.acos(math.sqrt(Po2byPi)) #k->coupling coefficient
L=kL #L=kL/k L->interacting length
#Result
print("interacting length:")
print("L = %.4f/k"%L)
# answer is slightly different than book
# wavelength suitable for laser light
import math
#Variable declaration
We=7.6*10**-5 #speed od gyro
L=490.0 #length
c=3*10**8 #speed of light
delphi=7.69*10**-5 #phase shift
d=0.094
#Calculations
lam=((2*math.pi*L*d*We)/(c*delphi)) #wavelength of laser light
#Result
print("wavelength of laser light:")
print("lam = %.f *10^-9 m"%(lam*10**9))
#Answer isslightly different than book
# find rate of change of RI wrt T
import math
#Variable declaration
#(delphi/delT)=(2pi/lam)(n*(delL/delT)+L*(deln/delT))=(deln/delT)
lam=635.0*10**-9 #wavelength of light beam
delphi=139.0 #phase angle
delL=0.49*10**-6 #change in length
n=1.48 #R.I of fibre
#Calculations
k=((lam*delphi)/(2*math.pi))-(delL*n) #//k=(deln/delT), rate of change of R.I w.r.t T
#Result
print("rate of change of R.I w.r.t T:")
print("k = %.2f * 10^-6/°C"%(k*10**6))
# Answer is nnot matching to book