summaryrefslogtreecommitdiff
path: root/Mechanics_of_Structures/Chapter3.ipynb
blob: 59d8003c2a30f14195525b8540df0fd701f39291 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:fda2efbde9309c997fd1c5768ac3e3ef47209d8a8fc8385592f593bd1834cc52"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter3-Impact or shock loading:strain energy"
     ]
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Ex1-pg63"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate The maximum instantaneous stress produced and corresponding strain  work done on the rod and stored\n",
      "d = 3./2.;##inches\n",
      "l = 10.;##feet\n",
      "P = 8.;##tons\n",
      "E = 13500.;##tons/in^2\n",
      "A = 0.25*math.pi*d**2;##in^2\n",
      "p = 2.*P/A;## tons/in^2\n",
      "e = p/E;\n",
      "del_l = e*l*12.;##inches\n",
      "W = P*del_l;##inch-ton\n",
      "print'%s %.2f %s'%('The maximum instantaneous stress produced is, p =',p,'tons/in^2');\n",
      "print'%s %.4f %s'%('The corresponding strain is e =',e,'') \n",
      "print'%s %.2f %s'%('del_l =',del_l,'inches')\n",
      "print'%s %.2f %s'%('The work done on the rod and stored by it is',W,'inch-ton.');\n",
      "\n",
      "##there is an error in the answer given in text book\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum instantaneous stress produced is, p = 9.05 tons/in^2\n",
        "The corresponding strain is e = 0.0007 \n",
        "del_l = 0.08 inches\n",
        "The work done on the rod and stored by it is 0.64 inch-ton.\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg64"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate Maximum instantaneous and extension stress produced\n",
      "l = 6.;##feet\n",
      "d = 1.;##inches\n",
      "h = 4.;##inches\n",
      "E = 30*10**6;##lb/in^2\n",
      "A = 0.25*math.pi*d**2;##in^2\n",
      "P = 50.;##lb\n",
      "p = (P/A)+math.sqrt((P**2/A**2)+(2*E*P*h)/(A*l*12.));\n",
      "e = p/E;\n",
      "del_l = e*l*12.##inches\n",
      "print'%s %.d %s'%('Maximum instantaneous stress produced is p =',p,'lb/in^2');\n",
      "print'%s %.3f %s'%('Maximum instantaneous extension produced is del_l =',del_l,'lb/in^2');\n",
      "\n",
      "##there is an error in the answer given in text book\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum instantaneous stress produced is p = 14631 lb/in^2\n",
        "Maximum instantaneous extension produced is del_l = 0.035 lb/in^2\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg64"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate Instantaneous elongation and Height of the drop\n",
      "l = 10.;##feet\n",
      "d = 5./4.;##inches\n",
      "p = 8.;##tons/in^2\n",
      "E = 13000.;##tons/in^2\n",
      "A = 0.25*math.pi*d**2;##in^2\n",
      "e = p/E;\n",
      "del_l = e*l*12.;##inches\n",
      "W = 0.5*p**2*A*l*12./E;## inch-ton\n",
      "h = W*10.-del_l;##inches\n",
      "print'%s %.3f %s'%('Instantaneous elongation is del_l =',del_l,'inches')\n",
      "print'%s %.2f %s'%('Height of the drop is h =',h,'inches');\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Instantaneous elongation is del_l = 0.074 inches\n",
        "Height of the drop is h = 3.55 inches\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg65"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate Maximum instantaneous extension and stress\n",
      "w = 4.;##tons\n",
      "v = 2.;##miles per hour\n",
      "l = 150.;##feet\n",
      "d = 3./2.;##inches\n",
      "E = 13000.;## tons/in^2\n",
      "g = 32.;## ft/sec^2\n",
      "A = 0.25*math.pi*d**2;## in^2\n",
      "KE = w*(v*17.6)**2/(2*g*12);## inch-tons\n",
      "p = math.sqrt(KE*(2.*E)/(A*l*12.));## tons/in^2\n",
      "del_l = p*l*12./E;## inches\n",
      "print'%s %.2f %s'%('Maximum instantaneous stress produced is p =',p,'tons/in^2')\n",
      "print'%s %.f %s'%('Maximum instantaneous extension produced is del_l =',del_l,'inch')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum instantaneous stress produced is p = 7.26 tons/in^2\n",
        "Maximum instantaneous extension produced is del_l = 1 inch\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg66"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#Maximum instantaneous stress and extension \n",
      "d = 2.;##inches\n",
      "l = 8.;##feet\n",
      "U = 50.;## ft-lbs\n",
      "E = 28.*10**6;## lb/in^2\n",
      "V = 0.25*math.pi*d**2*l*12.;## in^3\n",
      "p = math.sqrt(2*U*12.*E/V);## lb/in^2\n",
      "e = p/E;\n",
      "del_l = e*l*12.;## inches\n",
      "print'%s %.1f %s'%('Maximum instantaneous stress produced is p =',p,'lb/in^2');\n",
      "print'%s %.4f %s'%('Maximum instantaneous extension produced is del_l =',del_l,'inches');\n",
      "##there is an error in the answer given in text book\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum instantaneous stress produced is p = 10555.0 lb/in^2\n",
        "Maximum instantaneous extension produced is del_l = 0.0362 inches\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg66"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# calculate Maximum instantaneous stress and Ratio of energies stored if both bars are allowed to reach the proof stress and Ratio of energies stored at the same stress per unit volume\n",
      "l = 12.;##feet\n",
      "d1_A = 1.;##inch\n",
      "d2_A = 2.;##inches\n",
      "l1_A = 4.;##inches\n",
      "l2_A = 8.;##inches\n",
      "d1_B = 1.;##inch\n",
      "d2_B = 2.;##inches\n",
      "l1_B = 8.;##inches\n",
      "l2_B = 4.;##inches\n",
      "p_A = 15./2.;## tons/in^2\n",
      "p_B = math.sqrt((2./3.)*p_A**2);## tons/in^2\n",
      "r1 = (9*math.pi/8.)/(3*math.pi/4.);##ratio of energies if both bars are allowed to reach the proof stress\n",
      "V_A  = 0.25*math.pi*d1_A**2*l1_A+ 0.25*math.pi*d2_A**2*l2_A;## in^3\n",
      "V_B  = 0.25*math.pi*d1_B**2*l1_B+ 0.25*math.pi*d2_B**2*l2_B;## in^3\n",
      "r2 = ((3./16.)*p_B**2)/((1./12.)*p_B**2);##ratio of enrgies\n",
      "print'%s %.2f %s'%('Maximum instantaneous stress produced is p_B =',p_B,'tons/in^2')\n",
      "print'%s %.2f %s'%('Ratio of energies stored if both bars are allowed to reach the proof stress is r1 =',r1,'');\n",
      "print'%s %.2f %s'%('Ratio of energies stored at the same stress per unit volume, is r2 =',r2,'');\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum instantaneous stress produced is p_B = 6.12 tons/in^2\n",
        "Ratio of energies stored if both bars are allowed to reach the proof stress is r1 = 1.50 \n",
        "Ratio of energies stored at the same stress per unit volume, is r2 = 2.25 \n"
       ]
      }
     ],
     "prompt_number": 13
    }
   ],
   "metadata": {}
  }
 ]
}