summaryrefslogtreecommitdiff
path: root/Material_Science_In_Engineering/ch8.ipynb
blob: c6220c7aad147f4ee31e661e9f1df9ee3c8fabb6 (plain)
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 8 : Mechanical Testing"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 8.1 pageno : 195"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "b = 225.;\t\t\t#in mm\n",
      "h = 10. \t\t\t#in mm\n",
      "l = 1100.;\t\t\t#in mm\n",
      "f1 = 250.;\t\t\t#in N\n",
      "f2 = 350;\t\t\t#in N at which glass breaks\n",
      "\n",
      "# Calculations\n",
      "m = f1*l/4.;\t\t\t#in N-mm\n",
      "f = f1/2.;  \t\t\t#in N\n",
      "a = (6*m)/(b*h**2);\t\t\t#in N/mm**2\n",
      "t = (3*f)/(2*b*h);\t\t\t#in N/sqmm\n",
      "r = f2*l/4;\t\t\t        #in N-mm\n",
      "i = (b*h**3)/12;\t\t\t#in mm**4\n",
      "y = h/2;\t        \t\t#in mm\n",
      "mr = r*y/i;\t\t        \t#in n/sqmm\n",
      "\n",
      "# Results\n",
      "print \"Flexural Strength (in N/sqmm)  =  %.2f N/mm**2\"%a\n",
      "print \"Shear Strength (in N/sqmm)  =  %3f N/mm**2\"%t\n",
      "print \"Modulous of Rupture (in N/sqmm)  =  %.2f N/mm**2\"%mr\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Flexural Strength (in N/sqmm)  =  18.33 N/mm**2\n",
        "Shear Strength (in N/sqmm)  =  0.083333 N/mm**2\n",
        "Modulous of Rupture (in N/sqmm)  =  25.67 N/mm**2\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 8.2 pageno : 201"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "d = 5.;     \t\t\t#in mm\n",
      "\n",
      "# Calculations\n",
      "id = 32.5/10;\t\t\t#indentation diameter in mm\n",
      "p = 30*d**2;\t\t\t#load for steel specimen in kgf\n",
      "bhn = p/((3.14*d/2)*(d-math.sqrt(d**2-id**2)));\t\t\t#in kgf/sqmm\n",
      "\n",
      "# Results\n",
      "print \"Load P for steel specimen (in kgf)  =  %.f kgf\"%p\n",
      "print \"BRINELL HARDNESS NUMBER of the steel specimen  =  %.1f\"%bhn\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Load P for steel specimen (in kgf)  =  750 kgf\n",
        "BRINELL HARDNESS NUMBER of the steel specimen  =  79.6\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 8.3 pageno : 209"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "l = 0.1;\t\t\t#frictinal and windage losses in kgf-m\n",
      "dr = 5.9;\t\t\t#dial reading in kgf-m\n",
      "w = 19.33;\t\t\t#weight of hammer in kgf-m\n",
      "t = 10.;\t\t\t#in mm\n",
      "ui = 30.;\t\t\t#in kgf-m\n",
      "a = 160.;\t\t\t#angle in degrees\n",
      "r = 0.8;\t\t\t#swing radius in m\n",
      "\n",
      "\n",
      "# Calculations\n",
      "u = dr-l;\t        \t\t#in kgf-m\n",
      "d = t/5;\t\t        \t#depth of V-notch in mm\n",
      "te = t-d;\t\t    \t    #effective thickness in mm\n",
      "ve = 75.*10*te; \t\t\t#effective volume in cu. mm\n",
      "vem = ve*10.**-9;\t\t\t#in cu. m\n",
      "mr = u/vem;\t        \t\t#in kgf/sqm\n",
      "ae = t*te;      \t\t\t#effective area of cross section in sqmm\n",
      "aem = ae*10**-6;\t\t\t#in sqm\n",
      "is_ = u/aem;\t\t        \t#in kg/m\n",
      "uf = ui-u;\t\t\t#in kgf-m\n",
      "hf = uf/w;\t\t\t#in m\n",
      "B = math.degrees(math.acos(1-(uf/(w*r))))\n",
      "\n",
      "# Results\n",
      "print \"Rupture Energy (in kgf-m)  =  %.1f kgf-m\"%u\n",
      "print \"Modulous Of Rupture (in kgf/sqm)  =  %.1e kgf/m**2\"%mr\n",
      "print \"Notch Imapct Strength (in kg/m)  =  %.2e kgm\"%is_\n",
      "print \"Height risen by Hammer (in m)  =  %.2f m\"%hf\n",
      "print \"Angle after Breaking the specimen (in degress)  =  %.1f degrees\"%(B)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rupture Energy (in kgf-m)  =  5.8 kgf-m\n",
        "Modulous Of Rupture (in kgf/sqm)  =  9.7e+05 kgf/m**2\n",
        "Notch Imapct Strength (in kg/m)  =  7.25e+04 kgm\n",
        "Height risen by Hammer (in m)  =  1.25 m\n",
        "Angle after Breaking the specimen (in degress)  =  124.4 degrees\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 8.4 pageno : 211"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "a_m = 70.;  \t    \t\t#mean stress in Mpa\n",
      "a_r = 210.;\t    \t    \t#stress amplitude in Mpa\n",
      "\n",
      "# Calculations\n",
      "a_max = ((2*a_m)+a_r)/2;\t\t\t#maximum stress in MPa\n",
      "a_min = 2*a_m-a_max;\t    \t\t#Minimum stress in MPa\n",
      "s = a_min/a_max;\t\t\t        #stress ratio\n",
      "sr = a_max-a_min;       \t\t\t#stress range in MPa\n",
      "\n",
      "# Results\n",
      "print \"Maximum Stress Level (in MPa)  =  \",a_max\n",
      "print \"Minimum Stress Level (in MPa)  =  \",a_min\n",
      "print \"Stress Ratio  =  \",s\n",
      "print \"Stress Range (in MPa)  =  \",sr\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum Stress Level (in MPa)  =   175.0\n",
        "Minimum Stress Level (in MPa)  =   -35.0\n",
        "Stress Ratio  =   -0.2\n",
        "Stress Range (in MPa)  =   210.0\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 8.5 pageno : 212"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "p_min = 20.;\t\t\t#in kN\n",
      "p_max = 50.;\t\t\t#in kN\n",
      "l = 500.;   \t\t\t#in mm\n",
      "d = 60.;\t    \t\t#in mm\n",
      "a_u = 650.;\t\t    \t#in MPa\n",
      "a_y = 520.;\t\t    #in MPa\n",
      "fos = 1.8;\t\t\t    #factor of safety\n",
      "\n",
      "# Calculations\n",
      "m_max = p_max*l/4;\t\t\t#maximum bending moment in kN mm\n",
      "m_min = p_min*l/4;\t\t\t#minimum bending moment in kN mm\n",
      "m_m = (m_max+m_min)/2;\t\t\t#mean bending moment in kN mm\n",
      "m_a = (m_max-m_min)/2;\t\t\t#alternating bending moment in kN mm\n",
      "z = 3.14*d**3/32;\n",
      "a_m = (m_m/z)*1000;\t\t\t#mean bending stress in MPa\n",
      "a_a = (m_a/z)*1000;\t\t\t#alternating bending stress in MPa\n",
      "a_e1 = a_a/((1/fos)-(a_m/a_u)**2*fos);\t\t\t#in MPa\n",
      "a_e2 = a_a/((1/fos)-(a_m/a_u));\t\t\t#in MPa\n",
      "a_e3 = a_a/((1/fos)-(a_m/a_y));\t\t\t#in MPa\n",
      "\n",
      "# Results\n",
      "print \"ENDURANCE STRESS FROM Gerbers Parabolic Function (in MPa)  =  %.2f MPa\"%a_e1\n",
      "print \"ENDURANCE STRESS FROM Goodman Straight Line Relation (in MPa)  =  %.2f MPa\"%a_e2\n",
      "print \"ENDURANCE STRESS FROM Soderberg Straight Line Relation (in MPa)  =  %.2f MPa\"%a_e3\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "ENDURANCE STRESS FROM Gerbers Parabolic Function (in MPa)  =  236.52 MPa\n",
        "ENDURANCE STRESS FROM Goodman Straight Line Relation (in MPa)  =  371.71 MPa\n",
        "ENDURANCE STRESS FROM Soderberg Straight Line Relation (in MPa)  =  557.78 MPa\n"
       ]
      }
     ],
     "prompt_number": 11
    }
   ],
   "metadata": {}
  }
 ]
}