diff options
Diffstat (limited to 'Statics_And_Strength_Of_Materials/ch2.ipynb')
-rwxr-xr-x | Statics_And_Strength_Of_Materials/ch2.ipynb | 358 |
1 files changed, 358 insertions, 0 deletions
diff --git a/Statics_And_Strength_Of_Materials/ch2.ipynb b/Statics_And_Strength_Of_Materials/ch2.ipynb new file mode 100755 index 00000000..74bc7026 --- /dev/null +++ b/Statics_And_Strength_Of_Materials/ch2.ipynb @@ -0,0 +1,358 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ddc392c3474d618cbae4adde9fb1f47f093e50fd2a55d0b1580decec813c6214" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Force System : Components, Resultants, Equivalence" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "f1 = 20. \t\t\t#lb\n", + "f2 = 40. \t\t\t#lb\n", + "alpha = 30. \t\t\t#degrees\n", + "\t\t\t\n", + "# Calculations\n", + "R = math.sqrt(f1**2+f2**2+2*f1*f2*math.cos(math.radians(alpha)))\n", + "angle = math.degrees(math.asin((f2*math.sin(math.radians(180-alpha)))/(R)))\n", + "\t\t\t\n", + "# Results\n", + "print 'R = %.1f lb'%(R)\n", + "print 'angle = %.1f degrees'%(angle)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 58.2 lb\n", + "angle = 20.1 degrees\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "fx = 100. \t\t\t#lb\n", + "f1 = 200. \t\t\t#lb\n", + "f2 = 100. \t\t\t#lb\n", + "f3 = 50. \t\t\t#lb\n", + "a1 = 30. \t\t\t#degrees\n", + "a2 = 45. \t\t\t#degrees\n", + "a3 = 60. \t\t\t#degrees\n", + "\t\t\t\n", + "# Calculations\n", + "Rx = fx+f1*math.cos(math.radians(a1))-f2*math.cos(math.radians(a2))-f3*math.cos(math.radians(a3))\n", + "Ry = f1*math.sin(math.radians(a1))+f2*math.sin(math.radians(a2))-f3*math.sin(math.radians(a3))\n", + "R = math.sqrt(Rx**2+Ry**2)\n", + "angle = math.degrees(math.atan(Ry/Rx))\n", + "\t\t\t\n", + "# Results\n", + "print 'R = %.f lb'%(R)\n", + "print 'angle = %.1f degrees'%(angle)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 218 lb\n", + "angle = 35.7 degrees\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "f1 = 100. \t\t\t#lb\n", + "f2 = 200. \t\t\t#lb\n", + "x1 = 2.\n", + "x2 = -3.\n", + "y1 = 3.\n", + "y2 = 5.\n", + "z1 = 4.\n", + "z2 = -2.\n", + "\t\t\t\n", + "# Calculations\n", + "d1 = math.sqrt(x1**2+y1**2+z1**2)\n", + "d2 = math.sqrt(x2**2+y2**2+z2**2)\n", + "f1x = f1*x1/d1\n", + "f1y = f1*y1/d1\n", + "f1z = f1*z1/d1\n", + "f2x = f2*x2/d2\n", + "f2y = f2*y2/d2\n", + "f2z = f2*z2/d2\n", + "Rx = f1x+f2x\n", + "Ry = f1y+f2y\n", + "Rz = f1z+f2z\n", + "R = math.sqrt(Rx**2+Ry**2+Rz**3)\n", + "I1 = Rx/R\n", + "I2 = Ry/R\n", + "I3 = Rz/R\n", + "\t\t\t\n", + "# Results\n", + "print 'R = %d lb'%(R)\n", + "print 'I1 = %.3f '%(I1)\n", + "print 'I2 = %.3f '%(I2)\n", + "print 'I3 = %.3f '%(I3)\n", + "\n", + "# note : rounding off error would be there for R." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 227 lb\n", + "I1 = -0.264 \n", + "I2 = 0.956 \n", + "I3 = 0.041 \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "F = 100. \t\t\t#lb\n", + "x1 = 6. \t\t\t#in\n", + "x2 = 8. \t\t\t#in\n", + "x3 = 2. \t\t\t#in\n", + "\t\t\t\n", + "# Calculations\n", + "xab = math.sqrt(x1**2+x2**2)\n", + "d = x3*x1/xab\n", + "M1 = F*d\n", + "Fx = F*x2/xab\n", + "Fy = F*x1/xab\n", + "M2 = Fy*xab-Fx*x1\n", + "M3 = Fy*x3\n", + "\t\t\t\n", + "# Results\n", + "print 'M1 = %.f lb.in'%(M1)\n", + "print 'M2 = %.f lb.in'%(M2)\n", + "print 'M3 = %.f lb.in'%(M3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "M1 = 120 lb.in\n", + "M2 = 120 lb.in\n", + "M3 = 120 lb.in\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "Fy1 = 2. \t\t\t#kips\n", + "Fy2 = 5. \t\t\t#kips\n", + "Fy3 = 10. \t\t\t#kips\n", + "Fy4 = 3. \t\t\t#kips\n", + "L = 5. \t\t\t#ft\n", + "\n", + "# Calculations\n", + "Ry = Fy1+Fy2+Fy3+Fy4\n", + "x = (Fy1*L+Fy2*2*L+Fy3*3*L+Fy4*4*L)/Ry\n", + "\t\t\t\n", + "# Results\n", + "print 'Ry = %.2f kips'%(Ry)\n", + "print 'x = %.1f ft to the right of O'%(x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ry = 20.00 kips\n", + "x = 13.5 ft to the right of O\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \t\t\t\n", + "\n", + "# Variables\n", + "Fx1 = -15. \t\t\t#lb\n", + "Fx2 = 55. \t\t\t#lb\n", + "Fy1 = 70. \t\t\t#lb\n", + "Fy2 = -40. \t\t\t#lb\n", + "x1 = 4. \t\t\t#in\n", + "x2 = 3. \t\t\t#in\n", + "x3 = 5. \t\t\t#in\n", + "y1 = 4. \t\t\t#in\n", + "y2 = 2. \t\t\t#in\n", + "\t\t\t\n", + "# Calculations\n", + "Rx = Fx1+Fx2\n", + "Ry = Fy1+Fy2\n", + "R = math.sqrt(Rx**2+Ry**2)\n", + "angle = math.degrees(math.atan(Ry/Rx))\n", + "\t\t\t\n", + "# Results\n", + "print 'R = %.2f lb'%(R)\n", + "print 'angle = %.1f degrees'%(angle)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 50.00 lb\n", + "angle = 36.9 degrees\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\t\t\n", + "# Variables\n", + "Fy = 200. \t\t\t#lb\n", + "Fx = 100. \t\t\t#lb\n", + "y = 3. \t \t\t#in\n", + "x = 6. \t\t\t#in\n", + "\t\t\t\n", + "# Calculations\n", + "M = Fy*x-Fx*y\n", + "\t\t\t\n", + "# Results\n", + "print 'Moment = %.2f lb in'%(M)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Moment = 900.00 lb in\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |