{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 10: Collisions" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 10.1: Sample_Problem_1.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "exec('degree_rad.sci',-1)\n", "\n", "//Given that\n", "m = 140 * 10^-3 //in kg\n", "Vi = -39 //in m/s\n", "Vf = 39 //in m/s\n", "\n", "//Sample Problem 10-1a\n", "printf('**Sample Problem 10-1a**\n')\n", "//J = Pf - Pi\n", "J = m *(Vf - Vi)\n", "printf('The magnitude of impulse acted on the ball from bat is equal to %fN-s\n', J)\n", "\n", "//Sample Problem 10-1b\n", "printf('\n**Sample Problem 10-1b**\n')\n", "t = 1.20* 10^-3 //in sec\n", "Favg = J/t\n", "printf('The average force during the collision is %fN\n', Favg)\n", "\n", "//Sample Problem 10-1c\n", "printf('\n**Sample Problem 10-1c**\n')\n", "Vf = 45* [cos(dtor(30)), sin(dtor(30))]\n", "Vi = [-39, 0]\n", "J = m* (Vf - Vi)\n", "printf('The magnitude of new inpulse is %fN-s\n', norm(J))\n", "printf('The new impulse makes an angle of %f degress with the horizontal', rtod(atan(J(2)/ J(1))))" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 10.2: Sample_Problem_2.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Given that\n", "M = 5.4 //in kg\n", "m = 9.5* 10^-3 //in kg\n", "g = 9.8 //in m/s^2\n", "h = 6.3* 10^-2 //in meter\n", "\n", "//Sample Problem 10-2\n", "printf('**Sample Problem 10-2**\n')\n", "//Mechanical energy conservation-\n", "//0.5*(M+m)*Va^2 = (M+m)*g*h\n", "Va = sqrt(g*h/0.5)\n", "//Momentum conservation for the collision\n", "Vb = (M+m)*Va/m\n", "printf('The velocity of the bullet before collision is %fm/s', Vb)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 10.3: Sample_Problem_3.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Given that\n", "m1 = 0.70 //in kg\n", "m = [0.14, 3.2] //in kg\n", "k = [4.1* 10^4, 2.6* 10^6] //in N/m\n", "d = [16* 10^-3, 1.1* 10^-3] //in meter\n", "\n", "//Sample Problem 10-3a\n", "printf('**Sample Problem 10-3a**\n')\n", "name = ['board', 'block']\n", "U = zeros(2,1)\n", "for count = 1:2\n", " U(count) = 0.5* k(count)* d(count)^2\n", " printf('The energy stored in %s is %fJ\n', name(count), U(count))\n", "end\n", "\n", "//Sample Problem 10-3b\n", "printf('\n**Sample Problem 10-3b**\n')\n", "for count = 1:2\n", " //Energy conservation\n", " Vf = sqrt(U(count)/(0.5*(m1+m(count))))\n", " //Momentum conservation\n", " Vi = (m1 + m(count))*Vf/m1\n", " printf('The minimum velocity required to break the %s is %fm/s\n', name(count), Vi)\n", "end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 10.4: Sample_Problem_4.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "exec('collision.sci', -1)\n", "\n", "//Given that\n", "m1 = 30*10^-3 //in kg\n", "h1 = 8*10^-2 //in m\n", "m2 = 75*10^-3 //in kg\n", "g = 9.8 //in m/s^2\n", "e = 1\n", "\n", "//Sample Problem 10-4\n", "printf('**Sample Problem 10-4**\n')\n", "//velocity just before collision\n", "Vi = zeros(1,2)\n", "Vi(1) = sqrt(2*g*h1)\n", "Vi(2) = 0\n", "Vf= fsolve([0,0], collision)\n", "printf('The velocity of m1 after collision is %fm/s', abs(Vf(1)))" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 10.5: Sample_Problem_5.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Given that\n", "Ma = 83 //in kg\n", "Va = [6.2, 0] //in km/h\n", "Mb = 55 //in kg\n", "Vb = [0, 7.8] //in km/h\n", "\n", "//Sample Problem 10-5a\n", "printf('**Sample Problem 10-5a**\n')\n", "Vf = (Ma*Va + Mb*Vb)/(Ma+Mb)\n", "printf('The common velocity after the collision is %fm/s\n', norm(Vf))\n", "\n", "//Sample Problem 10-5b\n", "printf('\n**Sample Problem 10-5**\n')\n", "printf('The velocity of center of mass is not altered due to collision')" ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }