Chapter 16:Simple Harmonic Motion And Mechanical Vibrations

Example 16.1,Page No.615

In [1]:
import math
from math import sin, cos, radians, pi
import numpy as np


#Declaration Of Variables

t=0.3 #s #Time
r=0.8 #m #Amplitude
T=1.6 #s #Period of oscillations

#Calculations

#frequency
f=2*pi*T**-1 #rad/s

#Velocity
v=round(f,3)*r*sin(round(f,3)*t) #m/s

#Accleration
a=f**2*r*cos(f*t) #m/s**2

#Value for acceleration in textbook is incorrect

#Result
print"Velocity is",round(v,2),"m/s"
print"Acceleration is",round(a,2),"m/s**2"
Velocity is 2.9 m/s
Acceleration is 4.72 m/s**2

Example 16.2,Page No.615

In [1]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

r=1 #m #Amplitude
T=2 #s #Period of oscillations

#Calculations

#Time taken by body from mid pos
t=T*5**-1 #s

#Time taken by body from extreme position to mid position
t2=T*4**-1 #s

#time taken by body fom extreme position
t3=t2-t #s

#Angular velocity
f=2*pi*T**-1 #rad/s

#Velocity
v=-f*r*sin(f*t3) #m/s

#Value of velocity in book is incorrect in textbook i.e 0.09831

#Acceleration
a=-f**2*r*cos(pi*t3) #m/s**2

#Result
print"Velocity is",round(v,2),"m/s"
print"Acceleration is",round(a,2),"m/s**2"
Velocity is -0.97 m/s
Acceleration is -9.39 m/s**2

Example 16.3,Page No.616

In [2]:
import math
from math import sin, cos, radians, pi
import numpy as np


#Declaration Of Variables

t=0.4 #s #Time
r=1 #m #Amplitude
T=2 #s #Period of oscillations

#Calculations

#frequency
f=2*pi*T**-1 #rad/s

#Velocity
v=round(f,3)*r*sin(round(f,3)*t) #m/s

#Accleration
a=f**2*r*cos(f*t) #m/s**2

#Value for acceleration in textbook is incorrect

#Result
print"Velocity is",round(v,2),"m/s"
print"Acceleration is",round(a,2),"m/s**2"
Velocity is 2.99 m/s
Acceleration is 3.05 m/s**2

Example 16.4,Page No.617

In [9]:
import math

#Declaration Of Variables

N=100 #r.p.m #Speed of crank

#Calculations

#Angular velocity
f=2*pi*N*60**-1 #rad/s 

#Stroke of piston
n=1.8 #cm

#Ampiltude
r=n*2**-1 #m

#Displacement of piston from centre
x=0.6 #m


#Let f*t=y
#Displacement
y=arccos(x*r**-1)*(180*pi**-1)

#Velocity of piston
v=-f*r*sin(y*180**-1*pi)

#Acceleration of piston
a=-f**2*r*cos(y*180**-1*pi) #m/s**2

#Result
print"Velocity is",round(v,2),"m/s"
print"Acceleration is",round(a,2),"m/s**2"
Velocity is -7.02 m/s
Acceleration is -65.8 m/s**2

Example 16.5,Page No.617

In [3]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

#Velocities of Body
v1=8 #m/s
v2=3 #m/s

#Distance of Body
x1=1.5 #m #When v1=8 #m/s
x2=2.5 #m #When v2=3 #m/s

#Calculations

#For 1st velocity
#v1=-f*((r**2-x1**2))**2
#After Substituting values and further simplifying we get
#8=-f*((r**2-1.5**2))**2   ..........................................1

#For 2nd velocity
#v2=-f*((r**2-x2**2))**2
#After Substituting values and further simplifying we get
#3=-f*((r**2-2.5**2))**2   ..........................................2

#Dividing equations 1 and 2 and further simplifying we get
#Amplitude
r=(42.19*6.111**-1)**0.5 #m 

#Sub value of r in equation 2 we get
f=v2*(((r**2-x2**2))**0.5)**-1 #rad/s

