diff options
author | Jovina Dsouza | 2014-06-18 12:43:07 +0530 |
---|---|---|
committer | Jovina Dsouza | 2014-06-18 12:43:07 +0530 |
commit | 206d0358703aa05d5d7315900fe1d054c2817ddc (patch) | |
tree | f2403e29f3aded0caf7a2434ea50dd507f6545e2 /Mechanics_of_Materials/chapter12.ipynb | |
parent | c6f0d6aeb95beaf41e4b679e78bb42c4ffe45a40 (diff) | |
download | Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.tar.gz Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.tar.bz2 Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.zip |
adding book
Diffstat (limited to 'Mechanics_of_Materials/chapter12.ipynb')
-rw-r--r-- | Mechanics_of_Materials/chapter12.ipynb | 172 |
1 files changed, 172 insertions, 0 deletions
diff --git a/Mechanics_of_Materials/chapter12.ipynb b/Mechanics_of_Materials/chapter12.ipynb new file mode 100644 index 00000000..b8be714d --- /dev/null +++ b/Mechanics_of_Materials/chapter12.ipynb @@ -0,0 +1,172 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Review of Centroids and Moments of Inertia " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2, page no. 833" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "find centroid C of the cross-sectional area.\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "A1 = 6*0.5 # Partial Area in in2\n", + "A2 = 20.8 # from table E1 and E3\n", + "A3 = 8.82 # from table E1 and E3\n", + "y1 = (18.47/2.0) + (0.5/2.0) # Distance between centroid C1 and C2\n", + "y2 = 0 # Distance between centroid C2 and C2\n", + "y3 = (18.47/2.0) + 0.649 # Distance between centroid C3 and C2\n", + "\n", + "#calculation\n", + "A = A1 + A2 + A3 # Area of entire cross section\n", + "Qx = (y1*A1) + (y2*A2) - (y3*A3) # First moment of entire cross section\n", + "y_bar = Qx/A # Distance between x-axis and centroid of the cross section\n", + "print \"The distance between x-axis and centroid of the cross section is \", round(-y_bar,2), \"inch\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance between x-axis and centroid of the cross section is 1.8 inch\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5, page no. 840" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "evaluate moment of inertia Ic with respect to the horizontal axis C-C\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "A1 = 6*0.5 # Partial Area in in2\n", + "A2 = 20.8 # from table E1 and E3\n", + "A3 = 8.82 # from table E1 and E3\n", + "y1 = (18.47/2.0) + (0.5/2.0) # Distance between centroid C1 and C2\n", + "y2 = 0 # Distance between centroid C2 and C2\n", + "y3 = (18.47/2.0) + 0.649 # Distance between centroid C3 and C2\n", + "\n", + "#calculation\n", + "A = A1 + A2 + A3 # Area of entire cross section\n", + "Qx = (y1*A1) + (y2*A2) - (y3*A3) # First moment of entire cross section\n", + "y_bar = Qx/A # Distance between x-axis and centroid of the cross section\n", + "c_bar = -(y_bar)\n", + "\n", + "I1 = (6*0.5**3)/12.0 # Moment of inertia of A1 \n", + "I2 = 1170 # Moment of inertia of A2 from table E1\n", + "I3 = 3.94 # Moment of inertia of A3 from table E3\n", + "Ic1 = I1 + (A1*(y1+c_bar)**2) # Moment of inertia about C-C axis of area C1\n", + "Ic2 = I2 + (A2*(y2+c_bar)**2) # Moment of inertia about C-C axis of area C2\n", + "Ic3 = I3 + (A3*(y3-c_bar)**2) # Moment of inertia about C-C axis of area C3\n", + "Ic = Ic1 + Ic2 + Ic3 # Moment of inertia about C-C axis of whole area\n", + "print \"The moment of inertia of entire cross section area about its centroidal axis C-C\", round(Ic), \"in^4\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of inertia of entire cross section area about its centroidal axis C-C 2200.0 in^4\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7, page no. 851" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculate orientations of the principal centroidal axes and the magnitudes\n", + "of the principal centroidal moments of inertia\n", + "\"\"\"\n", + "\n", + "import math \n", + "import numpy\n", + "\n", + "#initialisation\n", + "Ix = 29.29e06 # Moment of inertia of crosssection about x-axis\n", + "Iy = 5.667e06 # Moment of inertia of crosssection about y-axis\n", + "Ixy = -9.336e06 # Moment of inertia of crosssection \n", + "\n", + "#calculation\n", + "tp1 = (numpy.degrees(numpy.arctan((-(2*Ixy)/(Ix-Iy)))))/2.0 # Angle definig a Principle axix\n", + "tp2 = 90 + tp1 \n", + "print \"The Principle axis is inclined at an angle\", round(tp1,2), \"degree\"\n", + "print \"Second angle of inclination of Principle axis is\", round(tp2,2), \"degree\"\n", + "Ix1 = (Ix+Iy)/2.0 + ((Ix-Iy)/2.0)*math.cos(math.radians(tp1)) - Ixy*math.sin(math.radians(tp1))\n", + "Ix2 = (Ix+Iy)/2.0 + ((Ix-Iy)/2.0)*math.cos(math.radians(tp2)) - Ixy*math.sin(math.radians(tp2))\n", + "print \"Principle Moment of inertia corresponding to tp1\", round(Ix1), \"mm^4\"\n", + "print \"Principle Moment of inertia corresponding to tp2\", round(Ix2), \"mm^4\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Principle axis is inclined at an angle 19.16 degree\n", + "Second angle of inclination of Principle axis is 109.16 degree\n", + "Principle Moment of inertia corresponding to tp1 31700001.0 mm^4\n", + "Principle Moment of inertia corresponding to tp2 22420295.0 mm^4\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |