# Example 14.3 Displacement velocity and acceleration of connected bodies¶

In [1]:
from __future__ import division
import math
# Initilization of variables
a_T=0.18 # m/s**2 # acc of trolley
# Calculations
a_B=-a_T/3 # m/s**2 # from eq'n 4
t=4 # seconds
v_T=a_T*t # m/s # velocity of trolley after 4 seconds
v_B=-v_T/3 # m/s # from eq'n 3
S_T=(1/2)*a_T*t**2 # m # distance moved by trolley in 4 sec
S_B=-S_T/3 # m # from eq'n 2
# Results
print('The acceleration of block B is %f m/s**2'%a_B)
print('The velocity of trolley & the block after 4 sec is %f m/s & %f m/s'%(v_T,v_B))
print('The distance moved by the trolley & the block is %f m & %f m'%(S_T,S_B))

The acceleration of block B is -0.060000 m/s**2
The velocity of trolley & the block after 4 sec is 0.720000 m/s & -0.240000 m/s
The distance moved by the trolley & the block is 0.000000 m & -0.000000 m


# Example 14.4 Velocity time relationship¶

In [4]:
from __future__ import division
import math
# Initiliztion of variables
v_B=12 # cm/s # velocity of block B
u=0
s=24 # cm # distance travelled by bock B
t=5 # seconds
# Calculations
a_B=v_B**2/(2*s) # cm/s**2 # using eq'n v**2-u**2=28*a*s for block B. Here u=0
a_A=(3/2)*a_B # cm/s**2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations
v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)
S_A=(u*t)+((1/2)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t**2)
# Results
print('The acceleration of block A (a_A) is %f cm/s**2'%a_A)
print('The acceleration of block B (a_B) is %f cm/s**2'%a_B)
print('The velocity of block A (v_A) after 5 seconds is %f m/s'%v_A)
print('The position of block A (S_A) after 5 seconds is %f m'%S_A)

The acceleration of block A (a_A) is 4.500000 cm/s**2
The acceleration of block B (a_B) is 3.000000 cm/s**2
The velocity of block A (v_A) after 5 seconds is 22.500000 m/s
The position of block A (S_A) after 5 seconds is 56.250000 m


# Example 14.5 Displacement time relationship¶

In [5]:
from __future__ import division
import math
# Initilization of variables
u=72*(1000/(60*60)) # km/hr # speed of the vehicle
s=300 # m # distance where the light is turning is red
t=20 # s # traffic light timed to remain red
# Calculations
# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t**2
a=(((s)-(u*t))*2)/t**2 # m/s**2 (Deceleration)
v=(u+(a*t))*((60*60)/1000) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr
# Results
print('(a) The required uniform acceleration of the car is %f m/s**2'%a)
print('(b) The speed at which the motorist crosses the traffic light is %f km/hr'%v)

(a) The required uniform acceleration of the car is -0.500000 m/s**2
(b) The speed at which the motorist crosses the traffic light is 36.000000 km/hr


# Example 14.6 Displacement time relationship¶

In [6]:
from __future__ import division
import math
# Initilization of variables
S=50 # m # height of the tower
v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower
g=9.81 # m/s**2 # acc due to graity
# Calculations
# The equation of time for the two stones to cross each other is given as,
t=S/v # seconds
S_1=(1/2)*g*t**2 # m # from the top
# Results
print('The time (t) at which the two stones cross each other is %f seconds'%t)
print('The two stones cross each other (from top) at a distance of %f m'%S_1)

The time (t) at which the two stones cross each other is 2.000000 seconds
The two stones cross each other (from top) at a distance of 19.620000 m


# Example 14.7 Displacement time relationship¶

