summaryrefslogtreecommitdiff
path: root/Mechanics_of_Materials_by_R._C._Hibbeler/chapter12.ipynb
blob: 461ae35c0fc1f056b7700190ffafb41eb4512ebe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
{
 "metadata": {
  "name": "",
  "signature": "sha256:28eceabccc986d95bd8fd4a32c3e228a185da4101f3a8dcc4e232e8945315e7d"
 },
 "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",
      "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",
      "\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",
      "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": {}
  }
 ]
}