summaryrefslogtreecommitdiff
path: root/Mechanics_of_Materials/Chapter9.ipynb
blob: cb81513e06e9349f3f00d183ec3f46684579244d (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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 9:Stress Transformation"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.1 Page no 440"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "import math\n",
      "tou = 25\t\t #MPa, shear stress\n",
      "sigma1 = 50 \t\t#MPa, stress\n",
      "sigma2 = 80 \t\t#MPa\n",
      "phi = 30*(math.pi/180.0)\n",
      "\n",
      "# Calculations\n",
      "sigma_x1 = (sigma1*math.cos(phi)*math.cos(phi))- (tou*math.cos(phi)*math.sin(phi)) - (sigma2*math.sin(phi)*math.sin(phi))- (tou*math.sin(phi)*math.cos(phi))\n",
      "tou1 = (sigma1*math.cos(phi)*math.sin(phi))+ (tou*math.cos(phi)*math.cos(phi)) + (sigma2*math.sin(phi)*math.cos(phi))- (tou*math.sin(phi)*math.sin(phi))\n",
      "sigma_x2 = (tou*math.cos(phi)*math.sin(phi))- (sigma2*math.cos(phi)*math.cos(phi)) + (tou*math.sin(phi)*math.cos(phi))+ (sigma1*math.sin(phi)*math.sin(phi))\n",
      "tou2 = (tou*math.cos(phi)*math.cos(phi))+ (sigma2*math.cos(phi)*math.sin(phi)) - (tou*math.sin(phi)*math.sin(phi))+ (sigma1*math.sin(phi)*math.cos(phi))\n",
      "\n",
      "#Display\n",
      "print\"The normal stress component in the x diection is     = \",round(sigma_x1,1),\"MPa\"\n",
      "print\"  The shear stress component in the x diection is    = \",round(tou1,1),\"MPa\"\n",
      "print\"  The normal stress component in the y diection is   = \",round(sigma_x2,1),\"MPa\"\n",
      "print\"  The shear stress component in the y diection is    = \",round(tou2,1),\"MPa\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The normal stress component in the x diection is     =  -4.2 MPa\n",
        "  The shear stress component in the x diection is    =  68.8 MPa\n",
        "  The normal stress component in the y diection is   =  -25.8 MPa\n",
        "  The shear stress component in the y diection is    =  68.8 MPa\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.2 Page no 444"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "import math\n",
      "phi = -30*(math.pi/180)    #angle\n",
      "theta = 60*(math.pi/180)   \n",
      "sigma_x = -80              #MPa\n",
      "sigma_y = 50               #MPa\n",
      "tou_xy = -25               #MPa\n",
      "\n",
      "#Plane CD\n",
      "sigma_x1 = (sigma_x+sigma_y)/2 + ((sigma_x-sigma_y)*math.cos(2*phi))/2 + (tou_xy*math.sin(2*phi)) #Eqn 9.1\n",
      "tou_xy1 = ((-(sigma_x - sigma_y)*math.sin(2*phi))/2) + (tou_xy*math.cos(2*phi)) #Eqn 9.2\n",
      "\n",
      "#Plane BC\n",
      "sigma_x2 = (sigma_x+sigma_y)/2 + ((sigma_x-sigma_y)*math.cos(2*theta))/2 + (tou_xy*math.sin(2*theta)) #Eqn 9.1\n",
      "tou_xy2 = (-(sigma_x - sigma_y)*math.sin(2*theta))/2 + tou_xy*math.cos(2*theta) #Eqn 9.2\n",
      "\n",
      "#Display\n",
      "print'The normal stress of plane CD inclined at 30 degrees    = ',round(sigma_x1,1),\"MPa\"\n",
      "print'The shear stress of plane CD inclined at 30 degrees     = ',round(tou_xy1,1),\"MPa\"\n",
      "print'The normal stress of plane BC inclined at 60 degrees    = ',round(sigma_x2,1),\"MPa\"\n",
      "print'The shear stress of plane BC inclined at 60 degrees     = ',round(tou_xy2,1),\"MPa\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The normal stress of plane CD inclined at 30 degrees    =  -25.8 MPa\n",
        "The shear stress of plane CD inclined at 30 degrees     =  -68.8 MPa\n",
        "The normal stress of plane BC inclined at 60 degrees    =  -4.2 MPa\n",
        "The shear stress of plane BC inclined at 60 degrees     =  68.8 MPa\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.3 Page no 448"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "sigma_x = -20   #MPa, stress\n",
      "sigma_y = 90    #MPa\n",
      "tou_xy = 60     #MPa\n",
      "\n",
      "#Orientation of Element\n",
      "import math\n",
      "theta_p2 = math.atan((2*tou_xy)/(sigma_x - sigma_y))\n",
      "theta_p2 = theta_p2/2.0\n",
      "theta_p1 = (180+2*theta_p2)/2.0\n",
      "\n",
      "#Principal Stresses\n",
      "\n",
      "sigma1 = ((sigma_x+sigma_y)/2.0)+(math.sqrt(((sigma_x - sigma_y)/2.0)**2 + tou_xy**2))\n",
      "sigma2 = ((sigma_x+sigma_y)/2.0)- math.sqrt(((sigma_x-sigma_y)/2.0)**2 + tou_xy**2)\n",
      "sigma_x2 = ((sigma_x+sigma_y)/2.0)+ (((sigma_x-sigma_y)/2.0)*math.cos(2*theta_p2)) + (tou_xy*math.sin(2*theta_p2))\n",
      "\n",
      "#Display\n",
      "print\"The first principal stress is                       = \",round(sigma1,1),\"MPa\"\n",
      "print\"The second principal stress is                      = \",round(sigma2,1),\"MPa\"\n",
      "print'The normal stress acting on the 23.7 degrees plane  = ',round(sigma_x2,1),\"MPa\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The first principal stress is                       =  116.4 MPa\n",
        "The second principal stress is                      =  -46.4 MPa\n",
        "The normal stress acting on the 23.7 degrees plane  =  -43.3 MPa\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.4 Page no 449"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "sigma_x = -20.0 #MPa, stress along x\n",
      "sigma_y  = 90.0 #MPa  stress along y\n",
      "tou_xy =60.0    #Mpa, shear stress\n",
      "\n",
      "#Calculation\n",
      "#Orientation of Element\n",
      "import math\n",
      "theta_s2 = math.atan(-(sigma_x - sigma_y)/(2*tou_xy))\n",
      "theta_s2 = theta_s2/2.0\n",
      "theta_s1 = math.pi + 2*theta_s2\n",
      "theta_s1 = theta_s1/2.0\n",
      "\n",
      "#Maximum in plane Shear Stress\n",
      "tou_max = (math.sqrt(((sigma_x - sigma_y)/2.0)**2 + tou_xy**2))\n",
      "tou_xy1 = -(sigma_x - sigma_y)*(math.sin(2*theta_s2))/2.0 + (tou_xy*math.cos(2*theta_s2))\n",
      "#Average Normal Stress\n",
      "sigma_avg = (sigma_x+sigma_y)/2\n",
      "\n",
      "#Display\n",
      "print\"The maximum in-plane shear stress is   = \",round(tou_xy1,1),\"MPa\"\n",
      "print\"The average normal stress is        = \",round(sigma_avg,0),\"MPa\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum in-plane shear stress is   =  81.4 MPa\n",
        "The average normal stress is        =  35.0 MPa\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.7 Page no 465"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "sigma_x = -12  #ksi, stress along x\n",
      "sigma_y = 0\n",
      "tou_xy = -6    #ksi, stress along xy\n",
      "\n",
      "#Calculation\n",
      "#Construction of the circle\n",
      "import math\n",
      "sigma_avg = (sigma_x+sigma_y)/2.0\n",
      "R = sqrt((-sigma_x+sigma_avg)**2 + (tou_xy)**2)\n",
      "#Principal Stresses\n",
      "sigma2 = -R+sigma_avg\n",
      "sigma1 = R+sigma_avg\n",
      "theta_p2 = math.atan((-tou_xy)/(-sigma_x+sigma_avg))\n",
      "theta_p2 = theta_p2/2*(180/math.pi)\n",
      "\n",
      "#Display\n",
      "print'The first principal stress is            = ',round(sigma1,2),\"ksi\"\n",
      "print'The second principal stress is           = ',round(sigma2,2),\"ksi\"\n",
      "print'The direction of the principal plane is  = ',theta_p2,\"degree\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The first principal stress is            =  2.49 ksi\n",
        "The second principal stress is           =  -14.49 ksi\n",
        "The direction of the principal plane is  =  22.5 degree\n"
       ]
      }
     ],
     "prompt_number": 31
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.8 Page no 466"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "sigma_x = -20.0 #MPa\n",
      "sigma_y = 90.0 #MPa\n",
      "tou_xy = 60.0  #MPa\n",
      "\n",
      "#Construction of the circle\n",
      "import math\n",
      "sigma_avg = (sigma_x+sigma_y)/2\n",
      "R = math.sqrt(((sigma_x-sigma_avg))**2 + (tou_xy)**2)\n",
      "#Maximum In plane Shear Stress\n",
      "tou_max = R\n",
      "theta_s1 = math.atan(-(sigma_x - sigma_avg)/(tou_xy))\n",
      "theta_s1 = theta_s1/2.0*(180/math.pi)\n",
      "\n",
      "#Display\n",
      "print'The maximum in-plane shear stresses are   = ',round(tou_max,1),\"MPa\"\n",
      "print'The second principal stress  = ',sigma_avg,\"MPa\"\n",
      "print'The orientation of the element is         = ',round(theta_s1,1),\"degree\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum in-plane shear stresses are   =  81.4 MPa\n",
        "The second principal stress  =  35.0 MPa\n",
        "The orientation of the element is         =  21.3 degree\n"
       ]
      }
     ],
     "prompt_number": 38
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.9 Page no 467"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate normal stress and shear stress \n",
      "\n",
      "#Given\n",
      "sigma_x  = -8.0    #MPa\n",
      "sigma_y = 12.0    #MPa\n",
      "tou_xy = -6.0     #Mpa\n",
      "\n",
      "#Construction of the circle\n",
      "import math\n",
      "sigma_avg = (sigma_x+sigma_y)/2.0\n",
      "R = math.sqrt( 10**2 + tou_xy**2)\n",
      "#Stresses on 30 degree element\n",
      "phi = math.atan(6/10.0)\n",
      "psi = (math.pi/3.0) - phi\n",
      "#On face BD\n",
      "sigma_x1 = 2 - (R*math.cos(psi))\n",
      "tou_xy1 = (R*math.sin(psi))\n",
      "#On face DE\n",
      "sigma_x2 = 2 + (R*math.cos(psi))\n",
      "tou_xy2 = -(R*math.sin(psi))\n",
      "\n",
      "#Display\n",
      "print'The normal stress on plane BD inclined at 30 degrees is   = ',round(sigma_x1,1),\"ksi\"\n",
      "print'The normal stress on plane DE inclined at 60 degrees is   = ',round(sigma_x2,1),\"ksi\"\n",
      "print'The shear stress is     = ',round(tou_xy1,1),\"ksi\"\n",
      "print'The shear stress is     = ',round(tou_xy2,1),\"ksi\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The normal stress on plane BD inclined at 30 degrees is   =  -8.2 ksi\n",
        "The normal stress on plane DE inclined at 60 degrees is   =  12.2 ksi\n",
        "The shear stress is     =  5.7 ksi\n",
        "The shear stress is     =  -5.7 ksi\n"
       ]
      }
     ],
     "prompt_number": 43
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.10 Page no 476"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "sigma_max = 32 #MPa\n",
      "sigma_min = 0 #MPa\n",
      "sigma_int = 16 #MPa\n",
      "\n",
      "#Calculation\n",
      "tou_max = (sigma_max - sigma_min)/2  \n",
      "sigma_avg = (sigma_max + sigma_min)/2 \n",
      "tou_in_plane = (sigma_max - sigma_int)/2\n",
      "sigma_avg2 = sigma_avg + (tou_in_plane)\n",
      "\n",
      "#Display\n",
      "print 'The normal shears tress is', sigma_avg,\"MPa\"\n",
      "print'The maximum absolute shear stress   = ',tou_max,\"MPa\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The normal shears tress is 16 MPa\n",
        "The maximum absolute shear stress   =  16 MPa\n"
       ]
      }
     ],
     "prompt_number": 49
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.11 Page no 477"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "tou = 40       #psi\n",
      "sigma = -20     #psi\n",
      "\n",
      "#Calculation\n",
      "#Principal Stresses\n",
      "import math\n",
      "sigma_avg = sigma/2\n",
      "R = sqrt( (-sigma + sigma_avg)**2 + tou**2)\n",
      "sigma_max = sigma_avg + R  \n",
      "sigma_min = sigma_avg - R  \n",
      "theta = math.atan(tou/(-sigma+sigma_avg))\n",
      "theta = theta/2\n",
      "#Absolute Maximum Shear Stress\n",
      "tou_max = (sigma_max - sigma_min)/2\n",
      "sigma_avg = (sigma_max + sigma_min)/2\n",
      "\n",
      "#Display\n",
      "print'The prinicpal stresses at the point are ',round(sigma_max,2),\"psi   and\",round(sigma_min,1),\"psi\"\n",
      "print'The absolute maximum shear stress at the point  ',round(tou_max,1),\"psi\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The prinicpal stresses at the point are  31.23 psi   and -51.2 psi\n",
        "The absolute maximum shear stress at the point   41.2 psi\n"
       ]
      }
     ],
     "prompt_number": 56
    }
   ],
   "metadata": {}
  }
 ]
}