In [7]:
from __future__ import division
import math
# Intilization of variables
acc=0.5 # m/s**2 # acceleration of the elevator
s=25 # m # distance travelled by the elevator from the top
u=0 # m/s
g=9.81 # m/s**2 # acc due to gravity
# Calculations
# Using eq'n the eq'n v**2-u**2=2*a*s, solving for v we get,
v=math.sqrt((2*acc*s)+(u**2)) # m/s
# Now solving eq'n 1 & 2 for t we get, (4.655*t**2)-(5*t)+(25)=0
# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b**2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,
a=4.655
b=-5
c=-25
t=(-b+math.sqrt((b**2)-(4*a*c)))/(2*a) # seconds
# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,
S_1=(v*t)+((1/2)*acc*t**2) # m
# Let S be the total dist from top when the stone hits the elevator,
S=S_1+s # m
# Results
print('The time taken by the stone to hit the elevator is %f seconds'%t)
print('The distance (S)travelled by the elevator at the time of impact is %f m'%S)

The time taken by the stone to hit the elevator is 2.915922 seconds
The distance (S)travelled by the elevator at the time of impact is 41.705261 m


# Example 14.9 Displacement time relationship¶

In [8]:
from __future__ import division
import math
# Initilization of variables
v=60 # km/hr # velocity of the train
d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)
d2=12 # km # from the velocity-time graph (here d2= Area OABB')
d3=3 # km # from the velocity-time graph (here d3= Area BB'C)
# Calculations
t_1=d2/v # hr # time of travel for first 12 kms
t_2=(2*d3)/v # hr # time of for next 3 kms
# Total time of travel for passenger train is given by eq'n
t=t_1+t_2 # hr
# Now time of travel of the local train (let it be T) is given as,
T=2*t # hr
V_max=(2*d1)/T # km/hr
# Results
print('The maximum speed of the local train is %f km/hr'%V_max)

The maximum speed of the local train is 50.000000 km/hr


# Example 14.10 Distance travelled by a particle in the n th second¶

In [9]:
from __future__ import division
import math
# Initilization of variables
a=10 # m/s**2 # acceleration of the particle
S_5th=50 # m # distance travelled by the particle during the 5th second
t=5 # seconds
# Calculations
# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t**2.....(consider this as eq'n 1)
# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)
# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5**2 = 5*u+125.....(consider eq'n 3)
# again, S_(0-4)=(4*u)+(1/2)*10*4**2 = 4*u+80....(consider eq'n 4)
# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45
u=(S_5th)-45 # m/s
# Calculations
print('The initial velocity of the particle is %f m/s'%u)

The initial velocity of the particle is 5.000000 m/s


# Example 14.11 Variable acceleration¶

In [10]:
from __future__ import division
import math
# Initilization of variables
# Conditions given are
t=1 # s
x=14.75 # m
v=6.33 # m/s
# Calculations
# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec
T=2 # sec
X=(T**4/12)-(T**3/3)+(T**2)+(5*T)+9 # m # eq'n 3
V=(T**3/3)-(T**2)+(2*T)+5 # m/s
a=(T**2)-(2*T)+2 # m/s**2
# Results
print('The distance travelled by the particle is %f m'%X)
print('The velocity of the particle is %f m/s'%V)
print('The acceleration of the particle is %f m/s**2'%a)
# The answer may vary due to decimal point error

The distance travelled by the particle is 21.666667 m
The velocity of the particle is 7.666667 m/s
The acceleration of the particle is 2.000000 m/s**2


# Example 14.12 Variable acceleration¶

In [11]:
from __future__ import division
import math
# Calculations
# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec
t=3 # sec .. from eq'n 2
# Position of particle at t=3 sec
x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1
# Acc of particle at t=3 sec
a=6*(t-1) # m/s**2 # from eq'n 3
# Results
print('The time at which the velocity of the particle becomes zero is %f sec'%t)
print('The position of the partice at t=3 sec is %f m'%x)
print('The acceleration of the particle is %f m/s**2'%a)

The time at which the velocity of the particle becomes zero is 3.000000 sec
The position of the partice at t=3 sec is -15.000000 m
The acceleration of the particle is 12.000000 m/s**2


# Example 14.15 D AlembertsPrinciple¶

In [12]:
from __future__ import division
import math
# Initilization of variables
F=250 # N # Force acting on a body
m=100 # kg # mass of the body
# Calculations
# Using the eq'n of motion
a=F/m # m/s**2
# Results
print('The acceleration of the body is %f m/s**2'%a)

The acceleration of the body is 2.500000 m/s**2


# Example 14.16 D AlembertsPrinciple¶

In [13]:
from __future__ import division
import math
# Initilization of variables
a=1 # m/s**2 # downward/upward acceleration of the elevator
W=500 # N # Weight of man
g=9.81 # m/s**2 # acceleration due to gravity
# Calculations
# (a) Downward Motion
R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)
# (b) Upward Motion
R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)
# Results
print('(a) The pressure transmitted to the floor by the  man for Downward motion of the elevator is %f N'%R_1)
print('(b) The pressure transmitted to the floor by the  man for Upward motion of the elevator is %f N'%R_2)

(a) The pressure transmitted to the floor by the  man for Downward motion of the elevator is 449.031600 N
(b) The pressure transmitted to the floor by the  man for Upward motion of the elevator is 550.968400 N


# Example 14.17 D Alamberts Principle¶

In [14]:
from __future__ import division
import math
# Initilization of variables
W=5000 # N # Total weight of the elevator
u=0 # m/s
v=2 # m/s # velocity of the elevator
s=2 # m # distance traveled by the elevator
t=2 # seconds # time to stop the lift
w=600 # N # weight of the man
g=9.81 # m/s**2 # acc due to gravity
# Calculations
# Acceleration acquired by the elevator after travelling 2 m is given by,
a=math.sqrt((v**2-u**2)/(2*s)) # m/s**2
# (a) Let T be the the tension in the cable which is given by eq'n,
T=W*(1+(a/g)) # N
# (b) Motion of man
# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,
R=w*(1-(a/g)) # N
# Results
print('(a) The Tensile force in the cable is %f N'%T)
print('(b) The pressure transmitted to the floor by the man is %f N'%R)

(a) The Tensile force in the cable is 5509.683996 N
(b) The pressure transmitted to the floor by the man is 538.837920 N


# Example 14.18 Motion of two Bodies¶

In [15]:
from __future__ import division
import math
# Initilization of variables
M_1=10 # kg # mass of the 1st block
M_2=5 # kg # mass of the 2nd block
mu=0.25 # coefficient of friction between the blocks and the surface
g=9.81 # m/s**2 # acc due to gravity
# Calculations
a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s**2 # from eq'n 5
T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6
# Results
print('The acceleration of the masses is %f m/s**2'%a)
print('The tension in the string is %f N'%T)

The acceleration of the masses is 1.635000 m/s**2
The tension in the string is 40.875000 N


# Example 14.19 Motion of two Bodies¶

In [16]:
from __future__ import division
import math
# Initilization of variables
M_1=150 # kg # mass of the 1st block
M_2=100 # kg # mass of the 2nd block
mu=0.2 # coefficient of friction between the blocks and the inclined plane
g=9.81 # m/s**2 # acc due to gravity
theta=45 # degree # inclination of the surface
# Calculations
# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,
T=((M_1*M_2*g)*(math.sin(theta*math.pi/180)+2-(mu*math.cos(theta*math.pi/180))))/((4*M_1)+(M_2)) # N
# Results
print('The tension in the string during the motion of the system is %f N'%T)

The tension in the string during the motion of the system is 539.343729 N


# Example 14.20 Motion of two Bodies¶

In [17]:
from __future__ import division
import math
# Initilization of variables
M_1=5 # kg # mass of the 1st block
theta_1=30 # degree # inclination of the 1st plane
M_2=10 # kg # mass of the 2nd block
theta_2=60 # degree # inclination of the 2nd plane
mu=0.33 # coefficient of friction between the blocks and the inclined plane
g=9.81 # m/s**2 # acc due to gravity
# Calculations
# solving eq'n 1 & 2 for a we get,
a=((((M_2*(math.sin(theta_2*math.pi/180)-(mu*math.cos(theta_2*math.pi/180))))-(M_1*(math.sin(theta_1*math.pi/180)+(mu*math.cos(theta_1*math.pi/180))))))*g)/(M_1+M_2) # m/s**2
# Results
print('The acceleration of the masses is %f m/s**2'%a)

The acceleration of the masses is 2.015178 m/s**2


# Example 14.21 Motion of two Bodies¶

In [18]:
from __future__ import division
import math
# Initilization of variables
S=5 # m # distance between block A&B
mu_A=0.2 # coefficient of friction between the block A and the inclined plane
mu_B=0.1 # coefficient of friction between the block B and the inclined plane
theta=20 # degree # inclination of the pane
g=9.81 # m/s**2 # acc due to gravity
# Calculatio#
# EQUATION OF MOTION OF BLOCK A:
# Let a_A & a_B be the acceleration of block A & B.
a_A=(g*math.sin(theta*math.pi/180))-(mu_A*g*math.cos(theta*math.pi/180)) # m/s**2 # from eq'n 1 & eq'n 2
# EQUATION OF MOTION OF BLOCK B:
a_B=g*((math.sin(theta*math.pi/180))-(mu_B*math.cos(theta*math.pi/180))) # m/s**2 # from eq'n 3 & Rb
# Now the eq'n for time of collision of the blocks is given as,
t=math.sqrt((S*2)/(a_B-a_A)) # seconds
S_A=(1/2)*a_A*t**2 # m # distance travelled by block A
S_B=(1/2)*a_B*t**2 # m # distance travelled by block B
# Results
print('The time before collision is %f seconds'%t)
print('The distance travelled by block A before collision is %f m'%S_A)
print('The distance travelled by block B before collision is %f m'%S_B)

The time before collision is 3.293613 seconds
The distance travelled by block A before collision is 8.198512 m
The distance travelled by block B before collision is 13.198512 m


# Example 14.22 Motion of two Bodies¶

In [19]:
from __future__ import division
import math
# Initilization of variables
P=50 # N # Weight of the car
Q=100 # N # Weight of the rectangular block
g=9.81 # m/s**2 # acc due to gravity
b=25 # cm # width of the rectangular block
d=50 # cm # depth of the block
# Calculations
a=(Q*g)/(4*P+2*Q) # m/s**2 # from eq'n 4
W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6
# Resuts
print('The maximum value of weight (W) by which the car can be accelerated is %f N'%W)
print('The acceleration is %f m/s**2'%a)

The maximum value of weight (W) by which the car can be accelerated is 50.000000 N
The acceleration is 2.452500 m/s**2


# Example 14.23 Motion of two Bodies¶

In [20]:
from __future__ import division
import math
# Initilization of variables
P=40 # N # weight on puley r_1
Q=60 # N # weight on pulley r_2
g=9.81 # m/s**2 # acc due to gravity
# Calculations
# The eq'n for acceleration of pulley Pi.e a_p is,
a_p=(((2*P)-(Q))/((4*P)+(Q)))*2*g # m/s**2
# Results
print('The downward acceleration of P is %f m/s**2'%a_p)

The downward acceleration of P is 1.783636 m/s**2


# Example 14.24 Motion of two Bodies¶

