Chapter 4 : Simple Harmonic Motion

Example 4.1 Page No : 75

In [1]:
import math 

# Variables:
N = 120. 			#rpm
r = 1.              #m
x = 0.75 			#m

#Solution:
#Calculating Angular Velocity
omega = 2*math.pi*N/60 			#rad/s
#Calculating Velocity of the Piston
v = omega*math.sqrt(r**2-x**2) 			#m/s
#Calculating Acceleration of the Piston
a = omega**2*x

#Results:
print " The Velocity of the Piston, v  =  %.2f m/s."%(v)
print " The Acceleration of the Piston, a  =  %.2f m/s**2."%(a)
 The Velocity of the Piston, v  =  8.31 m/s.
 The Acceleration of the Piston, a  =  118.44 m/s**2.

Example 4.2 Page No : 75

In [2]:
from numpy import linalg
import math 

# Variables:
x1 = .75
x2 = 2. 			#m
v1 = 11.
v2 = 3.			    #m/s

#Solution:
#We have11 = omega*math.sqrt(r**2-.75**2) and 3 = omega*math.sqrt(r**2-2**2).
#These upon solving yield r**2-(121/omega**2)-0.5625 = 0 and r**2-(9/omega**2)-4 = 0.
#Take r**2 = x and (1/omega**2) = y and the equation become x-121y = 0.5625 and x-9y = 4.
#Variables Matrix
A = [[1, -121],[ 1, -9]]
#Constants Matrix
B = [.5625, 4]
V = linalg.solve(A,B)
#Calculating Amplitude of the Particle
r = math.sqrt(V[0]) 	    		#m
#Calculating Angular Velocity of the Particle
omega = math.sqrt(1./V[1]) 			#rad/s
#Calculating Periodic Time
tp = 2*math.pi/omega 		    	#seconds
#Calculating Maximum Acceleration
amax = omega**2*r        			#m/s**2

#Results:
print " The Angular Velocity omega  =  %.1f rad/s."%(omega)
print " The Periodic Time tp  =  %.1f s."%(tp)
print " The Maximum Acceleration amax  =  %.2f m/s**2."%(amax)
 The Angular Velocity omega  =  5.7 rad/s.
 The Periodic Time tp  =  1.1 s.
 The Maximum Acceleration amax  =  67.38 m/s**2.

Example 4.3 Page No : 79

In [3]:
import math 

# Variables:
m = 60. 			#kg
r = 0.0125          #m
x = 0.005 			#m

#Solution:
#Calculating the Extension of the Spring
delta = (.25/1.5)*60*10**-3 			#m
#Calculating the Frequency of the System
n = 1./(2*math.pi)*math.sqrt(9.81/delta) 			#Hz
#Calculating the Angular Velocity of the Mass
omega = math.sqrt(9.81/delta) 			#rad/s
#Calculating the Linear Velocity of the Mass
v = omega*math.sqrt(r**2-x**2)

#Results:
print " The Frequency of Natural Vibration n  =  %.2f Hz."%(n)
print " The Velocity of the Mass v  =  %.2f m/s."%(v)
 The Frequency of Natural Vibration n  =  4.98 Hz.
 The Velocity of the Mass v  =  0.36 m/s.

Example 4.4 Page No : 82

In [5]:
import math 

# Variables:
m = 1.              #kg
m1 = 2.5 			#kg
s = 1.8*10**3 		#N/m
l = (300.+300)*10**-3			#m

#Solution:
#Calculating the Mass Moment of Inertia of the System
IA = (m*l**2/3)+(m1*l**2) 			#kg-m**2
#Calculating the Ratio of Alpha to Theta
#delta = 0.3*theta
#Restoring Force = s*delta = 540*theta
#Restoring torque about A = 540*theta*0.3 = 162*theta N-m ...(i)
#Torque about A =  IA*alpha = 1.02*alpha N-m              ...(ii)
#Equating (i) and (ii) 1.02*alpha = 162*theta 
alphabytheta = 162/1.02
#Calculating the Frequency of Oscillation
n = 1/(2*math.pi)*math.sqrt(alphabytheta)

#Results:
print " The Frequency of Oscillation n  =  %.2f Hz."%(n)
 The Frequency of Oscillation n  =  2.01 Hz.

Example 4.5 Page No : 83

In [6]:
import math 

# Variables:
m = 85. 			#kg
h = 0.1 			#m

