from __future__ import division
# Young's modulus of steel
#given data :
p=7.8*10**3 # in kg/m**3
v=5200 # m/s
Y=p*v**2
print "Young modulus of steel, Y = %0.1e N/m^2 " %Y
from math import sqrt
# Velocity and wavelength
#given data :
Y=8*10**10 # in N/m**2
p=5000 # in kg/m**3
v=sqrt(Y/p)
print "(1) The velocity, v = %0.f m/s " %v
f=400 # in vibration/sec
lamda=v/f
print "(2) The wavelength = %0.f m " %lamda
# Velocity and wavelength
#given data :
Y=7*10**10 # in N/m**2
p=2.8*10**3 # in kg/m**3
v=sqrt(Y/p)
print "(1) The velocity, v = %0.e m/s " %v
f=500 # in vibration/sec
lamda=v/f
print "(2) The wavelength = %0.f m " %lamda
# Young's modulus
#given data :
l=3 # in m
n=600 # in Hz
p=8.3*10**3 # in kg/m**3
Y=p*n**2*(2*l)**2
print "Youngs modulus, Y = %0.3e N/m^2 " %Y
# Frequency
#given data :
Y=2*10**11 # in N/m**2
p=8*10**3 # in kg/m**3
l=0.25 # in m
n=sqrt(Y/p)/(2*l)
print "The frequency, n = %0.e vibrations/s " %n
# Area of cross section
#given data :
n1BYn2=20
T=20*9.8 # in N
Y=19.6*10**10 # in N/m**2
alfa=n1BYn2**2*T/Y
print "Area of cross section, alfa = %0.e m^2 " %alfa
# Velocity and Young modulus
#given data :
n=2600 # in Hz
l=1 # in m
p=7.8*10**3 # kg/m**3
v=2*n*l
print "The velocity, v = %0.f m/s " % v
Y=v**2*p
print "Youngs modulus, Y = %0.2e N/m^2 " %Y
# Frequencies
#given data :
Y=7.1*10**10 # in N/m**2
p=2700 #in kg/m**3
l=1.5 # in m
r1=1
r2=3
r3=5
n1=(r1/(4*l))*sqrt(Y/p)
n2=(r2/(4*l))*sqrt(Y/p)
n3=(r3/(4*l))*sqrt(Y/p)
print "Frequency of first harmonic, n1 = %0.2f Hz " %n1
print "Frequency of second harmonic, n2 = %0.2f Hz " %n2
print "Frequency of third harmonic, n3 = %0.2f Hz " %n3
from math import pi
# Frequency
#given data :
l=1.2 # in m
v=5150 # in m/s
d=0.006 # in m
k=d/sqrt(12)
v1=pi*v*k*3.011**2/(8*l**2)
print "The frequency, v1 = %0.2f Hz " %v1
from math import pi
# Frequencies
#given data :
l=2 # in m
v=3560 # in m/s
r=0.004 # in m
k=r/2
v1=pi*v*k*3.011**2/(8*l**2)
print "The frequency, v1 = %0.2f Hz " %v1
v2=pi*v*k*5**2/(8*l**2)
print "The frequency of first overtone, v2 = %0.2f Hz" %v2
v3=pi*v*k*7**2/(8*l**2)
print "The frequency of second overtone, v3 = %0.2f Hz" %v3
# Frequency
#given data :
Y=7.1*10**10 # in N/m**2
p=2.7*10**3 # in kg/m**3
r=0.005 # in m
vu=sqrt(Y/p)
k=r/2
v=vu/(2*pi*k)
print "The frequency, v = %0.2e Hz " %v