summaryrefslogtreecommitdiff
path: root/TestContribution/ch3.ipynb
blob: 8becd2792196ce45f4176bf958714578ccf1c3a9 (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
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 3 : The mechanical equivalent of  heat"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.1 pageno : 44"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "m = 20;\t\t\t#calorimeter of water equivalent in gm\n",
      "n = 1030;\t\t\t#weight of water in gm\n",
      "p = 2;\t\t\t#no.of paddles\n",
      "a = 10;\t\t\t#weight of each paddle in kg\n",
      "s = 80;\t\t\t#dismath.tance between paddles in m\n",
      "g = 980;\t\t\t#accelaration due to gravity in cm/sec**2\n",
      "\n",
      "# Calculations\n",
      "E = (p*a*1000*g*s*100);\t\t\t#potential energy in dyne cm\n",
      "T = (E)/(1050*4.18*10**7);\t\t\t#rise in temperature in deg.C\n",
      "\n",
      "# Result\n",
      "print 'the rise in temperature of water is %3.2f deg.C'%(T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the rise in temperature of water is 3.57 deg.C\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.2 pageno : 45"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "cp = 0.1;\t\t\t#specific heat of copper in kj/kg-K\n",
      "w = 120;\t\t\t#weight of copper calorimeter in gm\n",
      "a = 1400;\t\t\t#weight of paraffin oil in gm\n",
      "cp1 = 0.6;\t\t\t#specific of parafin oil in kj/kg-K\n",
      "b = 10**8;\t\t\t#force to rotate the paddle in dynes\n",
      "T = 16;\t\t\t#rise in temperature in deg.C\n",
      "n = 900;\t\t\t#no.of revolutions stirred \n",
      "pi = 3.14;\t\t\t#value of pi\n",
      "\n",
      "# Calculations\n",
      "c = 2*pi*b;\t\t\t#work done by a rotating paddle per rotation in dyne cm per rotation\n",
      "d = c*n;\t\t\t#total work done in dyne cm \n",
      "hc = w*cp*16;\t\t\t#heat gained by calorimeter in calories\n",
      "hp = a*cp1*16;\t\t\t#heat gaained by paraffin oil in calories \n",
      "J = d/(hc+hp);\t\t\t#mecanical equivalent of heat in erg/cal\n",
      "\n",
      "# Result\n",
      "print 'mecanical equivalent of heat is %.2e erg/cal'%(J)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "mecanical equivalent of heat is 4.15e+07 erg/cal\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.3 pageno : 45"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables \n",
      "cp = 0.12;\t\t\t#specific heat of iron in kj/kg-K\n",
      "m = 25;\t\t\t#mass of iron in lb\n",
      "h = 0.4;\t\t\t#horse power developed in 3 min\n",
      "t = 3;\t\t\t#time taken to develop the horse power in min\n",
      "T = 17;\t\t\t#raise in temp in deg.C\n",
      "\n",
      "# Calculations\n",
      "w = h*33000*t;\t\t\t#total work done in ft-lb\n",
      "H = m*cp*T;\t\t\t#aount of heat developed in B.Th.U\n",
      "J = (w)/H;\t\t\t#the value of mechanical equivalent of heat\n",
      "\n",
      "# Result\n",
      "print 'the mechanical equivalent of water is %3.1f ft-lb/B.Th.U'%(J)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the mechanical equivalent of water is 776.5 ft-lb/B.Th.U\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.4 pageno : 45"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables \n",
      "n = 2.;\t\t\t#no.of lead blocks\n",
      "m = 210.;\t\t\t#mass of each lead block in gm\n",
      "v = 20000.;\t\t\t#velocity of block relative to earth in cm/sec\n",
      "J = 4.2*10**7;\t\t\t#mechanical equivalent of heat in ergs/calorie\n",
      "cp = 0.03;\t\t\t#specific heat of lead in kj/kg-K\n",
      "\n",
      "# Calculations\n",
      "E = (m*v**2)/2;\t\t\t#kinetic energy of each block in ergs\n",
      "E2 = n*E;\t\t\t#total kinetic energy in ergs\n",
      "T = E2/(J*m*n*cp);\t\t\t#mean rise in temperature in T\n",
      "\n",
      "# Result\n",
      "print 'the mean rise in temperature is %3.1f deg.C'%(T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the mean rise in temperature is 158.7 deg.C\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.5 pageno : 45"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables \n",
      "h = 150;\t\t\t#height froom which ball fallen in ft\n",
      "cp = 0.03;\t\t\t#specific heat of lead in kj/kg-K\n",
      "J = 778;\t\t\t#mechanical equivalent of heat in ft lb/B.Th.U\n",
      "\n",
      "# Calculations\n",
      "#work done in falling is equal to heat absorbed by the ball\n",
      "T = 160./(J*cp)*(5./9);\t\t\t#the raise in temperature in T\n",
      "\n",
      "# Result\n",
      "print 'the raise in temperature is %3.1f deg.C'%(T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the raise in temperature is 3.8 deg.C\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.6 pageno : 46"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "# Variables \n",
      "w = 26.6;\t\t\t#work done one horse in to raise the temperature in lb\n",
      "T1 = 32.;\t\t\t#temperature at initial in deg.F\n",
      "T2 = 212.;\t\t\t#temperature at final in deg.F\n",
      "t = 2.5;\t\t\t#time to raise the tmperature in hrs\n",
      "p = 25.;\t\t\t#percentage of heat lossed \n",
      "\n",
      "# Calculations\n",
      "#only 75% of heat is utillised\n",
      "x = w*180.*100.*778./((100-p)*150);\t\t\t#the rate at which horse worked\n",
      "\n",
      "# Result\n",
      "print 'the rate at which horse worked is %3.0f ft-lb wt/min'%(x)\n",
      "print \"Note : Answer in book is rounded off, Please calculate manually. This answer is accurate.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the rate at which horse worked is 33112 ft-lb wt/min\n",
        "Note : Answer in book is rounded off, Please calculate manually. This answer is accurate.\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.7 pageno : 46"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables \n",
      "l = 100.;\t\t\t#length of glass tube in cm\n",
      "m = 500.;\t\t\t#mass of mercury in glass tube in gm\n",
      "n = 20.;\t\t\t#number of times inverted i succession\n",
      "cp = 0.03;\t\t\t#specific heat of mercury in cal/gm/deg.C\n",
      "J = 4.2;\t\t\t#joule's equivalent in j/cal\n",
      "g = 981.;\t\t\t#accelaration due to gravity in cm/s**2\n",
      "\n",
      "# Calculations\n",
      "PE = m*g*l;\t\t\t#potential energy for each time in ergs\n",
      "TE = PE*n;\t\t\t#total loss in ergs\n",
      "T = TE/(m*cp*J*10**7);\t\t\t#rise in temperature in deg.C\n",
      "#if T is the rise in temperature,then heat devoloped is m*cp*T\n",
      "\n",
      "# Result\n",
      "print 'the rise in temperature is %3.2f deg.C'%(T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the rise in temperature is 1.56 deg.C\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.8 page no : 46"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables \n",
      "d = 0.02;\t\t\t#diameter of the copper wire in cm\n",
      "i = 1;\t\t\t#current in amp\n",
      "T = 100;\t\t\t#maximum steady temperature in deg.C\n",
      "r = 2.1;\t\t\t#resistance of the wire in ohm cm\n",
      "J = 4.2;\t\t\t#mechanical equivalent of heat in j/cal\n",
      "a = 3.14*d**2/4;\t\t\t#area of the copper wire in sq.cm\n",
      "a2 = 1;\t\t\t#area of the copper surface in sq.cm\n",
      "\n",
      "# Calculations \n",
      "l = 1/(2*3.14*d/2);\t\t\t#length corresponding to the area in cm\n",
      "R = r*l/a;\t\t\t#resistance of the copper wire in ohm\n",
      "w = R*a2**2;\t\t\t#work done in joule\n",
      "h = w/J;\t\t\t#heat devoleped in cal\n",
      "\n",
      "# Result\n",
      "print 'the heat developed is %.f calories'%(round(h,-1))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the heat developed is 25360 calories\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.9 pageno: 47"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "h = 10000;\t\t\t#vertical height of water fall in cm\n",
      "v = 5;\t\t\t    #volume disharged per sec in litres\n",
      "J = 4.18;\t\t\t#joule's constant in j/cal\n",
      "g = 981;\t\t\t#accelaration due to gravity in cm/sec**2\n",
      "\n",
      "# Calculations\n",
      "m = v*1000;\t\t\t#mass of water disharged per sec in gm\n",
      "w = m*h*g;\t\t\t#work done in falling through 100m in erg\n",
      "H = (v*10**7 *g)/(J*10**7);\t#quantity of heat produced in cal\n",
      "T = H/m;\t\t\t#rise in temperature in deg.C\n",
      "\n",
      "# Result\n",
      "print 'the quantity of heat produced is %3f cal  \\\n",
      "\\nthe rise in temperature is %3.2f deg.C'%(H,T)\n",
      "\n",
      "print \"Note : Answer for part A in book is wrong. Please calculate manually.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the quantity of heat produced is 1173.444976 cal  \n",
        "the rise in temperature is 0.23 deg.C\n",
        "Note : Answer for part A in book is wrong. Please calculate manually.\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.10 page no : 47"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables \n",
      "cp = 0.03;\t\t\t#specific heat of lead in kj/kg.k\n",
      "v = 10000;\t\t\t#initial velocity of bullet in cm/sec\n",
      "J = 4.2*10**7;\t\t\t#joules constant in ergs/cal\n",
      "\n",
      "# Calculations\n",
      "ke = (v**2)/2;\t\t\t#kinetic energy of the bullet per unit mass in (cm/sec)**2\n",
      "T = ke*95/(cp*J*100);\t\t\t#rise in temperature in deg.C\n",
      "\n",
      "# Result\n",
      "print 'the rise in temperature is %3.1f deg.C'%(T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the rise in temperature is 37.7 deg.C\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.11 page no : 47"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables \n",
      "h = 5000.;\t\t\t#height of the niagara falls in cm\n",
      "J = 4.2*10**7;\t\t#joules constant in ergs per cal\n",
      "g = 981;\t\t\t#accelaration due to gravity in cm/sec**2\n",
      "\n",
      "#CALCULATIONS\n",
      "w = h*g;\t\t\t#work done per unit mass in ergs/gn\n",
      "T = w/J;\t\t\t#rise in temperature in deg.C\n",
      "\n",
      "# Result\n",
      "print 'the rise in temperature is %3.2f deg.C'%(T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the rise in temperature is 0.12 deg.C\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.12 page no : 48\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "# Variables \n",
      "E1 = 3.75;\t\t\t#potential difference in v\n",
      "E2 = 3.;\t\t\t#potential differnce in v\n",
      "i1 = 2.5;\t\t\t#current in amp\n",
      "i2 = 2;\t\t\t    #current in amp\n",
      "T = 2.7;\t\t\t#the rise in temperature of the water in deg.C\n",
      "m1 = 48.;\t\t\t#water flow rate at 3 volts in gm/min\n",
      "m2 = 30.;\t\t\t#water flow rate at 3.75volts in gm/min\n",
      "s = 1;\t\t\t    #specific heat of the water kj/kg-K\n",
      "\n",
      "# Calculations\n",
      "J = (E1*i1-E2*i2)/(s*T*(m1-m2)/60);\t\t\t#the mechanical equivalent in j/cal\n",
      "\n",
      "# Result\n",
      "print 'the mechanical equivalent is %3.3f j/cal'%(J)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the mechanical equivalent is 4.167 j/cal\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.13 page no : 48"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables \n",
      "R = 64*10**7;\t\t\t#mean radius of the earth in cm\n",
      "cp = 0.15;\t\t\t#specific heat of earth in kj/kg-K\n",
      "J = 4.2*10**7;\t\t\t#joules consmath.tant in erg/cal\n",
      "\n",
      "# Calculations\n",
      "i = 2./5*R**2;\t\t\t#moment of inertia of the earth per unit mass in joules\n",
      "w = (2*3.14)/(24*60*60);\t\t\t#angular velocity of the earth in rad/sec\n",
      "T = (i*w**2)/(2*J*cp);\t\t\t#rise in temperature in deg.C\n",
      "\n",
      "# Result\n",
      "print 'the rise in the temperature is %.1f deg C'%(T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the rise in the temperature is 68.7 deg C\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.14 page no : 49"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables \n",
      "cp = 1.25;\t\t\t#specific heat of helium inkj/kg-K\n",
      "v = 1000;\t\t\t#volume of the gas in ml\n",
      "w = 0.1785;\t\t\t#mass of the gas at N.T.P in gm\n",
      "p = 76*13.6*981;\t#pressure of the gas at N.T.P in dynes\n",
      "T = 273;\t\t\t#temperature at N.T.P in K\n",
      "\n",
      "# Calculations\n",
      "V = 1000/w;\t\t\t#volume occupied by the 1gm of helium gas in cc\n",
      "cv = cp/1.66;\t\t#specific heat at constant volume it is monatomuc gas kj/kg-K\n",
      "r = p*V/T;\t\t\t#gas constant in cm**3.atm./K.mol\n",
      "J = r/(cp-cv);\t\t#mechanical equivalent of heat in erg/cal\n",
      "\n",
      "# Result\n",
      "print 'the mechanical equivalent of heat is %.2e ergs/calories'%(J)\n",
      "print \"Note: answer slightly different because of rounding error.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the mechanical equivalent of heat is 4.19e+07 ergs/calories\n",
        "Note: answer slightly different because of rounding error.\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "\n",
      "Example 3.15 pageno : 49"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables \n",
      "n = 1./273;     \t\t\t#coefficent of expaaansion of air\n",
      "a = 0.001293;\t    \t\t#density of air in gm/cc\n",
      "cp = 0.2389;\t\t    \t#specific heat at consmath.tant pressure in kj/kg.K\n",
      "p = 76*13.6*981;\t\t\t#pressure at 0 deg.C in dynes\n",
      "\n",
      "# Calculations\n",
      "J = (p*n)/(a*(cp-(cp/1.405)));\t\t\t#mechanical equivalent of heat\n",
      "\n",
      "# Result\n",
      "print 'mechanical equivalent of heat is %.2e ergs/cal'%(J)\n",
      "print \"Note: answer slightly different because of rounding error.\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "mechanical equivalent of heat is 4.17e+07 ergs/cal\n",
        "Note: answer slightly different because of rounding error.\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.16 pageno : 49"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "# Variables \n",
      "r = 120./60;\t\t\t#rate of flow of water in gm/sec\n",
      "T1 = 27.30;\t\t\t#temperature at initial in deg.C\n",
      "T2 = 33.75;\t\t\t#temperature at final in deg.C\n",
      "v = 12.64;\t\t\t#potential drop in volts\n",
      "s = 1.; \t\t\t#specific heat of water in kj/kg-K\n",
      "i = 4.35;\t\t\t#current through the heating element in amp\n",
      "\n",
      "# Calculations\n",
      "J = (v*i)/(r*s*(T2-T1));\t\t\t#the mechanical equivalent of heat in joule/calorie\n",
      "\n",
      "# Result\n",
      "print 'the mechanical equivalent of heat is %3.2f j/cal'%(J)\n",
      "print \"Note: answer slightly different because of rounding error.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the mechanical equivalent of heat is 4.26 j/cal\n",
        "Note: answer slightly different because of rounding error.\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17 page no : 50"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables \n",
      "cp = 6.865;\t\t\t#molar specific heat of hydrogen at consmath.tant pressure in kj/kg-K\n",
      "cv = 4.880;\t\t\t#molar specific heat of hydrogen at consmath.tant volume in kj/kg-K\n",
      "p = 1.013*10**6;\t\t\t#atmospheric pressure in dynes/cm**2\n",
      "v = 22.4*10**3;\t\t\t#gram molar volume in ml\n",
      "T = 273;\t\t\t#temperature at N.T.P in kelvins\n",
      "\n",
      "# Calculations\n",
      "J = (p*v)/(T*(cp-cv));\t\t\t#mechanical equivalent of heat\n",
      "\n",
      "# Result\n",
      "print 'the mechanical equivalent of heat is %.2e ergs/cal'%(J)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the mechanical equivalent of heat is 4.19e+07 ergs/cal\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.18 page no : 50"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "# Variables\n",
      "v = 1000.;\t\t\t#volume of hydrogen in ml\n",
      "t = 273.;\t\t\t#tempature of hydrogen in kelvin\n",
      "p = 76.;\t\t\t#pressure of hydrogen in mm of hg\n",
      "w = 0.0896;\t\t\t#weigh of hydrogen in gm\n",
      "cp = 3.409;\t\t\t#specific heat of hydogen in kj/kg-K\n",
      "cv = 2.411;\t\t\t#specific heat of hydrogen in kj/kg-K\n",
      "g = 981.;\t\t\t#accelaration due to gravity in cm/sec**2\n",
      "a = 13.6;\t\t\t#density of mercury in gm/cm**2\n",
      "\n",
      "# Calculations\n",
      "J = (p*v*g*a)/(w*t*(cp-cv));\t\t\t#mechanical equivalent of heat in ergs/cals\n",
      "\n",
      "# Result\n",
      "print 'mechanical equivalent of heat is %.2e ergs/calorie'%(J)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "mechanical equivalent of heat is 4.15e+07 ergs/calorie\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.19 page no : 50"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "cp = 0.23;\t\t\t#specific heat at constant pressure in kj/kg-K\n",
      "a = 1.18;\t\t\t#density of air in gm/lit\n",
      "J = 4.2*10**7;\t\t\t#mechanical equivalent of heat in ergs/cal\n",
      "t = 300;\t\t\t#temperature of air in kelvin\n",
      "p = 73*13.6*981;\t\t\t#pressure of air in dynes\n",
      "\t\t\t#cp-cv = (r/J) = pv/(tj)\n",
      "\n",
      "#CALCULATON\n",
      "cv = cp-(p*1000/(a*t*J));\t\t\t#specific heat at constant volume in calories\n",
      "\n",
      "# Result\n",
      "print 'the specific heat at constant volume is %.4f calories'%(cv)\n",
      "print \"Note: answer slightly different because of rounding error.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the specific heat at constant volume is 0.1645 calories\n",
        "Note: answer slightly different because of rounding error.\n"
       ]
      }
     ],
     "prompt_number": 29
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.20 pageno : 51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "t1 = 0;\t\t\t#temperature of water in deg.C\n",
      "t2 = 0;\t\t\t#temperature of ice in deg.C\n",
      "J = 4.18*10**7;\t\t\t#the joules thomson coefficent in erg/cal\n",
      "l = 80;\t\t\t#latent heat og fusion kj/kg\n",
      "g = 981;\t\t\t#accelaration due to gravity in cm/sec**2\n",
      " \n",
      "# Calculations\n",
      "h = l*J/(15*g);\t\t\t#height from which ice has fallen\n",
      "\n",
      "# Result\n",
      "print 'the height from which ice has fallen is %.2e cm'%(h)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the height from which ice has fallen is 2.27e+05 cm\n"
       ]
      }
     ],
     "prompt_number": 30
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.21 page no : 51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "T = 80;\t\t\t#temperature of bullet in deg.C\n",
      "cp = 0.03;\t\t\t#specific heat of lead in kj/kg-K\n",
      "J = 4.2;\t\t\t#mechanical equivalent of heat in j/cal\n",
      "\n",
      "# Calculations\n",
      "h = T*cp;\t\t\t#heat developed per unit mass in calorie\n",
      "v = (J*10**7*h*2/0.9)**0.5;\t\t\t#velocity of bullet in cm/sec\n",
      "\n",
      "# Result\n",
      "print 'the velocity of bullet is %.1e cm/sec'%(v)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the velocity of bullet is 1.5e+04 cm/sec\n"
       ]
      }
     ],
     "prompt_number": 31
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.22 pageno : 51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "w = 5.0;\t\t\t#weight of lead ball in lb\n",
      "cp = 0.032;\t\t\t#specific heat of lead in Btu/lbdeg.F\n",
      "h = 50;\t\t\t#height at which ball thrown in feets\n",
      "v = 20;\t\t\t#vertical speed in ft/sec\n",
      "g = 32;\t\t\t#accelararion due to gravity in ft/sec**2\n",
      "\n",
      "# Calculations\n",
      "u = (v**2)+2*g*h\n",
      "ke = (w/2*(u));\t\t\t#kinetic energy of the ball at ground\n",
      "T = ke/(2*32*778*w*cp);\t\t\t#rise of temperature in deg.F\n",
      "\n",
      "# Result\n",
      "print 'the rise in temperature is %.1f deg.F'%(T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the rise in temperature is 1.1 deg.F\n"
       ]
      }
     ],
     "prompt_number": 32
    }
   ],
   "metadata": {}
  }
 ]
}