#Period
T=2*pi*f**-1 #s

#Result
print"Amplitude of Body is",round(r,2),"m"
print"Period of Body is",round(T,2),"s"
Amplitude of Body is 2.63 m
Period of Body is 1.69 s

Example 16.6,Page No.618

In [4]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

#Velocities of Body
v1=12 #m/s
v2=3 #m/s

#Distance of Body
x1=0.05 #m #When v1=8 #m/s
x2=0.1 #m #When v2=3 #m/s
x=0.075 #m

#Calculations

#For 1st velocity
#v1=-f*((r**2-x1**2))**2
#After Substituting values and further simplifying we get
#12=-f*((r**2-0.05**2))**2   ..........................................1

#For 2nd velocity
#v2=-f*((r**2-x2**2))**2
#After Substituting values and further simplifying we get
#3=-f*((r**2-0.1**2))**2   ..........................................2

#Dividing equations 1 and 2 and further simplifying we get
#Amplitude
r=(0.1575*15**-1)**0.5 #m 

#Sub value of r in equation 2 we get
f=v2*(((r**2-x2**2))**0.5)**-1 #rad/s

#Frequency
n=f*(2*pi)**-1 #cycles/s

#Acceleration
a=f**2*x

#Result
print"Frequency of motion is",round(f,2),"rad/s"
print"Amplitude of motion is",round(r,4),"m"
print"Acceleration when the displacement is 75 mm is",round(a,2),"m/s**2"
Frequency of motion is 134.16 rad/s
Amplitude of motion is 0.1025 m
Acceleration when the displacement is 75 mm is 1350.0 m/s**2

Example 16.7,Page No.619

In [5]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

r=4.5 #m #amplitude
T=3.5 #s #Period
x1=3.5 #m #Distance of 1st point from centre
x2=1.5 #m #Distsnce of 2nd point from centre

#Calculations

#Angular velocity
f=2*pi*T**-1 #rad/s

#For 1st point
#x1=r*cos(f*t1)
#After substituting and  further simplifying 
t1=0.6796*1.795**-1

#For second point
#x2=r*cos(f*t2)
#After substituting and  further simplifying 
t2=1.231*1.795**-1

#Time required by body in passing between two points
t=t2-t1 #s

#Result
print"Time required by body in passing between two points is",round(t,2),"s"
Time required by body in passing between two points is 0.31 s

Example 16.8,Page No.620

In [6]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

#Velocities of Body
v1=6 #m/s
v2=3 #m/s

#Distance of Body
x1=0.125 #m #When v1=6 #m/s
x2=0.200 #m #When v2=3 #m/s

W=0.2 #kg #Weight of cross head
g=9.81 #Acceleration due to gravity


#Calculations

#For 1st velocity
#v1=-f*((r**2-x1**2))**2
#After Substituting values and further simplifying we get
#6=-f*((r**2-0.125**2))**2   ..........................................1

#For 2nd velocity
#v2=-f*((r**2-x2**2))**2
#After Substituting values and further simplifying we get
#3=-f*((r**2-0.200**2))**2   ..........................................2

#Dividing equations 1 and 2 and further simplifying we get
#Amplitude
r=(0.1444*3**-1)**0.5 #m 

#Sub value of r in equation 2 we get
f=v2*(((round(r,4)**2-x2**2))**0.5)**-1 #rad/s

#Period
T=2*pi*f**-1 #s

#Max Velocity
V_max=f*r #m/s

#mass of cross head
m=W*g**-1 #N

#Max acceleration
a_max=round(f,2)**2*round(r,4) #m/s**2

#Max Force
F_max=m*a_max

#Result
print"Amplitude of vibration is",round(r,2),"m"
print"Max Velocity is",round(V_max,2),"m/s"
print"period of Vibration is",round(T,2),"s"
print"MAx Force in direction of motion",round(F_max,2),"Kg*f"
Amplitude of vibration is 0.22 m
Max Velocity is 7.3 m/s
period of Vibration is 0.19 s
MAx Force in direction of motion 4.95 Kg*f

