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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 2: Strain"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.1 page no. 70"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Given\n",
"e_z= 4 #Constant\n",
"ab = 0.200 #m, dimension\n",
"from scipy import integrate\n",
"#Calculations\n",
"#Part a)\n",
"import math\n",
"def f(z):\n",
" return(1+(40*10**-3)*(math.sqrt(z)))\n",
"z=integrate.quad(f,0,ab) #Strain formula for short line segment = delta(sdash) =(1+e_z)delta(s) \n",
"deltaB= z[0]-ab\n",
"deltaB_mm= deltaB*1000\n",
"\n",
"#Part b)\n",
"\n",
"e_avg = deltaB/ab# Normal strain formula e = (delta(sdash) -delta(s))/delta(s)\n",
"\n",
"#Display\n",
"print\"The displacement at the end of the rod is = \",round(deltaB_mm,2),\"mm\"\n",
"print\"The average normal strain in the rod is =\",round(e_avg,4),\"mm\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The displacement at the end of the rod is = 2.39 mm\n",
"The average normal strain in the rod is = 0.0119 mm\n"
]
}
],
"prompt_number": 19
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.2 page no. 71"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Given\n",
"theta = 0.05 #degree, angle\n",
"L1=300.0 #mm, length\n",
"L2 = 400.0 #mm\n",
"\n",
"#Calculations\n",
"import math\n",
"alpha=math.atan(L2/L1)*180/3.14\n",
"phi=90-alpha+theta\n",
"Lad=math.sqrt(L1**2+L2**2)\n",
"Lbd=math.sqrt(Lad**2+L2**2-2*L2*Lad*math.cos(36.92*3.14/180.0))\n",
"epsilonBD=(Lbd-L1)/(L1)\n",
"dLbd=(theta*3.14/180.0)*L2\n",
"\n",
"#Display\n",
"print\"The average normal strain =\",round(epsilonBD,3),\"mm/mm\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The average normal strain = 0.001 mm/mm\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.3 page no. 72"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Given\n",
"#The given dimension are\n",
"ab= 250.0 #mm\n",
"bbdash_x = 3.0 #mm\n",
"bbdash_y = 2.0 #mm\n",
"ac = 300.0 #mm\n",
"\n",
"#calculations\n",
"#Part(a)\n",
"import math\n",
"abdash = math.sqrt((ab - bbdash_y)**2 + (bbdash_x)**2) #Pythagoras theorem\n",
"avg_normal_strain = (abdash-ab)/ab\n",
"\n",
"#Part(b)\n",
"gamma_xy = math.atan(bbdash_x/(ab - bbdash_y)) #shear strain formula\n",
"\n",
"#Display\n",
"print\"The average normal strain along AB is =\",round(avg_normal_strain,4),\"mm/mm\"\n",
"print\"The average shear strain =\",round(gamma_xy,4),\"rad\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The average normal strain along AB is = -0.0079 mm/mm\n",
"The average shear strain = 0.0121 rad\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2.4 page no. 73"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Given\n",
"ab = 150 #mm\n",
"bc = 150 #mm\n",
"disp_cd= 2 #mm\n",
"ab_half = ab/2.0\n",
"addash_half = (bc+disp_cd)/2.0 \n",
"\n",
"#Calculations\n",
"#Part(a)\n",
"import math\n",
"ac = sqrt((ab)**2 + (bc)**2) #Pythagoras theorem in mm\n",
"ac_m = ac/1000.0 #in m\n",
"acdash = sqrt((ab)**2 + (bc+disp_cd)**2) #Pythagoras theorem in mm\n",
"acdash_m = acdash/1000.0 #in m\n",
"avg_strain_ac = (acdash_m - ac_m)/ac_m #Normal strain formula\n",
"\n",
"#Part(b)\n",
"theta_dash = 2* math.atan((addash_half)/(bc/2.0)) \n",
"gamma_xy = (math.pi / 2.0)- theta_dash \n",
"\n",
"#Display\n",
"print\"The average normal strain along the diagonal AC is =\",round(avg_strain_ac,5),\"mm/mm\"\n",
"print\"The shear strain at E relative to the x,y axes =\",round(gamma_xy,4),\"rad\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The average normal strain along the diagonal AC is = 0.00669 mm/mm\n",
"The shear strain at E relative to the x,y axes = -0.0132 rad\n"
]
}
],
"prompt_number": 22
}
],
"metadata": {}
}
]
}
|