#To calculate the depth of a submerged submarine
#Variable declaration
v = 1440; #velocity of ultrasonic waves(m/s)
t = 0.33; #time elapsed(s)
#Calculation
d = v*t; #distance travelled(m)
d1 = d/2; #depth of submarine(m)
#Result
print "depth of the submerged submarine is",d1, "m"
#To calculate the natural frequency
#importing modules
import math
#Variable declaration
l = 40; #length of iron rod(mm)
E = 115*10**9; #Young's modulus(N/m**2)
rho = 7.25*10**3; #density of pure iron(kg/m**3)
#Calculation
l = l*10**-3; #length of iron rod(m)
new = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)
new = new*10**-3; #natural frequency of the rod(kHz)
new=math.ceil(new*10**3)/10**3; #rounding off to 3 decimals
#Result
print "depth of the submerged submarine is",new, "kHz"
#To calculate the fundamental frequency
#importing modules
import math
#Variable declaration
l = 1; #length of quartz crystal(mm)
E = 7.9*10**10; #Young's modulus(N/m**2)
rho = 2650; #density(kg/m**3)
#Calculation
l = l*10**-3; #length of iron rod(m)
new = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)
new = new*10**-6;
new=math.ceil(new*10**2)/10**2; #rounding off to 2 decimals
#Result
print "fundamental frequency of crystal is",new, "*10**6 Hz"
#To calculate the velocity of waves
#importing modules
import math
#Variable declaration
d = 0.55; #distance between 2 constructive antinodes(mm)
new = 1.5; #frequency of crystal(MHz)
#Calculation
new = new*10**6; #frequency of crystal(Hz)
d = d*10**-3; #distance between 2 constructive antinodes(m)
#distance between 2 antinodes is given by lamda/2
lamda = 2*d; #wavelength of ultrasonic waves(m)
v = new*lamda; #velocity of waves(m/s)
#Result
print "velocity of waves is",int(v), "m/s"
#To calculate the natural frequency
#importing modules
import math
#Variable declaration
l = 50; #length of rod(mm)
E = 11.5*10**10; #Young's modulus(N/m**2)
rho = 7250; #density(kg/m**3)
#Calculation
l = l*10**-3; #length of iron rod(m)
new = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)
new = new*10**-3; #natural frequency of the rod(kHz)
new = math.ceil(new*10**2)/10**2; #rounding off to 2 decimals
#Result
print "natural frequency of rod is",new, "kHz"
#To calculate the frequency
#importing modules
import math
#Variable declaration
l = 2; #length of crystal(mm)
E = 7.9*10**10; #Young's modulus(N/m**2)
rho = 2650; #density(kg/m**3)
#Calculation
l = l*10**-3; #length of iron rod(m)
new = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)
new = new*10**-6; #natural frequency of the rod(MHz)
new=math.ceil(new*10**3)/10**3; #rounding off to 3 decimals
#Result
print "frequency of crystal is",new, "MHz"
#To calculate the frequency
#importing modules
import math
#Variable declaration
l = 3; #length of crystal(mm)
E = 8*10**10; #Young's modulus(N/m**2)
rho = 2500; #density(kg/m**3)
#Calculation
l = l*10**-3; #length of iron rod(m)
new = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)
new = new*10**-3; #natural frequency of the rod(kHz)
new=math.ceil(new*10**2)/10**2; #rounding off to 2 decimals
#Result
print "frequency of crystal is",new, "kHz"
#To calculate the frequency
#importing modules
import math
#Variable declaration
l = 1.5; #length of crystal(mm)
E = 7.9*10**10; #Young's modulus(N/m**2)
rho = 2650; #density(kg/m**3)
#Calculation
l = l*10**-3; #length of iron rod(m)
new = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)
new = new*10**-6; #natural frequency of the rod(MHz)
new=math.ceil(new*10**2)/10**2; #rounding off to 2 decimals
#Result
print "frequency of crystal is",new, "MHz"
#To calculate the depth of the sea
#Variable declaration
v = 1440; #velocity of ultrasonic waves(m/s)
t = 0.95; #time elapsed(s)
#Calculation
d = v*t; #distance travelled(m)
d1 = d/2; #depth of sea(m)
#Result
print "depth of the submerged submarine is",int(d1), "m"
#To calculate the depth of a submerged submarine
#Variable declaration
v = 1440; #velocity of ultrasonic waves(m/s)
t = 0.83; #time elapsed(s)
#Calculation
d = v*t; #distance travelled(m)
d1 = d/2; #depth of submarine(m)
#Result
print "depth of the submerged submarine is",d1, "m"
#To calculate the reverberation time of hall
#importing modules
import math
#Variable declaration
aS = 1050; #total absorption inside hall(Sabine)
V = 9000; #volume of cinema hall(m**3)
#Calculation
T = 0.165*V/aS; #reverberation time of hall(s)
T = math.ceil(T*10**4)/10**4; #rounding off to 4 decimals
#Result
print "reverberation time of the hall is",T, "s"
#To calculate the area of interior surface
#importing modules
import math
#Variable declaration
a = 0.65; #average absorption coefficient(Sabine/m**2)
V = 13500; #volume of auditorium(m**3)
T = 1.2; #reverberation time of hall(s)
#Calculation
S = 0.165*V/(a*T); #reverberation time of hall(s)
S = math.ceil(S*10)/10; #rounding off to 1 decimal
#Result
print "total area of interior surface is",S, "m**2"
#To calculate the new reverberation time of hall
#importing modules
import math
#Variable declaration
V = 15000; #volume of cinema hall(m**3)
T1 = 1.3; #initial reverberation time of hall(s)
a1S1 = 300; #number of chairs placed
#Calculation
aS = 0.165*V/T1; #total absorption of hall
T2 = (0.165*V)/(aS+a1S1); #reverberation time of hall after adding chairs(s)
T2 = math.ceil(T2*10**4)/10**4; #rounding off to 4 decimals
#Result
print "reverberation time of the hall after adding chairs is",T2, "s"
#To calculate the depth of a submerged submarine
#Variable declaration
v = 1440; #velocity of ultrasonic waves(m/s)
t = 0.5; #time elapsed(s)
#Calculation
d = v*t; #distance travelled(m)
d1 = d/2; #depth of submarine(m)
#Result
print "depth of the submerged submarine is",int(d1), "m"
#To calculate the velocity of waves
#importing modules
import math
#Variable declaration
d = 0.4; #distance between 2 constructive antinodes(mm)
new = 1.5; #frequency of crystal(MHz)
#Calculation
new = new*10**6; #frequency of crystal(Hz)
d = d*10**-3; #distance between 2 constructive antinodes(m)
#distance between 2 antinodes is given by lamda/2
lamda = 2*d; #wavelength of ultrasonic waves(m)
v = new*lamda; #velocity of waves(m/s)
#Result
print "velocity of waves is",int(v), "m/s"
#To calculate the natural frequency
#importing modules
import math
#Variable declaration
l = 40; #length of iron rod(mm)
E = 11.5*10**10; #Young's modulus(N/m**2)
rho = 7250; #density of pure iron(kg/m**3)
#Calculation
l = l*10**-3; #length of iron rod(m)
new = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)
new = new*10**-3; #natural frequency of the rod(kHz)
new=math.ceil(new*10**3)/10**3; #rounding off to 3 decimals
#Result
print "depth of the submerged submarine is",new, "kHz"