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
|
{
"metadata": {
"name": "",
"signature": "sha256:2206f2855e4232dc4600c4e414262a1e7f06df22f4a8f22ba905ba92f7813175"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter1-Introduction"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex1-pg16"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"##calculate the\n",
"## initialization of variables\n",
"import math\n",
"## part (a)\n",
"a=700. ## M Pa from figure 1.8\n",
"b=100. ## M Pafrom figure 1.8\n",
"m=1/6. ## from figure 1.8\n",
"Y=450. ## M Pa from figure 1.9\n",
"##calculations\n",
"sigma_u=a+m*b\n",
"## results\n",
"print('\\n part (a) \\n')\n",
"print\"%s %.2f %s\"%(' The ultimate strength is sigma = ',sigma_u,' M Pa')\n",
"print\"%s %.2f %s\"%('\\n and the yield strength is Y = ',Y,'M Pa')\n",
"\n",
"## part (b)\n",
"c1=62. ## from figure 1.8\n",
"d1=0.025 ## from figure 1.8\n",
"c2=27. ## from figure 1.10a\n",
"d2=0.04 ## from figure 1.10a\n",
"## calculations\n",
"U_f1=c1*b*d1*10**6\n",
"U_f2=c2*b*d2*10**6\n",
"## results\n",
"print('\\n part (b)')\n",
"print\"%s %.2e %s\"%('\\n The modulus of toughness for alloy steel is Uf = ',U_f1,' N/m^2')\n",
"print\"%s %.2e %s\"%('\\n and structural steel is Uf = ',U_f2,' N/m^2')\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
" part (a) \n",
"\n",
" The ultimate strength is sigma = 716.67 M Pa\n",
"\n",
" and the yield strength is Y = 450.00 M Pa\n",
"\n",
" part (b)\n",
"\n",
" The modulus of toughness for alloy steel is Uf = 1.55e+08 N/m^2\n",
"\n",
" and structural steel is Uf = 1.08e+08 N/m^2\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex2-pg16"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"##calculate the permanet strain\n",
"## initialization of variables\n",
"import math\n",
"sigma=500. ## Stress M Pa\n",
"eps=0.0073 ## Strain\n",
"sigma_A=343. ## M Pa from figure 1.9\n",
"eps_A=0.00172 ## from figure 1.9\n",
"## part (a)\n",
"E=sigma_A/eps_A\n",
"\n",
"## part (B)\n",
"eps_e=sigma/E\n",
"eps_p=eps-eps_e\n",
"## results\n",
"print(' part (a) \\n')\n",
"print\"%s %.2f %s\"%(' The modulus of elasticity of the rod is E = ',E/1000,' G Pa')\n",
"print('\\n part (b)')\n",
"print\"%s %.4f %s\"%('\\n the permanent strain is = ',eps_p,'')\n",
"print\"%s %.4f %s\"%('\\n and the strain recovered is =',eps_e,'')\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" part (a) \n",
"\n",
" The modulus of elasticity of the rod is E = 199.42 G Pa\n",
"\n",
" part (b)\n",
"\n",
" the permanent strain is = 0.0048 \n",
"\n",
" and the strain recovered is = 0.0025 \n"
]
}
],
"prompt_number": 15
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex3-pg19"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"##calculate the diameter\n",
"## initialization of variables\n",
"import math\n",
"D=25. ## kN\n",
"L=60. ## kN\n",
"W=30. ##kN\n",
"Y=250. ## M Pa\n",
"safety=5./3. ## AISC, 1989\n",
"## calculations\n",
"Q=(D+L+W)*10**3. ## converted to N\n",
"A=safety*Q/Y\n",
"r=math.sqrt(A/math.pi)+0.5 ## additional 0.5 mm is for extra safety\n",
"d=1.8*r ## diameter\n",
"## results\n",
"print('Part (a) \\n ')\n",
"print\"%s %.2f %s %.2f %s \"%('A rod of ',d,' mm'and ' in diameter, with a cross sectional area of ',math.pi*(d**2./4.),' mm^2, is adequate')\n",
"## The diameter is correct as given in the textbook. Area doesn't match due to rounding off error and partly because it's a design problem.\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Part (a) \n",
" \n",
"A rod of 29.02 in diameter, with a cross sectional area of 661.39 mm^2, is adequate \n"
]
}
],
"prompt_number": 14
}
],
"metadata": {}
}
]
}
|