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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 8: The Tension Test"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"### Example 8.1, Standard properties of the material, Page No. 281"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Ultimate Tensile Strength = 92363.2 psi\n",
"0.2 percent offset yield strength = 74889.1 psi\n",
"Breaking Stress = 80880.2 psi\n",
"Elongation = 26.5 percent\n",
"Reduction of Area = 61.092 percent\n",
"\n",
"\n",
"Note: Slight Computational Errors in book\n"
]
}
],
"source": [
"\n",
"from math import pi\n",
"\n",
"#variable declaration\n",
"D=0.505;\n",
"Lo=2;\n",
"Lf=2.53;\n",
"Py=15000;\n",
"Pmax=18500;\n",
"Pf=16200;\n",
"D_f=0.315;\n",
"\n",
"#calculation\n",
"A0=pi*D**2/4;\n",
"Af=pi*D_f**2/4;\n",
"s_u=Pmax/A0;\n",
"s0=Py/A0;\n",
"s_f=Pf/A0;\n",
"e_f=(Lf-Lo)/Lo;\n",
"q=(A0-Af)/A0;\n",
"\n",
"#result\n",
"print('\\nUltimate Tensile Strength = %g psi\\n0.2 percent offset yield strength = %g psi\\nBreaking Stress = %g psi\\nElongation = %g percent\\nReduction of Area = %g percent\\n\\n\\nNote: Slight Computational Errors in book')%(s_u,s0,s_f,e_f*100,q*100);\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 8.2, True Strain, Page No. 288"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"True Strain to fracture using changes in length = 0.405465\n",
"True Strain to fracture using changes in area = 0.405465\n",
"\n",
"\n",
"\n",
"For More ductile metals\n",
"True Strain to fracture using changes in length = 0.729961\n",
"True Strain to fracture using changes in diameter = 0.940007\n"
]
}
],
"source": [
"\n",
"from math import log\n",
"\n",
"#case 1\n",
"#variable declaration\n",
"Af=100.0;\n",
"Lf1=60.0;\n",
"A0=150.0;\n",
"L01=40.0;\n",
"Lf=83.0;\n",
"L0=40.0;\n",
"Df=8.0;\n",
"D0=12.8;\n",
"\n",
"#calculation\n",
"L1=float (Lf1/L01);\n",
"A1=float (A0/Af);\n",
"ef11=log(L1);\n",
"ef21=log(A1);\n",
"L2=(Lf/L0);\n",
"D2=D0/Df;5\n",
"ef12=log(L2);\n",
"ef22=2*log(D2);\n",
"\n",
"#result\n",
"print('\\nTrue Strain to fracture using changes in length = %g\\nTrue Strain to fracture using changes in area = %g')%(ef11,ef21);\n",
"print('\\n\\n\\nFor More ductile metals\\nTrue Strain to fracture using changes in length = %g\\nTrue Strain to fracture using changes in diameter = %g')%(ef12,ef22);\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 8.3, Ultimate Tensile Strength, Page No. 290"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Ultimate Tensile Strength = 99729.2 psi\n"
]
}
],
"source": [
"\n",
"\n",
"from math import exp\n",
"\n",
"#variable declaration\n",
"def sigma(e):\n",
" return 200000*e**0.33;\n",
"E_u=0.33;\n",
"\n",
"#calculation\n",
"sigma_u=sigma(E_u);\n",
"s_u=sigma_u/exp(E_u);\n",
"\n",
"#result\n",
"print('Ultimate Tensile Strength = %g psi')%(s_u);"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 8.4, Effect of Strain Rate, Page No. 298"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"At 70deg F\n",
"\n",
"sigma_a = 10.2 ksi\n",
"sigma_b = 13.8229 ksi\n",
"sigma_b/sigma_a = 1.35519\n",
"\n",
"\n",
"\n",
"At 825deg F\n",
"\n",
"sigma_a = 2.1 ksi\n",
"sigma_b = 5.54906 ksi\n",
"sigma_b/sigma_a = 2.64241\n",
"\n"
]
}
],
"source": [
"\n",
"\n",
"#variable declaration\n",
"C_70=10.2;\n",
"C_825=2.1;\n",
"m_70=0.066;\n",
"m_825=0.211;\n",
"e1=1;\n",
"e2=100;\n",
"\n",
"#calculation 1\n",
"print('\\nAt 70deg F\\n');\n",
"sigma_a=C_70*e1**m_70;\n",
"sigma_b=C_70*e2**m_70;\n",
"\n",
"#result 1\n",
"print('sigma_a = %g ksi\\nsigma_b = %g ksi\\nsigma_b/sigma_a = %g\\n')%(sigma_a,sigma_b,sigma_b/sigma_a);\n",
"\n",
"\n",
"#calculation 2\n",
"print('\\n\\nAt 825deg F\\n');\n",
"sigma_a=C_825*e1**m_825;\n",
"sigma_b=C_825*e2**m_825;\n",
"\n",
"#result 2\n",
"print('sigma_a = %g ksi\\nsigma_b = %g ksi\\nsigma_b/sigma_a = %g\\n')%(sigma_a,sigma_b,sigma_b/sigma_a);\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|