# 7: Vibrations-Fundamental Concepts¶

## Example number 1, Page number 271¶

In [21]:
#importing modules
import math
from __future__ import division

#Variable declaration
a=-0.0176;       #acceleration(m/s**2)
x=0.44;        #displacement(m)
m=0.5;     #mass(kg)

#Calculation
omega0=math.sqrt(-a/x);       #frequency
k=m*omega0**2;      #force constant(N/m)

#Result
print "force constant is",k,"N/m"

force constant is 0.02 N/m


## Example number 2, Page number 271¶

In [26]:
#importing modules
import math
from __future__ import division

#Variable declaration
g=9.8;       #acceleration(m/s**2)
x=0.5;        #displacement(m)
m1=5;     #mass(kg)
m2=2;     #mass(kg)

#Calculation
k=m1*g/x;      #spring constant(N/m)
omega=math.sqrt(k/m2)/(2*math.pi);       #frequency of oscillation(Hertz)

#Result
print "frequency of oscillation is",round(omega,3),"Hertz"

frequency of oscillation is 1.114 Hertz


## Example number 4, Page number 272¶

In [19]:
#importing modules
import math
from __future__ import division

#Variable declaration
#given y=0.3sin(t+pi/6)
A=0.3;     #value of amplitude by comparing with the given equation
t1=math.pi/3;        #time(sec)
t2=2*math.pi/3;      #time(sec)
t3=math.pi;          #time(sec)

#Calculation
new=omega/(2*math.pi);       #frequency of oscillation(Hertz)
y=A*math.sin(theta+(math.pi/6));      #displacement(m)
V=omega*A*math.cos((omega*t2)+theta);      #velocity(m/sec)
a=-A*omega**2*math.sin((omega*t3)+theta);      #acceleration(m/s**2)

#Result
print "amplitude is",A,"m"
print "frequency of oscillation is",new*2*math.pi,"/(2 math.pi) Hertz"

amplitude is 0.3 m