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
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 11: Introduction To Refrigeration And Air Conditioning"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.10: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_10.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 10')\n",
"Q=2.86*3.5;//refrigeration effect in KJ/s\n",
"N=1200;//compressor rpm\n",
"n=1.13;//compression index\n",
"disp('properties of Freon-12,')\n",
"disp('at -20 degree celcius,P1=1.51 bar,vg=0.1088 m^3/kg,hf=17.8 KJ/kg,h1=178.61 KJ/kg,sf=0.0730 KJ/kg K,s1=0.7082 KJ/kg K,Cpg=0.605 KJ/kg K')\n",
"P1=1.51;\n",
"T1=(-20+273);\n",
"vg=0.1088;\n",
"h1=178.61;\n",
"s1=0.7082;\n",
"s2=s1;\n",
"disp('at 40 degree celcius,P2=9.61 bar,h3=74.53 KJ/kg,hg=203.05 KJ/kg,sf=0.2716 KJ/kg K,sg=0.682 KJ/kg K,Cpf=0.976 KJ/kg K,Cpg=0.747 KJ/kg K')\n",
"P2=9.61;\n",
"h3=74.53;\n",
"h4=h3;\n",
"hg=203.05;\n",
"sf=0.2716;\n",
"sg=0.682;\n",
"Cpf=0.976;\n",
"Cpg=0.747;\n",
"disp('during expansion(throttling)between 3 and 4')\n",
"disp('h3=h4=hf_40oc=74.53 KJ/kg=h4')\n",
"disp('process 1-2 is adiabatic compression so,')\n",
"disp('s1=s2,s1=sg_-20oc=0.7082 KJ/kg K')\n",
"disp('at 40 degree celcius or 313 K,s1=sg+Cpg*log(T2/313)')\n",
"disp('T2=313*exp((s1-sg)/Cpg)in K')\n",
"T2=313*exp((s1-sg)/Cpg)\n",
"disp('so temperature after compression,T2=324.17 K')\n",
"disp('enthalpy after compression,h2=hg+Cpg*(T2-313)in KJ/kg')\n",
"h2=hg+Cpg*(T2-313)\n",
"disp('compression work required,per kg(Wc)=h2-h1 in KJ/kg')\n",
"Wc=h2-h1\n",
"disp('refrigeration effect during cycle,per kg(q)=h1-h4 in KJ/kg')\n",
"q=h1-h4\n",
"disp('mass flow rate of refrigerant,m=Q/q in kg/s')\n",
"m=Q/q\n",
"m=0.096;//approx.\n",
"disp('COP=q/Wc')\n",
"COP=q/Wc\n",
"disp('volumetric efficiency of reciprocating compressor,given C=0.02')\n",
"C=0.02;\n",
"disp('n_vol=1+C-C*(P2/P1)^(1/n)')\n",
"n_vol=1+C-C*(P2/P1)^(1/n)\n",
"disp('let piston displacement by V,m^3')\n",
"disp('mass flow rate,m=(V*n_vol*N)/(60*vg_-20oc)')\n",
"disp('so V=(m*60*vg_-20oc)*10^6/(N*n_vol) in cm^3')\n",
"V=(m*60*vg)*10^6/(N*n_vol)\n",
"disp('so COP=3.175')\n",
"disp('and piston displacement=569.45 cm^3')\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
""
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.11: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_11.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 11')\n",
"Q=2;//refrigeration effect in KW\n",
"disp('properties of CO2,')\n",
"disp('at 20 degree celcius,P1=57.27 bar,hf=144.11 KJ/kg,hg=299.62 KJ/kg,sf=0.523 KJ/kg K,sg_20oc=1.0527 KJ/kg K,Cpf=2.889 KJ/kg K,Cpg=2.135 KJ/kg K')\n",
"T1=(20+273);//condensation temperature in K\n",
"P1=57.27;\n",
"h3=144.11;\n",
"hg=299.62;\n",
"sf=0.523;\n",
"sg_20oc=1.0527;\n",
"Cpf=2.889;\n",
"Cpg=2.135;\n",
"disp('at -10 degree celcius,P2=26.49 bar,vg=0.014 m^3/kg,hf=60.78 KJ/kg,hg=322.28 KJ/kg,sf=0.2381 KJ/kg K,sg=1.2324 KJ/kg K')\n",
"T2=(-10+273);//evaporator temperature in K\n",
"P2=26.49;\n",
"vg=0.014;\n",
"hf=60.78;\n",
"h1=322.28;\n",
"sf=0.2381;\n",
"sg=1.2324;\n",
"disp('processes of vapour compression cycle are shown on T-s diagram')\n",
"disp('1-2:isentropic compression process')\n",
"disp('2-3-4:condensation process')\n",
"disp('4-5:isenthalpic expansion process')\n",
"disp('5-1:refrigeration process in evaporator')\n",
"disp('h1=hg at -10oc=322.28 KJ/kg')\n",
"disp('at 20 degree celcius,h2=hg+Cpg*(40-20)in KJ/kg')\n",
"h2=hg+Cpg*(40-20)\n",
"disp('entropy at state 2,at 20 degree celcius,s2=sg_20oc+Cpg*log((273+40)/(273+20))in KJ/kg K')\n",
"s2=sg_20oc+Cpg*log((273+40)/(273+20))\n",
"disp('entropy during isentropic process,s1=s2')\n",
"disp('at -10 degree celcius,s2=sf+x1*sfg')\n",
"disp('so x1=(s2-sf)/(sg-sf)')\n",
"x1=(s2-sf)/(sg-sf)\n",
"disp('enthalpy at state 1,at -10 degree celcius,h1=hf+x1*hfg in KJ/kg')\n",
"h1=hf+x1*(h1-hf)\n",
"disp('h3=hf at 20oc=144.11 KJ/kg')\n",
"disp('since undercooling occurs upto 10oc,so,h4=h3-Cpf*deltaT in KJ/kg')\n",
"h4=h3-Cpf*(20-10)\n",
"disp('also,h4=h5=115.22 KJ/kg')\n",
"h5=h4;\n",
"disp('refrigeration effect per kg of refrigerant(q)=(h1-h5)in KJ/kg')\n",
"q=(h1-h5)\n",
"disp('let refrigerant flow rate be m kg/s')\n",
"disp('refrigerant effect(Q)=m*q')\n",
"disp('m=Q/q in kg/s')\n",
"m=Q/q\n",
"disp('compressor work,Wc=h2-h1 in KJ/kg')\n",
"Wc=h2-h1\n",
"disp('COP=refrigeration effect per kg/compressor work per kg=q/Wc')\n",
"COP=q/Wc\n",
"disp('so COP=6.51,mass flow rate=0.01016 kg/s')\n",
"disp('NOTE=>In book,mass flow rate(m) which is 0.1016 kg/s is calculated wrong and it is correctly solve above and comes out to be m=0.01016 kg/s. ')\n",
"\n",
"\n",
"\n",
"\n",
""
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.12: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_12.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 12')\n",
"omega=0.016;//specific humidity in gm/gm of air\n",
"disp('here pressure of atmospheric air(P)may be taken as 1.013 bar')\n",
"P=1.013;//pressure of atmospheric air in bar\n",
"disp('specific humidity,omega=0.622*(Pv/(P-Pv))')\n",
"disp('so partial pressure of vapour(Pv)in bar')\n",
"disp('Pv=P/(1+(0.622/omega))in bar ')\n",
"Pv=P/(1+(0.622/omega))\n",
"Pv=0.0254;//approx.\n",
"disp('relative humidity(phi)=(Pv/Pv_sat)')\n",
"disp('from pychrometric properties of air Pv_sat at 25 degree celcius=0.03098 bar')\n",
"Pv_sat=0.03098;\n",
"disp('so phi=Pv/Pv_sat')\n",
"phi=Pv/Pv_sat\n",
"disp('in percentage')\n",
"phi=phi*100\n",
"disp('so partial pressure of vapour=0.0254 bar')\n",
"disp('relative humidity=81.98 %')"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.13: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_13.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 13')\n",
"r=0.6;//relative humidity\n",
"P=1.013;//total pressure of mixture in bar\n",
"R=0.287;//gas constant in KJ/kg K\n",
"Ta=(30+273);//room temperature in K\n",
"Cp=1.005;//specific heat at constant pressure in KJ/kg degree celcius\n",
"disp('at 30 degree celcius from steam table,saturation pressure,Pv_sat=0.0425 bar')\n",
"Pv_sat=0.0425;\n",
"disp('partial pressure of vapour(Pv)=relative humidity*Pv_sat in bar')\n",
"Pv=r*Pv_sat\n",
"disp('partial pressure of air(Pa)=total pressure of mixture-partial pressure of vapour')\n",
"Pa=P-Pv\n",
"disp('so partial pressure of air=0.9875 bar')\n",
"disp('humidity ratio,omega=0.622*Pv/(P-Pv)in kg/kg of dry air')\n",
"omega=0.622*Pv/(P-Pv)\n",
"disp('so humidity ratio=0.01606 kg/kg of air')\n",
"disp('Dew point temperature may be seen from the steam table.The saturation temperature corresponding to the partial pressure of vapour is 0.0255 bar.Dew point temperature can be approximated as 21.4oc by interpolation')\n",
"disp('so Dew point temperature=21.4 degree celcius')\n",
"disp('density of mixture(rho_m)=density of air(rho_a)+density of vapour(rho_v)')\n",
"disp('rho_m=(rho_a)+(rho_v)=rho_a*(1+omega)')\n",
"disp('rho_m=P*100*(1+omega)/(R*Ta)in kg/m^3')\n",
"rho_m=P*100*(1+omega)/(R*Ta)\n",
"disp('so density = 1.1835 kg/m^3')\n",
"disp('enthalpy of mixture,h=Cp*T+omega*(hg+1.860*(30-21.4))in KJ/kg of dry air')\n",
"T=30;//room temperature in degree celcius\n",
"hg=2540.1;//enthalpy at 30 degree celcius in KJ/kg\n",
"h=Cp*T+omega*(hg+1.860*(30-21.4))\n",
"disp('enthalpy of mixture =71.2 KJ/kg of dry air')"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.14: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_14.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 14')\n",
"disp('initial state at 15 degree celcius and 80% relative humidity is shown by point 1 and final state at 25 degree celcius and 50% relative humidity is shown by point 2 on psychrometric chart.')\n",
"disp('omega1=0.0086 kg/kg of air,h1=37 KJ/kg,omega2=0.01 kg/kg of air,h2=50 KJ/kg,v2=0.854 m^3/kg')\n",
"omega1=0.0086;\n",
"h1=37;\n",
"omega2=0.01;\n",
"h2=50;\n",
"v2=0.854;\n",
"disp('mass of water added between states 1 and 2 omega2-omega1 in kg/kg of air')\n",
"omega2-omega1\n",
"disp('mass flow rate of air(ma)=0.8/v2 in kg/s')\n",
"ma=0.8/v2\n",
"disp('total mass of water added=ma*(omega2-omega1)in kg/s')\n",
"ma*(omega2-omega1)\n",
"disp('heat transferred=ma*(h2-h1) in KJ/s')\n",
"ma*(h2-h1)\n",
"disp('so mass of water added=0.001312 kg/s,heat transferred=12.18 KW')"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.15: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_15.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 15')\n",
"P=1.013;//atmospheric pressure in bar\n",
"Cp_air=1.005;//specific heat of air at constant pressure in KJ/kg K\n",
"Cp_stream=1.86;//specific heat of stream at constant pressure in KJ/kg K\n",
"T1=30;//temperature of first stream of moist air in K\n",
"m1=3;//mass flow rate of first stream in kg/s \n",
"T2=35;//temperature of second stream of moist air in K\n",
"m2=2;//mass flow rate of second stream in kg/s \n",
"disp('Let temperature after mixing be Toc.For getting final enthalpy after adiabatic mixing the enthalpy of two streams are required.')\n",
"disp('For moist air stream at 30 degree celcius and 30% relative humidity.')\n",
"phi1=0.3;\n",
"disp('phi1=Pv1/Pv_sat_30oc')\n",
"disp('here Pv_sat_30oc=0.04246 bar')\n",
"Pv_sat_30oc=0.04246;\n",
"disp('so Pv1=phi1*Pv_sat_30oc in bar')\n",
"Pv1=phi1*Pv_sat_30oc\n",
"disp('corresponding to vapour pressure of 0.01274 bar the dew point temperature shall be 10.5 degree celcius')\n",
"Tdp1=10.5;\n",
"disp('specific humidity,omega1=0.622*Pv1/(P-Pv1)in kg/kg of air')\n",
"omega1=0.622*Pv1/(P-Pv1)\n",
"disp('at dew point temperature of 10.5 degree celcius,enthalpy,hg at 10.5oc=2520.7 KJ/kg')\n",
"hg=2520.7;//enthalpy at 10.5 degree celcius in KJ/kg\n",
"disp('h1=Cp_air*T1+omega1*{hg-Cp_stream*(T1-Tdp1)}in KJ/kg of dry air')\n",
"h1=Cp_air*T1+omega1*{hg-Cp_stream*(T1-Tdp1)}\n",
"disp('for second moist air stream at 35oc and 85% relative humidity')\n",
"phi2=0.85;\n",
"disp('phi2=Pv2/Pv_sat_35oc')\n",
"disp('here Pv_sat_35oc=0.005628 bar')\n",
"Pv_sat_35oc=0.005628;\n",
"disp('so Pv2=phi2*Pv_sat_35oc in bar')\n",
"Pv2=phi2*Pv_sat_35oc\n",
"disp('specific humidity,omega2=0.622*Pv2/(P-Pv2)in kg/kg of air')\n",
"omega2=0.622*Pv2/(P-Pv2)\n",
"disp('corresponding to vapour pressure of 0.004784 bar the dew point temperature is 32 degree celcius')\n",
"Tdp2=32;\n",
"disp('so,enthalpy of second stream,')\n",
"disp('h2=Cp_air*T2+omega2*{hg+Cp_stream*(T2-Tdp2)}in KJ/kg of dry air')\n",
"hg=2559.9;//enthalpy at 32 degree celcius in KJ/kg\n",
"h2=Cp_air*T2+omega2*{hg+Cp_stream*(T2-Tdp2)}\n",
"disp('enthalpy of mixture after adiabatic mixing,')\n",
"disp('=(1/(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2))) in KJ/kg of moist air')\n",
"(1/(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2)))\n",
"disp('mass of vapour per kg of moist air=(1/5)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))in kg/kg of moist air')\n",
"(1/5)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))\n",
"disp('specific humidity of mixture(omega)in kg/kg of dry air=')\n",
"omega=0.00589/(1-0.005893)\n",
"disp('omega=0.622*Pv/(P-Pv)')\n",
"disp('Pv=omega*P/(omega+0.622)in bar')\n",
"Pv=omega*P/(omega+0.622)\n",
"disp('partial pressure of water vapour=0.00957 bar')\n",
"disp('so specific humidity of mixture=0.00593 kg/kg dry air')\n",
"disp('and partial pressure of water vapour in mixture=0.00957 bar')\n",
"\n",
"\n",
"\n",
"\n",
""
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.16: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_16.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 16')\n",
"m1=3;//rate at which moist air enter in heating coil in m^3/s\n",
"disp('The type of heating involved is sensible heating.Locating satte 1 on psychrometric chart corresponding to 15 degree celcius dbt and 80% relative humidity the other property values shall be,')\n",
"disp('h1=36.4 KJ/kg,omega1=0.0086 kg/kg of air,v1=0.825 m^3/kg')\n",
"h1=36.4;\n",
"omega1=0.0086;\n",
"v1=0.825;\n",
"disp('final state 2 has,h2=52 KJ/kg')\n",
"h2=52;\n",
"disp('mass of air(m)=m1/v1 in kg/s')\n",
"m=m1/v1\n",
"m=3.64;//approx.\n",
"disp('amount of heat added(Q)in KJ/s')\n",
"disp('Q=m*(h2-h1)')\n",
"Q=m*(h2-h1)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.1: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_1.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 1')\n",
"T1=(-16+273);//temperature of refrigerated space in K\n",
"T2=(27+273);//temperature of atmosphere in K\n",
"Q1=500;//heat extracted from refrigerated space in KJ/min\n",
"disp('for refrigerator working on reversed carnot cycle.')\n",
"disp('Q1/T1=Q2/T2')\n",
"disp('so Q2=Q1*T2/T1 in KJ/min')\n",
"Q2=Q1*T2/T1\n",
"disp('and work input required,W in KJ/min')\n",
"disp('W=Q2-Q1')\n",
"W=Q2-Q1"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.2: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_2.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 2')\n",
"Q=800;//refrigeration capacity in tons\n",
"Q_latent=335;//latent heat for ice formation from water in KJ/kg\n",
"T1=(-7+273);//temperature of reservoir 1 in K\n",
"T2=(27+273);//temperature of reservoir 2 in K\n",
"disp('refrigeration capacity or heat extraction rate(Q)in KJ/s')\n",
"Q=Q*3.5\n",
"disp('let the ice formation rate be m kg/s')\n",
"disp('heat to be removed from per kg of water for its transformation into ice(Q1)in KJ/kg.')\n",
"Q1=4.18*(27-0)+Q_latent\n",
"disp('ice formation rate(m)in kg=refrigeration capacity/heat removed for getting per kg of ice')\n",
"m=Q/Q1\n",
"disp('COP of refrigerator,=T1/(T2-T1)=refrigeration capacity/work done')\n",
"COP=T1/(T2-T1)\n",
"disp('also COP=Q/W')\n",
"disp('so W=Q/COP in KJ/s')\n",
"W=Q/COP\n",
"disp('HP required')\n",
"W=W/0.7457\n",
"disp('NOTE=>In book,this question is solved by taking T1=-5 degree celcius,but according to question T1=-7 degree celcius so this question is correctly solved above by considering T1=-7 degree celcius.')"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.3: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_3.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 3')\n",
"T1=(-27+273);//temperature of refrigerator in K\n",
"W=3*.7457;//work input in KJ/s\n",
"Q=1*3.5;//refrigeration effect in KJ/s\n",
"disp('COP=T1/(T2-T1)=Q/W')\n",
"COP=Q/W\n",
"COP=1.56;//approx.\n",
"disp('equating,COP=T1/(T2-T1)')\n",
"disp('so temperature of surrounding(T2)in K')\n",
"disp('T2=T1+(T1/COP)')\n",
"T2=T1+(T1/COP)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.4: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_4.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 4')\n",
"T1=(-30+273);//temperature of air at beginning of compression in K\n",
"T3=(27+273);//temperature of air after cooling in K\n",
"r=8;//pressure ratio\n",
"Cp=1.005;//specific heat at constant pressure in KJ/kg K\n",
"y=1.4;//expansion constant \n",
"m=1;//air flow rate in kg/s\n",
"n1=0.85;//isentropic efficiency for compression process\n",
"n2=.9;//isentropic efficiency for expansion process\n",
"disp('during process 1-2_a')\n",
"disp('p2/p1=(T2_a/T1)^(y/(y-1))')\n",
"disp('so T2_a=T1*(p2/p1)^((y-1)/y)in K')\n",
"T2_a=T1*(r)^((y-1)/y)\n",
"disp('theoretical temperature after compression,T2_a=440.18 K')\n",
"disp('for compression process,')\n",
"disp('n1=(T2_a-T1)/(T2-T1)')\n",
"disp('so T2=T1+(T2_a-T1)/n1 in K')\n",
"T2=T1+(T2_a-T1)/n1\n",
"disp('for expansion process,3-4_a')\n",
"disp('T4_a/T3=(p1/p2)^((y-1)/y)')\n",
"disp('so T4_a=T3*(p1/p2)^((y-1)/y) in K')\n",
"T4_a=T3*(1/r)^((y-1)/y)\n",
"disp('n2=0.9=(T3-T4)/(T3-T4_a)')\n",
"disp('so T4=T3-(n2*(T3-T4_a))in K')\n",
"T4=T3-(n2*(T3-T4_a))\n",
"disp('so work during compression,W_C in KJ/s')\n",
"disp('W_C=m*Cp*(T2-T1)')\n",
"W_C=m*Cp*(T2-T1)\n",
"disp('work during expansion,W_T in KJ/s')\n",
"disp('W_T=m*Cp*(T3-T4)')\n",
"W_T=m*Cp*(T3-T4)\n",
"disp('refrigeration effect is realized during process,4-1.so refrigeration shall be,')\n",
"disp('Q_ref=m*Cp*(T1-T4) in KJ/s')\n",
"Q_ref=m*Cp*(T1-T4)\n",
"disp('Q_ref in ton')\n",
"Q_ref=Q_ref/3.5\n",
"disp('net work required(W)=W_C-W_T in KJ/s')\n",
"W=W_C-W_T\n",
"disp('COP=Q_ref/(W_C-W_T)')\n",
"Q_ref=64.26;\n",
"COP=Q_ref/(W_C-W_T)\n",
"disp('so refrigeration capacity=18.36 ton or 64.26 KJ/s')\n",
"disp('and COP=0.57')\n",
"disp('NOTE=>In book this question is solve by taking T1=240 K which is incorrect,hence correction is made above according to question by taking T1=-30 degree celcius or 243 K,so answer may vary slightly.')\n",
""
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.5: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_5.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 5')\n",
"T1=(7+273);//temperature of refrigerated space in K\n",
"T3=(27+273);//temperature after compression in K\n",
"p1=1*10^5;//pressure of refrigerated space in pa\n",
"p2=5*10^5;//pressure after compression in pa\n",
"y=1.4;//expansion constant\n",
"Cp=1.005;//specific heat at constant pressure in KJ/kg K\n",
"disp('for isentropic compression process:')\n",
"disp('(p2/p1)^((y-1)/y)=T2/T1')\n",
"disp('so T2=T1*(p2/p1)^((y-1)/y) in K')\n",
"T2=T1*(p2/p1)^((y-1)/y)\n",
"disp('for isenropic expansion process:')\n",
"disp('(p3/p4)^((y-1)/y)=(T3/T4)=(p2/p1)^((y-1)/y)')\n",
"disp('so T4=T3/(p2/p1)^((y-1)/y) in K')\n",
"T4=T3/(p2/p1)^((y-1)/y)\n",
"disp('heat rejected during process 2-3,Q23=Cp*(T2-T3)in KJ/kg')\n",
"Q23=Cp*(T2-T3)\n",
"disp('refrigeration process,heat picked during process 4-1,Q41=Cp*(T1-T4) in KJ/kg')\n",
"Q41=Cp*(T1-T4)\n",
"disp('so net work(W)=Q23-Q41 in KJ/kg')\n",
"W=Q23-Q41\n",
"disp('so COP=refrigeration effect/net work=Q41/W')\n",
"COP=Q41/W"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.6: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_6.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 6')\n",
"T1=(-10+273);//air entering temperature in K\n",
"p1=1*10^5;//air entering pressure in pa\n",
"T3=(27+273);//compressed air temperature after cooling in K\n",
"p2=5.5*10^5;//pressure after compression in pa\n",
"m=0.8;//air flow rate in kg/s\n",
"Cp=1.005;//specific heat capacity at constant pressure in KJ/kg K\n",
"y=1.4;//expansion constant\n",
"R=0.287;//gas constant in KJ/kg K\n",
"disp('for process 1-2')\n",
"disp('(p2/p1)^((y-1)/y)=T2/T1')\n",
"disp('so T2=T1*(p2/p1)^((y-1)/y) in K')\n",
"T2=T1*(p2/p1)^((y-1)/y)\n",
"disp('for process 3-4')\n",
"disp('(p3/p4)^((y-1)/y)=T3/T4')\n",
"disp('so T4=T3/(p3/p4)^((y-1)/y)=T3/(p2/p1)^((y-1)/y)in K')\n",
"T4=T3/(p2/p1)^((y-1)/y)\n",
"disp('refrigeration capacity(Q)=m*Cp*(T1-T4) in KJ/s')\n",
"Q=m*Cp*(T1-T4)\n",
"disp('Q in ton')\n",
"Q=Q/3.5\n",
"disp('work required to run compressor(w)=(m*n)*(p2*v2-p1*v1)/(n-1)')\n",
"disp('w=(m*n)*R*(T2-T1)/(n-1) in KJ/s')\n",
"n=y;\n",
"w=(m*n)*R*(T2-T1)/(n-1)\n",
"disp('HP required to run compressor')\n",
"w/0.7457\n",
"disp('so HP required to run compressor=177.86 hp')\n",
"disp('net work input(W)=m*Cp*{(T2-T3)-(T1-T4)}in KJ/s')\n",
"W=m*Cp*{(T2-T3)-(T1-T4)}\n",
"disp('COP=refrigeration capacity/work=Q/W')\n",
"Q=63.25;//refrigeration capacity in KJ/s\n",
"COP=Q/W\n",
"\n",
"\n",
"\n",
"\n",
""
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.7: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_7.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 7')\n",
"p1=1.2*10^5;//pressure of ram air in pa\n",
"p6=p1;\n",
"T1=(15+273);//temperature of ram air in K\n",
"T6=T1;\n",
"p7=0.9*10^5;//pressure of ram air after expansion in pa\n",
"p3=4*10^5;//pressure of ram air after compression in pa\n",
"p2=p3;\n",
"p4=1*10^5;//pressure of ram air after expansion in second turbine in pa\n",
"T5=(25+273);//temperature of air when exhausted from cabin in K\n",
"T3=(50+273);//temperature of compressed air in K\n",
"T8=(30+273);//limited temperaure of ram air in K\n",
"Q=10*3.5;//refrigeration capacity in KJ/s\n",
"Cp=1.005;//specific heat capacity at constant pressure in KJ/kg K\n",
"disp('for process 1-2,n=1.45')\n",
"n=1.45;\n",
"disp('T2/T1=(p2/p1)^((n-1)/n)')\n",
"disp('so T2=T1*(p2/p1)^((n-1)/n) in K')\n",
"T2=T1*(p2/p1)^((n-1)/n)\n",
"disp('for process 3-4,n=1.3')\n",
"n=1.3;\n",
"disp('T4/T3=(p4/p3)^((n-1)/n)')\n",
"disp('so T4=T3*(p4/p3)^((n-1)/n)in K')\n",
"T4=T3*(p4/p3)^((n-1)/n)\n",
"disp('refrigeration effect in passenger cabin with m kg/s mass flow rate of air.')\n",
"disp('Q=m*Cp*(T5-T4)')\n",
"disp('m=Q/(Cp*(T5-T4))in kg/s')\n",
"m=Q/(Cp*(T5-T4))\n",
"disp('so air mass flow rate in cabin=0.55 kg/s')\n",
"disp('let the mass flow rate through intercooler be m1 kg/s then the energy balance upon intercooler yields,')\n",
"disp('m1*Cp*(T8-T7)=m*Cp*(T2-T3)')\n",
"disp('during process 6-7,T7/T6=(p7/p6)^((n-1)/n)')\n",
"disp('so T7=T6*(p7/p6)^((n-1)/n) in K')\n",
"T7=T6*(p7/p6)^((n-1)/n)\n",
"disp('substituting T2,T3,T7,T8 and m in energy balance on intercooler,')\n",
"disp('m1=m*(T2-T3)/(T8-T7)in kg/s')\n",
"m1=m*(T2-T3)/(T8-T7)\n",
"disp('total ram air mass flow rate=m+m1 in kg/s')\n",
"m+m1\n",
"disp('ram air mass flow rate=2.12 kg/s')\n",
"disp('work input to compressor(W)=m*Cp*(T2-T1)in KJ/s')\n",
"m=0.55;//approx.\n",
"W=m*Cp*(T2-T1)\n",
"disp('COP=refrigeration effect/work input=Q/W')\n",
"COP=Q/W\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
""
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.8: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_8.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 8')\n",
"po=0.9*10^5;//atmospheric air pressure in pa\n",
"To=(3+273);//temperature of atmospheric air in K\n",
"p1=1*10^5;//pressure due to ramming air in pa\n",
"p2=4*10^5;//pressure when air leaves compressor in pa\n",
"p3=p2;\n",
"p4=p3;\n",
"p5=1.03*10^5;//pressure maintained in passenger cabin in pa\n",
"T6=(25+273);//temperature of air leaves cabin in K\n",
"Q=15*3.5;//refrigeration capacity of aeroplane in KJ/s\n",
"n1=0.9;//isentropic efficiency of compressor\n",
"n2=0.8;//isentropic efficiency of turbine\n",
"Cp=1.005;//specific heat at constant pressure in KJ/kg K\n",
"disp('considering index of compression and expansion as 1.4')\n",
"y=1.4;\n",
"disp('during ramming action,process 0-1,')\n",
"disp('T1/To=(p1/po)^((y-1)/y)')\n",
"disp('T1=To*(p1/po)^((y-1)/y)in K')\n",
"T1=To*(p1/po)^((y-1)/y)\n",
"disp('during compression process 1-2_a')\n",
"disp('T2_a/T1=(p2/p1)^((y-1)/y)')\n",
"disp('T2_a=T1*(p2/p1)^((y-1)/y)in K')\n",
"T2_a=T1*(p2/p1)^((y-1)/y)\n",
"disp('n1=(T2_a-T1)/(T2-T1)')\n",
"disp('so T2=T1+(T2_a-T1)/n1 in K')\n",
"T2=T1+(T2_a-T1)/n1\n",
"disp('In heat exchanger 66% of heat loss shall result in temperature at exit from heat exchanger to be,T3=0.34*T2 in K')\n",
"T3=0.34*T2\n",
"disp('subsequently for 10 degree celcius temperature drop in evaporator,')\n",
"disp('T4=T3-10 in K')\n",
"T4=T3-10\n",
"disp('expansion in cooling turbine during process 4-5;')\n",
"disp('T5_a/T4=(p5/p4)^((y-1)/y)')\n",
"disp('T5_a=T4*(p5/p4)^((y-1)/y)in K')\n",
"T5_a=T4*(p5/p4)^((y-1)/y)\n",
"disp('n2=(T4-T5)/(T4-T5_a)')\n",
"disp('T5=T4-(T4-T5_a)*n2 in K')\n",
"T5=T4-(T4-T5_a)*n2\n",
"disp('let the mass flow rate of air through cabin be m kg/s.using refrigeration capacity heat balance yields.')\n",
"disp('Q=m*Cp*(T6-T5)')\n",
"disp('so m=Q/(Cp*(T6-T5))in kg/s')\n",
"m=Q/(Cp*(T6-T5))\n",
"disp('work input to compressor(W)=m*Cp*(T2-T1)in KJ/s')\n",
"W=m*Cp*(T2-T1)\n",
"disp('W in Hp')\n",
"W=W/.7457\n",
"disp('COP=refrigeration effect/work input=Q/W')\n",
"W=41.37;//work input to compressor in KJ/s\n",
"COP=Q/W\n",
"disp('so COP=1.27')\n",
"disp('and HP required=55.48 hp')\n",
"\n",
""
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11.9: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_11_Example_9.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Display mode\n",
"mode(0);\n",
"// Display warning for floating point exception\n",
"ieee(1);\n",
"clear;\n",
"clc;\n",
"disp('Engineering Thermodynamics by Onkar Singh Chapter 11 Example 9')\n",
"disp('properties of NH3,')\n",
"disp('at 15 degree celcius,h9=-54.51 KJ/kg,hg=1303.74 KJ/kg,s9=-0.2132 KJ/kg K,sg=5.0536 KJ/kg K')\n",
"T1=(-15+273);\n",
"h9=-54.51;\n",
"hg=1303.74;\n",
"s9=-0.2132;\n",
"sg=5.0536;\n",
"disp('and at 25 degree celcius,h3=99.94 KJ/kg,h2=1317.95 KJ/kg,s3=0.3386 KJ/kg K,s2=4.4809 KJ/kg K')\n",
"T2=(25+273);\n",
"h3=99.94;\n",
"h2=1317.95;\n",
"s3=0.3386;\n",
"s2=4.4809;\n",
"disp('here work done,W=Area 1-2-3-9-1')\n",
"disp('refrigeration effect=Area 1-5-6-4-1')\n",
"disp('Area 3-8-9 =(Area 3-11-7)-(Area 9-11-10)-(Area 9-8-7-10)')\n",
"disp('so Area 3-8-9=h3-h9-T1*(s3-s9)in KJ/kg')\n",
"h3-h9-T1*(s3-s9)\n",
"disp('during throttling process between 3 and 4,h3=h4')\n",
"disp('(Area=3-11-7-3)=(Area 4-9-11-6-4)')\n",
"disp('(Area 3-8-9)+(Area 8-9-11-7-8)=(Area 4-6-7-8-4)+(Area 8-9-11-7-8)')\n",
"disp('(Area 3-8-9)=(Area 4-6-7-8-4)')\n",
"disp('so (Area 4-6-7-8-4)=12.09 KJ/kg')\n",
"disp('also,(Area 4-6-7-8-4)=T1*(s4-s8)')\n",
"disp('so (s4-s8)in KJ/kg K=')\n",
"12.09/T1\n",
"disp('also s3=s8=0.3386 KJ/kg K')\n",
"s8=s3;\n",
"disp('so s4 in KJ/kg K=')\n",
"s4=s8+12.09/T1\n",
"disp('also s1=s2=4.4809 KJ/kg K')\n",
"s1=s2;\n",
"disp('refrigeration effect(Q)=Area (1-5-6-4-1)=T1*(s1-s4)in KJ/kg')\n",
"Q=T1*(s1-s4)\n",
"disp('work done(W)=Area (1-2-3-9-1)=(Area 3-8-9)+((T2-T1)*(s1-s8))in KJ/kg')\n",
"W=12.09+((T2-T1)*(s1-s8))\n",
"disp('so COP=refrigeration effect/work done=Q/W')\n",
"COP=Q/W\n",
"disp('so COP=5.94')\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
""
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Scilab",
"language": "scilab",
"name": "scilab"
},
"language_info": {
"file_extension": ".sce",
"help_links": [
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "scilab",
"version": "0.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|