summaryrefslogtreecommitdiff
path: root/Mechanics_of_Materials_by_Pytel_and_Kiusalaas/Chapter06.ipynb
blob: d8fd7d88dee363bca279db7bd72342348fb34381 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:d43d7deae359298d302c004afe7a99ad4d721fd85b5d0a2361afaf05440c9100"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 06:Deflection of Beam"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6.1, Page No:196"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "wo=400 #loading in lb/ft\n",
      "E=29*10**6 #Modulus of elasticity in psi\n",
      "I=285 #Moment of inertia in in^4\n",
      "S=45.6 #Sectional Modulus in in^3\n",
      "L=8 #Span in ft\n",
      "\n",
      "#Calculations\n",
      "#Part 1\n",
      "#Part1 is theoretical in nature hence not coded\n",
      "\n",
      "#Part 2\n",
      "delta_max=((wo*12**-1)*(L*12)**4)/(8*E*I) #maximum deflection in inches\n",
      "M_max=(wo*12**-1)*(L*12)**2 #Maximum moment\n",
      "sigma_max=M_max/(2*S) #Maximum bending stress in psi\n",
      "\n",
      "#Result\n",
      "print M_max\n",
      "print \"The maximum deflection is\",round(delta_max,4),\"in\"\n",
      "print \"The maximum Bending Stress is\",round(sigma_max),\"psi\"\n",
      "\n",
      "#Answer in the textbook for sigma_max is incorrect"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "307200.0\n",
        "The maximum deflection is 0.0428 in\n",
        "The maximum Bending Stress is 3368.0 psi\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6.3, Page No:198"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "P=300 #Point Load in N\n",
      "R_a=100 #Reaction at A in N\n",
      "R_c=200 #Reaction at C in N\n",
      "E=12 #Youngs Modulus in GPa\n",
      "L1=2 #Length of the load from A in m\n",
      "L2=1 #Length of the load from C in m\n",
      "b=0.04 #Width of the CS of the beam in m\n",
      "h=0.08 #Depth of the CS of the beam in m\n",
      "\n",
      "#Claculations\n",
      "#Moment of inertia \n",
      "I=b*h**3*12**-1 #Moment of Inertia in m^4\n",
      "#Flexural Rigidity\n",
      "FR=E*10**9*I #FLexural rigidity in N.m^2\n",
      "\n",
      "#Moments in terms of x are\n",
      "#Given\n",
      "#After the variable Calculations we get\n",
      "C1=-400/3 #Constant\n",
      "C3=C1 #Constant\n",
      "C2=0 #Constant\n",
      "C4=0 #Constant\n",
      "\n",
      "#to get max displacement x we have\n",
      "x=(6.510/2.441)**0.5 #Length at which displacement is maximum in m\n",
      "v=(0.8138*x**3-6.510*x) #Displacement in mm\n",
      "\n",
      "#Largest slope\n",
      "theta=(2.441*(L1+L2)**2-(7.324*(L1+L2-L1)**2)-6.150)*10**-3#Angle in radians\n",
      "\n",
      "#Result \n",
      "print \"The maximum displacement is\",round(-v,2),\"mm downwards\"\n",
      "print \"The maximum angle is\",round(theta*180*pi**-1,3),\"degrees anticlockwise\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum displacement is 7.09 mm downwards\n",
        "The maximum angle is 0.487 degrees anticlockwise\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6.4, Page No:200"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "#The computation is mostly variable based hence values will be directly declared \n",
      "C1=19.20*10**3 #lb.ft^2\n",
      "C2=-131.6*10**3 #lb.ft^2\n",
      "C3=14.7*10**3 #lb.ft^2\n",
      "C4=-112.7*10**3 #lb.ft^2\n",
      "EI=10**7 #Flexural Rigidity in psi\n",
      "\n",
      "#Calculations\n",
      "v=-(C2*12**3)/(EI*40) #Displacement in inches\n",
      "\n",
      "#Result\n",
      "print \"The maximum displacement is\",round(v,3),\"in downwards\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum displacement is 0.569 in downwards\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6.6, Page No:210"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "L1=3 #Length in m\n",
      "L2=1 #Length in m\n",
      "L3=8 #Length in m\n",
      "L4=4 #Length in m\n",
      "L5=6 #Length in m\n",
      "\n",
      "#Calculations\n",
      "#Deflection midway\n",
      "EIv=250*3**-1*L1**3-(50*3**-1*(L1-L2)**4)-(3925*3**-1*L1) #Deflection in N.m^3\n",
      "\n",
      "#Deflection at E\n",
      "EIv_E=250*3**-1*L3**3-(50*3**-1*(L3-L2)**4)+(50*3**-1*(L3-L4)**4)+(650*3**-1*(L3-L5)**3)-(3925*3**-1*L3) #Deflection in N.m^3\n",
      "\n",
      "#Result\n",
      "print \"The deflection at midspan is\",round(-EIv),\"N.m^3 downwards\"\n",
      "print \"The deflection at point E is\",round(-EIv_E),\"N.m^3 downwards\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The deflection at midspan is 1942.0 N.m^3 downwards\n",
        "The deflection at point E is 1817.0 N.m^3 downwards\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6.8, Page No:223"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "x1=16*3**-1 #Centroid of the triangle in ft\n",
      "x2=3 #Centroid of the lower parabola in ft\n",
      "x3=6 #Centroid of the rectangle in ft\n",
      "x4=20*3**-1 #Centroid of the triangle in ft\n",
      "#Moment values\n",
      "M1=4800 #Moment in lb.ft\n",
      "M2=14400 #Moment in lb.ft\n",
      "\n",
      "#Calcualtions\n",
      "P=((3**-1*4*M1*x2)+(4*M1*x3)+(0.5*4*M1*2*x4))*(x1*8*8*0.5)**-1 #Force P in lb\n",
      "\n",
      "#Result\n",
      "print \"The magnitude of force P is\",round(P,1),\"lb\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The magnitude of force P is 1537.5 lb\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6.9, Page No:225"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "P=300 #Force in N\n",
      "L1=1 #Length in m\n",
      "L2=2 #Length in m\n",
      "R_a=100 #Reaction at A in N\n",
      "R_c=200 #Reaction at C in N\n",
      "EI=20.48*10**3 #Flexural Rigidity in N.m^2\n",
      "\n",
      "#Calculations\n",
      "#Part 1\n",
      "tC_A=(0.5*(L1+L2)*P*L1-(0.5*L1*P*(L1+L2)**-1))*EI**-1 #First Moment in m\n",
      "theta_A=tC_A/(L1+L2) #Angle in radians \n",
      "\n",
      "#Part 2\n",
      "tD_A=0.5*L1*R_a*(L1+L2)**-1*EI**-1 #First Moment in m\n",
      "delta_D=(theta_A*L1-tD_A) #Displacement in m \n",
      "\n",
      "#Result\n",
      "print \"The angle in part 1 is\",round(theta_A*180*pi**-1,3),\"Degrees\"\n",
      "print \"The displacement in part 2 is\",round(delta_D*1000,2),\"mm downward\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The angle in part 1 is 0.373 Degrees\n",
        "The displacement in part 2 is 5.7 mm downward\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6.10, Page No:227"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "P1=150 #Load in lb\n",
      "P2=30 #Load in lb\n",
      "R_A=78 #Reaction at A in lb\n",
      "R_C=102 #Reaction at C in lb\n",
      "L1=4 #Length in ft\n",
      "L2=6 #Length in ft\n",
      "M1=780 #Moment in lb.ft\n",
      "M2=900 #Moment in lb.ft\n",
      "M3=120 #Moment in lb.ft\n",
      "\n",
      "#Calculations\n",
      "EI_AC=0.5*(L1+L2)*M1*(2*3**-1)*(L1+L2)-(0.5*L2*M2*(L1+(2*3**-1)*L2)) #Deflection in lb.ft^3\n",
      "EI_thetaC=EI_AC/(L1+L2) #Deflection in lb.ft^2\n",
      "\n",
      "EI_DC=-0.5*L1*M3*2*3**-1*L1 #Deflection in lb.ft^3\n",
      "EI_deltaD=EI_thetaC*L1-(-EI_DC) #Deflection in lb.ft^2\n",
      "\n",
      "#Result\n",
      "print \"The deflection is\",round(EI_deltaD),\"lb.ft^2 upwards\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The deflection is 1120.0 lb.ft^2 upwards\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6.11, Page No:234"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "P1=80 #Load in lb\n",
      "P2=100 #Load in lb\n",
      "b1=3 #Distance of load from end in ft\n",
      "b2=2 #Distance of load from end in ft\n",
      "L=9 #Span of the beam in ft\n",
      "\n",
      "#Calcualtions\n",
      "EI_delta1=(P1*b1*48**-1)*(3*L**2-4*b1**2) #Deflection in lb.ft^3\n",
      "EI_delta2=(P2*b2*48**-1)*(3*L**2-4*b2**2) #Deflection in lb.ft^3\n",
      "EI_delta=EI_delta1+EI_delta2 #Deflection at modspan in lb.ft^3\n",
      "\n",
      "#Result\n",
      "print \"The deflection at midspan is\",round(EI_delta),\" lb.ft^3 downward\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The deflection at midspan is 1981.0  lb.ft^3 downward\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6.12, Page no:234"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "wo=600 #Load in N/m\n",
      "L=6 #Span of the beam in m\n",
      "b=2 #Distance of the load from end in m\n",
      "a=1 #Distance of the load from end in m\n",
      "\n",
      "#Calulations\n",
      "EI_delta1=wo*384**-1*(5*L**4-12*L**2*b**2+8*b**4) #Deflection in N.m^3\n",
      "EI_delta2=wo*96**-1*a**2*(3*L**2-2*a**2) #Deflection in N.m^3\n",
      "\n",
      "EI_delta=EI_delta1-EI_delta2 #Total Delfection at midspan in N.m^3\n",
      "\n",
      "#Result\n",
      "print \"The total Deflection at midpsan is\",round(EI_delta),\"N.m^3 downwards\"\n",
      "\n",
      "#NOTE:The answer varies due to decimal point accuracy"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The total Deflection at midpsan is 6963.0 N.m^3 downwards\n"
       ]
      }
     ],
     "prompt_number": 16
    }
   ],
   "metadata": {}
  }
 ]
}