summaryrefslogtreecommitdiff
path: root/Mechanics_of_Materials_by_Pytel_and_Kiusalaas/Chapter12.ipynb
blob: 9163c9cff9ac3189889376e12bb32d06e52a4981 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:d8a1a6f05cd4df2c46b4f5147d4f831726de5041386c1f65ed2892779a5fb0fb"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 12:Special Topics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.12.1, Page No:422"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "W=24*10**3 #Load in kips\n",
      "E=29*10**6 #Youngs Modulus in psi\n",
      "L=72 #length in inches\n",
      "theta=30 #Angle in degrees\n",
      "\n",
      "#Calculations\n",
      "L_ab=L/np.sin(theta*pi*180**-1) #Length of AB in inches\n",
      "L_ac=L/np.sin((90-theta)*pi*180**-1) #Length of AC in inches\n",
      "\n",
      "#Applying the forces in x and y sum to zero\n",
      "#Applying the Starin energy formula\n",
      "#Applying Castiglinos theorem \n",
      "delta_A=91.16*W*E**-1 #Displacement in inches\n",
      "\n",
      "#Result\n",
      "print \"The displacement of point A is\",round(delta_A,4),\"in\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The displacement of point A is 0.0754 in\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.12.3, Page No:423"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from scipy.integrate import quad\n",
      "\n",
      "\n",
      "\n",
      "#We will directly compute the integral as function cannot be declared\n",
      "#Calculations\n",
      "#Part 1\n",
      "def integrand(x):\n",
      "    return (800*x-400*x**2)*(4-0.5*x)\n",
      "I = quad(integrand, 0, 2)\n",
      "delta=I[0] #Deflection in horizontal direction in N.m^3\n",
      "\n",
      "#Part 2\n",
      "def inte1(x):\n",
      "    return x**2\n",
      "I1=quad(inte1,0,4)\n",
      "I2=quad(inte1,0,3)\n",
      "def inte2(x):\n",
      "    return (4-0.5*x)*(4-0.5*x)\n",
      "I3=quad(inte2,0,2)\n",
      "\n",
      "Q=-delta/(I1[0]+I2[0]+I3[0]) #Horizontal reaction in N\n",
      "\n",
      "\n",
      "#Result\n",
      "print \"The Horizontal deflection is\",round(delta),\"N.m^3\"\n",
      "print \"The Horizontal reaction is\",round(Q,1),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Horizontal deflection is 1867.0 N.m^3\n",
        "The Horizontal reaction is -33.9 N\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.12.4, Page No:433"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import numpy as np\n",
      "\n",
      "#NOTE:The figure mentions the unit of length as ft which is incorrect\n",
      "#Variable Decleration\n",
      "L=30 #Length in m\n",
      "m=2000 #Mass in kg\n",
      "v=2 #Velocity in m/s\n",
      "E=10**5 #Youngs Modulus in MPa\n",
      "A=600 #Area in mm^2\n",
      "g=9.81 #Acceleration due to gravity in m/s^2\n",
      "\n",
      "#Calculations\n",
      "k=E*A*L**-1 #Stifness of the cable in N/m\n",
      "\n",
      "#Applying the Work-Energy principle \n",
      "delta_max=np.sqrt((0.5*m*v**2)*(0.5*k)**-1) #Maximum Displacement in m\n",
      "\n",
      "P_max=k*delta_max+m*g #Maximum force in N\n",
      "\n",
      "#Result\n",
      "print \"The maximum force is\",round(P_max*10**-3,1),\"kN\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum force is 146.1 kN\n"
       ]
      }
     ],
     "prompt_number": 51
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.12.5, Page No:434"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "b=0.060 #Breadth of the section in mm\n",
      "d=0.03 #Depth of the section in mm\n",
      "L=1.2 #Length in m\n",
      "m=80 #Mass in kg\n",
      "g=9.81 #Acceleration due to gravity in m/s^2\n",
      "E=200*10**9 #Youngs Modulus in Pa\n",
      "e=0.015 \n",
      "h=0.01 #height in m\n",
      "\n",
      "#Calculations\n",
      "#Part 1\n",
      "I=b*d**3*12**-1 #Moment of Inertia in m^4\n",
      "delta_st=m*g*L**3/(48*E*I) #Mid-span Displacement  in m\n",
      "n=1+np.sqrt(1+(2*h/delta_st)) #Impact Factor\n",
      "\n",
      "#Part 2\n",
      "P_max=n*m*g #Maximum dynamic load in N at midspan\n",
      "M_max=P_max*0.5*L*0.5 #Maximum moment in N.m\n",
      "sigma_max=M_max*e/I #Maximum dynamic Bending Stress in Pa\n",
      "\n",
      "#Result\n",
      "print \"The impact factor is\",round(n,3)\n",
      "print \"The maximum dynamic Bending Moment is\",round(sigma_max*10**-6,1),\"MPa\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The impact factor is 5.485\n",
        "The maximum dynamic Bending Moment is 143.5 MPa\n"
       ]
      }
     ],
     "prompt_number": 65
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.12.7, Page No:440"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable decleration\n",
      "M=2.21 #Applied moment in kip.ft\n",
      "d=3 #Diameter of the bar in inches\n",
      "sigma_y=40 #Yield strength of the of steel in ksi\n",
      "\n",
      "#Calculations\n",
      "#Part 1\n",
      "sigma=32*M*12*(pi*d**3)**-1 #Maximum Bending Stress in ksi\n",
      "T1=np.sqrt((sigma_y*0.5)**2-5**2)/(12*0.18863) #Maximum Allowable torque in kip.ft\n",
      "\n",
      "#Part 2\n",
      "R=np.sqrt((sigma_y**2-5**2)*3**-1) #Maximum shear stress in ksi\n",
      "T2=np.sqrt(R**2-5**2)/(12*0.18863) #Maximum safe torque in kpi.ft\n",
      "\n",
      "#Result\n",
      "print \"Using the maximum shear stress theory T=\",round(T1,2),\"kip.ft\"\n",
      "print \"Using the maximum sitrotion energy theory T=\",round(T2,2),\"kip.ft\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Using the maximum shear stress theory T= 8.56 kip.ft\n",
        "Using the maximum sitrotion energy theory T= 9.88 kip.ft\n"
       ]
      }
     ],
     "prompt_number": 79
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.12.8, Page No:448"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "D=250 #Wideness in mm\n",
      "b=20 #Thickness of the plate in mm\n",
      "r=50 #Radius  of the hole in mm\n",
      "e=50 #Eccentricity in mm\n",
      "sigma_max=150 #Maximum normal stress at the hole in MPa\n",
      "kb=2 #Stress Concentraion factor \n",
      "\n",
      "#Calculations\n",
      "A=b*(D-2*r)*10**-6 #Area in m^2\n",
      "I=10**-12*(b*D**3*12**-1-(b*2**3*r**3*12**-1)) #Moment of inertia in m^4\n",
      "#Simplfying computation\n",
      "a=2*r*D**-1\n",
      "kt=3-3.13*a+3.66*a**2-1.53*a**3 #Stress Concentration factor\n",
      "#Simplfying computation\n",
      "b=kt*A**-1\n",
      "c=kb*r*r*10**-6*I**-1\n",
      "P=10**3*sigma_max*(b+c)**-1 #Maximum Load in N\n",
      "\n",
      "#Result\n",
      "print \"The maximum value of P is\",round(P,1),\"kN\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum value of P is 157.8 kN\n"
       ]
      }
     ],
     "prompt_number": 106
    }
   ],
   "metadata": {}
  }
 ]
}