{ "metadata": { "name": "chapter18.ipynb" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 18: Impact:Collision Of Elastic Bodies" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 18.18-1,Page No:474" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "import numpy as np\n", "\n", "# Initilization of variables\n", "m_a=1 # kg # mass of the ball A\n", "v_a=2 # m/s # velocity of ball A\n", "m_b=2 # kg # mass of ball B\n", "v_b=0 # m/s # ball B at rest\n", "e=1/2 # coefficient of restitution\n", "\n", "# Calculations\n", "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", "A=np.array([[1 ,2],[-1 ,1]])\n", "B=np.array([2,1])\n", "C=np.linalg.solve(A,B)\n", "\n", "# Results\n", "\n", "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The velocity of ball A after impact is 0.0 m/s\n", "The velocity of ball B after impact is 1.0 m/s\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 18.18-2,Page No:480" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "import numpy as np\n", "\n", "# Initilization of variables\n", "m_a=2 # kg # mass of ball A\n", "m_b=6 # kg # mass of ball B\n", "m_c=12 # kg # mass of ball C\n", "v_a=12 # m/s # velocity of ball A\n", "v_b=4 # m/s # velocity of ball B\n", "v_c=2 # m/s # velocity of ball C\n", "e=1 # coefficient of restitution for perfectly elastic body\n", "\n", "# Calculations\n", "\n", "# (A)\n", "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", "A=np.array([[2 ,6],[-1, 1]])\n", "B=np.array([48,8])\n", "C=np.linalg.solve(A,B)\n", "\n", "# Calculations\n", "\n", "# (B)\n", "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", "P=np.array([[1 ,2],[-1, 1]])\n", "Q=np.array([12,6])\n", "R=np.linalg.solve(P,Q)\n", "\n", "# Results (A&B)\n", "\n", "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The velocity of ball A after impact on ball B is 0.0 m/s\n", "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", "The final velocity of ball B is 0.0 m/s\n", "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 18.18-3,Page No:481" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Initilization of variables\n", "h_1=9 # m # height of first bounce\n", "h_2=6 # m # height of second bounce\n", "\n", "# Calculations\n", "\n", "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", "e=(h_2*h_1**-1)**0.5\n", "# From eq'n 3 we get height of drop as,\n", "h=h_1/e**2 # m\n", "\n", "# Results\n", "\n", "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The ball was dropped from a height of 13.5 m\n", "The coefficient of restitution between the glass and the floor is 0.8\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 18.18-4,Page No:484" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Initilization of variables\n", "\n", "e=0.90 # coefficient o restitution\n", "v_a=10 # m/s # velocity of ball A\n", "v_b=15 # m/s # velocity of ball B\n", "alpha_1=30 # degree # angle made by v_a with horizontal\n", "alpha_2=60 # degree # angle made by v_b with horizontal\n", "\n", "# Calculations\n", "\n", "# The components of initial velocity of ball A:\n", "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", "\n", "# The components of initial velocity of ball B:\n", "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", "\n", "# From eq'n 1 & 2 we get,\n", "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", "\n", "# On adding eq'n 3 & 4 we get,\n", "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", "\n", "# On substuting the value of v'_b_x in eq'n 3 we get,\n", "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", "\n", "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", "\n", "# The direction of the ball after Impact is,\n", "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", "\n", "# Results\n", "\n", "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The velocity of ball A after impact is 8.35 m/s\n", "The velocity of ball B after impact is 15.18 m/s\n", "The direction of ball A after impact is 36.77 degree\n", "The direction of ball B after impact is 58.85 degree\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 18.18-5,Page No:485" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Initiization of variables\n", "theta=30 # degrees # ange made by the ball against the wall\n", "e=0.50\n", "# Calculations\n", "# The notations have been changed\n", "# Resolving the velocity v as,\n", "v_x=cos(theta*(pi/180))\n", "v_y=sin(theta*(pi/180))\n", "V_y=v_y\n", "# from coefficient of restitution reation\n", "V_x=-e*v_x\n", "# Resultant velocity\n", "V=sqrt(V_x**2+V_y**2)\n", "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", "# Results\n", "\n", "print\"The velocity of the ball is \",round(V,3),\"v\"\n", "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The velocity of the ball is 0.661 v\n", "The direction of the ball is 49.1 degree\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 18.18-6,Page No:488" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "import numpy as np\n", "\n", "# Initilization of variables\n", "e=0.8 # coefficient of restitution\n", "g=9.81 # m/s^2 # acc due to gravity\n", "\n", "# Calcuations\n", "\n", "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", "B=np.array([0.945**2,(-0.4*9.81)])\n", "C=np.linalg.solve(A,B) # m\n", "\n", "# Results\n", "\n", "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", "# The answer given in the book i.e 0.104 is wrong.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The height from which the ball A should be released is 0.15 m\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 18.18-7,Page No:490" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Initilization of variables\n", "theta_a=60 # degree # angle made by sphere A with the verticle\n", "e=1 # coefficient of restitution for elastic impact\n", "\n", "# Calculations\n", "\n", "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", "theta_b=arccos(0.875)*(180/pi) # degree\n", "\n", "# Results\n", "\n", "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The angle through which the sphere B will swing after the impact is 28.96 degree\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 18.18-8,Page No:491" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Initilization of variables\n", "m_a=0.01 # kg # mass of bullet A\n", "v_a=100 # m/s # velocity of bullet A\n", "m_b=1 # kg # mass of the bob\n", "v_b=0 # m/s # velocity of the bob\n", "l=1 # m # length of the pendulum\n", "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", "g=9.81 # m/s^2 # acc due to gravity\n", "\n", "# Calculations\n", "\n", "# Momentum of the bullet & the bob before impact is,\n", "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", "\n", "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", "\n", "# (a) When the bullet gets embedded into the bob\n", "v_c=M/(m_a+m_b) # m/s\n", "# The height h to which the bob rises is given by eq'n 3 as,\n", "h_1=(0.5)*(v_c**2/g) # m\n", "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", "\n", "# (b) When the bullet rebounds from the surface of the bob\n", "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", "# The equation for the height which the bob attains after impact is,\n", "h_2=(v_bob_rebound**2)/(2*g) # m\n", "# The corresponding angle of swing \n", "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", "\n", "# (c) When the bullet pierces and escapes through the bob\n", "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", "# The equation for the height which the bob attains after impact is,\n", "h_3=(v_b_escape**2)/(2*g) # m\n", "# The corresponding angle of swing \n", "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", "\n", "# Results\n", "\n", "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" ] } ], "prompt_number": 21 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 18.18-9,Page No:493" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Initilization of variables\n", "\n", "W_a=50 # N # falling weight\n", "W_b=50 # N # weight on which W_a falls\n", "g=9.81 # m/s^2 # acc due to gravity\n", "m_a=W_a/g # kg # mass of W_a\n", "m_b=W_b/g # kg # mass of W_b\n", "k=2*10**3 # N/m # stiffness of spring\n", "h=0.075 # m # height through which W_a falls\n", "\n", "#Calculations\n", "\n", "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", "v_a=(2*g*h)**0.5 # m/s\n", "\n", "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", "\n", "# Initial compression of the spring due to weight W_b is given by,\n", "delta_st=(W_b/k)*(10**2) # cm\n", "\n", "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", "a=1\n", "b=-0.1\n", "c=-0.000003\n", "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", "delta=delta_t-delta_st # cm\n", "\n", "# Results\n", "\n", "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" ] } ], "prompt_number": 26 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 18.18-10,Page No:494" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Initilization of variables\n", "v_a=600 # m/s # velocity of the bullet before impact\n", "v_b=0 # m/s # velocity of the block before impact\n", "w_b=0.25 # N # weight of the bullet\n", "w_wb=50 # N # weight of wodden block\n", "mu=0.5 # coefficient of friction between the floor and the block\n", "g=9.81 # m/s^2 # acc due to gravity\n", "\n", "# Calculations\n", "\n", "m_a=w_b/g # kg # mass of the bullet\n", "m_b=w_wb/g # kg # mass of the block\n", "\n", "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", "\n", "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", "s=v_c**2/(2*g*mu) # m\n", "\n", "# Results\n", "\n", "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The distance through which the block is displaced from its initial position is 0.91 m\n" ] } ], "prompt_number": 28 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 18.18-11,Page No:495" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Initilization of variables\n", "\n", "M=750 # kg # mass of hammer\n", "m=200 # kg # mass of the pile\n", "h=1.2 # m # height of fall of the hammer\n", "delta=0.1 # m # distance upto which the pile is driven into the ground\n", "g=9.81 # m/s^2 # acc due to gravity\n", "\n", "# Caculations\n", "\n", "# The resistance to penetration to the pile is given by eq'n,\n", "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", "\n", "# Results\n", "\n", "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The resistance to penetration to the pile is 79.0 KN\n" ] } ], "prompt_number": 29 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }