summaryrefslogtreecommitdiff
path: root/Advanced_Strength_and_Applied_Elasticity/Chapter8.ipynb
blob: 1a1e4e4a93d541f10c2bb9341e4afffd9cfb942b (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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
{
 "metadata": {
  "name": "",
  "signature": "sha256:54c92a13ce853ac5fe5325a355c839b097f01e81340aa957e3602b8ea43de184"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter8-Axisymmetrically Loaded Members"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg239"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate pressure and for longitudinal stress \n",
      "di=0.3 ##m\n",
      "de=0.4 ##m\n",
      "v=0.3\n",
      "sigmathetamax=250*10**6 ##Pa\n",
      "p0=0.\n",
      "pi=0.\n",
      "\n",
      "##solution a:\n",
      "a=0.15\n",
      "b=0.2\n",
      "r=a\n",
      "##sigmathetamax=pi*((b**2+a**2)/(b**2-a**2))\n",
      "pi=sigmathetamax*((b**2-a**2.)/(b**2+a**2.))\n",
      "print'%s %.2f %s'%(\"in Pa is= \",pi,\"\")\n",
      "\n",
      "##solution b:\n",
      "r=a\n",
      "##sigmathetamax=-2*p0*(b**2/(b**2-a**2))\n",
      "p0=-(-sigmathetamax)*((b**2.-a**2.)/(2.*b**2.))\n",
      "print'%s %.2f %s'%(\"in Pa is= \",p0,\"\")\n",
      "\n",
      "##solution c:\n",
      "u=((a**3*pi)/(b**2-a**2))*(0.7+1.3*(b**2./a**2.))\n",
      "print'%s %.2f %s'%(\"in per E meter is= \",u,\"\")\n",
      "sigmaz=(pi*a**2-p0*b**2)/(b**2-a**2)\n",
      "print'%s %.2f %s'%(\"for longitudinal stress is\",sigmaz,\"\")\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "in Pa is=  70000000.00 \n",
        "in Pa is=  54687500.00 \n",
        "in per E meter is=  40650000.00 \n",
        "for longitudinal stress is -35000000.00 \n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg241"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate pressure \n",
      "sigmayp=340. ##MPa\n",
      "tauyp=sigmayp/2. ##MPa\n",
      "print'%s %.2f %s'%(\"in MPa is=\",tauyp,\"\")\n",
      "a=0.1 ##m\n",
      "b=0.15 ##m\n",
      "v=0.3 \n",
      "##pi=4*p0\n",
      "##sigmatheta=(pi*(a**2+b**2)-2*p0*b**2)/(b**2-a**2)\n",
      "##sigmatheta=1.7*pi\n",
      "\n",
      "##sloution a: maxi principal stress theory\n",
      "sigmatheta=1.7\n",
      "pi=sigmayp/sigmatheta\n",
      "print'%s %.2f %s'%(\"in MPa is= \",pi,\"\")\n",
      "\n",
      "##sloution b: maxi shearing stress theory\n",
      "##(sigmatheta-sigmar)/2=1.35*pi\n",
      "pi=tauyp/1.35\n",
      "print'%s %.2f %s'%(\"in MPa is= \",pi,\"\")\n",
      "\n",
      "##solution c: energy of distortion theory\n",
      "sigmar=-1\n",
      "sigmayp1=math.sqrt(sigmatheta**2+sigmar**2-sigmatheta*sigmar)##*pi\n",
      "print(sigmayp1)\n",
      "pi=sigmayp/sigmayp1\n",
      "print'%s %.2f %s'%(\"in MPa is=\",pi,\"\")\n",
      "\n",
      "##solution d: maxi principal strain theory\n",
      "##(sigmatheta-v*sigmar)/E=sigmayp/E\n",
      "pi=sigmayp/(sigmatheta-v*sigmar)\n",
      "print'%s %.2f %s'%(\"in MPa is= \",pi,\"\")\n",
      "\n",
      "##solution e: octahedral shearing stress theory:\n",
      "pi=(math.sqrt(2.)*sigmayp)/math.sqrt((sigmatheta-sigmar)**2.+sigmar**2.+(-sigmatheta)**2)\n",
      "print'%s %.2f %s'%(\"in MPa is= \",pi,\"\")\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "in MPa is= 170.00 \n",
        "in MPa is=  200.00 \n",
        "in MPa is=  125.93 \n",
        "2.36431808351\n",
        "in MPa is= 143.80 \n",
        "in MPa is=  170.00 \n",
        "in MPa is=  143.80 \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg243"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate contact pressure and tangential stresses in the outer cylinder\n",
      "a=0.15 ##m\n",
      "b=0.2 ##m\n",
      "c=0.25 ##m\n",
      "E=200*10**9. ##Pa\n",
      "delta=0.0001 ##m\n",
      "140 ##MPa\n",
      "\n",
      "p=((E*delta)/8.)*(((b**2.-a**2.)*(c**2.-b**2.))/(2.*(b**2.)*(c**2.-a**2.)))\n",
      "print'%s %.2f %s'%(\"the contact pressure in Pa is= \",p,\"\") ## textbook ans is wrong\n",
      "\n",
      "p=12.3*10**6\n",
      "sigmatheta=p*((b**2+c**2.)/(c**2.-b**2.)) ## where r=0.2\n",
      "print'%s %.2f %s'%(\"tangential stresses in the outer cylinder in Pa is= \",sigmatheta,\"\")\n",
      "sigmatheta1=(2*p*b**2)/(c**2-b**2) ## where r=0.25\n",
      "print'%s %.2f %s'%(\"tangential stresses in the outer cylinder in Pa is= \",sigmatheta1,\"\")\n",
      "sigmatheta3=-(2*p*b**2)/(b**2-a**2) ## where r=0.15\n",
      "print'%s %.2f %s'%(\"tangential stresses in the inner cylinder in Pa is= \",sigmatheta3,\"\")\n",
      "sigmatheta4=-p*((b**2.+a**2.)/(b**2.-a**2.)) ## where r=0.2\n",
      "print'%s %.2f %s'%(\"tangential stresses in the inner cylinder in Pa is= \",sigmatheta4,\"\")\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the contact pressure in Pa is=  307617.19 \n",
        "tangential stresses in the outer cylinder in Pa is=  56033333.33 \n",
        "tangential stresses in the outer cylinder in Pa is=  43733333.33 \n",
        "tangential stresses in the inner cylinder in Pa is=  -56228571.43 \n",
        "tangential stresses in the inner cylinder in Pa is=  -43928571.43 \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg246"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate radial displacement of disk and shaft\n",
      "dn=0.1 ##m\n",
      "do=0.5 ##m\n",
      "t=0.08 ##m\n",
      "w=6900*(2*math.pi/60.) ##rpm\n",
      "row=7.8*10**3##Ns**2/m**4\n",
      "E=200*10**9 ##Pa\n",
      "v=0.3\n",
      "b=0.05\n",
      "c=0.25\n",
      "\n",
      "\n",
      "##solution a:\n",
      "##ud=((0.05*3.3*0.7)*(0.0025+0.0625-(1.3/3.3)*0.0025+(1.3/0.7)*0.0625)*row*w**2)/(8*E)\n",
      "ud=((0.05*3.3*0.7)*(b**2+c**2-(1.3/3.3)*b**2+(1.3/0.7)*c**2))/(8)\n",
      "print'%s %.4f %s'%(\"radial displacement of the disk in meter is= \",ud,\"\")\n",
      "\n",
      "##us=((0.05*0.7)*(3.3*0.0025-1.3*0.0025)*row*w**2)/(8*E)\n",
      "us=((0.05*0.7)*(3.3*b**2-1.3*b**2))/(8)\n",
      "print'%s %.6f %s'%(\"radial displacement of the shaft in meter is= \",us,\"\")\n",
      "delta=(ud-us)*row*w**2./E\n",
      "print(delta)\n",
      "\n",
      "##solution b:\n",
      "##p=E*delta*(c**2-b**2)/(2*b*c**2)\n",
      "p=E*delta*(c**2-b**2)/(2*b*c**2)\n",
      "print'%s %.2f %s'%(\"in Pa is= \",p,\"\")\n",
      "sigmathetamax=p*(c**2+b**2)/(c**2-b**2)\n",
      "print'%s %.2f %s'%(\"in Pa is= \",sigmathetamax,\"\")\n",
      "\n",
      "##solution c:\n",
      "sigmathetamax=3.3*(b**2.+c**2.-(1.9/3.3)*b**2.+c**2.)*row*w**2./8.\n",
      "print'%s %.2f %s'%(\"in Pa is= \",sigmathetamax,\"\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "radial displacement of the disk in meter is=  0.0026 \n",
        "radial displacement of the shaft in meter is=  0.000022 \n",
        "5.24957318528e-05\n",
        "in Pa is=  100791805.16 \n",
        "in Pa is=  109191122.25 \n",
        "in Pa is=  211764600.73 \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg250"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate sigma theta and sigma \n",
      "ti=0.075 ##m\n",
      "to=0.015##m\n",
      "a=0.05##m\n",
      "b=0.25##m\n",
      "delta=0.05 ##mm\n",
      "w=6900*(2*math.pi/60.) ##rpm\n",
      "s=1.\n",
      "row=7.8*10**3##Ns**2/m**4\n",
      "E=200. ##GPa\n",
      "\n",
      "##solution a:\n",
      "t1=ti*a**s\n",
      "print'%s %.4f %s'%(\"t1 is=\",t1,\"\")\n",
      "t1=to*b**2.\n",
      "print'%s %.4f %s'%(\"t1 is=\",t1,\"\")\n",
      "##(ti/to)=(t1*a**-s)/(t1*b**-s)=(b/a)**s\n",
      "c=(b/a)**s\n",
      "\n",
      "(ti/to)==c\n",
      "print'%s %.2f %s'%(\"ti/t0 is=\",c,\"\")\n",
      "m1=-0.5+math.sqrt((0.5)**2+(1+0.3*1))\n",
      "print'%s %.2f %s'%(\"m1 is=\",m1,\"\")\n",
      "m2=-0.5-math.sqrt((0.5)**2.+(1.+0.3*1.))\n",
      "print'%s %.2f %s'%(\"m2 is=\",m2,\"\")\n",
      "\n",
      "##sigmar=0=(c1/t1)*(0.05)**m1+(c2/t1)*(0.05)**(m2)-0.00176*row*w**2     ## r=0.05\n",
      "##sigmar=0=(c1/t1)*(0.25)**m1+(c2/t1)*(0.25)**(m2)-0.0439*row*w**2     ## r=0.25\n",
      "\n",
      "c1=t1*0.12529*row*w**2.\n",
      "print'%s %.2f %s'%(\"c1 is=\",c1,\"\")\n",
      "c2=t1*-6.272*10**-5*row*w**2\n",
      "print'%s %.2f %s'%(\"c2 is=\",c2,\"\")\n",
      "\n",
      "r=0.05\n",
      "sigmar=(0.12529*r**0.745-6.272*10**-5*r**(-1.745)-0.70*r**2)##*row*w**2\n",
      "print'%s %.5f %s'%(\"sigmar is= \",sigmar,\"\")\n",
      "\n",
      "sigmatheta=(0.09334*r**0.745+1.095*10**-4*r**(-1.745)-0.40*r**2)##*row*w**2\n",
      "print'%s %.2f %s'%(\"sigmatheta is= \",sigmatheta,\"\")\n",
      "\n",
      "##solution b:\n",
      "r=0.05\n",
      "##ur=(r*sigmatheta)/E\n",
      "ur=(r*sigmatheta)\n",
      "print'%s %.7f %s'%(\"ur is= \",ur,\"\")\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "t1 is= 0.0037 \n",
        "t1 is= 0.0009 \n",
        "ti/t0 is= 5.00 \n",
        "m1 is= 0.74 \n",
        "m2 is= -1.74 \n",
        "c1 is= 478341.11 \n",
        "c2 is= -239.46 \n",
        "sigmar is=  0.00001 \n",
        "sigmatheta is=  0.03 \n",
        "ur is=  0.0014711 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg251"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate pressure\n",
      "b=0.25 ##m\n",
      "w=6900.*(2*math.pi/60.) ##rpm\n",
      "t1=0.075 ##m\n",
      "t2=0.015 ##m\n",
      "row=7.8*10**3##Ns**2/m**4\n",
      "c1=t1\n",
      "\n",
      "x=t2/t1\n",
      "print(x)\n",
      "\n",
      "##(t2/t1)==(c1*exp(-(row*w**2/2*sigma)*b**2))/c1\n",
      "##exp(-(row*w**2/2*sigma)*b**2)=x\n",
      "##log(x)=-(row*w**2*b**2/2*sigma)\n",
      "y=2.*math.log(x)\n",
      "print(y)\n",
      "sigma=-(row*w**2.*b**2.)/y\n",
      "print'%s %.2f %s'%(\"in Pa is= \",sigma,\"\")\n",
      "\n",
      "##t=c1*exp(-row*(w**2/2*sigma)*r**2)\n",
      "z=row*(w**2./(2.*sigma))\n",
      "print(z)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "0.2\n",
        "-3.21887582487\n",
        "in Pa is=  79072562.70 \n",
        "25.7510065989\n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}