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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 9:Mechanical Properties of Materials"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example 9.1,Page No:9.3"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Elongation = 0.435 mm\n",
"Lateral contraction = 1.30 um\n"
]
}
],
"source": [
"import math\n",
"\n",
"#variable declaration\n",
"F = 8482; # Tensile force in newtons\n",
"lo = 0.30; # length of steel wire in cm\n",
"Y = 207*10**9; # Youngs modulus of steel Gpa\n",
"r = 3*10**-3; # radius of steel wire in m\n",
"v = 0.30; # poisson ratio\n",
"\n",
"# Calculations\n",
"\n",
"dl = (F*lo)/float(Y*math.pi*r**2); #elongation in mm\n",
"e1 = dl/float(lo); #longitudanl strain \n",
"e2 = v*e1 # lateral strain \n",
"dr = e2*r; # lateral contraction in m\n",
" \n",
"# Result\n",
"print'Elongation = %3.3f'%(dl*10**3),'mm';\n",
"print'Lateral contraction = %3.2f '%(dr*10**6),'um';"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example 9.3,Page No:9.7"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Engineering stress = 14.15 MPa\n"
]
}
],
"source": [
"import math\n",
"\n",
"#variable declaration\n",
"P = 400; # tensile force in newtons \n",
"d = 6*10**-3; # diameter of steel rod m\n",
"\n",
"# Calculations\n",
"r =d/float(2);\n",
"E_stress = (P)/float((math.pi/float(4))*d*d); #e_stress in N/m**2\n",
"\n",
"#Result\n",
"\n",
"print'Engineering stress = %3.2f '%(E_stress*10**-6),'MPa';\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example 9.4,Page No:9.7"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Percentage of elongation = 5.75 %\n"
]
}
],
"source": [
"import math\n",
"\n",
"#variable declaration\n",
"Lf = 42.3; #guage length after strain mm\n",
"Lo = 40; # guage length in mm\n",
"\n",
"# Calculations\n",
"e = ((Lf - Lo)/float(Lo))*100 #Engineering Strain in %\n",
"\n",
"#Result\n",
"print'Percentage of elongation = %3.2f '%e,'%';"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example 9.5,Page No:9.7"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Percent reduction in area = 30.1 %\n"
]
}
],
"source": [
"import math\n",
"\n",
"#variable declaration\n",
"dr = 12.8; # original diameter of steel wire in mm\n",
"df = 10.7; # diameter at fracture in mm\n",
"\n",
"# Calculations\n",
"percent_red = (((math.pi*dr*dr) - (math.pi*df*df))/float(math.pi*dr*dr))*100; #Percent reduction in area in %\n",
"\n",
"\n",
"# Result\n",
"print'Percent reduction in area = %3.1f'%percent_red,'%';"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"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.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|