summaryrefslogtreecommitdiff
path: root/sample_notebooks/ArchanaDharmasagar Kalidas
diff options
context:
space:
mode:
authorhardythe12015-04-07 15:58:05 +0530
committerhardythe12015-04-07 15:58:05 +0530
commitc7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131 (patch)
tree725a7d43dc1687edf95bc36d39bebc3000f1de8f /sample_notebooks/ArchanaDharmasagar Kalidas
parent62aa228e2519ac7b7f1aef53001f2f2e988a6eb1 (diff)
downloadPython-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.tar.gz
Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.tar.bz2
Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.zip
added books
Diffstat (limited to 'sample_notebooks/ArchanaDharmasagar Kalidas')
-rwxr-xr-xsample_notebooks/ArchanaDharmasagar Kalidas/chapter3.ipynb560
1 files changed, 560 insertions, 0 deletions
diff --git a/sample_notebooks/ArchanaDharmasagar Kalidas/chapter3.ipynb b/sample_notebooks/ArchanaDharmasagar Kalidas/chapter3.ipynb
new file mode 100755
index 00000000..0ace7f2d
--- /dev/null
+++ b/sample_notebooks/ArchanaDharmasagar Kalidas/chapter3.ipynb
@@ -0,0 +1,560 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c2cfd770b64ff6a5a34b3865d707320d0a14506274eb94013c7282c3c39c74ee"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "3 : Mechanics of rigid body"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1, Page number A 3.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given data\n",
+ "t = 20 # tow is given in N-m\n",
+ "k = 0.5 # radius of gyration is given in meters\n",
+ "m = 10 # mass is given in Kgs\n",
+ "# alpha = ? alpha is angular acceleration\n",
+ "#alpha = tow / (((gyration)**2) * mass)\n",
+ "\n",
+ "#calculation\n",
+ "alpha = t / ((k**2) * m)\n",
+ "\n",
+ "#result\n",
+ "print \"the angular acceleration is\", alpha ,\"rad /(sec**2)\"\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the angular acceleration is 8.0 rad /(sec**2)\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2, Page number A 3.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given data\n",
+ "pi = 22/7\n",
+ "m = 6 * 10**24 # mass is given in kgs\n",
+ "r = 6.4 * 10**6 # radius is given in meters \n",
+ "r1 = 1.5 * 10**11 # orbital radius in meters\n",
+ "t = 24*60*60 # number of seconds in a day\n",
+ "T = 365*24*60*60 # number of seconds in a year\n",
+ "\n",
+ "I = (2/5) * m * r**2 # inertia in kg-m**2\n",
+ "I1 = m * r1**2 # inertia in kg-m**2\n",
+ "omega = (2* pi) / t # angular velocity in rad / sec\n",
+ "omega1 = (2* pi) / T\n",
+ "\n",
+ "#calculation\n",
+ "L = I * omega # spin angular momentum (Kg -m**2) / sec\n",
+ "L1 = I1 * omega1 # Orbital angular momentum ((Kg -m**2) / sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"the spin angular momentum is \", round(L/10**33,3), \"*10**33 Kg m**2 / sec\"\n",
+ "print \"answer varies due to rounding off errors\"\n",
+ "print \"the spin angular momentum is \", round(L1/10**40,2), \"*10**40 Kg m**2 / sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the spin angular momentum is 7.152 *10**33 Kg m**2 / sec\n",
+ "answer varies due to rounding off errors\n",
+ "the spin angular momentum is 2.69 *10**40 Kg m**2 / sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4, Page number A 3.33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given data\n",
+ "m = 0.1 # mass is converted into kgs from grams\n",
+ "d = 0.01 # diameter is given in meters\n",
+ "r = d/2 # radius is half of diameter\n",
+ "v = 0.05 # velocity is given in m / s\n",
+ "\n",
+ "I = (2/5) * m *r**2 # inertia is given in Kg - m**2\n",
+ "omega = v/r # angular velocity is given in rad/sec\n",
+ "\n",
+ "#calculation\n",
+ "KE = (1/2)* I * omega**2 # kinetic energy is given in joules\n",
+ "\n",
+ "#Result\n",
+ "print \"the kinetic energy of the sphere is\", round(KE*10**5), \"*10**-5 j\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the kinetic energy of the sphere is 5.0 *10**-5 j\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 5, Page number A 3.34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given data\n",
+ "d = .02 # diameter is converted to meters from centimeters\n",
+ "r = d/2 # radius is half of diameter\n",
+ "I = 2 * 10**(-6) # inertia is given in kg - mtr**2\n",
+ "v = .05 # velocity is converted into mtrs/sec from cms / sec\n",
+ "omega = v/r # omega is angular velocity in rad / sec\n",
+ "\n",
+ "#calculation\n",
+ "KE = (1/2) * I * omega**2 # kinetic energy is calculated in joules\n",
+ "\n",
+ "#Result \n",
+ "print \"the kinetic energy calculated is\" ,KE*10**6, \"*10**-6 j\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the kinetic energy calculated is 25.0 *10**-6 j\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6, Page number A 3.34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given data\n",
+ "m = 100 # mass is given in Kgs\n",
+ "r = 1 # radius is given in meters\n",
+ "n = 120 # number of rotations is equall to 120 rotations per minute\n",
+ "pi = 3.14\n",
+ "t = 60 # time t is given in seconds as the rotations are given according to minute\n",
+ "\n",
+ "#calculation\n",
+ "I = (1/2) * m * r**2 # inertia is calculated in Kg - mtr**2\n",
+ "omega = (2*pi*n)/t # omega is angular velocity\n",
+ "\n",
+ "KE = (1/2) * I * omega**2 # kinetic energy is calculated in joules\n",
+ "\n",
+ "#Result\n",
+ "print \"the kinetic energy is \", round(KE), \"j\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the kinetic energy is 3944.0 j\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8, Page number A 3.35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given data\n",
+ "f = 40 # frequency is given in revolutions per sec\n",
+ "b = 0.1 # base is given in cetimeters which is converted into meters\n",
+ "# inertia (I) is given as (3/10)* m * r**2\n",
+ "\n",
+ "# omega = (m*g*r)/L\n",
+ "\n",
+ "#Calculation\n",
+ "omega = (10*9.8*20*10**(-2))/(4*25*10**(-4) * 6.28 * 40) # angular velocity is cal in rad /sec\n",
+ "\n",
+ "#reuslt\n",
+ "print \"the angular velocity\", round(omega,4), \"rad/sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the angular velocity 7.8025 rad/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 9, Page number A 3.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given data\n",
+ "m = 1.5 # mass is given in Kgs\n",
+ "k = 0.3 # radius of gyration is given in mtrs\n",
+ "n = 240 # number of revolutions per miute\n",
+ "t = 60 # time is taken in seconds as the revolutioni is given per minute\n",
+ "L = 0.1 # pivoted point length is given in meters\n",
+ "g = 9.8 # gravitational constant is 9.8 mtrs/sec**2\n",
+ "\n",
+ "#calculation\n",
+ "omega = (2*pi*n) / t # omega is calculated in rad /sec\n",
+ "\n",
+ "omegap = (g * L) / (k**2 *omega)\n",
+ "\n",
+ "#result\n",
+ "print \"the precessional speed of the wheel is\", round(omegap,2), \"red / sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the precessional speed of the wheel is 0.43 red / sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 10, Page number A 3.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given data\n",
+ "m = 1 # mass is given in kgs\n",
+ "r = 0.1 # radius is given in meters\n",
+ "omega = 20 * 3.14 # omega(angular velocity) is given in rad/ sec\n",
+ "I = (1/2)*m*r**2 # inertia is calcuated in kg - m**2\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "L= I* omega #L agular momentum is calculated in m**2 / sec\n",
+ "KE = (1/2) * I * (omega**2) # kineticc energy is calculated in joules\n",
+ "\n",
+ "#result\n",
+ "print \"the angular momentum is\", L, \"m**2 / sec\"\n",
+ "print \"the kinetic energy is\", KE, \"j\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the angular momentum is 0.314 m**2 / sec\n",
+ "the kinetic energy is 9.8596 j\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 12, Page number A 3.38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given data\n",
+ "m = 0.2 # mass is given in kgs\n",
+ "r = 0.5 # radius is given in meters\n",
+ "a = 0.2 # rate of change of velocity is acceleration which ig given in mtr / sec**2\n",
+ "\n",
+ "# calculation\n",
+ "\n",
+ "# tow is rate of change of angular momentum\n",
+ "# L = m* v * r\n",
+ "# by differentiating L we have to differentiate v that is velocity which gives us acceleration a \n",
+ "\n",
+ "t = m * r * a # tow is calculated in N/m\n",
+ "\n",
+ "#Result\n",
+ "print \"the torque acting is\",t , \"N - m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the torque acting is 0.02 N - m\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 13, Page number A 3.38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given data\n",
+ "m = 2 # mass is given in kgs\n",
+ "r = 0.5 # radius is given in meters\n",
+ "v = 24*1000/(60*60) # velocity is given in Km / hr which is cinverted into mtrs / sec\n",
+ "t = 0.1 # time is given in sec\n",
+ "omega = v/r # angular velocity is calc in rad/sec\n",
+ "theta = 1 # angular change\n",
+ "\n",
+ "# calculation\n",
+ "L = m * r**2 * omega # angular momentum Kg -m**2/sec\n",
+ "#t = d/dt(L)\n",
+ "t= L * theta/t # torque in N -m\n",
+ "\n",
+ "#result\n",
+ "print \"the angular momentum\",round(L,3),\"in KG - m**2/sec\"\n",
+ "print \"the torque required is\",round(t,2),\"N - m\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the angular momentum 6.667 in KG - m**2/sec\n",
+ "the torque required is 66.67 N - m\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 14, Page number A 3.38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given data\n",
+ "KE = 80 # kinetic energy is calculated in joules\n",
+ "I = 8 * 10 **(-7) # inertia is given in kg-m**2\n",
+ "\n",
+ "# calculation\n",
+ "L = (2* I * KE)**(0.5) # the angular momentum is given in Kg -m**2/sec\n",
+ "\n",
+ "# result\n",
+ "print \"the angular momentum is\", round(L*10**2,2) , \"*10**-2 Kg - m**2/sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the angular momentum is 1.13 *10**-2 Kg - m**2/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 15, Page number A 3.39\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#import modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given data\n",
+ "n = 30 # numb of revolution is given in rev / sec\n",
+ "t = 1 # time t is in seconds\n",
+ "theta = 30 # angle theta is 30 degrees\n",
+ "m = 0.5 # mass is given in Kgs \n",
+ "I = 5 * 10**-4 # rotational inertia is given in Kg -m**2\n",
+ "l = 0.04 # length pivoted from the center of mass is given in cms which is converted into meters\n",
+ "pi= 3.14\n",
+ "g = 9.8 # gravitational const is given in m/sec**2\n",
+ "\n",
+ "#calculation\n",
+ "omega = (2*pi*n)/t # angular velocity is calculated in rad/ sec\n",
+ "omegap = (m*g*l)/(I* omega) # angular velocity of precession is calculated in rad/ sec\n",
+ "\n",
+ "#Result\n",
+ "print \"the angular velocity of precession is\",round(omegap,2),\"rad/sec\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the angular velocity of precession is 2.08 rad/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file