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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)