{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 20 Motion of Projectile" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 20.1 Motion of Projectile" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The velocity of the projectile is 435.272891 m/s\n", "The direction of the projectile is 5.841405 degree\n" ] } ], "source": [ "import math\n", "# Initilization of variables\n", "v_o=500 # m/s # velocity of the projectile\n", "alpha=30 # angle at which the projectile is fired\n", "t=30 # seconds\n", "g=9.81 # m/s**2 # acc due to gravity\n", "# Calculations\n", "v_x=v_o*(math.cos(alpha*math.pi/180)) # m/s # Initial velocity in the horizontal direction\n", "v_y=v_o*(math.sin(alpha*math.pi/180)) # m/s # Initial velocity in the vertical direction\n", "# MOTION IN HORIZONTA DIRECTION:\n", "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", "# Let the Resultant velocity be v_R. It is given as,\n", "v_R=math.sqrt((V_x)**2+(-V_y)**2) # m/s\n", "theta=math.degrees(math.atan((-V_y)/V_x)) # degree # direction of the projectile\n", "# Results\n", "print('The velocity of the projectile is %f m/s'%v_R) \n", "# The answer of velocity is wrong in the text book.\n", "print('The direction of the projectile is %f degree'%theta)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 20.2 Motion of Projectile" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(a) The velocity of body B for horizontal range is 9.306049 m/s\n", "(b) The velocity of body B for the maximum height is 12.247449 m/s\n", "(c) The velocity of body B for equal time of flight is 12.247449 m/s\n" ] } ], "source": [ "# Initilization of variables\n", "v_A=10 # m/s # velocity of body A\n", "alpha_A=60 # degree # direction of body A\n", "alpha_B=45 # degree # direction of body B\n", "# Calculations\n", "# (a) The velocity (v_B) for the same range is given by eq'n;\n", "v_B=math.sqrt((v_A**2*math.sin(2*alpha_A*math.pi/180))/(math.sin(2*alpha_B*math.pi/180))) # m/s\n", "# (b) Now velocity v_B for the same maximum height is given as,\n", "v_b=math.sqrt((v_A**2)*((math.sin(alpha_A*math.pi/180))**2/(math.sin(alpha_B*math.pi/180))**2)) # m/s\n", "# (c) Now the velocity (v) for the equal time of flight is;\n", "v=(v_A*math.sin(alpha_A*math.pi/180))/(math.sin(alpha_B*math.pi/180)) # m/s\n", "# Results\n", "print('(a) The velocity of body B for horizontal range is %f m/s'%v_B)\n", "print('(b) The velocity of body B for the maximum height is %f m/s'%v_b)\n", "print('(c) The velocity of body B for equal time of flight is %f m/s'%v)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 20.3 Motion of Projectile" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The least velocity with which the ball can be thrown is 9.779954 m/s\n", "The angle of projection for the same is 60.255119 degree\n" ] } ], "source": [ "# Initilization of variables\n", "y=3.6 # m # height of the wall\n", "x_1=4.8 # m # position of the boy w.r.t the wall\n", "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", "g=9.81 # m/s**2 # acc due to gravity\n", "# Calculations\n", "# The range of the projectile is r, given as,\n", "r=x_1+x_2 # m\n", "# Let the angle of the projection be alpha, which is derived and given as,\n", "alpha=math.degrees(math.atan((y)/(x_1-(x_1**2/r)))) # degree\n", "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", "v_o=math.sqrt((g*r)/(math.sin(2*alpha*math.pi/180))) # m/s\n", "# Results\n", "print('The least velocity with which the ball can be thrown is %f m/s'%v_o)\n", "print('The angle of projection for the same is %f degree'%alpha)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 20.5 Motion of Projectile" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The time difference between the two hits is 67.908579 seconds\n" ] } ], "source": [ "# Initilization of variables\n", "v_o=400 # m/s # initial velocity of each gun\n", "r=5000 # m # range of each of the guns\n", "g=9.81 # m/s**2 # acc due to gravity\n", "pi=180 # degree \n", "# Calculations\n", "# now from eq'n 1\n", "theta_1=math.degrees(math.asin((r*g)/(v_o**2)))/(2) \n", "# from eq'n 3\n", "theta_2=(pi-(2*theta_1))/2 # degree \n", "# For 1st & 2nd gun, s is\n", "s=r # m\n", "# For 1st gun \n", "v_x=v_o*math.cos(theta_1*math.pi/180) # m/s\n", "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", "t_1=s/(v_x) # seconds\n", "# For 2nd gun\n", "V_x=v_o*math.cos(theta_2*math.pi/180)\n", "# Now the time of flight for 2nd gun is t_2\n", "t_2=s/(V_x) # seconds\n", "# Let the time difference between the two hits be delta.T. Then,\n", "deltaT=t_2-t_1 # seconds\n", "# Results\n", "print('The time difference between the two hits is %f seconds'%deltaT)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 20.6 Motion of Projectile" ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The pilot should release the bomb from a distance of 3028.912664 m\n", "The angle at which the target would appear is 33.436901 degree\n" ] } ], "source": [ "# Initilization of variables\n", "h=2000 # m/ height of the plane\n", "v=540*(1000/3600) # m/s # velocity of the plane\n", "g=9.81 # m/s**2 # acc due to gravity\n", "# Calculations\n", "# Time t required to travel down a height 2000 m is given by eq'n,\n", "u=0 # m/s # initial velocity\n", "t=math.sqrt((2*h)/(g)) # seconds\n", "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", "s=v*t # m\n", "# angle is given as theta,\n", "theta=math.degrees(math.atan(h/s)) # degree\n", "# Results\n", "print('The pilot should release the bomb from a distance of %f m'%s)\n", "print('The angle at which the target would appear is %f degree'%theta)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 20.7 Motion of Projectile" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(a) The maximum height to which the bullet will rise above the soldier is 127.420999 m\n", "(b) The velocity with which the bullet will hit the target is 104.790267 m/s\n", "(c) The time required to hit the target is 11.111111 seconds\n" ] } ], "source": [ "# Initilization of variables\n", "theta=30 # degree # angle at which the bullet is fired\n", "s=-50 # position of target below hill\n", "v=100 # m/s # velocity at which the bullet if fired\n", "g=9.81 # m/s**2 \n", "# Calculations\n", "v_x=v*math.cos(theta*math.pi/180) # m/s # Initial velocity in horizontal direction\n", "v_y=v*math.sin(theta*math.pi/180) # m/s # Initial velocity in vertical direction\n", "# (a) Max height attained by the bullet\n", "h=v_y**2/(2*g) # m\n", "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", "V_y=math.sqrt((2*-9.81*s)+(v_y)**2) # m/s # the value of V_y is +ve & -ve\n", "# Let V be the velocity with wich it hits the target\n", "V=math.sqrt((v_x)**2+(V_y)**2) # m/s\n", "# (c) The time required to hit the target\n", "a=g # m/s**2\n", "t=(v_y-(-V_y))/a # seconds\n", "# Results\n", "print('(a) The maximum height to which the bullet will rise above the soldier is %f m'%h)\n", "print('(b) The velocity with which the bullet will hit the target is %f m/s'%V)\n", "print('(c) The time required to hit the target is %f seconds'%t)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 20.8 Motion of Projectile" ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The distance x where the hammer hits the round is 5.159708 m\n" ] } ], "source": [ "# Initilization of variables\n", "W=30 # N # Weight of the hammer\n", "theta=30 # degree # ref fig.20.12\n", "mu=0.18 # coefficient of friction\n", "s=10 # m # distance travelled by the hammer # fig 20.12\n", "g=9.81 # m/s**2 # acc due to gravity\n", "# Calculations\n", "# The acceleration of the hammer is given as,\n", "a=g*((math.sin(theta*math.pi/180))-(mu*math.cos(theta*math.pi/180))) # m/s**2\n", "# The velocity of the hammer at point B is,\n", "v=math.sqrt(2*a*s) # m/s\n", "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", "v_x=v*math.cos(theta*math.pi/180) # m/s\n", "v_y=v*math.sin(theta*math.pi/180) # m/s\n", "# MOTION IN VERTICAL DIRECTION\n", "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", "# From the eq'n 4.9*t**2+4.1*t-5=0,\n", "a=4.9\n", "b=4.1\n", "c=-5\n", "# The roots of the eq'n are,\n", "t=((-b)+(math.sqrt(b**2-(4*a*c))))/(2*a)\n", "# MOTION IN HORIZONTAL DIRECTION\n", "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", "s_x=v_x*math.cos(theta*math.pi/180)*t # m\n", "x=1+s_x # m\n", "# Results\n", "print('The distance x where the hammer hits the round is %f m'%x)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 20.9 Motion of Projectile" ] }, { "cell_type": "code", "execution_count": 27, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(a) The velocity of shell just before bursting is 500.255037 m/s\n", "(b) The velocity of first part immediately after the shell burst is 1000.510074 m/s\n", "(c) The velocity of second part immediately after the shell burst is 1000.510074 m/s\n", "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.000000 m\n" ] } ], "source": [ "# Initilization of variables\n", "s=1000 # m # distance OB (ref fig.20.13)\n", "h=19.6 # m # height of shell from ground\n", "g=9.81 # m/s**2 # acc due to gravity\n", "# Calculations\n", "# MOTION OF ENTIRE SHELL FROM O to A.\n", "v_y=math.sqrt(2*(g)*h) # m/s # initial velocity of shell in vertical direction\n", "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", "v_x=s/t # m/s # velocity of shell in vertical direction\n", "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", "v_x2=v_x*2 # m/s\n", "# Now distance BC travelled by part 2 is\n", "BC=v_x2*t # m\n", "# Distance from firing point OC\n", "OC=s+BC # m\n", "# Results\n", "print('(a) The velocity of shell just before bursting is %f m/s'%v_x)\n", "print('(b) The velocity of first part immediately after the shell burst is %f m/s'%v_x2)\n", "print('(c) The velocity of second part immediately after the shell burst is %f m/s'%v_x2)\n", "print('(b) The distance between the firing point & the point where the second part of the shell hit the ground is %f m'%OC)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 20.10 Motion of Projectile" ] }, { "cell_type": "code", "execution_count": 33, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The range covered (i.e BC) is 7650.920998 m\n" ] } ], "source": [ "# Initilization of variables\n", "v_o=200 # m/s # initial velocity\n", "theta=60 # degree # angle of the incline\n", "y=5 # rise of incline\n", "x=12 # length of incline\n", "g=9.81 # m/s**2 # acc due to gravity\n", "# Calculations\n", "# The angle of the inclined plane with respect to horizontal\n", "beta=math.degrees(math.atan(y/x)) # degree\n", "# The angle of projection with respect to horizontal\n", "alpha=90-theta # degree\n", "# Range is given by eq'n (ref. fig.20.14)\n", "AB=(2*v_o**2*(math.sin((alpha-beta)*math.pi/180))*math.cos(alpha*math.pi/180))/(g*(math.cos(beta*math.pi/180))**2) # m\n", "# Range AC when the short is fired down the plane\n", "AC=(2*v_o**2*(math.sin((alpha+beta)*math.pi/180))*math.cos(alpha*math.pi/180))/(g*(math.cos(beta*math.pi/180))**2) # m\n", "BC=AB+AC # m\n", "# Results\n", "print('The range covered (i.e BC) is %f m'%BC)" ] } ], "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 }