diff options
Diffstat (limited to 'Engineering_Mechanics_by_A._K._Tayal/Chapter14.ipynb')
-rw-r--r-- | Engineering_Mechanics_by_A._K._Tayal/Chapter14.ipynb | 887 |
1 files changed, 887 insertions, 0 deletions
diff --git a/Engineering_Mechanics_by_A._K._Tayal/Chapter14.ipynb b/Engineering_Mechanics_by_A._K._Tayal/Chapter14.ipynb new file mode 100644 index 00000000..e5f012c8 --- /dev/null +++ b/Engineering_Mechanics_by_A._K._Tayal/Chapter14.ipynb @@ -0,0 +1,887 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 Rectilinear Motion of a particle" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.3 Displacement velocity and acceleration of connected bodies" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The acceleration of block B is -0.060000 m/s**2\n", + "The velocity of trolley & the block after 4 sec is 0.720000 m/s & -0.240000 m/s\n", + "The distance moved by the trolley & the block is 1.440000 m & -0.480000 m\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "a_T=0.18 # m/s**2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T/3 # m/s**2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T/3 # m/s # from eq'n 3\n", + "S_T=(1/2)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T/3 # m # from eq'n 2\n", + "# Results\n", + "print('The acceleration of block B is %f m/s**2'%a_B)\n", + "print('The velocity of trolley & the block after 4 sec is %f m/s & %f m/s'%(v_T,v_B))\n", + "print('The distance moved by the trolley & the block is %f m & %f m'%(S_T,S_B))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.4 Velocity time relationship" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The acceleration of block A (a_A) is 4.500000 cm/s**2\n", + "The acceleration of block B (a_B) is 3.000000 cm/s**2\n", + "The velocity of block A (v_A) after 5 seconds is 22.500000 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.250000 m\n" + ] + } + ], + "source": [ + "# Initiliztion of variables\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "# Calculations\n", + "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\n", + "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\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((1/2)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t**2)\n", + "# Results\n", + "print('The acceleration of block A (a_A) is %f cm/s**2'%a_A)\n", + "print('The acceleration of block B (a_B) is %f cm/s**2'%a_B)\n", + "print('The velocity of block A (v_A) after 5 seconds is %f m/s'%v_A)\n", + "print('The position of block A (S_A) after 5 seconds is %f m'%S_A)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.5 Displacement time relationship" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) The required uniform acceleration of the car is -0.500000 m/s**2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.000000 km/hr\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "u=72*(1000/(60*60)) # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "# Calculations\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t**2\n", + "a=(((s)-(u*t))*2)/t**2 # m/s**2 (Deceleration) \n", + "v=(u+(a*t))*((60*60)/1000) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "# Results\n", + "print('(a) The required uniform acceleration of the car is %f m/s**2'%a)\n", + "print('(b) The speed at which the motorist crosses the traffic light is %f km/hr'%v)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.6 Displacement time relationship" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time (t) at which the two stones cross each other is 2.000000 seconds\n", + "The two stones cross each other (from top) at a distance of 19.620000 m\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s**2 # acc due to graity\n", + "# Calculations\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(1/2)*g*t**2 # m # from the top\n", + "# Results\n", + "print('The time (t) at which the two stones cross each other is %f seconds'%t)\n", + "print('The two stones cross each other (from top) at a distance of %f m'%S_1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.7 Displacement time relationship" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time taken by the stone to hit the elevator is 2.915922 seconds\n", + "The distance (S)travelled by the elevator at the time of impact is 41.705261 m\n" + ] + } + ], + "source": [ + "import math\n", + "# Intilization of variables\n", + "acc=0.5 # m/s**2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s**2 # acc due to gravity\n", + "# Calculations\n", + "# Using eq'n the eq'n v**2-u**2=2*a*s, solving for v we get,\n", + "v=math.sqrt((2*acc*s)+(u**2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t**2)-(5*t)+(25)=0\n", + "# 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,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+math.sqrt((b**2)-(4*a*c)))/(2*a) # seconds\n", + "# 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,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "# Results\n", + "print('The time taken by the stone to hit the elevator is %f seconds'%t)\n", + "print('The distance (S)travelled by the elevator at the time of impact is %f m'%S)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.9 Displacement time relationship" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The maximum speed of the local train is 50.000000 km/hr\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "# Calculations\n", + "t_1=d2/v # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)/v # hr # time of for next 3 kms\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=(2*d1)/T # km/hr\n", + "# Results\n", + "print('The maximum speed of the local train is %f km/hr'%V_max)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.10 Distance travelled by a particle in the n th second" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The initial velocity of the particle is 5.000000 m/s\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "a=10 # m/s**2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "# Calculations\n", + "# 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)\n", + "# 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)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5**2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4**2 = 4*u+80....(consider eq'n 4)\n", + "# 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\n", + "u=(S_5th)-45 # m/s\n", + "# Calculations\n", + "print('The initial velocity of the particle is %f m/s'%u)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.11 Variable acceleration" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The distance travelled by the particle is 21.666667 m\n", + "The velocity of the particle is 7.666667 m/s\n", + "The acceleration of the particle is 2.000000 m/s**2\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4/12)-(T**3/3)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3/3)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s**2\n", + "# Results\n", + "print('The distance travelled by the particle is %f m'%X)\n", + "print('The velocity of the particle is %f m/s'%V)\n", + "print('The acceleration of the particle is %f m/s**2'%a)\n", + "# The answer may vary due to decimal point error" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.12 Variable acceleration" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.000000 sec\n", + "The position of the partice at t=3 sec is -15.000000 m\n", + "The acceleration of the particle is 12.000000 m/s**2\n" + ] + } + ], + "source": [ + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s**2 # from eq'n 3\n", + "# Results\n", + "print('The time at which the velocity of the particle becomes zero is %f sec'%t)\n", + "print('The position of the partice at t=3 sec is %f m'%x)\n", + "print('The acceleration of the particle is %f m/s**2'%a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.15 D AlembertsPrinciple" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The acceleration of the body is 2.500000 m/s**2\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "# Calculations\n", + "# Using the eq'n of motion\n", + "a=F/m # m/s**2 \n", + "# Results\n", + "print('The acceleration of the body is %f m/s**2'%a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.16 D AlembertsPrinciple" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.031600 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.968400 N\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "a=1 # m/s**2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s**2 # acceleration due to gravity\n", + "# Calculations\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "# Results\n", + "print('(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is %f N'%R_1)\n", + "print('(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is %f N'%R_2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.17 D Alamberts Principle" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) The Tensile force in the cable is 5509.683996 N\n", + "(b) The pressure transmitted to the floor by the man is 538.837920 N\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s**2 # acc due to gravity\n", + "# Calculations\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=math.sqrt((v**2-u**2)/(2*s)) # m/s**2\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "# Results\n", + "print('(a) The Tensile force in the cable is %f N'%T)\n", + "print('(b) The pressure transmitted to the floor by the man is %f N'%R)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.18 Motion of two Bodies" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The acceleration of the masses is 1.635000 m/s**2\n", + "The tension in the string is 40.875000 N\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s**2 # acc due to gravity\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s**2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "# Results\n", + "print('The acceleration of the masses is %f m/s**2'%a)\n", + "print('The tension in the string is %f N'%T)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.19 Motion of two Bodies" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The tension in the string during the motion of the system is 539.343729 N\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s**2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "# Calculations\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "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\n", + "# Results\n", + "print('The tension in the string during the motion of the system is %f N'%T)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.20 Motion of two Bodies" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The acceleration of the masses is 2.015178 m/s**2\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s**2 # acc due to gravity\n", + "# Calculations\n", + "# solving eq'n 1 & 2 for a we get,\n", + "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\n", + "# Results\n", + "print('The acceleration of the masses is %f m/s**2'%a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.21 Motion of two Bodies" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time before collision is 3.293613 seconds\n", + "The distance travelled by block A before collision is 8.198512 m\n", + "The distance travelled by block B before collision is 13.198512 m\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s**2 # acc due to gravity\n", + "# Calculatio#\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "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\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "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\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=math.sqrt((S*2)/(a_B-a_A)) # seconds \n", + "S_A=(1/2)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(1/2)*a_B*t**2 # m # distance travelled by block B\n", + "# Results\n", + "print('The time before collision is %f seconds'%t)\n", + "print('The distance travelled by block A before collision is %f m'%S_A)\n", + "print('The distance travelled by block B before collision is %f m'%S_B)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.22 Motion of two Bodies" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.000000 N\n", + "The acceleration is 2.452500 m/s**2\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s**2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "# Calculations\n", + "a=(Q*g)/(4*P+2*Q) # m/s**2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "# Resuts\n", + "print('The maximum value of weight (W) by which the car can be accelerated is %f N'%W)\n", + "print('The acceleration is %f m/s**2'%a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.23 Motion of two Bodies" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The downward acceleration of P is 1.783636 m/s**2\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s**2 # acc due to gravity\n", + "# Calculations\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(((2*P)-(Q))/((4*P)+(Q)))*2*g # m/s**2\n", + "# Results\n", + "print('The downward acceleration of P is %f m/s**2'%a_p)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.24 Motion of two Bodies" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) The acceleration of the wedge is 0.157459 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636364 g\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s**2 # acc due to gravity\n", + "# Calculations\n", + "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.\n", + "# 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\n", + "a_r=(((g*math.sin(theta*math.pi/180))*(m+M))/((M)+(m*(math.sin(theta*math.pi/180))**2)))/(g) # g\n", + "# Results\n", + "print('(a) The acceleration of the wedge is %f g'%a_A)\n", + "print('(b) The acceleration of the bock relative to the wedge is %f g'%a_r)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.25 Motion of two Bodies" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The acceleration of P is -0.058824 g\n", + "The acceleration of Q is -0.294118 g\n", + "The acceleration of R is 0.411765 g\n" + ] + } + ], + "source": [ + "import numpy\n", + "# Initilization of variables\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s**2 # acc due to gravity\n", + "# Calculations\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=numpy.matrix('70 -40;-10 30')\n", + "B=numpy.matrix('10;-10')\n", + "C=numpy.linalg.inv(A)*B\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s**2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s**2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s**2 # as R is taken to be +ve\n", + "# Results\n", + "print('The acceleration of P is %f g'%P)\n", + "print('The acceleration of Q is %f g'%Q)\n", + "print('The acceleration of R is %f g'%R)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 14.30 Motion of two Bodies" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The acceleration is 2.719604 m/s**2\n", + "The reaction at A (R_A) is 9.161998 N\n", + "The angle made by the resultant is 74.505151 degree\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s**2 # acc due to gravity\n", + "# Calculations\n", + "# Consider the respective F.B.D.\n", + "theta_1=math.degrees(math.atan(5/12)) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=math.degrees(math.asin(5/13)) # theta_2=asin(theta)\n", + "theta_3=math.degrees(math.acos(12/13)) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "# The various forces acting on the bar are:\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*math.cos(theta_3*math.pi/180) \n", + "DF=L_BC*math.sin(theta_2*math.pi/180)\n", + "AH=(L_AB*math.cos(theta_3*math.pi/180))+((L_BC/2)*math.sin(theta_2*math.pi/180))\n", + "IG=(L_AB*math.sin(theta_2*math.pi/180))-((L_BC/2)*math.cos(theta_3*math.pi/180))\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "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\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=math.sqrt(X_A**2+Y_A**2) # N # Resultant of R_A\n", + "alpha=math.degrees(math.atan(Y_A/X_A)) # degree\n", + "# Results\n", + "print('The acceleration is %f m/s**2'%a)\n", + "print('The reaction at A (R_A) is %f N'%R_A)\n", + "print('The angle made by the resultant is %f degree'%alpha)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.5.1" + }, + "widgets": { + "state": {}, + "version": "1.1.2" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |