summaryrefslogtreecommitdiff
path: root/Mechanics_of_Materials_by_Pytel_and_Kiusalaas/AppendixA_3.ipynb
blob: 7f8e8cd809b1a9fce83d722dd4a9b8e036d8fc50 (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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
{
 "metadata": {
  "name": "",
  "signature": "sha256:8adf459ea4014e5f8ac2990e8d05feaccf30880e758648b173bb1fd18b74b81a"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Appendix A: Review of Properties of Plane Area"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example A.1, Page No:486"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "A=2000 #Area of the plane in mm^2\n",
      "Ix=40*10**6 #Momnet of Inertia in mm^4\n",
      "d1=90 #Distance in mm\n",
      "d2=70 #Distance in mm\n",
      "\n",
      "#Calculations\n",
      "Ix_bar=Ix-(A*d1**2) #Moment of Inertia along x_bar axis in mm^4\n",
      "Iu=Ix_bar+A*d2**2 #Moment of Inertia along U-axis in mm^4\n",
      "\n",
      "#Result\n",
      "print Ix_bar\n",
      "print \"The moment of inertia along u-axis is\",round(Iu,1),\"mm^4\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "23800000\n",
        "The moment of inertia along u-axis is 33600000.0 mm^4\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example A.2, Page No:486"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "R=45 #Radius of the circle in mm\n",
      "r=20 #Radius of the smaller circle in mm\n",
      "h=100 #Depth of the straight section in mm\n",
      "\n",
      "#Calculations\n",
      "#Part 1\n",
      "\n",
      "#Triangle\n",
      "b=2*R #Breadth in mm\n",
      "A_t=b*h*0.5 #Area in mm^2\n",
      "Ix_bar_t=b*h**3*36**-1 #Moment of inertia in mm^4\n",
      "y_bar1=2*3**-1*h #centroidal axis in mm\n",
      "Ix_t=Ix_bar_t+A_t*y_bar1**2 #moment of inertia in mm^4\n",
      "\n",
      "#Semi-circle\n",
      "A_sc=pi*R**2*0.5 #Area of the semi-circle in mm^2\n",
      "Ix_bar_sc=0.1098*R**4 #Moment of inertia in mm^4\n",
      "y_bar2=h+(4*R*(3*pi)**-1) #Distance of centroid in mm\n",
      "Ix_sc=Ix_bar_sc+A_sc*y_bar2**2 #Moment of inertia in mm^4\n",
      "\n",
      "#Circle\n",
      "A_c=pi*r**2 #Area of the circle in mm^2\n",
      "Ix_bar_c=pi*r**4*4**-1 #Moment of inertia in mm^4\n",
      "y_bar3=h #Distance of centroid in mm\n",
      "Ix_c=Ix_bar_c+A_c*y_bar3**2 #Moment of inertia in mm^4\n",
      "\n",
      "#Composite Area\n",
      "A=A_t+A_sc-A_c #Total area in mm^2\n",
      "Ix=Ix_t+Ix_sc-Ix_c #Moment of inertia in mm^4\n",
      "\n",
      "#Part 2\n",
      "y_bar=(A_t*y_bar1+A_sc*y_bar2-A_c*y_bar3)/(A) #Location of centroid in mm\n",
      "Ix_bar=Ix-A*y_bar**2 #Moment of inertia in mm^4\n",
      "\n",
      "#Result\n",
      "print \"Moment of inertia about x-axis is\",round(Ix),\"mm^4\"\n",
      "print \"Moment of inertia about the centroidal axis is\",round(Ix_bar),\"mm^4\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Moment of inertia about x-axis is 55377079.0 mm^4\n",
        "Moment of inertia about the centroidal axis is 7744899.0 mm^4\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example A.3, Page No:488"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "t=20 #Thickness in mm\n",
      "h=140 #Depth in mm\n",
      "w=180 #Width in mm\n",
      "\n",
      "#Calculations\n",
      "Ixy_1=0+(h*t*t*0.5*h*0.5) #product of inertia in mm^4\n",
      "Ixy_2=0+((w-t)*t*(w+t)*0.5*t*0.5) #Product of inertia in mm^4\n",
      "Ixy=Ixy_1+Ixy_2 #Product of inertia in mm^4\n",
      "\n",
      "#Result\n",
      "print \"The Product of inertia is\",round(Ixy),\"mm^4\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Product of inertia is 5160000.0 mm^4\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example A.4, Page No:495"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "t=30 #Thickness in mm\n",
      "h=200 #Depth of the section in mm\n",
      "w=160 #Width in mm\n",
      "the=50 #Angle in degrees\n",
      "\n",
      "\n",
      "#Calculations\n",
      "A1=t*h #Area of the web portion in mm^2\n",
      "A2=(w-t)*t #Area of the flange portion in mm^2\n",
      "x_bar=(A1*t*0.5+A2*(t+(w-t)*0.5))/(A1+A2) #Location of x_bar in mm\n",
      "y_bar=(A1*h*0.5+A2*t*0.5)/(A1+A2) #Location of y_bar in mm\n",
      "\n",
      "#Simplfying the computation\n",
      "a=t*h**3*12**-1\n",
      "b=A1*(200*0.5-y_bar)**2\n",
      "c=(w-t)*t**3*12**-1\n",
      "d=A2*(t*0.5-y_bar)**2\n",
      "Ix_bar=a+b+c+d #Moment of inertia about x-axis in mm^4\n",
      "\n",
      "#Simplifying the computation\n",
      "p=h*t**3*12**-1\n",
      "q=A1*(t*0.5-x_bar)**2\n",
      "r=t*(w-t)**3*12**-1\n",
      "s=A2*((w-t)*0.5+t-x_bar)**2\n",
      "Iy_bar=p+q+r+s #Moment of inertia about y-axis in mm^4\n",
      "\n",
      "#Simplfying the computation\n",
      "a1=(t*0.5-x_bar)*(h*0.5-y_bar)\n",
      "a2=(t*0.5-y_bar)*((w-t)*0.5+t-x_bar)\n",
      "Ixy_bar=A1*a1+A2*a2 #Moment of inertia in mm^4\n",
      "\n",
      "#Part 1\n",
      "#Simplfying the computation\n",
      "a3=(Ix_bar+Iy_bar)*0.5\n",
      "a4=(0.5*(Ix_bar-Iy_bar))**2\n",
      "a5=Ixy_bar**2\n",
      "I1=a3+np.sqrt(a4+a5) #Moment of inertia in mm^4\n",
      "I2=a3-np.sqrt(a4+a5) #Moment of inertia in mm^4\n",
      "\n",
      "ThetaRHS=-(2*Ixy_bar)/(Ix_bar-Iy_bar) #RHS of the tan term\n",
      "theta1=arctan(ThetaRHS)*0.5*180*pi**-1 #Angle in degrees\n",
      "theta2=theta1+90 #Angle in degrees\n",
      "\n",
      "#Part 2\n",
      "Iu=a3+np.sqrt(a4)*np.cos(2*the*pi*180**-1)-(Ixy_bar)\\\n",
      "      *np.sin(2*the*pi*180**-1) #Moment of inertia in mm^4\n",
      "Iv=a3-np.sqrt(a4)*np.cos(2*the*pi*180**-1)+(Ixy_bar)\\\n",
      "      *np.sin(2*the*pi*180**-1) #Moment of inertia in mm^4\n",
      "Iuv=np.sqrt(a4)*np.sin(2*the*pi*180**-1)+(Ixy_bar)\\\n",
      "      *np.cos(2*the*pi*180**-1) #Moment of inertia in mm^4\n",
      "    \n",
      "    \n",
      "#Result\n",
      "print \"The Principal Moment of inertias are as follows\"\n",
      "print \"I1=\",round(I1),\"mm^4 and I2=\",round(I2),\"mm^4\"\n",
      "print \"Princial direction are theta1=\",round(theta1,1), \"degrees\"\\\n",
      "       \" theta2=\",round(theta2,1),\"degrees\"\n",
      "print \"The moment of inertia along the uv-axis is\",round(Iuv),\"mm^4\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Principal Moment of inertias are as follows\n",
        "I1= 47240734.0 mm^4 and I2= 11198811.0 mm^4\n",
        "Princial direction are theta1= 31.6 degrees theta2= 121.6 degrees\n",
        "The moment of inertia along the uv-axis is 10817183.0 mm^4\n"
       ]
      }
     ],
     "prompt_number": 51
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example A.5, Page No:497"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "Ix_bar=37.37*10**6 #Moment of inertia in mm^4\n",
      "Iy_bar=21.07*10**6 #Moment of inertia in mm^4\n",
      "Ixy_bar=-16.073*10**6 #Moment of inertia in mm^4\n",
      "\n",
      "#Calculations\n",
      "b=(Ix_bar+Iy_bar)*0.5 #Parameter for the circle in mm^4\n",
      "R=sqrt(((Ix_bar-Iy_bar)*0.5)**2+Ixy_bar**2) #Radius of the Mohr's Circle in mm^4\n",
      "\n",
      "#Part 1\n",
      "I1=b+R #MI in mm^4\n",
      "I2=b-R #MI in mm^4\n",
      "theta1=arcsin(abs(Ixy_bar)/R)*180*pi**-1*0.5 #Angle in degrees\n",
      "theta2=theta1+90 #Angle in degrees\n",
      "\n",
      "#Part 2\n",
      "alpha=(100-theta1*2)*0.5 #Angle in degrees\n",
      "Iu=round(b,2)+round(R,3)*round(np.cos(alpha*pi*180**-1),2) #MI in mm^4\n",
      "Iv=round(b,2)-round(R,3)*round(np.cos(alpha*pi*180**-1),2) #MI in mm^4\n",
      "Iuv=R*np.sin(2*alpha*pi*180**-1) #MI in mm^4\n",
      "\n",
      "#Result\n",
      "print \"The Principal Moment of inertias are as follows\"\n",
      "print \"I1=\",round(I1),\"mm^4 and I2=\",round(I2),\"mm^4\"\n",
      "print \"Princial direction are theta1=\",round(theta1,1), \"degrees\"\\\n",
      "       \" theta2=\",round(theta2,1),\"degrees\"\n",
      "print \"The moment of inertia along the uv-axis is\",round(Iuv),\"mm^4\"  \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Principal Moment of inertias are as follows\n",
        "I1= 47241205.0 mm^4 and I2= 11198795.0 mm^4\n",
        "Princial direction are theta1= 31.6 degrees theta2= 121.6 degrees\n",
        "The moment of inertia along the uv-axis is 10817230.0 mm^4\n"
       ]
      }
     ],
     "prompt_number": 73
    }
   ],
   "metadata": {}
  }
 ]
}