{
 "metadata": {
  "name": "",
  "signature": "sha256:f9d692b8ada89b9372523f07f56e78c71c5c09788ec3236a2d96cefbcb6dfce2"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 9 : Distributed forces Moment of Inertia"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.4  Page No : 465"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Given Data\n",
      "#Area of plate\n",
      "A = 9*.75;\t\t\t#in**2\n",
      "y = 1./2*13.84+1/2*.75;\t\t\t#in, y co-ordinate of centroid of the plate\n",
      "\n",
      "# Calculations and Results\n",
      "#All values for flange are from table from book\n",
      "sumA = A+8.85;\t\t\t#in**2 Total area\n",
      "sumyA = y*A+0;\t\t\t#in**3\n",
      "Y = sumyA/sumA;\t\t\t#in \n",
      "#print (Y)\n",
      "#Moment of inertia\n",
      "#For wide flanfe\n",
      "Ix1 = 291+8.85*Y**2;\t\t\t#in**4\n",
      "#for plate\n",
      "Ix2 = 1./12*9*(3./4)**3+6.75*(7.295-3.156)**2;\t\t\t#in**4\n",
      "#For composite area\n",
      "Ix = Ix1+Ix2;\t\t\t#in**4\n",
      "\n",
      "print \"Moment of inertia Ix =  %.2e in**4 \"%(Ix);\n",
      "\n",
      "#Radius of gyration\n",
      "kx = math.sqrt(Ix/sumA);\t\t\t#mm\n",
      "print \"Radius of gyration is kx =  %.1f in\"%(kx);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Moment of inertia Ix =  4.86e+02 in**4 \n",
        "Radius of gyration is kx =  5.6 in\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.5  Page No : 466"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#Given\n",
      "r = 90.;\t\t\t#mm, radius of half circle\n",
      "b = 240.;\t\t\t#mm, width\n",
      "h = 120.;\t\t\t#mm, height\n",
      "\n",
      "# Calculations\n",
      "#Moment of inertia of recmath.tangle\n",
      "Ixr = 1./3*b*h**3;\t\t\t#mm**4\n",
      "#Moment of inertia of half circle\n",
      "a = 4*r/(3*math.pi);\t\t\t#mm\n",
      "b = h-a;\t\t\t#mm, Dismath.tance b from centroid c to X axis\n",
      "I_AA = 1./8*math.pi*r**4;\t\t\t#mm**4, Moment of inertia of half circle with respect to AA'\n",
      "A = 1./2*math.pi*r**2;\t\t\t#mm**2, Area of half circle\n",
      "Ix1 = I_AA-A*a**2;\t\t\t#mm**4, Parallel axis theorem\n",
      "Ixc = Ix1+A*b**2;\t\t\t#mm**4, Parallel axis theorem\n",
      "#Moment of inertia of given area\n",
      "Ix = Ixr-Ixc;\t\t\t#mm**4\n",
      "\n",
      "# Results\n",
      "print \"Moment of inertia of area about X axis is Ix =  %2.2e mm**4\"%(Ix);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Moment of inertia of area about X axis is Ix =  4.59e+07 mm**4\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.7  Page No : 479"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Given Data\n",
      "Ix = 10.38;\t\t\t#in**4,Moment of inertia about x axis\n",
      "Iy = 6.97;\t\t\t#in**4,Moment of inertia about y axis\n",
      "\n",
      "# Calculations and Results\n",
      "Ixy = -3.28+0-3.28\n",
      "print (Ixy)\t\t\t#in in**4\n",
      "\n",
      "#Principal axes\n",
      "tan_2_theta_m = -(2*Ixy)/(Ix-Iy)\n",
      "two_theta_m = math.degrees(math.atan(tan_2_theta_m))\n",
      "theta_m = two_theta_m/2\n",
      "print \"Orientation of principle axes of section about O is Theta_m =  %.1f degree \"%(theta_m);\n",
      "\n",
      "#Principle moment of inertia, eqn 9.27\n",
      "Imax = (Ix+Iy)/2+math.sqrt(((Ix-Iy)/2)**2+Ixy**2);\t\t\t#mm**4\n",
      "Imin = (Ix+Iy)/2-math.sqrt(((Ix-Iy)/2)**2+Ixy**2);\t\t\t#mm**4\n",
      "\n",
      "print \"Principle moment of inertia of section about O are  Imax =  %.2e in**4  Imin =  %.0e  in**4\"%(Imax,Imin);\n",
      "#answer difference is due to roundoff"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "-6.56\n",
        "Orientation of principle axes of section about O is Theta_m =  37.7 degree \n",
        "Principle moment of inertia of section about O are  Imax =  1.55e+01 in**4  Imin =  2e+00  in**4\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}