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
|
{
"metadata": {
"name": "",
"signature": "sha256:1983ff28cbb6fa2f27736543d13290cc4b84b616fb5e9a5a775ca4d190cec891"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter2-Principal planes and principal stress"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex1-pg37"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#calculate Normal stress intensity and Tangential stress intensity and Resultant stress intensity and angle\n",
"p_1 = 5.;##principal stress in tons/in^2\n",
"p_2 = 5./2.;##principal stress in tons/in^2\n",
"theta = 50*math.pi/180;##angle in degrees\n",
"p_n = p_1*math.cos(theta)**2+p_2*math.sin(theta)**2;##normal stress intensity\n",
"p_t = (p_1-p_2)*math.sin(theta)*math.cos(theta);##tangential stress intensity\n",
"p = math.sqrt((p_1*math.cos(theta))**2+(p_2*math.sin(theta))**2);##resultant intensity of stress\n",
"alpha = math.atan((p_2*math.sin(theta))/(p_1*math.cos(theta)));##in radians\n",
"alpha = alpha*180/math.pi;##in degrees\n",
"print'%s %.2f %s'%('Normal stress intensity p_n = ',p_n,' tons/in^2');\n",
"print'%s %.2f %s'%('h Tangential stress intensity p_t = ',p_t,' tons/in^2');\n",
"print'%s %.2f %s'%(' Resultant stress intensity p = ',p,'tons/in^2');\n",
"print'%s %.2f %s'%(' angle alpha p_n = ',alpha,' degrees');\n",
"\n",
"##there is an error in the answer given in text book\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Normal stress intensity p_n = 3.53 tons/in^2\n",
"h Tangential stress intensity p_t = 1.23 tons/in^2\n",
" Resultant stress intensity p = 3.74 tons/in^2\n",
" angle alpha p_n = 30.79 degrees\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex3-pg47"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#calculate The inclination of principal planes to the axis of the bolt and p_2 and Maximum shear stress is p_max and stress which acting alone will produce the same maximum strain \n",
"d = 3./4. ;##inches\n",
"P = 2.;##tons\n",
"Q = 0.5;##tons\n",
"m = 4.;\n",
"A = 0.25*math.pi*d**2;##in^2\n",
"p = P/A ;##tons/in^2\n",
"q = Q/A;##tons/in^2\n",
"theta = 0.5*math.atan(2.*q/p);##radians\n",
"theta1 = theta*180/math.pi;##degrees\n",
"theta2 = theta1+90;##degrees\n",
"print'%s %.2f %s'%('The inclination of principal planes to the axis of the bolt will be',theta1,'degres') \n",
"print'%s %.2f %s'%('The inclination of principal planes to the axis of the bolt will be',180-theta2,'degrees') \n",
"print'%s %.2f %s'%('The inclination of maximum shear planes to the axis of the bolt will be',theta1+45,'degress')\n",
"print'%s %.2f %s'%('The inclination of principal planes to the axis of the bolt will be',180-theta2-45,'degrees')\n",
"\n",
"p_1 = 0.5*p+math.sqrt(0.25*p**2+q**2);##tons/in^2\n",
"p_2 = 0.5*p-math.sqrt(0.25*p**2+q**2);##tons/in^2\n",
"p_max = 0.5*(p_1-p_2);##tons/in^2\n",
"p_s = p_1-(p_2/m);##tons/in^2 \n",
"print'%s %.2f %s'%('The principal stresse are given by p_1 =',p_1,'tons/in^2.,tensile')\n",
"print'%s %.2f %s'%('p_2 =',p_2,'tons/in^2.,compressive')\n",
"print'%s %.2f %s'%('p_2 =',p_2,'tons/in^2 .,compressive');\n",
"print'%s %.2f %s'%('Maximum shear stress is p_max =',p_max,'tons/in^2');\n",
"print'%s %.2f %s'%('The stress which acting alone will produce the same maximum strain is given by,',p_s,'tons/in^2');\n",
"\n",
"##there is an error in the answer given in text book"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The inclination of principal planes to the axis of the bolt will be 13.28 degres\n",
"The inclination of principal planes to the axis of the bolt will be 76.72 degrees\n",
"The inclination of maximum shear planes to the axis of the bolt will be 58.28 degress\n",
"The inclination of principal planes to the axis of the bolt will be 31.72 degrees\n",
"The principal stresse are given by p_1 = 4.79 tons/in^2.,tensile\n",
"p_2 = -0.27 tons/in^2.,compressive\n",
"p_2 = -0.27 tons/in^2 .,compressive\n",
"Maximum shear stress is p_max = 2.53 tons/in^2\n",
"The stress which acting alone will produce the same maximum strain is given by, 4.86 tons/in^2\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4-pg51"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#calculate The principal stresses and The maximum shear stress and the planes offering it being inclined and the normal stress intensity \n",
"q = 2.;##tons/in^2\n",
"p = 5.;##tons/in^2\n",
"p_dash = 2.;##tons/in^2\n",
"theta = 0.5*math.atan(2*q/(p-p_dash));##radians\n",
"theta1 = theta*180/math.pi;##degrees\n",
"theta2 = theta1+90;##degrees\n",
"p_1 = 0.5*(p+p_dash)+math.sqrt(q**2 + 0.25*(p-p_dash)**2);##tons/in^2\n",
"p_2 = 0.5*(p+p_dash)-math.sqrt(q**2 + 0.25*(p-p_dash)**2);##tons/in^2\n",
"q_max = 0.5*(p_1-p_2);##tons/in^2\n",
"print'%s %.2f %s'%('The principal stresses are p_1 =',p_1,'tons/in^2 .,tensile')\n",
"print'%s %.2f %s'%('The principal stresses arep_2 =',p_2,'tons/in^2., tensile');\n",
"print'%s %.1f %s'%('The maximum shear stress is',q_max,'tons/in^2.,') \n",
"print'%s %.2f %s'%('the planes offering it being inclined at',theta1+45,'degrees') \n",
"print'%s %.2f %s'%('the planes offering it being inclined at',theta2+45,'degrees')\n",
"print'%s %.2f %s'%('to the plane having the normal stress intensity of',p,'tons/in^2.')\n",
"##there is an error in the answer given in text book\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The principal stresses are p_1 = 6.00 tons/in^2 .,tensile\n",
"The principal stresses arep_2 = 1.00 tons/in^2., tensile\n",
"The maximum shear stress is 2.5 tons/in^2.,\n",
"the planes offering it being inclined at 71.57 degrees\n",
"the planes offering it being inclined at 161.57 degrees\n",
"to the plane having the normal stress intensity of 5.00 tons/in^2.\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex5-pg51"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#calculate theta1 and theta2 and P_1 and P_2 and maximum shear intensity\n",
"p_res = 6.;##tons/in^2\n",
"p_dash = 4.;##tons/in^2\n",
"theta = 30.*math.pi/180.;##degrees\n",
"p_n = 4.;##tons/in^2\n",
"p = p_res*math.cos(theta);##tons/in^2\n",
"q = p_res*math.sin(theta);##tons/in^2\n",
"L = 2*q/(p-p_dash);\n",
"theta = 0.5*math.atan(2*q/(p-p_dash));\n",
"theta1 = theta*180/math.pi;##degrees\n",
"theta2 = theta1+90;##degrees\n",
"p_1 = 0.5*(p+p_dash)+math.sqrt(q**2 + 0.25*(p-p_dash)**2);##tons/in^2\n",
"p_2 = 0.5*(p+p_dash)-math.sqrt(q**2 + 0.25*(p-p_dash)**2);##tons/in^2\n",
"p_max = 0.5*(p_1-p_2);##tons/in^2\n",
"print'%s %.2f %s'%('Theta1 =',theta1,'degrees') \n",
"print'%s %.2f %s'%('Theta2 =',theta2,'degrees')\n",
"print'%s %.2f %s'%('p_1 =',p_1,'tons/in^2.,tensile')\n",
"print'%s %.2f %s'%('p_2 =',p_2,'tons/in^2.,tensile')\n",
"print'%s %.2f %s'%('The maximum shear intensity will be',p_max,'tons/in^2 across the planes of maximum shear.');\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Theta1 = 39.36 degrees\n",
"Theta2 = 129.36 degrees\n",
"p_1 = 7.66 tons/in^2.,tensile\n",
"p_2 = 1.54 tons/in^2.,tensile\n",
"The maximum shear intensity will be 3.06 tons/in^2 across the planes of maximum shear.\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex6-pg52"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#calculate tensiles and compressive \n",
"p_1 = 7.;##tons/in^2\n",
"p_2 = 4.;##tons/in^2\n",
"p_3 = 3.;##tons/in^2\n",
"m = 4.;\n",
"E = 13000.;##tons/in^2\n",
"e_1 = (p_1/E)+(p_2/(m*E))-(p_3/(m*E));\n",
"e_2 = (p_2/E)+(p_1/(m*E))+(p_3/(m*E));\n",
"e_3 = (p_3/E)-(p_1/(m*E))+(p_2/(m*E));\n",
"print'%s %.4f %s'%('e_1 =',e_1,'tensile')\n",
"print'%s %.4f %s'%('e_2 =',e_2,'compressive')\n",
"print'%s %.4f %s'%('e_3 =',e_3,'tensile')\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"e_1 = 0.0006 tensile\n",
"e_2 = 0.0005 compressive\n",
"e_3 = 0.0002 tensile\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex7-pg53"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#calculate the contraction in the length \n",
"a = 2.;##inches\n",
"l = 6.;##inches\n",
"E = 13000.;##tons/In^2\n",
"m = 1./0.3;\n",
"P = 20.;##tons\n",
"p_1 = P/a**2;##tons/in^2\n",
"p_2 = p_1/(2.*(m-1));##tons/in^2\n",
"e_1 = (5.-0.6*p_2)/E;##tons/in^2\n",
"del_l = e_1*l;##inches\n",
"print'%s %.4f %s'%('The contraction in the length del_l =',del_l,'inches');\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The contraction in the length del_l = 0.0020 inches\n"
]
}
],
"prompt_number": 3
}
],
"metadata": {}
}
]
}
|