In [21]:
from __future__ import division
import math
# Initilization of variables
M=15 # kg # mass of the wedge
m=6 # kg # mass of the block
theta=30 # degree # angle of the wedge
g=9.81 # m/s**2 # acc due to gravity
# Calculations
a_A=((m*g*math.cos(theta*math.pi/180)*math.sin(theta*math.pi/180))/((M)+(m*(math.sin(theta*math.pi/180))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.
# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2
a_r=(((g*math.sin(theta*math.pi/180))*(m+M))/((M)+(m*(math.sin(theta*math.pi/180))**2)))/(g) # g
# Results
print('(a) The acceleration of the wedge is %f g'%a_A)
print('(b) The acceleration of the bock relative to the wedge is %f g'%a_r)

(a) The acceleration of the wedge is 0.157459 g
(b) The acceleration of the bock relative to the wedge is 0.636364 g


# Example 14.25 Motion of two Bodies¶

In [22]:
from __future__ import division
import math
import numpy
# Initilization of variables
P=30 # N # weight on pulley A
Q=20 # N # weight on pulley B
R=10 # N # weight on puey B
g=9.81 # m/s**2 # acc due to gravity
# Calculations
# Solving eqn's 6 & 7 using matrix for a & a_1, we get
A=numpy.matrix('70 -40;-10 30')
B=numpy.matrix('10;-10')
C=numpy.linalg.inv(A)*B
# Acceleration of P is given as,
P=C[0] # m/s**2
# Acceleration of Q is given as,
Q=C[1]-C[0] # m/s**2
# Acceleration of R is given as,
R=-(C[1]+C[0]) # m/s**2 # as R is taken to be +ve
# Results
print('The acceleration of P is %f g'%P)
print('The acceleration of Q is %f g'%Q)
print('The acceleration of R is %f g'%R)

The acceleration of P is -0.058824 g
The acceleration of Q is -0.294118 g
The acceleration of R is 0.411765 g


# Example 14.30 Motion of two Bodies¶

In [24]:
from __future__ import division
import math
# Initilization of variables
W=1 # kg/m # weight of the bar
L_AB=0.6 # m # length of segment AB
L_BC=0.30 # m # length of segment BC
g=9.81 # m/s**2 # acc due to gravity
# Calculations
# Consider the respective F.B.D.
theta_1=math.degrees(math.atan(5/12)) # slope of bar AB # here theta_1= atan(theta)
theta_2=math.degrees(math.asin(5/13)) # theta_2=asin(theta)
theta_3=math.degrees(math.acos(12/13)) # theta_3=acos(theta)
M_AB=L_AB*W # kg acting at D # Mass of segment AB
M_BC=L_BC*W # kg acting at E # Mass of segment BC
# The various forces acting on the bar are:
# Writing the eqn's of dynamic equilibrium
Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0
# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,
AF=L_BC*math.cos(theta_3*math.pi/180)
DF=L_BC*math.sin(theta_2*math.pi/180)
AH=(L_AB*math.cos(theta_3*math.pi/180))+((L_BC/2)*math.sin(theta_2*math.pi/180))
IG=(L_AB*math.sin(theta_2*math.pi/180))-((L_BC/2)*math.cos(theta_3*math.pi/180))
# On simplifying and solving moment eq'n we get a as,
a=((2*L_AB*L_BC*g*math.sin(theta_2*math.pi/180))-(L_BC*g*(L_BC/2)*math.cos(theta_3*math.pi/180)))/((2*L_AB*L_BC*math.cos(theta_3*math.pi/180))+(L_BC*(L_BC/2)*math.sin(theta_2*math.pi/180))) # m/s**2
X_A=0.9*a #N # from eq'n of dynamic equilibrium
R_A=math.sqrt(X_A**2+Y_A**2) # N # Resultant of R_A
alpha=math.degrees(math.atan(Y_A/X_A)) # degree
# Results
print('The acceleration is %f m/s**2'%a)
print('The reaction at A (R_A) is %f N'%R_A)
print('The angle made by the resultant is %f degree'%alpha)

The acceleration is 2.719604 m/s**2
The reaction at A (R_A) is 9.161998 N
The angle made by the resultant is 74.505151 degree