#Solution:
#Calculating the Frequency of Oscillation
n = 100./145 			#Hz
#Calculating the Equivalent Length of Simple Pendulum
L = (1/(2*math.pi)/.69*math.sqrt(9.81))**2
#Calculating the Radius of Gyration
kG = math.sqrt((L-h)*h)
#Calculating the Moment of Inertia of the Flywheel through the Centre of Gravity
I = m*kG**2 			#kg-m**2

#Results:
print " The Moment of Inertia of the Flywheel Through its c.g. I  =  %.1f kg-m**2."%(I)
 The Moment of Inertia of the Flywheel Through its c.g. I  =  3.6 kg-m**2.

Example 4.6 Page No : 84

In [9]:
from scipy.optimize import fsolve 
import math 

# Variables:
m = 60. 			#kg
d1 = 75.
d2 = 102. 			#mm

#Solution:
#Calculating the Frequencies of Oscillation
n1 = 100./190
n2 = 100./165 			#Hz

#Calculating the Equivalent Lengths of Simple Pendulum
L1 = 9.81/(2*math.pi*n1)**2 			#m
L2 = 9.81/(2*math.pi*n2)**2 			#m

#Calculating Dismath.tance of c.g. from the Small and Big End Centres (h1 and h2)  and the Radius of Gyration
def f(x):
    h1 = x[0]
    h2 = x[1]
    kG = x[2]
    y = [0,0,0]
    y[0] = L1*h1-h1**2-kG**2
    y[1] = L2*h2-h2**2-kG**2
    y[2] = h1+h2-1
    return y

z = fsolve(f,[1,1,1])

h1 = z[0]
h2 = z[1]
kG = z[2]

#Calculating the Mass Moment of Inertia of the Rod
I = m*kG**2 			#kg-m**2

#Results:
print " The Moment of Inertia of the Rod I  =  %d kg-m**2."%(I)
print " The C.G is at a Distance of h1  =  %.3f m from the Small End Centre."%(h1)
 The Moment of Inertia of the Rod I  =  6 kg-m**2.
 The C.G is at a Distance of h1  =  0.759 m from the Small End Centre.

Example 4.7 Page No : 85

In [10]:
import math 

# Variables:
l = 1.2 			#m
theta = 3*math.pi/180 			#rad

#Solution:
#Calculating the Distance Between the Knife Edge and C.G. of the Rod
h = 1.2/2-.05 			#m
#Calculating the Radius of Gyration of the Rod About C.G.
kG = l/math.sqrt(12) 			#m
#Calculating the Time of Swing of the Rod
tp = 2*math.pi*math.sqrt((kG**2+h**2)/(9.81*h)) 			#seconds
#Calculating the Minimum Time of Swing
tpmin = 2*math.pi*math.sqrt((2*kG)/9.81) 			#seconds
#Calculating Angular Velocity
omega = 2*math.pi/tp 			#rad/s
#Calculating Maximum Angular Velocity
omegamax = omega*theta 			#rad/s
#Calculating Maximum Angular Acceleration
alphamax = omega**2*theta 			#rad/s**2

#Results:
print " The Time of Swing of the Rod tp  =  %.2f seconds."%(tp)
print " The Minimum Time of Swing tpmin  =  %.2f seconds."%(tpmin)
print " The Maximum Angular Velocity omegamax  =  %.4f rad/s."%(omegamax)
print " The Maximum Angular Acceleration (alphamax)  =  %.3f rad/s**2."%( alphamax)
 The Time of Swing of the Rod tp  =  1.76 seconds.
 The Minimum Time of Swing tpmin  =  1.67 seconds.
 The Maximum Angular Velocity omegamax  =  0.1871 rad/s.
 The Maximum Angular Acceleration (alphamax)  =  0.669 rad/s**2.

Example 4.8 Page No : 86

In [11]:
from numpy import linalg
import math 

# Variables:
m = 30. 			#kg
OG = 1.05           #m
h = OG              #m
AG = 0.15 			#m

#Solution:
#Calculating the Frequency of Oscillation
n = 20/43.5 			#Hz
#Calculating the Equivalent Length of Simple Pendulum
L = 9.81/(2*math.pi*n)**2 			#m
#Calculating the Distance of Centre of Percussion (C) from the Centre of Gravity (G)
CG = L-OG 			#m
#Calculating the Distance of Centre of Percussion (C) from the Knife Edge A
AC = AG-CG 			#m
#Calculating the Radius of Gyration of the Pendulum About O
kO = math.sqrt(L*h) 			#m
h1 = h*(1-math.cos(60*math.pi/180)) 			#m
#Calculating the Angular Velocity of the Pendulum
omega = math.sqrt(2*m*9.81*h1/(m*kO**2)) 			#rad/s
OA = OG+AG
#Calculating the Velocity of Striking
v = omega*(OA) 			#Velocity of Striking
#Calculating the Angular Velocity of the Pendulum Immediately After Impact
I = m*kO**2
LKE = 55. 			#Loss of Kinetic Energy N-m
omega1 = math.sqrt(omega**2-LKE*2/I)
#Calculating the Impulses at Knife Edge A and at Pivot O (P and Q)
CLM = m*h*(omega-omega1) 			#Change of Linear Momentum
CAM = m*(kO**2-h**2)*(omega-omega1) 			#Change of Angular Momentum
#P+Q = Change of Linear Momentum and  0.15P-1.05Q = Change of Angular Momentum.
#i.e. P+Q = CLM and 0.15P-1.05Q = CAM
#Variables Matrix
A = [[1, 1],[0.15,-1.05]]
B = [CLM, CAM]
V = linalg.solve(A,B)
P = V[0]
Q = V[1]
#Calculating the Change in Axis Reaction When the Pendulum is Vertical
CAR = m*(omega**2-omega1**2)*h 			#Change in Axis Reaction, N

#Results:
print " The Distance of Centre of Percussion, AC  =  %.3f m."%(AC)
print " The Velocity of Striking  =  %.2f m/s."%(v)
print " The Impulse at the Knife Edge P  =  %.1f N-s."%(P)
print " The Impulse at the Pivot Q  =  %.2f N-s."%(Q)
print " The Change in Axis Reaction When the Pendulum is Vertical  =  %d N."%(CAR)
 The Distance of Centre of Percussion, AC  =  0.024 m.
 The Velocity of Striking  =  3.47 m/s.
 The Impulse at the Knife Edge P  =  17.6 N-s.
 The Impulse at the Pivot Q  =  0.37 N-s.
 The Change in Axis Reaction When the Pendulum is Vertical  =  93 N.

Example 4.9 Page No : 89

In [12]:
import math 

# Variables
m = 1.5 			#kg
l = 1.25            #m
x = 120.*10**-3     #m
y = x 			    #m

#Solution:
#Calculating the Frequency of Oscillation
n = 20./40 			#Hz
#Calculating the Radius of Gyration of the Connecting Rod
kG = 1/(2*math.pi*n)*math.sqrt(9.81*x*y/l) 			#m
#Calculating the Moment of Inertia of the Connecting Rod
I = m*kG**2 			#kg-m**2

#Results:
print " The Radius of Gyration  kG  =  %d mm."%(kG*1000)
print " The Mass Moment of Inertia  I  =  %.3f kg-m**2."%(I)
 The Radius of Gyration  kG  =  107 mm.
 The Mass Moment of Inertia  I  =  0.017 kg-m**2.

Example 4.10 Page No : 90

In [13]:
import math 

# Variables:
l = 2.5
r = 250.*10**-3 			#m

#Solution:
#Calculating the Frequency of Oscillation
n = 50./170 			#Hz
#Calculating the Radius of Gyration of the Wheel
kG = r/(2*math.pi*n)*math.sqrt(9.81/l) 			#m

#Results:
print " The Radius of Gyration kG  =  %d mm."%(kG*10**3)
 The Radius of Gyration kG  =  267 mm.

Example 4.11 Page No : 91

In [15]:
import math 

# Variables:
m1 = 5.5            #kg
m2 = 1.5 			#kg
l = 1.25            #m
r = 125.*10**-3 	#m

#Solution:
#Calculating the Frequency of Oscillation
n = 10./30 			#Hz
#Calculating the Radius of Gyration About an Axis Through the c.g.
kG = r/(2*math.pi*n)*math.sqrt(9.81/l) 			#m
#Calculating the Mass Moment of Inertia About an Axis Through its c.g.
m = m1+m2 			#Total Mass  kg
I = m*kG**2 			#kg-m**2

#Results:
print "The Mass Moment of Inertia About an Axis Through its c.g.  I  =  %.3f kg-m**2."%(I)
The Mass Moment of Inertia About an Axis Through its c.g.  I  =  0.196 kg-m**2.