import math
# Initilization of variables
N=1800 # r.p.m # Speed of the shaft
t=5 # seconds # time taken to attain the rated speed # case (a)
T=90 # seconds # time taken by the unit to come to rest # case (b)
pi=3.14 # constant
# Calculations
omega=(2*pi*N)/(60)
# (a)
# we take alpha_1,theta_1 & n_1 for case (a)
alpha_1=omega/t # rad/s^2 #
theta_1=(omega**2)/(2*alpha_1) # radian
# Let n_1 be the number of revolutions turned,
n_1=theta_1*(1/(2*pi))
# (b)
# similarly we take alpha_1,theta_1 & n_1 for case (b)
alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve
theta_2=(omega**2)/(2*alpha_2) # radians
# Let n_2 be the number of revolutions turned,
n_2=theta_2*(1/(2*pi))
# Results
print"(a) The no of revolutions the unit turns to attain the rated speed is ",round(n_1)
print"(b) The no of revolutions the unit turns to come to rest is ",round(n_2)
(a) The no of revolutions the unit turns to attain the rated speed is 75.0 (b) The no of revolutions the unit turns to come to rest is 1350.0
import math
# Initilization of variables
r=1 # m # radius of the cylinder
v_c=20 # m/s # velocity of the cylinder at its centre
# Calculations
# The velocity of point E is given by using the triangle law as,
v_e=(2)**0.5*v_c # m/s
# Similarly the velocity at point F is given as,
v_f=2*v_c # m/s
# Results
print"The velocity of point E is ",round(v_e,2),"m/s"
print"The velocity of point F is ",round(v_f),"m/s"
The velocity of point E is 28.28 m/s The velocity of point F is 40.0 m/s
import math
# Initilization of Variables
v_1=3 # m/s # uniform speed of the belt at top
v_2=2 # m/s # uniform speed of the belt at the bottom
r=0.4 # m # radius of the roller
# Calculations
# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's
A=[1 r;1 -r]
B=[v_1;v_2]
C=inv(A)*B
# Results
print"The linear velocity (v_c) at point C is ",round(C(1)),"m/s"
print"The angular velocity at point C is " round(C(2)),"radian/second"
# NOTE: The answer of angular velocity is incorrect in the book
File "<ipython-input-4-f6df08d07dba>", line 12 A=[1 r;1 -r] ^ SyntaxError: invalid syntax
import math
# Initilization of Variables
l=1 # m # length of bar AB
v_a=5 # m/s # velocity of A
theta=30 # degree # angle made by the bar with the horizontal
# Calculations
# From the vector diagram linear velocity of end B is given as,
v_b=v_a/tan(theta*(pi/180)) # m/s
# Now let the relative velocity be v_ba which is given as,
v_ba=v_a/sin(theta*(pi/180)) # m/s
# Now let the angular velocity of the bar be theta_a which is given as,
theta_a=(v_ba)/l # radian/second
# Velocity of point A
v_a=(0.5)*theta_a # m/s
# Magnitude of velocity at point C is,
v_c=v_a # m/s # from the vector diagram
# Results
print"(a) The angular velocity of the bar is ",round(theta_a),"radian/second"
print"(b) The velocity of end B is ",round(v_b,2),"m/s"
print"(c) The velocity of mid point C is ",round(v_c),"m/s"
(a) The angular velocity of the bar is 10.0 radian/second (b) The velocity of end B is 8.67 m/s (c) The velocity of mid point C is 5.0 m/s
import math
# Initilization of Variables
r=0.12 # m # length of the crank
l=0.6 # m # length of the connecting rod
N=300 # r.p.m # angular velocity of the crank
theta=30 # degree # angle made by the crank with the horizontal
pi=3.14
# Calculations
# Now let the angle between the connecting rod and the horizontal rod be phi
phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree
# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n
omega_oa=(2*pi*N)/(60) # radian/second
# Linear velocity at A is given as,
v_a=r*omega_oa # m/s
# Now using the sine rule linear velocity at B can be given as,
v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s
# Similarly the relative velocity (assume v_ba) is given as,
v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))
# Angular velocity (omega_ab) is given as,
omega_ab=v_ba/l # radian/second
# Results
print"(a) The angular velocity of the connecting rod is ",round(omega_ab,2),"radian/second"
print"(b) The velocity of the piston when the crank makes an angle of 30 degree is ",round(v_b,2),"m/s"
(a) The angular velocity of the connecting rod is 5.46 radian/second (b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s
import math
# Initiization of variables
r=1 # m # radius of the cylinder
v_c=20 # m/s # velocity at the centre
# Calculations
# Angular velocity is given as,
omega=v_c/r # radian/second
# Velocity at point D is
v_d=omega*(2)**0.5*r # m/s # from eq'n 1
# Now, the velocity at point E is,
v_e=omega*2*r # m/s
# Results
print"The velocity at point D is ",round(v_d,2),"m/s"
print"The velocity at point E is ",round(v_e),"m/s"
The velocity at point D is 28.28 m/s The velocity at point E is 40.0 m/s
import math
# Initilization of Variables
r=5 # cm # radius of the roller
AB=0.1 # m
v_a=3 # m/s # velocity at A
v_b=2 # m/s # velocity at B
# Calculations
# Solving eqn's 1 & 2 using matrix for IA & IB we get,
A=[-2 3;1 1]
B=[0;AB]
C=inv(A)*B
d1=C(2)*10**2 # cm # assume d1 for case 1
# Similary solving eqn's 3 & 4 again for IA & IB we get,
P=[-v_b v_a;1 -1]
Q=[0;AB]
R=inv(P)*Q
d2=R(2)*10**2 # cm # assume d2 for case 2
# Results
print"The distance d when the bars move in the opposite directions are ",round(d1),"cm"
print"The distance d when the bars move in the same directions are ",round(d2),"cm"
File "<ipython-input-21-6e389b1a0870>", line 13 A=[-2 3;1 1] ^ SyntaxError: invalid syntax
import math
# Initilization of Variables
v_c=1 # m/s # velocity t the centre
r1=0.1 # m
r2=0.20 # m
EB=0.1 # m
EA=0.3 # m
ED=(r1**2+r2**2)**0.5 # m
# Calculations
# angular velocity is given as,
omega=v_c/r1 # radian/seconds
# Velocit at point B
v_b=omega*EB # m/s
# Velocity at point A
v_a=omega*EA # m/s
# Velocity at point D
v_d=omega*ED # m/s
# Results
print"The velocity at point A is ",round(v_a),"m/s"
print"The velocity at point B is ",round(v_b),"m/s"
print"The velocity at point D is ",round(v_d,2),"m/s"
The velocity at point A is 3.0 m/s The velocity at point B is 1.0 m/s The velocity at point D is 2.24 m/s
import math
# Initilization of variables
l=1 # m # length of bar AB
v_a=5 # m/s # velocity at A
theta=30 # degree # angle made by the bar with the horizontal
# Calculations
IA=l*sin(theta*(pi/180)) # m
IB=l*cos(theta*(pi/180)) # m
IC=0.5 # m # from triangle IAC
# Angular veocity is given as,
omega=v_a/(IA) # radian/second
v_b=omega*IB # m/s
v_c=omega*IC # m/s
# Results
print"The velocity at point B is ",round(v_b,2),"m/s"
print"The velocity at point C is ",round(v_c),"m/s"
The velocity at point B is 8.67 m/s The velocity at point C is 5.0 m/s
import math
# Initilization of variables
v_a=2 # m/s # velocity at end A
r=0.05 # m # radius of the disc
alpha=30 # degree # angle made by the bar with the horizontal
# Calculations
# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,
omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second
# Results
print"The anguar veocity of the bar is ",round(omega,2),"radian/second"
The anguar veocity of the bar is 11.53 radian/second
import math
# Initilization of variables
l=0.6 # m
r=0.12 # m
theta=30 # degree # angle made by OA with the horizontal
phi=5.7 # degree # from EX 21.5
N=300
pi=3.14
# Calculations
# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,
omega_oa=(2*pi*N)/(60) # radian/ second
# Now,in triangle IBO.
IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m
IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m
# from eq'n 5
v_b=(r*omega_oa*IB)/(IA) # m/s
# From eq'n 6
omega_ab=(r*omega_oa)/(IA) # radian/second
# Results
print"The velocity at B is ",round(v_b,2),"m/s"
print"The angular velocity of the connecting rod is ",round(omega_ab,2),"radian/second"
The velocity at B is 2.21 m/s The angular velocity of the connecting rod is 5.47 radian/second
import math
# Initilization of variables
omega_ab=5 # rad/s # angular veocity of the bar
AB=0.20 # m
BC=0.15 # m
CD=0.3 # m
theta=30 # degree # where theta= angle made by AB with the horizontal
alpha=60 # degree # where alpha=angle made by CD with the horizontal
# Calculations
# Consider triangle BIC
IB=sin(alpha*(pi/180))*BC*1 # m
IC=sin(theta*(pi/180))*BC*1 # m
v_b=omega_ab*AB # m/s
# let the angular velocity of the bar BC be omega_bc
omega_bc=v_b/IB # radian/second
v_c=omega_bc*IC # m/s
# let the angular velocity of bar DC be omega_dc
omega_dc=v_c/CD # radian/second
# Results
print"The angular velocity of bar BC is ",round(omega_bc,3),"rad/s"
print"The angular velocity of bar CD is ",round(omega_dc,2),"rad/s"
The angular velocity of bar BC is 7.7 rad/s The angular velocity of bar CD is 1.92 rad/s