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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 3: Elements of the Theory of Plasticity"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.1, True Stress and True Strain, Page No. 76"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Engineering Stress at maximum load = 99852.1 psi\n",
"True Fracture Stress = 112785 psi\n",
"True Strain at fracture = 0.344939\n",
"Engineering strain at fracture = 0.411903\n"
]
}
],
"source": [
"from math import pi\n",
"from math import log\n",
"from math import exp\n",
"\n",
"#variable declaration\n",
"D_i=0.505;\n",
"L=2;\n",
"P_max=20000;\n",
"P_f=16000;\n",
"D_f=0.425;\n",
"\n",
"#calculation\n",
"E_St= P_max*4/(pi*D_i**2);\n",
"T_fr_St= P_f*4/(pi*D_f**2);\n",
"e_f=log(D_i**2/D_f**2);\n",
"e=exp(e_f)-1;\n",
"\n",
"#result\n",
"print('\\nEngineering Stress at maximum load = %g psi\\nTrue Fracture Stress = %g psi\\nTrue Strain at fracture = %g\\nEngineering strain at fracture = %g')%(E_St,T_fr_St,e_f,e);\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.2, Yielding Criteria for Ductile Metals, Page No. 78"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Since the calculated value of sigma0 = 224.054 MPa, which is less than the yield strength of the aluminium alloy\n",
"Thus safety factor is = 2.23161\n"
]
}
],
"source": [
"\n",
"from math import sqrt\n",
"\n",
"#variable declaration\n",
"sigma00=500;\n",
"sigma_z=-50;\n",
"sigma_y=100;\n",
"sigma_x=200;\n",
"T_xy=30;\n",
"T_yz=0;\n",
"T_xz=0;\n",
"\n",
"#calculation\n",
"sigma0=sqrt((sigma_x-sigma_y)**2+(sigma_y-sigma_z)**2+(sigma_z-sigma_x)**2+6*(T_xy**2+T_yz**2+T_xz**2))/sqrt(2);\n",
"s=sigma00/sigma0;\n",
"\n",
"#result\n",
"print('\\nSince the calculated value of sigma0 = %g MPa, which is less than the yield strength of the aluminium alloy\\nThus safety factor is = %g')%(sigma0,s);\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.3, Tresca Criterion, Page No. 81"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Since the calculated value of sigma0 = 250 MPa, which is less than the yield strength of the aluminium alloy\n",
"Thus safety factor is = 2\n"
]
}
],
"source": [
"\n",
"\n",
"#variable declaration\n",
"sigma00=500;\n",
"sigma_z=-50;\n",
"sigma_y=100;\n",
"sigma_x=200;\n",
"T_xy=30;\n",
"T_yz=0;\n",
"T_xz=0;\n",
"\n",
"#calculation\n",
"sigma0=sigma_x-sigma_z;\n",
"s=sigma00/sigma0;\n",
"\n",
"#result\n",
"print('\\nSince the calculated value of sigma0 = %g MPa, which is less than the yield strength of the aluminium alloy\\nThus safety factor is = %g')%(sigma0,s);\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"### Example 3.4, Levy-Mises Equation, Page No. 91"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Plastic Strain = 0.199532\n"
]
}
],
"source": [
"from math import sqrt\n",
"\n",
"#variable declaration\n",
"r_t=20;\n",
"p=1000;\n",
"\n",
"#calculation\n",
"sigma1=p*r_t;\n",
"sigma1=sigma1/1000; #conversion to ksi\n",
"sigma=sqrt(3)*sigma1/2;\n",
"e=(sigma/25)**(1/0.25);\n",
"e1=sqrt(3)*e/2;\n",
"\n",
"#result\n",
"print('\\nPlastic Strain = %g')%(e1);\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
}
|