{ "metadata": { "name": "", "signature": "sha256:5a553b2a442e6221dea12996ec8dc7d308a698d61fa5538169e60bbcf11198bb" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 4 : Equilibrium" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 4.3 Page No : 71" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "from numpy import linalg\t\t\n", " \t\n", "# Variables\n", "W = 100. \t\t\t#lb\n", "a1 = 30. \t\t\t#degrees\n", "a2 = 45. \t\t\t#degrees\n", "\t\t\t\n", "# Calculations\n", "A =[[math.cos(math.radians(a2)),-math.cos(math.radians(a1))],[math.sin(math.radians(a2)),math.sin(math.radians(a1))]]\n", "b =[[0],[W]]\n", "c = linalg.solve(A,b)\n", "Tbc = c[0]\n", "Tab = c[1]\n", "\t\t\t\n", "# Results\n", "print 'Tbc = %.1f lb'%(Tbc)\n", "print 'Tab =%.1f lb'%(Tab)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Tbc = 89.7 lb\n", "Tab =73.2 lb\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 4.4 Page No : 72" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables\n", "W1 = 7000. \t\t\t#lb\n", "W2 = 1000. \t\t\t#lb\n", "W3 = 3000. \t\t\t#lb\n", "x1 = 6. \t\t\t#in\n", "x2 = 9. \t\t\t#in\n", "x3 = 10. \t\t\t#in\n", "x4 = 5. \t\t\t#in\n", "\t\t\t\n", "# Calculations\n", "Rb = (W1*x1+W2*(x1+x2)+W3*(x1+x2+x3))/(x1+x2+x3+x4)\n", "Ra = W1+W2+W3-Rb\n", "\t\t\t\n", "# Results\n", "print 'Rb = %.1f lb'%(Rb)\n", "print 'Ra = %.1f lb'%(Ra)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Rb = 4400.0 lb\n", "Ra = 6600.0 lb\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 4.5 Page No : 74" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables\n", "Fc = 500. \t\t\t#lb\n", "Fd = 1000. \t\t\t#lb\n", "xc = 2. \t\t\t#in\n", "xd = 8. \t\t\t#in\n", "y = 6. \t\t\t#in\n", "\t\t\t\n", "# Calculations\n", "Ay = Fc+Fd\n", "Bx = (Fc*xc+Fd*xd)/y\n", "Ax = Bx\n", "A = math.sqrt(Ax**2+Ay**2)\n", "\t\t\t\n", "# Results\n", "print 'A = %.f lb'%(A)\n", "print 'B = %.f lb'%(Bx)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "A = 2121 lb\n", "B = 1500 lb\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 4.6 Page No : 75" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\t\t\t\n", "# Variables\n", "W = -300. \t\t\t#lb\n", "r = 4. \t\t\t#in\n", "x1 = 2. \t\t\t#ft\n", "x2 = 3. \t\t\t#ft\n", "x3 = 1. \t\t\t#ft\n", "y1 = 1. \t\t\t#ft\n", "x4 = 3. \t\t\t#in\n", "\t\t\t\n", "# Calculations\n", "F = -W*r/(y1*12)\n", "By = -W*x1/(x1+x2)\n", "Bz = -F*(x1+x2+x3+(x4/12))/(x1+x2)\n", "Ay = -W-By\n", "Az = -F-Bz\n", "\t\t\t\n", "# Results\n", "print 'Ay = %.2f lb'%(Ay)\n", "print 'By = %.2f lb'%(By)\n", "print 'Az = %.2f lb'%(Az)\n", "print 'Bz = %.2f lb'%(Bz)\n", "print 'F = %.2f lb'%(F)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Ay = 180.00 lb\n", "By = 120.00 lb\n", "Az = 25.00 lb\n", "Bz = -125.00 lb\n", "F = 100.00 lb\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 4.7 Page No : 77" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables\n", "W = 500. \t\t\t#lb\n", "r = 4. \t\t\t#in\n", "Lx = 3. \t\t\t#in\n", "Ly = 12. \t\t\t#in\n", "Lz = 4. \t\t\t#in\n", "\t\t\t\n", "# Calculations\n", "Tbd = W*(math.sqrt((-Lx)**2+(-Ly)**2+(-Lz)**2))/Ly\n", "Tcd = Lx*Tbd/(math.sqrt((-Lx)**2+(-Ly)**2+(-Lz)**2))\n", "Tad = Lz*Tbd/(math.sqrt((-Lx)**2+(-Ly)**2+(-Lz)**2))\n", "\t\t\t\n", "# Results\n", "print 'Tbd = %.f lb'%(Tbd)\n", "print 'Tcd =%.f lb'%(Tcd)\n", "print 'Tad =%.f lb'%(Tad)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Tbd = 542 lb\n", "Tcd =125 lb\n", "Tad =167 lb\n" ] } ], "prompt_number": 5 } ], "metadata": {} } ] }