Example 16.9,Page No.621

In [7]:
import math
from math import sin, cos, radians, pi
import numpy as np


#Declaration Of Variables

#Distance of Body
x1=0.07 #m #When v1=0.6*V_max #m/s
x2=0.05 #m #When v2 #m/s
T=7.5 #s #Time to perform oscillation

#Calculations

#Equation of velocity
#v=-f*((r**2-x**2)**0.5)  ..................1

#Velocity
#v=0.6*V_max   ........2
#x=x1    ................3

#Frequency
f=2*pi*T**-1 #rad/s

#MAx Velocity
#V_max=-f*r       ............4

#Sub all values in equation 1 and further simplifying we get
r=(0.0049*0.64**-1)**0.5

#Velocity 
v=f*((r**2-x2**2)**0.5)

#Max Acceleration
a_max=f**2*r

#Result
print"Amplitude of motion is",round(r,4),"m"
print"Velocity of particle is",round(v,2),"m/s"
print"MAx Acceleration is",round(a_max,4),"m/s**2"
Amplitude of motion is 0.0875 m
Velocity of particle is 0.06 m/s
MAx Acceleration is 0.0614 m/s**2

Example 16.10,Page No.625

In [8]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

W=50 #N #Weight attached
n=4 #No. of oscillation
T=0.25 #s #Period of oscillation

#Calculations

#Static Extension
P=(T*(2*pi)**-1)**2*9.81*100 #cm

#Stiffness of spring
k=W*round(P,2)**-1 #N/cm

#Result
print"Stiffness of spring is",round(k,2),"N/cm"
Stiffness of spring is 32.26 N/cm

Example 16.11,Page No.625

In [16]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

C=150 #N/m #Stiffness
T=1.5 #s #PEriod time

#Calculations

#Static Extension
P=(T*(2*pi)**-1)**2*9.81

#Weight Attached
W=C*P #N

#Result
print"Weight attached to spring",round(W,2),"N"
Weight attached to spring 83.87 N

Example 16.12,Page No.626

In [17]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

#Frequency
n1=12 #cycles/s #when Weight W1=W
n2=10 #cycles/s #when Weight W2=(W+20)
g=9.81 #m/s**2 #Acceleration due to gravity

#Calculations

#frequency equation
#f=1*(2*pi)**-1*((k*g)*W**-1)**0.5

#For First case f=12 
#12=1*(2*pi)**-1*((k*g)*W**-1)**0.5   ...............1

#For Second case f=10
#10=1*(2*pi)**-1*((k*g)*W**-1)**0.5    .............2

#Dividing equation 1 by 2 we get
#12*10**-1=((W+20)*W**-1)**0.5 

#Squaring above equation and further simplifying we get 
W=2000*44**-1

#Sub value of W in equation 1 we get
k=(n1*2*pi)**2*W*g**-1*10**-3 #KN/m

#Result
print"Weight of spring is",round(W,2),"N"
print"Stiffness of the spring is",round(k,2),"KN/m"
Weight of spring is 45.45 N
Stiffness of the spring is 26.34 KN/m

Example 16.15,Page No.629

In [18]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

M=50 #kg #Mass of block
g=9.81 #Acceleration due to gravity
C1=4000 #N/m #Stiffness of 1st spring
C2=6000 #N/m #Stiffness  of 2nd spring
r=0.04 #m #MAx amplitude

#Calculations

#Static Extension of 1st spring
x1=M*g*C1**-1 #m


#Static Extension of 2nd spring
x2=M*g*C2**-1 #m

#Total Extension 
x=x1+x2 #m

#Period of vibration 
T=2*pi*(x*g**-1)**0.5 #s

#Angular velocity
f=2*pi*T**-1 #rad/s

#MAx velocity
V_max=f*r #m/s

#Max Acceleration
A_max=f**2*r #m/s**2

#2nd case

#Let
#W1=Weight supported by first spring
#W2=Weight suppoerted by second spring

#W=W1+W2 #Total Weight ......................1

#Extension of first spring
#X1=W1*C1**-1  ...........................2

#Extension of second spring
#X2=W2*C2**-1    .........................3

#As Extension of 1st spring is equal to 2nd spring
#W1*C1**-1=W2*C2**-1 

#sub value in equation 1 and further simplifying we get
W2=50*g*3*5**-1 #N

#Static extension of block
X3=W2*C2**-1 #m

#Period of vibration 
T2=2*pi*(X3*g**-1)**0.5 #s

#Angular velocity
f2=2*pi*T2**-1 #rad/s

#MAx velocity
V_max2=f2*r #m/s

#Acceleration
A_max2=f2**2*r #m/s**2


#result
print"Period of vibrations",round(T,4),"s"
print"MAx velocity",round(V_max,2),"m/s"
print"Max Acceleration" ,round(A_max,2),"m/s**2"

#When Block is suppoetred with spring
print"Period of vibrations",round(T2,2),"s"
print"MAx velocity",round(V_max2,2),"m/s"
print"Max Acceleration" ,round(A_max2,2),"m/s**2"
Period of vibrations 0.9069 s
MAx velocity 0.28 m/s
Max Acceleration 1.92 m/s**2
Period of vibrations 0.44 s
MAx velocity 0.57 m/s
Max Acceleration 8.0 m/s**2

Example 16.16,Page No.631

In [19]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

x=0.3 #mm #Extension of spring
W1=20 #N #Weight 
W2=700 #N #Weight supported
e=1.05 #cm #Static Extension
r=0.90 #cm #Amplitude
g=980 #m/s**2 #Acceleration due to gravity
x3=0.4 #cm #Displacement of weight from equilibrium position

#Calculations

#Stiffness of spring
C=W1*x**-1 #N/mm

#Extension of spring
x2=W2*C**-1 #cm

#Period of vibration
T=2*pi*((e*g**-1)**0.5) #s

#Frequency
n=1*T**-1 #vib/s

#Angular velocioty
f=(g*e**-1)**0.5 #rad/s

#Velocity
v=-f*((r**2-x3**2)**0.5)

#Result
print"Frequency of vibration is",round(n,2),"vib/s"
print"Period of vibration is",round(T,2),"s"
print"Velocity of weight is",round(v,2),"m/s"
Frequency of vibration is 4.86 vib/s
Period of vibration is 0.21 s
Velocity of weight is -24.63 m/s

Example 16.17,Page No.632

In [20]:
import math
from math import sin, cos, radians, pi
import numpy as np


#Declaration Of Variables

W_o=24 #tf #Weight of empty wagon
W1=32 #tf #Weight of goods
W=W_o+W1 #Total Weight
e1=8 #cm #Total Compression of spring
g=981 #Acceleration due to gravity
r=10 #cm #Amplitude
x=4 #cm #displacement

#Calculations

#Stiffness of spring
c=W*e1**-1 #tf/cm

#Compression of spring due to weight of wagon
e_o=W_o*c**-1 #cm

#When Wagon is empty 
T_o=2*pi*((e_o*g**-1)**0.5)

#When Wagon is Loaded 
T1=2*pi*((e1*g**-1)**0.5)

#Angular velocity
f=2*pi*T_o**-1 #rad/s

#Velocity 
v=f*((r**2-x**2)**0.5)*10**-2

#Result
print"Natural period of Vibrations is:When wagon is empty",round(T_o,2),"s"
print"                               :When wagon is loaded",round(T1,2),"s"
print"Velocity when displacement is",round(v,2),"m/s"
Natural period of Vibrations is:When wagon is empty 0.37 s
                               :When wagon is loaded 0.57 s
Velocity when displacement is 1.55 m/s

Example 16.18,Page No.634

In [21]:
import math
from math import sin, cos, radians, pi
import numpy as np


#Declaration Of Variables

T=2 #s #time
g2=981 #Acceleration due to gravity
g=980 #Acceleration due to gravity

#Calculations

#Length of seconds pendulum with g=980
L1=(T*(2*pi)**-1)**2*g

#Length of seconds pendulum with g=981
L2=(T*(2*pi)**-1)**2*g2

#Result
print"Length of seconds pendulum with g=980 is",round(L1,2),"cm"
print"Length of seconds pendulum with g=981 is",round(L2,3),"cm"
Length of seconds pendulum with g=980 is 99.29 cm
Length of seconds pendulum with g=981 is 99.396 cm

Example 16.19,Page No.634

In [22]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

l=0.6 #m #Length of string
W=80 #g
g=9.81 

#Calculations

#Time
T=2*pi*((l*g**-1)**0.5) #s

#Result
print"Time period of pendulum is",round(T,2),"s"
Time period of pendulum is 1.55 s

Example 16.20,Page No.635

In [13]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

l=99.93 #cm #LEngth of pendulum
dn=-5 #s #Number of beats clock loses
n=39.155

#Calculations

#Number of seconds in days 
dl=-dn*2*l*n**-1

#Result
print"Length of pendulum for correct time is",round(dl,5),"cm"
Length of pendulum for correct time is 25.52164 cm

Example 16.21,Page No.635

In [14]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

T=2 #s #Time
g=981 #cm/s**2

#Calculations

#Length of pendulum
L=(T*(2*pi)**-1)**2*g #cm

#Part-2

#Decrease in gravity
dg=g-981 #cm/s**2

#Number of beats in day
n=24*60*60

# number of beats clock will lose
dn=n*(2*g)**-1 #s

#Result
print"Length of Pendulum",round(L,2),"cm"
print"Number of beats clock will lose is",round(dn,2),"s"
Length of Pendulum 99.4 cm
Number of beats clock will lose is 44.04 s

Example 16.24,Page No.640

In [17]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

d=100 #mm #Diameter of shaft
L=1000 #mm #Length of shaft
W=5000 #N #Weight attached
C=8.16*10**4 #N/mm**2 #Modulus of rigidity
g=9.81 #m/s**2
E=2*10**5 #N/mm**2 #Modulus of  Elasticity
k=250 #mm #Radius of gyration

#Calculations

#Stress
F=W*(pi*4**-1*d**2)**-1 #N/mm**2

#static deflection
dell=F*L*E**-1*10**-3 #m

#Frequency of longitudinal vibrations
f=1*(2*pi)**-1*((g*dell**-1))**0.5

#Part-2

#Torsional stiffness
q=C*pi*32**-1*d**4*L**-1

#M.I
I=W*(g*1000)**-1*k**2

#Frequency of torsional vibrations
f2=1*(2*pi)**-1*((q*I**-1))**0.5

#Result
print"Frequencies for free longitudinal  vibrations is",round(f,2),"m"
print"Frequencies for free torsional vibrations is",round(f2,2),"cycles/s"
Frequencies for free longitudinal  vibrations is 279.4 m
Frequencies for free torsional vibrations is 25.24 cycles/s

Example 16.25,Page No.641

In [18]:
import math
from math import sin, cos, radians, pi
import numpy as np

#Declaration Of Variables

d=5 #mm #Diameter of shaft
L=1000 #mm #Length of shaft
W=20 #N #Weight of rotor
D=200 #mm #Diameter of rotor
C=0.85*10**5 #N/mm**2 #Modulus of rigidity
g=9.81*1000 #mm/s**2

#Calculations

#Radius of rotor
R=D*2**-1 #mm

#Polar Modulus 
J=pi*32**-1*d**4 #mm**4

#Torsional Stiffness
q=C*J*L**-1 #N*mm

#M.I
I=W*g**-1*R**2*2**-1 #N*mm-s**2

#Frequency of torsional vibrations
f=1*(2*pi)**-1*((q*I**-1))**0.5

#Result
print"Torsional Vibrations of the system is",round(f,2),"cycles/s"
Torsional Vibrations of the system is 3.6 cycles/s