summaryrefslogtreecommitdiff
path: root/Mechanics_of_Structures_by_S._B._Junnarkar/Chapter12.ipynb
blob: 794c3e4e7f2076922f1f7d91a871cb7fd425c2bb (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
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
{
 "metadata": {
  "name": "",
  "signature": "sha256:f6a5fb5a9bb50976164cfcdf430ee1b396b67dbf2ffbf7763fc02510b90290d3"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter12-Shafts and springs in torsion"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg450"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate The maximum intensity of shear stress induced and The angle of twist in degree\n",
      "d = 3.;##inches\n",
      "HP = 120.;##horse power\n",
      "RPM = 180.;\n",
      "l = 25.;##feet\n",
      "N = 12.*10**6.;## lb/in**2\n",
      "T = 33000.*HP/(2.*math.pi*RPM);##  lb-feet\n",
      "f_s = 16*T*12/(math.pi*d**3.);## lb/in**2\n",
      "theta = f_s*l*12./(0.5*d*N);## radian\n",
      "print'%s %.d %s'%('The maximum intensity of shear stress induced is f_s =',f_s,' lb/in**2');\n",
      "print'%s %.2f %s'%('The angle of twist in degrees is theta = ',theta*180/math.pi,'');\n",
      "\n",
      "##there is a minute error in the answer given in textbook.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum intensity of shear stress induced is f_s = 7925  lb/in**2\n",
        "The angle of twist in degrees is theta =  7.57 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg451"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate H.P transmitted is\n",
      "D = 2.;## inches\n",
      "N = 150.;## RPM\n",
      "f_s = 9000.;## lb/in^2\n",
      "M_r = f_s*(math.pi/16.)*D**3.;## lb-inches\n",
      "HP = M_r*2.*math.pi*N/(12.*33000.);##\n",
      "print'%s %.2f %s'%('H.P transmitted is',HP,'');\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "H.P transmitted is 33.65 \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg451"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate Suitable diameter \n",
      "HP = 80.;\n",
      "N = 200.;## RPM\n",
      "m = 30/100.;\n",
      "f = 12000.;## lb/in^2\n",
      "T = HP*33000./(2.*math.pi*N);## lb-feet\n",
      "T_max = (1+m)*T;## lb-feet\n",
      "D = (T_max*12.*16./(math.pi*f))**(1/3.);## inches\n",
      "print'%s %.3f %s'%('Suitable diameter is D =',D,'inches');\n",
      "\n",
      "##the answer is approximated in the textbook.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Suitable diameter is D = 2.405 inches\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg451"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#check whether it is satisfactory or not for given st A shaft',round(D),'inches external diameter and',round(d),' inches internal diameter\n",
      "HP = 750.;\n",
      "N = 90.;## RPM\n",
      "m = 40/100.;\n",
      "f = 12000.;## lb/in^2\n",
      "t = 1.;## inch\n",
      "T = HP*33000./(2.*math.pi*N);## lb-inches\n",
      "T_max = (1.+m)*T;## lb-inches\n",
      "##On solving (4*t)D^3 - (6*t^2)D^2 +(4*t^3 -(16*M/f*%pi))D -t^4 = 0, we get D\n",
      "D = 7.6;##inches\n",
      "d = D - 2.;##inches\n",
      "print'%s %.d %s %d %s '%('A shaft',round(D),'inches external diameter and',round(d),' inches internal diameter will be satisfactory.');\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "A shaft 8 inches external diameter and 6  inches internal diameter will be satisfactory. \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg452"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate'D = ',round(D1),' inches will be suitable for the shaft\n",
      "RPM = 180.;## RPM\n",
      "HP = 130.;\n",
      "f = 9000.;## lb/in^2\n",
      "alpha = 1.;##degree\n",
      "l = 10.;## feet\n",
      "N = 6000.;## tons/in^2\n",
      "T = 33000.*HP/(2*math.pi*RPM);## lb-feet\n",
      "D1 = (16*T*12/(f*math.pi))**(1/3);## inches\n",
      "D2 = (T*12*l*12*32*alpha*180/(math.pi*N*math.pi*2240.))**(1/4.);## inches\n",
      "if D1 > D2 :\n",
      "    print'%s %.d %s'%('D = ',round(D1),' inches will be suitable for the shaft');\n",
      "else:\n",
      "    print'%s %.d %s'%('D =',round(D2),'inches will be suitable for the shaft');\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "D = 4 inches will be suitable for the shaft\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg453"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate 'The saving in weight per foot run and percentage saving\n",
      "HP = 3000.;\n",
      "RPM = 60.;\n",
      "f = 12000.;##lb/in^2\n",
      "rho = 480.;##lb. per sq. foot\n",
      "k = 3./4.;## k = d/D \n",
      "T = HP*33000.*12./(2.*math.pi*RPM);## lb-inches\n",
      "D1 = (T*16/(f*math.pi))**(1/3.);##inches\n",
      "D2 = (T/((1.+k**2.)*(1.-k**2.)*math.pi*f/16.))**(1/3.);##inches\n",
      "d = k*D2;## inches\n",
      "w1 = 0.25*math.pi*D1**2 *rho/144. ;## lb-wt\n",
      "w2 = 0.25*math.pi*(D2+d)*(D2-d)*rho/144. ;## lb-wt\n",
      "w = w1-w2;## lb-wt\n",
      "n = (w/w1)*100.;\n",
      "print'%s %.d %s'%('The saving in weight per foot run is w =',w,' lb-wt');\n",
      "print'%s %.2f %s'%('Percentage saving is ',n,'');\n",
      "\n",
      "##there is a minute error in the answer given in textbook.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The saving in weight per foot run is w = 138  lb-wt\n",
        "Percentage saving is  43.62 \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex7-pg454"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate T1 and T2 \n",
      "l1 = 3.;## feet\n",
      "d1 = 1.;## feet\n",
      "l2 = 9.;## feet\n",
      "M = 200.;## lb-wt\n",
      "l = 9.;## inches\n",
      "N = 12.*10**6;## lb/in^2\n",
      "k = l2/l1;\n",
      "T1 = M/(1.+k);## lb-feet\n",
      "T2 = k*T1;## lb-feet\n",
      "f_s = T2*12./(math.pi/16.);## lb/in^2\n",
      "theta = f_s*l/(0.5*d1*N);## radians\n",
      "print'%s %.d %s %.d %s '%('T1 =',T1,'lb-feet, T2 = ',T2,' lb-feet');\n",
      "print'%s %.d %s'%('f_s = ',f_s,' lb/in^2');\n",
      "print'%s %.4f %s %.3f %s'%(' theta = ',theta,' radian ,  theta    = ',theta*180/math.pi,' degrees');\n",
      "##there is a minute error in the answer given in twxtbook\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "T1 = 50 lb-feet, T2 =  150  lb-feet \n",
        "f_s =  9167  lb/in^2\n",
        " theta =  0.0138  radian ,  theta    =  0.788  degrees\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex8-pg456"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate forces \n",
      "D = 5.;## inches\n",
      "HP = 120.;\n",
      "RPM = 150.;\n",
      "b = 5.;## inches\n",
      "h = 1.;##inch\n",
      "n = 6.;## no. of bolts\n",
      "d = 3/4.;## inches\n",
      "T = HP*33000.*12./(2.*math.pi*RPM);## lb-inches\n",
      "f_s = T*16./(math.pi*27.);\n",
      "f_k = T/(b*h*2.*d);\n",
      "f_b = T/(n*0.25*math.pi*d**2 * b);## lb-inches\n",
      "print'%s %.d %s %d %s %d %s'%('f_s =',f_s,'lb/in^2, f_k =',f_k,'lb/in^2, f_b =',f_b,' lb/in^2');\n",
      "\n",
      "##there are errors given in the answers given in the textbook\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "f_s = 9510 lb/in^2, f_k = 6722 lb/in^2, f_b = 3804  lb/in^2\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex9-pg460"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate 'Maximum strain  energys\n",
      "d = 4.;##inches\n",
      "T = 30.;## ton-inches\n",
      "M = 20.;##ton-inches\n",
      "m = 1/0.3;\n",
      "f_s = 16.*T/(math.pi*d**3);## tons/in^2\n",
      "f_b = 32*M/(math.pi*d**3);## tons/in^2\n",
      "theta = 0.5*math.atan(T/M);## radians\n",
      "theta1 = theta*180./math.pi;\n",
      "theta2 = theta1+90.;\n",
      "f1 = 0.5*f_b + math.sqrt(f_s**2 + 0.25*f_b**2);## tons/in^2\n",
      "f2 = 0.5*f_b - math.sqrt(f_s**2 + 0.25*f_b**2);## tons/in^2\n",
      "Ee = f1 - (f2/m);## tons/in^2\n",
      "f = math.sqrt(f1**2 + f2**2 - 2*f1*f2/m);## tons/in^2\n",
      "print'%s %.3f %s'%('Maximum strain is Ee = ',Ee,' tons/in^2');\n",
      "print'%s %.3f %s'%(' Maximum strain energy is f = ',f,' tons/in^2');\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum strain is Ee =  4.844  tons/in^2\n",
        " Maximum strain energy is f =  4.995  tons/in^2\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex10-pg461"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate diameter of the shaft in all  different cases\n",
      "HP = 80.;\n",
      "RPM = 120.;\n",
      "b = 10.;## feet\n",
      "h = 3.;## feet\n",
      "F = 8000.;## lb-wt\n",
      "m = 4.;\n",
      "T = HP*33000.*12./(2.*math.pi*RPM*2240.);## ton-inches\n",
      "M = F*h*(b-h)*12./(b*2240.);## ton-inches\n",
      "##(i) The major principal stress f1 is given by\n",
      "f1 = 6;## tons/in^2\n",
      "d1 = ((M+math.sqrt(M**2 + T**2))*16/(math.pi*f1))**(1/3.);## inches\n",
      "\n",
      "##(ii) If f_s_dash is the maximum intensity of shear stress\n",
      "f_s_dash = 3;## tons/in^2\n",
      "d2 = (math.sqrt(M**2 + T**2) * 16./(math.pi*f_s_dash))**(1/3.);## inches\n",
      "\n",
      "##(iii) If e is the major principal strain\n",
      "Ee = 6.;## tons/in^2\n",
      "d3 = (((1.-(1./m))*M + (1.+(1./m))*math.sqrt(M**2 + T**2))*16./(math.pi*Ee))**(1/3.);## inches\n",
      "\n",
      "##(iv) If f is the direct stress which, acting alone will produce the same maximum strain energy \n",
      "f = 6.;## tons/in^2\n",
      "d4 = ((math.sqrt(4*M**2 + 2.*(m+1.)*(T**2)/m))*16./(math.pi*f))**(1/3.);## inches\n",
      "print'%s %.3f %s %.3f %s %.3f %s %.3f %s'%('The diameter of the shaft in different cases will be, (i) d = ',d1,' inches,(ii) d = ',d2,' inches  , (iii) d = ',d3,' inches  ,(iv) d = ',d4,'inches');\n",
      "##there are round-off errors in the answers given in textbook.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The diameter of the shaft in different cases will be, (i) d =  5.365  inches,(ii) d =  5.384  inches  , (iii) d =  5.370  inches  ,(iv) d =  5.370 inches\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex11-pg463"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate The maximum principal stress and The maximum shear intensity and maximum strain\n",
      "D = 12.;## inches\n",
      "d = 6.;## inches\n",
      "HP = 2400.;\n",
      "RPM = 80.;\n",
      "M = 40.;## ton-feet\n",
      "P = 25.;## tons\n",
      "PR = 0.3;##poisson's ratio\n",
      "A = 0.25*math.pi*(D**2 - d**2);## in**2\n",
      "Z = (math.pi/32)*(D**4 - d**4)/D;## in**3\n",
      "J = (math.pi/16)*(D**4 - d**4)/D;## in**3\n",
      "p_0 = P/A ;## ton/in**2\n",
      "p_b = M*12/Z ;## tons/in**2\n",
      "f_b = p_0 + p_b;##tons/in**2\n",
      "f_s = HP*33000*12/(2*math.pi*RPM*2240*J);## tons/in**2\n",
      "theta = 0.5*math.atan(2*f_s/f_b);## radians\n",
      "theta1 = theta*180/math.pi;## degrees\n",
      "theta2 = theta1+90;##degrees\n",
      "f_1 = 0.5*f_b + math.sqrt(f_s**2 + 0.25*f_b**2);##tons/in**2\n",
      "f_2 = 0.5*f_b - math.sqrt(f_s**2 + 0.25*f_b**2);##tons/in**2\n",
      "f = math.sqrt(0.25*f_b**2 + f_s**2);## tons/in**2\n",
      "Ee = f_1 - PR*f_2;## tons/in**2\n",
      "print'%s %.2f  %s %.2f %s'%('The maximum principal stresse are f_1 = ',f_1,' tons/in**2.,compressive ,  f_2 = ',-f_2,' tons/in**2., tensile');\n",
      "print'%s %.1f %s %.1f %s'%('theta1 = ',theta1,' degrees,theta2 =',theta2,'degrees');\n",
      "print'%s %.1f %s '%(' The maximum shear intensity = ',f,'tons/in**2');\n",
      "print'%s %.3f %s'%(' Maximum strain is, Ee =',Ee,'tons/in**2');\n",
      "\n",
      "##there are minute errors in the answers given in textbook.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum principal stresse are f_1 =  4.78   tons/in**2.,compressive ,  f_2 =  1.47  tons/in**2., tensile\n",
        "theta1 =  29.0  degrees,theta2 = 119.0 degrees\n",
        " The maximum shear intensity =  3.1 tons/in**2 \n",
        " Maximum strain is, Ee = 5.226 tons/in**2\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex12-pg466"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate 'The size of the shaft and angle of the twist in the shaft for a length \n",
      "RPM = 180.;\n",
      "P = 10.;## tons\n",
      "v = 25.;## feet per minute\n",
      "n = 64/100.;## efficiency of the crane\n",
      "f = 5500.;## lb/in^2\n",
      "l = 10.;## feet\n",
      "N = 12*10**6.;## lb/in^2\n",
      "W = P*v*2240./n;## ft-lbs\n",
      "T = W*12./(2.*math.pi*RPM);## lb-inches\n",
      "s = (T/(0.208*f))**(1/3.);## inches\n",
      "theta = 7.11*T*l*12.*180./(math.pi*N*s**4.);## degrees\n",
      "print'%s %.3f %s'%('The size of the shaft is s = ',s,' inches');\n",
      "print'%s %.1f %s %.2f %s'%('The angle of the twist in the shaft for a length of ',l,' feet, theta =',theta,' degrees');\n",
      "##there is a round-off error in the answer given in textbook.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The size of the shaft is s =  2.010  inches\n",
        "The angle of the twist in the shaft for a length of  10.0  feet, theta = 2.32  degrees\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex13-pg469"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate Shear stress induced  and  Shear stress induced  and  Energy stored\n",
      "d = 3/8.;## inches\n",
      "n = 12.;##no. of complete turns\n",
      "D = 4.;## inches\n",
      "W = 50.;## lb-wt\n",
      "N = 12*10**6;## lb/in^2\n",
      "T = W*0.5*D;## lb-inches\n",
      "f_s = T*16./(math.pi*d*83);##lb/in^2\n",
      "delta = 64.*W*(D**3 /8.)*n/(N*d**4.);## inches\n",
      "E = 0.5*W*delta;## inch-lbs\n",
      "print'%s %.d %s'%('Shear stress induced is f_s =',f_s,' lb/in^2');\n",
      "print'%s %.3f %s'%(' Deflection under the pull is delta = ',delta,' inches');\n",
      "print'%s %.3f %s'%(' Energy stored = ',E,' lb-inches');\n",
      "\n",
      "##there is a minute error in the answer given in textbook.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Shear stress induced is f_s = 16  lb/in^2\n",
        " Deflection under the pull is delta =  1.295  inches\n",
        " Energy stored =  32.363  lb-inches\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex14-pg469"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate The number of springs required\n",
      "W = 2.;## tons\n",
      "v = 4.;## miles per hour\n",
      "n = 18.;## no. of coils\n",
      "delta = 9.;## inches\n",
      "N = 6000.;## tons/in^2\n",
      "d = 1.;## inch\n",
      "D = 8.;## inches\n",
      "KE = 12.*(W*(v*44./30.)**2.)/(2.*32.);## inch-tons\n",
      "P = (delta*N*d**4)/(64.*n*(0.5*D)**3);## tons\n",
      "E = 0.5*P*delta;## inch-tons\n",
      "m = KE/E ;## no. of springs required\n",
      "print'%s %.d %s'%('The number of springs required m =',round(m),'');\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The number of springs required m = 4 \n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex15-470"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate height of drop\n",
      "W = 5.;## cwt\n",
      "n = 18.;## no. of coils\n",
      "delta = 9.;## inches\n",
      "d = 1.;## inch\n",
      "D = 8.;## inches\n",
      "N = 6000.;## tons/in^2\n",
      "P = (delta*N*d**4.)/(64.*n*(0.5*D)**3);## tons\n",
      "h = (0.5*P*delta*20./W)-delta;## inches\n",
      "print'%s %.3f %s'%('The height of drop h = ',h,' inches');\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The height of drop h =  4.184  inches\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex16-pg471"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate  Maximum possible axial load and  Deflection, delta\n",
      "s = 1/4.;## inch\n",
      "n = 12.;## no. of coils\n",
      "D = 3.;## inches\n",
      "f_s = 45000.;## lb/in^2\n",
      "N = 12*10**6;## lb/in^2\n",
      "T = 0.208*f_s*s**3;## lb-inches\n",
      "W = T/(0.5*D);## lb-wt\n",
      "theta = 7.11*T*math.pi*D*12./(N*s**4);##rdaians\n",
      "delta = 0.5*D*theta;## inches\n",
      "print'%s %.1f %s'%('Maximum possible axial load is W = ',W,' lb-wt');\n",
      "print'%s %.3f %s'%(' Deflection, delta = ',delta,' inches');\n",
      "\n",
      "##there is a minute error in the answer given in textbook.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum possible axial load is W =  97.5  lb-wt\n",
        " Deflection, delta =  3.763  inches\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex17-pg472"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate The bending stresses\n",
      "d = 3/8.;## inches\n",
      "n = 12.;##no. of complete turns\n",
      "D = 4.;## inches\n",
      "W = 50.;## lb-wt\n",
      "N = 12.*10**6;## lb/in^2\n",
      "E = 30.*10**6;## lb/in^2\n",
      "M = 75.;## lb-inches\n",
      "I = (math.pi/64.)*d**4;## in^4\n",
      "Z = 2.*I/d;## in^3\n",
      "f = M/Z ;## lb/in^2\n",
      "phi = M*math.pi*D*12./(E*I);## radians\n",
      "n_ = (phi/(2*math.pi)) + n;## increase in no. of turns\n",
      "print'%s %.d %s'%('The bending stress is f = ',f,' lb/in^2');\n",
      "print'%s %.3f %s'%(' n_new = ',n_,' turns');\n",
      "\n",
      "##there are minute errors in the answers given in textbook.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The bending stress is f =  14486  lb/in^2\n",
        " n_new =  12.062  turns\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex18-pg476"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate The maximum intensity of shear stress and 'Deflection\n",
      "d = 3/8.;## inches\n",
      "n = 12.;##no. of complete turns\n",
      "D = 4.;## inches\n",
      "W = 50.;## lb-wt\n",
      "N = 12.*10**6.;## lb/in^2\n",
      "alpha = 15*math.pi/180.;## degrees\n",
      "E = 30.*10**6.;## lb/in^2\n",
      "T = W*0.5*D*math.cos(alpha);## lb-inches\n",
      "M = W*0.5*D*math.sin(alpha);## lb-inches\n",
      "J = math.pi*d**4 /32.;## in^4\n",
      "I = math.pi*d**4 /64.;## in^4\n",
      "delta = 64.*W*((D/2.)**3.)*n/math.cos(alpha)*((math.cos(alpha)**2.)/N + (2.*math.sin(alpha)**2.)/E)/d**4. ;## inches\n",
      "f = 32.*W*0.5*D*math.sin(alpha)/(math.pi*d**3) ;## lb/in^2\n",
      "f_s = T*16./(math.pi*d**3);## lb/in^2\n",
      "f_1 = 0.5*f + math.sqrt(f_s**2. + 0.25*f**2.);## lb/in^2\n",
      "f_2 = 0.5*f - math.sqrt(f_s**2. + 0.25*f**2.);## lb/in^2\n",
      "f_s_dash = math.sqrt(f_s**2. + 0.25*f**2.);## lb/in^2\n",
      "print'%s %.3f %s'%('Deflection, delta = ',delta,' inches');\n",
      "print'%s %.d %s %.d %s'%(' f = ',f,' lb/in^2, f_s = ',f_s,' lb/in^2');\n",
      "print'%s %.d %s'%('The maximum intensity of shear stress =',f_s_dash,' lb/in^2');\n",
      "\n",
      "##there are calculation errors in the answers given in textbook\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Deflection, delta =  1.322  inches\n",
        " f =  4999  lb/in^2, f_s =  9328  lb/in^2\n",
        "The maximum intensity of shear stress = 9657  lb/in^2\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex19-pg477"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate 'Angle of rotation and 'Angle of rotation\n",
      "d = 3/8.;## inches\n",
      "n = 12.;##no. of complete turns\n",
      "D = 4.;## inches\n",
      "M = 75.;## lb-inches\n",
      "N = 12.*10**6.;## lb/in**2\n",
      "alpha = 15*math.pi/180.;## degrees\n",
      "E = 30.*10.**6.;## lb/in**2\n",
      "phi_dash = (64./d**4.)*M*0.5*D*n/math.cos(alpha)*((2.*(math.cos(alpha))**2.)/E + ((math.sin(alpha))**2)/N);## radians\n",
      "DELTA = 64.*M*((0.5*D)**2.)*n*math.sin(alpha)*((1./N) - (2./E))/d**4.;## inches\n",
      "print'%s %.2f %s %.3f %s'%('Angle of rotation phi_dash = ',phi_dash,' radians or ',phi_dash*180/math.pi,' degrees');\n",
      "print'%s %.4f %s '%(' The axial deflection = ',DELTA,' inches');\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Angle of rotation phi_dash =  0.41  radians or  23.422  degrees\n",
        " The axial deflection =  0.0503  inches \n"
       ]
      }
     ],
     "prompt_number": 15
    }
   ],
   "metadata": {}
  }
 ]
}