summaryrefslogtreecommitdiff
path: root/Heat_Transfer_by_K._A._Gavhane/Chapter_6.ipynb
blob: 6cbb928fc41327a66840062b0d61a816591c0185 (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
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
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter6: Evaporation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no:6.1,Page no:6.19"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Boiling point of elevation of the solution is 7 K\n",
      "Driving forve for heat transfer is 19 K\n"
     ]
    }
   ],
   "source": [
    "#Boiling point Elevation\n",
    "#Variable declaration\n",
    "T=380       #B.P of solution[K]\n",
    "T_dash=373      #B.P of water [K]\n",
    "Ts=399      #Saturating temperature in [K]\n",
    "#Calculation\n",
    "BPE=T-T_dash        #Boiling point elevation in [K]\n",
    "DF=Ts-T     #Driving force in [K]\n",
    "#Result\n",
    "print\"Boiling point of elevation of the solution is\",BPE,\"K\"\n",
    "print\"Driving forve for heat transfer is\",DF,\"K\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no:6.2 ,Page no:6.20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Capacity of evaporator is 8400.0 kg/h\n"
     ]
    }
   ],
   "source": [
    "#Capacity of evaporator\n",
    "#Variable declaration\n",
    "m_dot=10000     #Weak liquor entering in [kg/h]\n",
    "fr_in=0.04       #Fraciton of caustic soda IN i.e 4%\n",
    "fr_out=0.25    #Fraciton of caustic soda OUT i.e 25%\n",
    "#Let mdash_dot be the kg/h of thick liquor leaving\n",
    "\n",
    "#Calculation\n",
    "mdash_dot=fr_in*m_dot/fr_out        #[kg/h]\n",
    "\n",
    "#Overall material balance\n",
    "#kg/h of feed=kg/h of water evaporated +kg/h of thick liquor\n",
    "#we=water evaporated in kg/h\n",
    "#Therefore\n",
    "we=m_dot-mdash_dot      #[kg/h]\n",
    "\n",
    "#Result\n",
    "\n",
    "print\"Capacity of evaporator is\",we,\"kg/h\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no: 6.3,Page no:6.20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ANSWER:Economoy pf evaporator is  0.808\n",
      "Heat tarnsfer area to be provided =  57.07 m^2\n"
     ]
    }
   ],
   "source": [
    "#Economy of Evaporator\n",
    "#Variable declaration\n",
    "ic=0.05     #Initial concentration (5%)\n",
    "fc=0.2      #Final concentration   (20%)\n",
    "T_dash=373      #B.P of water in [K]\n",
    "bpe=5       #Boiling point elevation[K]\n",
    "mf_dot=5000       #[Basis] feed to evaporator in [kg/h]\n",
    "\n",
    "#Calculation\n",
    "\n",
    "#Material balance of solute\n",
    "mdash_dot=ic*mf_dot/fc       #[kg/h]\n",
    "#Overall material balance\n",
    "mv_dot=mf_dot-mdash_dot      #Water evaporated [kg/h]\n",
    "lambda_s=2185        #Latent heat of condensation of steam[kJ/kg]\n",
    "lambda_v=2257       #Latent heat of vaporisation of water [kJ/kg]\n",
    "lambda1=lambda_v     #[kJ/kg]\n",
    "T=T_dash+bpe        #Temperature of thick liquor[K]\n",
    "Tf=298      #Temperature of feed [K]\n",
    "Cpf=4.187       #Sp. heat of feed in [kJ/kg.K]\n",
    "#Heat balance over evaporator=ms_dot\n",
    "ms_dot=(mf_dot*Cpf*(T-Tf)+mv_dot*lambda1)/lambda_s   #Steam consumption [kg/h]\n",
    "Eco=mv_dot/ms_dot       #Economy of evaporator\n",
    "Ts=399      #Saturation temperature of steam in [K]\n",
    "dT=Ts-T     #Temperature driving force [K]        \n",
    "U=2350      #[W/sq m.K]\n",
    "Q=ms_dot*lambda_s       #Rate of heat transfer in [kJ/kg]\n",
    "Q=Q*1000/3600           #[J/s]=[W]\n",
    "A=Q/(U*dT)              #Heat transfer area in [sq m]\n",
    "\n",
    "#Result\n",
    "print\"ANSWER:Economoy pf evaporator is \",round(Eco,3)\n",
    "print\"Heat tarnsfer area to be provided = \",round(A,2),\"m^2\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no: 6.4,Page no:6.22"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "When Feed introduced at 293 K ,Steam economy is  0.87\n",
      "ANSWER-(i) At 293 K,Heat transfer area required is 83.16 m^2\n",
      "ANSWER-(ii) When T=308 K,Economy of evaporator is  0.896\n",
      "ANSWER-(iii) When T=308 K,Heat transfer Area required is  80.71 m^2\n"
     ]
    }
   ],
   "source": [
    "#Steam economy\n",
    "\n",
    "#Variable declaration\n",
    "\n",
    "Cpf=3.98        #Specific heat of feed in kJ/(kg.K)\n",
    "lambda_s=2202    #Latent heat of conds of heat at 0.2MPa in [kJ/kg]\n",
    "lambda1=2383     #Latent heat of vaporisation of water aty 323 [kJ/kg\n",
    "ic=0.1          #Initial concentration of soilds in [%]\n",
    "fc=0.5          #Final concentration\n",
    "m_dot=30000     #Feed to evaporator in [kg/h]\n",
    "\n",
    "#Calculation\n",
    "\n",
    "mdash_dot=ic* m_dot/fc  #Mass flow rate of thick liquor in [kg/h]\n",
    "mv_dot=m_dot-mdash_dot      #Water evaporated in [kg/h]\n",
    "\n",
    "#Case 1: Feed at 293K\n",
    "mf_dot=30000        #[kg/h]\n",
    "mv_dot=24000        #[kg/h]\n",
    "Cpf=3.98        #[kJ/(kg.K)]\n",
    "Ts=393      #Saturation temperature of steam in [K]\n",
    "T=323       #Boiling point of solution [K]\n",
    "lambda_s=2202       #Latent heat of condensation [kJ/kg]\n",
    "lambda1=2383     #Latent heat of vaporisation[kJ/kg]\n",
    "Tf=293          #Feed temperature\n",
    "#Enthalpy balance over the evaporator:\n",
    "ms_dot=(mf_dot*Cpf*(T-Tf)+mv_dot*lambda1)/lambda_s       #Steam consumption[kg/h]\n",
    "eco=(mv_dot/ms_dot)         #Steam economy\n",
    "print\"When Feed introduced at 293 K ,Steam economy is \",round(eco,2) \n",
    "dT=Ts-T                     #[K]\n",
    "U=2900          #[W/sq m.K]\n",
    "Q=ms_dot*lambda_s           #Heat load =Rate of heat transfer in [kJ/h]\n",
    "Q=Q*1000/3600               #[J/s]\n",
    "A=Q/(U*dT)              #Heat transfer area required [sq m]\n",
    "\n",
    "#Result\n",
    "print\"ANSWER-(i) At 293 K,Heat transfer area required is\",round(A,2),\"m^2\"\n",
    "\n",
    "#Case2: Feed at 308K\n",
    "Tf=308      #[Feed temperature][K]\n",
    "\n",
    "#Calculation\n",
    "ms_dot=(mf_dot*Cpf*(T-Tf)+mv_dot*lambda1)/lambda_s           #Steam consumption in [kg/h]\n",
    "eco=mv_dot/ms_dot               #Economy of evaporator\n",
    "Q=ms_dot*lambda_s               #[kJ/h]\n",
    "Q=Q*1000/3600                   #[J/s]\n",
    "A=Q/(U*dT)                      #Heat transfer area required [sq m]\n",
    "#Result\n",
    "print\"ANSWER-(ii) When T=308 K,Economy of evaporator is \",round(eco,3)\n",
    "print\"ANSWER-(iii) When T=308 K,Heat transfer Area required is \",round(A,2),\"m^2\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no: 6.5,Page no:6.24"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Heat transfer area to be provided is 45.33 m^2\n"
     ]
    }
   ],
   "source": [
    "#Evaporator economy\n",
    "#Variable declaration\n",
    "m_dot=5000  #Feed to the evaporator [kg/h]\n",
    "Cpf=4.187           #Cp of feed in [kJ/kg.K]\n",
    "ic=0.10             #Initial concentration\n",
    "fc=0.4              #Final concentration\n",
    "lambda_s=2162           #Latent heat of condensing steam [kJ/kg]\n",
    "P=101.325       #Pressure in the evaporator[kPa]\n",
    "bp=373          #[K]\n",
    "Hv=2676     #Enthalpy of water vapor [kJ/kg]\n",
    "H_dash=419          #[kJ/kg]\n",
    "Hf=170          #[kJ/kg]\n",
    "U=1750          #[W/sq m.K]\n",
    "dT=34           #[K]\n",
    "#Calculation\n",
    "mdash_dot=m_dot*ic/fc           #[kg/h] of thick liquor\n",
    "mv_dot=m_dot-mdash_dot          #Water evaporated in[kg/h]\n",
    "ms_dot=(mv_dot*Hv+mdash_dot*H_dash-m_dot*Hf)/lambda_s          #Steam consumption in [kg/h]\n",
    "eco=mv_dot/ms_dot           #Steam economy of evaporator\n",
    "Q=ms_dot*lambda_s           #[kJ/h]\n",
    "Q=Q*1000/3600               #[J/s]\n",
    "A=Q/(U*dT)                  #[sq m]\n",
    "#Result\n",
    "print\"Heat transfer area to be provided is\",round(A,2),\"m^2\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no:6.6 ,Page no:6.26"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Steam economy is 0.784\n",
      "Overall heat transfer coefficient is 2862.0 W/m^2.K\n"
     ]
    }
   ],
   "source": [
    "#Single effect Evaporator\n",
    "#Variable declaration\n",
    "mf_dot=5000           #[kg/h]\n",
    "ic=0.01             #Initial concentration [kg/h]\n",
    "fc=0.02             #Final concentration  [kg/h]\n",
    "T=373               #Boiling pt of saturation in [K]\n",
    "Ts=383              #Saturation temperature of steam in [K]  \n",
    "Hf=125.79           #[kJ/kg]\n",
    "Hdash=419.04            #[kJ/kg]\n",
    "Hv=2676.1           #[kJ/kg]\n",
    "lambda_s=2230.2     #[kJ/kg]\n",
    "#Calculation\n",
    "mdash_dot=ic*mf_dot/fc   #[kg/h]\n",
    "mv_dot=mf_dot-mdash_dot      #Water evaporated in [kg/h]\n",
    "ms_dot=(mdash_dot*Hdash+mv_dot*Hv-mf_dot*Hf)/lambda_s   #Steam flow rate in [kg/h]\n",
    "eco=mv_dot/ms_dot           #Steam economy\n",
    "Q=ms_dot*lambda_s           #Rate of heat transfer in [kJ/h]\n",
    "Q=Q*1000/3600               #[J/s]\n",
    "dT=Ts-T                     #[K]\n",
    "\n",
    "A=69            #Heating area of evaporator in [sq m]\n",
    "U=Q/(A*dT)      #Overall heat transfer coeff in [W/sq m.K]\n",
    "\n",
    "#Result\n",
    "print\"Steam economy is\",round(eco,3)\n",
    "print\"Overall heat transfer coefficient is\",round(U),\"W/m^2.K\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no: 6.7,Page no:6.27"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The heat transfer area in this case is 18.7 m^2\n",
      "NOTE :There is a calculation mistake in the book at the line12 of this code,ms_dot value is written as 2320.18,which is wrong\n"
     ]
    }
   ],
   "source": [
    "#Single efect evaporator reduced pressure\n",
    "#From previous example:\n",
    "#Variable declaration\n",
    "mf_dot=5000         #[kg/h]\n",
    "Hf=125.79           #[kJ/kg]\n",
    "lambda_s=2230.2     #[kJ/kg]\n",
    "mdash_dot=2500   #[kg/h]\n",
    "Hdash=313.93         #[kJ/kg]\n",
    "mv_dot=2500         #[kg/h]\n",
    "Hv=2635.3           #[kJ/kg]\n",
    "U=2862              #[W/sq m.K]\n",
    "dT=35       #[K]\n",
    "#Calculation\n",
    "ms_dot=(mdash_dot*Hdash+mv_dot*Hv-mf_dot*Hf)/lambda_s   #Steam flow rate in [kg/h]\n",
    "Q=ms_dot*lambda_s           #[kJ/h]\n",
    "Q=Q*1000/3600           #[W]\n",
    "A=Q/(U*dT)      #[sq m]\n",
    "#Result\n",
    "print\"The heat transfer area in this case is\",round(A,2),\"m^2\"\n",
    "print\"NOTE :There is a calculation mistake in the book at the line12 of this code,ms_dot value is written as 2320.18,which is wrong\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no: 6.8,Page no:6.27"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Mass flow rate of product is 3629.9 kg/h\n",
      "The product concentration is 1.653 % by weight\n"
     ]
    }
   ],
   "source": [
    "#Mass flow rate\n",
    "#Variable declaration\n",
    "mf_dot=6000         #Feed rate in [kg/h]\n",
    "#Taking the given values from previous example(6.6)\n",
    "Hf=125.79           #[kJ/kg]\n",
    "ms_dot=3187.56      #[kg/h]\n",
    "lambda_s=2230.2         #[kJ/kg]\n",
    "Hdash=419.04        #[kJ/kg]\n",
    "Hv=2676.1           #[kJ/kg]\n",
    "#Calculation\n",
    "mv_dot=(mf_dot*Hf+ms_dot*lambda_s-6000*Hdash)/(Hv-Hdash)  #Water evaporated in [kg/h]\n",
    "mdash_dot=6000-mv_dot       #Mass flow rate of product [kg/h]\n",
    "x=(0.01*mf_dot)*100/mdash_dot       #Wt % of solute in products\n",
    "#Result\n",
    "print\"Mass flow rate of product is\",round(mdash_dot,1),\"kg/h\"\n",
    "print\"The product concentration is\",round(x,3),\"% by weight\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no:6.9 ,Page no:6.28"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Heat load is 11226389.0 W or J/s\n",
      "Economy of evaporator is  0.811\n",
      "NOTE:Again there is a calcualtion mistake in book at line 19 of code,it is written as 4041507.1 instead of 40415071\n"
     ]
    }
   ],
   "source": [
    "#Heat load in single effect evaporator\n",
    "#Variable declaration\n",
    "Tf=298      #Feed temperature in [K]\n",
    "T_dash=373      #[K]\n",
    "Cpf=4       #[kJ/kg.K]\n",
    "fc=0.2      #Final concentration of salt\n",
    "ic=0.05     #Initial concentration\n",
    "mf_dot=20000    #[kg/h] Feed to evaporator\n",
    "#Calculation\n",
    "mdash_dot=ic*mf_dot/fc      #Thick liquor [kg/h]\n",
    "mv_dot=mf_dot-mdash_dot     #Water evaporated in [kg/h]\n",
    "lambda_s=2185       #[kJ/kg]\n",
    "lambda1=2257       #[kJ/kg]\n",
    "bpr=7       #Boiling point rise[K]\n",
    "T=T_dash+bpr     #Boiling point of solution in[K]\n",
    "Ts=39       #Temperature of condensing steam in [K]\n",
    "ms_dot=(mf_dot*Cpf*(T-Tf)+mv_dot*lambda1)/lambda_s   #Steam consumption in [kg/h]\n",
    "eco=mv_dot/ms_dot           #Economy of evaporator \n",
    "Q=ms_dot*lambda_s               #[kJ/h]\n",
    "Q=Q*1000/3600           #[J/s]\n",
    "#Result\n",
    "print\"Heat load is\",round(Q),\"W or J/s\"\n",
    "print\"Economy of evaporator is \",round(eco,3)\n",
    "print\"NOTE:Again there is a calcualtion mistake in book at line 19 of code,it is written as 4041507.1 instead of 40415071\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no:6.10 ,Page no:6.32"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Boiling point of solution in first effect = 369.55 K\n",
      "Boiling point of solution in second effect = 354.6 K\n"
     ]
    }
   ],
   "source": [
    "#Triple efect evaporator\n",
    "#Variable declaration\n",
    "Ts=381.3        #[K]\n",
    "dT=56.6      #[K]\n",
    "U1=2800.0  #Overall heat transfer coeff in first effect\n",
    "U2=2200.0  #Overall heat transfer coeff in first effect\n",
    "U3=1100.0  #Overall heat transfer coeff in first effect\n",
    "#Calculation\n",
    "dT1=dT/(1+(U1/U2)+(U1/U3))  #/[K]\n",
    "dT2=dT/(1+(U2/U1)+(U2/U3))  #/[K]\n",
    "dT3=dT-(dT1+dT2)             #[K]\n",
    "#dT1=Ts-T1_dash      #[K]\n",
    "T1dash=Ts-dT1\n",
    "#dT2=T1_dash-T2_dash         #[K]\n",
    "T2_dash=T1dash-dT2             #[K]\n",
    "#Result\n",
    "print\"Boiling point of solution in first effect =\",round(T1dash,2),\"K\"\n",
    "print\"Boiling point of solution in second effect =\",round(T2_dash,1),\"K\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no:6.11,Page no:6.33"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "A1( 24.9 )=A2( 23.0 ),So the area in each effect can be 24.9 m^2\n",
      "Heat transfer surface in each effect is 24.9 m^2\n",
      "Steam consumption= 5517.0 (approx)kg/h\n",
      "Evaporation in the first effect is 4343.0 kg/h\n",
      "Evaporation in  2nd effect is 3742.0 kg/h\n"
     ]
    }
   ],
   "source": [
    "#Double effect evaporator\n",
    "#Variable declaration\n",
    "mf_dot=10000.0        #[kg/h] of feed\n",
    "ic=0.09     #Initial concentration \n",
    "fc=0.47     #Final concentration\n",
    "m1dot_dash=ic*mf_dot/fc     #[kg/h]\n",
    "Ps=686.616      #Steam pressure [kPa.g]\n",
    "Ps=Ps+101.325       #[kPa]\n",
    "Ts=442.7        #Saturation temperature in [K]\n",
    "P2=86.660       #Vacuum in second effect in [kPa]\n",
    "U1=2326.0     #Overall heat transfer in first effect [W/sq m.K]\n",
    "U2=1744.5   #Overall heat transfer in 2nd effect [W/sqm.K]\n",
    "P2_abs=101.325-P2   #Absolute pressure in second effect[kPa]\n",
    "T2=326.3        #Temperature in 2nd effect in [K]\n",
    "dT=Ts-T2        #[K]\n",
    "Tf=309.0      #Feed temperature in[K]\n",
    "T=273.0       #[K]\n",
    "Cpf=3.77        #kJ/kg.K  Specific heat for all caustic streams\n",
    "#Q1=Q2\n",
    "#U1*A1*dT1=U2*A2*dT2\n",
    "#Calculation\n",
    "dT2=dT/1.75     #[K]\n",
    "dT1=(U2/U1)*dT2     #[K]\n",
    "#Since there is no B.P.R\n",
    "Tv1=Ts-dT1      #Temperature in vapor space of first effect in [K]\n",
    "Tv2=Tv1-dT2     #Second effect [K]\n",
    "Hf=Cpf*(Tf-T)       #Feed enthalpy[kJ/kg]\n",
    "H1dash=Cpf*(Tv1-T)      #Enthalpy of final product[kJ/kg]\n",
    "H2dash=Cpf*(Tv2-T)      #kJ/kg\n",
    "#For steam at 442.7 K\n",
    "lambda_s=2048.7     #[kJ/kg]\n",
    "#For vapour at 392.8 K\n",
    "Hv1=2705.22     #[kJ/kg]\n",
    "lambda_v1=2202.8        #[kJ/kg]\n",
    "#for vapour at 326.3 K:\n",
    "Hv2=2597.61     #[kJ/kg]\n",
    "lambda_v2=2377.8        #[kJ/kg]\n",
    "\n",
    "#Overall material balance:\n",
    "mv_dot=mf_dot-m1dot_dash        #[kg/h]\n",
    "\n",
    "#Equation 4 becomes:\n",
    "#mv1_dot*lambda_v1+mf_dot*Hf=(mv_dot-mv1_dot)*Hv2+(mf_dot-mv2_dot)*H2_dash\n",
    "mv1_dot=(H2dash*(mf_dot-mv_dot)-mf_dot*Hf+mv_dot*Hv2)/(Hv2+lambda_v1-H2dash)  \n",
    "mv2_dot=mv_dot-mv1_dot              #[kg/h]\n",
    "\n",
    "#From equation 2\n",
    "\n",
    "m2dot_dash=m1dot_dash+mv1_dot           #First effect material balance[kg/h]\n",
    "ms_dot=(mv1_dot*Hv1+m1dot_dash*H1dash-m2dot_dash*H2dash)/lambda_s     #[kg/h]\n",
    "\n",
    "\n",
    "#Heat transfer Area\n",
    "#First effect\n",
    "A1=ms_dot*lambda_s*(10.0**3.0)/(3600.0*U1*dT1)     #[sq m]\n",
    "\n",
    "#Second effect\n",
    "lambda_v1=lambda_v1*(10**3.0)/3600.0\n",
    "A2=mv1_dot*lambda_v1/(U2*dT2)       #[sq m]\n",
    "\n",
    "#Since A1 not= A2\n",
    "\n",
    "#SECOND TRIAL\n",
    "Aavg=(A1+A2)/2          #[sq m]\n",
    "dT1_dash=dT1*A1/Aavg        #[K]\n",
    "dT2_dash=dT-dT1         #/[K]\n",
    "\n",
    "#Temperature distribution\n",
    "Tv1=Ts-dT1_dash         #[K]\n",
    "Tv2=Tv1-dT2_dash            #[K]\n",
    "Hf=135.66       #[kJ/kg]\n",
    "H1dash=Cpf*(Tv1-T)      #[kJ/kg]\n",
    "H2dash=200.83          #[kJ/kg]\n",
    "\n",
    "#Vapour at 388.5 K\n",
    "Hv1=2699.8      #[kJ/kg]\n",
    "lambda_v1=2214.92       #[kJ/kg]\n",
    "mv1_dot=(H2dash*(mf_dot-mv_dot)-mf_dot*Hf+mv_dot*Hv2)/(Hv2+lambda_v1-H2dash)  \n",
    "mv2_dot=mv_dot-mv1_dot  #[kg/h]\n",
    "\n",
    "#First effect Energy balance\n",
    "ms_dot=((mv1_dot*Hv1+m1dot_dash*H1dash)-(mf_dot-mv2_dot)*H2dash)/lambda_s   #[kg/h]\n",
    "\n",
    "#Area of heat transfer\n",
    "lambda_s=lambda_s*1000.0/3600.0     \n",
    "A1=ms_dot*lambda_s/(U1*dT1_dash)        #[sq m]\n",
    "\n",
    "#Second effect:\n",
    "A2=(mv1_dot*lambda_v1*1000)/(3600.0*U2*dT2_dash)        #[sq m]\n",
    "\n",
    "#Result\n",
    "\n",
    "print\"A1(\",round(A1,1),\")=A2(\",round(A2),\"),So the area in each effect can be\",round(A1,1),\"m^2\"\n",
    "print\"Heat transfer surface in each effect is\",round(A1,1),\"m^2\"\n",
    "print\"Steam consumption=\",round(ms_dot),\"(approx)kg/h\"\n",
    "print\"Evaporation in the first effect is\",round(mv1_dot),\"kg/h\"\n",
    "print\"Evaporation in  2nd effect is\",round(mv2_dot),\"kg/h\" \n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no:6.12 ,Page no:6.37"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ANSWER:Area in each effect 200.2 sq m\n",
      "Steam economy is 2.55\n",
      "Cooling water rate is 66.63 t/h\n"
     ]
    }
   ],
   "source": [
    "#lye in Triple effect evaporator\n",
    "#Variable declaration\n",
    "Tf=353.0           #[K]\n",
    "T=273.0           #[K]\n",
    "mf_dot=10000.0          #Feed [kg/h]\n",
    "ic=0.07          #Initial conc of glycerine \n",
    "fc=0.4           #FinaL CONC OF GLYCERINE\n",
    "#Overall glycerine balance\n",
    "P=313.0            #Steam pressure[kPa]\n",
    "Ts=408.0       #[from steam table][K]\n",
    "P1=15.74         #[Pressure in last effect][kPa]\n",
    "Tv3=328.0          #[Vapour temperature]\n",
    "#Calculation\n",
    "m3dot_dash=(ic/fc)*mf_dot           #[kg/h]\n",
    "mv_dot=mf_dot-m3dot_dash            #/[kg/h]\n",
    "dT=Ts-Tv3      #Overall apparent [K]\n",
    "bpr1=10.0          #[K]\n",
    "bpr2=bpr1 \n",
    "bpr3=bpr2 \n",
    "sum_bpr=bpr1+bpr2+bpr3      #[K]\n",
    "dT=dT-sum_bpr               #True_Overall\n",
    "dT1=14.5             #[K]\n",
    "dT2=16.0               #[K]\n",
    "dT3=19.5             #[K]\n",
    "Cpf=3.768            #[kJ/(kg.K)]\n",
    "#Enthalpies of various streams\n",
    "Hf=Cpf*(Tf-T)           #[kJ/kg]\n",
    "H1=Cpf*(393.5-T)           #[kJ/kg]\n",
    "H2=Cpf*(367.5-T)           #[kJ/kg]\n",
    "H3=Cpf*(338.0-T)           #[kJ/kg]\n",
    "#For steam at 40K\n",
    "lambda_s=2160.0       #[kJ/kg]\n",
    "Hv1=2692.0        #[kJ/kg]\n",
    "lambda_v1=2228.3        #[kJ/kg]\n",
    "Hv2=2650.8          #[kJ/kg]\n",
    "lambda_v2=2297.4        #[kJ/kg]\n",
    "Hv3=2600.5              #[kJ/kg]\n",
    "lambda_v3=2370.0      #[kJ/kg]\n",
    "\n",
    "#MATERIAL AND EBERGY BALANCES\n",
    "#First effect\n",
    "#Material balance\n",
    "\n",
    "#m1dot_dash=mf_dot-mv1_dot\n",
    "#m1dot_dash=1750+mv2_dot+mv3_dot           \n",
    "\n",
    "#Energy balance\n",
    "#ms_dot*lambda_s+mf_Dot*hf=mv1_dot*Hv1+m1dot_dash*H1\n",
    "#2160*ms_dot+2238*(mv2_dot+mv3_dot)=19800500\n",
    "\n",
    "#Second effect\n",
    "#Energy balance:\n",
    "#mv3_dot=8709.54-2.076*mv2_dot\n",
    "\n",
    "#Third effect:\n",
    "#m2dot_dash=mv3_dot+m3dot_dash\n",
    "#m2dot_dash=mv3_dot+1750\n",
    "#From eqn 8 we get\n",
    "mv2_dot=(8709.54*2600.5+1750*244.92-8790.54*356.1-356.1*1750)/(-2.076*356.1+2297.4+2600.5*2.076)\n",
    "#From eqn 8:\n",
    "mv3_dot=8709.54-2.076*mv2_dot           #[kg/h]\n",
    "mv1_dot=mv_dot-(mv2_dot+mv3_dot)        #[kg/h]\n",
    "#From equation 4:\n",
    "#m1dot_dash=mf_dot-mv1_dot\n",
    "#ms_dot=(mv1_dot*Hv1+m1dot_dash*H1-mf_dot*Hf)/lambda_s   #[kg/h]\n",
    "ms_dot=(19800500.0-2238.0*(mv2_dot+mv3_dot))/2160.0           #[kg/h]\n",
    "\n",
    "#Heat transfer Area is\n",
    "U1=710.0          #[W/sq m.K]\n",
    "U2=490.0          #[W/sq m.K]\n",
    "U3=454.0          #[W/sq m.K]\n",
    "A1=(ms_dot*lambda_s*1000.0)/(3600.0*U1*dT1)     #[sq m]\n",
    "A2=mv1_dot*lambda_v1*1000.0/(3600.0*U2*dT2)   #[sq m]\n",
    "A3=mv2_dot*lambda_v2*1000.0/(3600.0*U3*dT3)   #[sq m]\n",
    "#The deviaiton is within +-10%\n",
    "#Hence maximum A1 area can be recommended\n",
    "\n",
    "eco=(mv_dot/ms_dot)     #[Steam economy]\n",
    "\n",
    "Qc=mv3_dot*lambda_v3        #[kJ/h]\n",
    "dT=25.0           #Rise in water temperature\n",
    "Cp=4.187\n",
    "mw_dot=Qc/(Cp*dT)\n",
    "#Result\n",
    "print\"ANSWER:Area in each effect\",round(A3,1),\"sq m\" \n",
    "print\"Steam economy is\",round(eco,2) \n",
    "print\"Cooling water rate is\",round(mw_dot/1000,2),\"t/h\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no:6.13 ,Page no:6.42"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Steam economy is 2.0\n",
      "Area pf heat transfer in each effect is 65.3 m^2\n"
     ]
    }
   ],
   "source": [
    "#Triple effect unit\n",
    "#Variable declaration\n",
    "Cpf=4.18        #[kJ/kg.K]\n",
    "dT1=18          #[K]\n",
    "dT2=17          #[K]\n",
    "dT3=34          #[K]\n",
    "mf_dot=4        #[kg/s]\n",
    "Ts=394          #[K]\n",
    "bp=325      #Bp of water at 13.172 kPa [K]\n",
    "dT=Ts-bp        #[K]\n",
    "lambda_s=2200           #[kJ/kg]\n",
    "T1=Ts-dT1           #[K]\n",
    "lambda1=2249        #[kJ/kg]\n",
    "lambda_v1=lambda1       #[kJ/kg]\n",
    "#Calculation\n",
    "T2=T1-dT2           #[K]\n",
    "lambda2=2293        #[kJ/kg]\n",
    "lambda_v2=lambda2       #[kJ/kg]\n",
    "\n",
    "T3=T2-dT3           #[K]\n",
    "lambda3=2377        #[kJ/kg]\n",
    "lambda_v3=lambda3       #[kJ/kg]\n",
    "\n",
    "ic=0.1      #Initial conc of solids\n",
    "fc=0.5      #Final conc of solids\n",
    "m3dot_dash=(ic/fc)*mf_dot       #[kg/s]\n",
    "mv_dot=mf_dot-m3dot_dash        #Total evaporation in [kg/s]\n",
    "#Material balance over first effect\n",
    "#mf_dot=mv1_dot_m1dot_dash\n",
    "#Energy balance:\n",
    "#ms_dot*lambda_s=mf_dot*(Cpf*(T1-Tf)+mv1_dot*lambda_v1)\n",
    "\n",
    "#Material balance over second effect\n",
    "#m1dot_dash=mv2_dot+m2dot_dash\n",
    "#Enthalpy balance:\n",
    "#mv1_dot*lambda_v1+m1dot_dash(cp*(T1-T2)=mv2_dot*lambda_v2)\n",
    "\n",
    "#Material balance over third effect\n",
    "#m2dot_dash=mv3_dot+m3dot+dash\n",
    "\n",
    "#Enthalpy balance:\n",
    "#mv2_lambda_v2+m2dot_dash*cp*(T2-T3)=mv3_dot*lambda_v3\n",
    "294\n",
    "mv2_dot=3.2795/3.079        #[kg/s]\n",
    "mv1_dot=1.053*mv2_dot-0.1305     #[kg/s]\n",
    "mv3_dot=1.026*mv2_dot+0.051     #[kg/s]\n",
    "ms_dot=(mf_dot*Cpf*(T1-294)+mv1_dot*lambda_v1)/lambda_s      #[kg/s]\n",
    "eco=mv_dot/ms_dot           #Steam economy      \n",
    "eco=round(eco)\n",
    "U1=3.10     #[kW/sq m.K]\n",
    "U2=2     #[kW/sq m.K]\n",
    "U3=1.10     #[kW/sq m.K]\n",
    "#First effect:\n",
    "A1=ms_dot*lambda_s/(U1*dT1)         #[sq m]\n",
    "A2=mv1_dot*lambda_v1/(U2*dT2)        #[sq m]\n",
    "A3=mv2_dot*lambda_v2/(U3*dT3)        #[sq m]\n",
    "#Areas are calculated witha  deviation of +-10%\n",
    "#Result\n",
    "print\"Steam economy is\",eco \n",
    "print\"Area pf heat transfer in each effect is\",round(A3,1),\"m^2\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no: 6.14,Page no:6.45"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Steam economy is 1.957 evaporation/kg steam\n"
     ]
    }
   ],
   "source": [
    "#Quadruple effect evaporator\n",
    "#Variable declaration\n",
    "mf_dot=1060     #[kg/h]\n",
    "ic=0.04     #Initial concentration\n",
    "fc=0.25         #Final concentration\n",
    "m4dot_dash=(ic/fc)*mf_dot       #[kg/h]\n",
    "#Total evaporation=\n",
    "mv_dot=mf_dot-m4dot_dash        #[kg/h]\n",
    "\n",
    "#Fromsteam table:\n",
    "P1=370      #[kPa.g]\n",
    "T1=422.6        #[K]\n",
    "lambda1=2114.4      #[kJ/kg]\n",
    "\n",
    "P2=235      #[kPa.g]\n",
    "T2=410.5        #[K]\n",
    "lambda2=2151.5      #[kJ/kg]\n",
    "\n",
    "P3=80      #[kPa.g]\n",
    "T3=390.2        #[K]\n",
    "lambda3=2210.2      #[kJ/kg]\n",
    "\n",
    "P4=50.66      #[kPa.g]\n",
    "T4=354.7        #[K]\n",
    "lambda4=2304.6      #[kJ/kg]\n",
    "\n",
    "P=700       #Latent heat of steam[kPa .g]\n",
    "lambda_s=2046.3         #[kJ/kg]\n",
    "\n",
    "#Calculation\n",
    "#FIRST EFFECT\n",
    "#Enthalpy balance:\n",
    "#ms_dot=mf_dot*Cpf*(T1-Tf)+mv1_dot*lambda1\n",
    "#ms_dot=1345.3-1.033*m1dot_dash\n",
    "\n",
    "#SECOND EFFECT\n",
    "#m1dot_dash=m2dot_dash+mdot_v2\n",
    "#Enthalpy balance:\n",
    "#m1dot_dash=531.38+0.510*m2dot_dash\n",
    "\n",
    "#THIRD EFFECT\n",
    "#Material balance:\n",
    "#m2dot_dash-m3dot_dash+mv3_dot\n",
    "\n",
    "#FOURTH EFFECT\n",
    "#m3dot_dash=m4dot_dash+mv4_dot\n",
    "mv4dot_dash=169.6           #[kg/h]\n",
    "m3dot_dash=416.7        #[kg/h]\n",
    "\n",
    "#From eq n 4:\n",
    "m2dot_dash=-176.84+1.98*m3dot_dash      #[kg/h]\n",
    "\n",
    "#From eqn 2:\n",
    "m1dot_dash=531.38+0.510*m2dot_dash      #[kg/h]\n",
    "\n",
    "#From eqn 1:\n",
    "ms_dot=1345.3-1.033*m1dot_dash\n",
    "eco=mv_dot/ms_dot           #[kg evaporation /kg steam]\n",
    "#Result\n",
    "print\"Steam economy is\",round(eco,3),\"evaporation/kg steam\" \n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example no:6.15 ,Page no:6.48"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "NOTE:In textbook this value of hio is wrongly calculated as 3975.5..So we will take this\n",
      "Steam consumption is 24531.0 kg/h\n",
      "Capacity is 20000.0 kg/h\n",
      "Steam economy is  0.815\n",
      " No. of tubes required is  722.0\n"
     ]
    }
   ],
   "source": [
    "#Single effect Calendria\n",
    "import math\n",
    "#Variable declaration\n",
    "m1_dot=5000     #[kg/h]\n",
    "ic=0.1      #Initial concentration\n",
    "fc=0.5      #Final concentration\n",
    "mf_dot=(fc/ic)*m1_dot       #[kg/h]\n",
    "mv_dot=mf_dot-m1_dot        #Water evaporated[kg/h]\n",
    "P=357       #Steam pressure[kN/sq m]\n",
    "Ts=412       #[K]\n",
    "H=2732      #[kJ/kg]\n",
    "lambda1=2143     #[kJ/kg]\n",
    "bpr=18.5            #[K]\n",
    "T_dash=352+bpr      #[K]\n",
    "Hf=138      #[kJ/kg]\n",
    "lambda_s=2143       #[kJ/kg]\n",
    "Hv=2659     #[kJ/kg]\n",
    "H1=568      #[kJ/kg]\n",
    "#Calculation\n",
    "ms_dot=(mv_dot*Hv+m1_dot*H1-mf_dot*Hf)/lambda_s         #Steam consumption in kg/h\n",
    "eco=mv_dot/ms_dot       #Economy\n",
    "dT=Ts-T_dash        #[K]\n",
    "hi=4500     #[W/sq m.K]\n",
    "ho=9000     #[W/sq m.K]\n",
    "Do=0.032        #[m]\n",
    "Di=0.028        #[m]\n",
    "x1=(Do-Di)/2        #[m]\n",
    "Dw=(Do-Di)/math.log(32.0/28.0)   #[m]\n",
    "x2=0.25*10**-3      #[m]\n",
    "L=2.5       #Length [m]\n",
    "hio=hi*(Di/Do)        #[W/sq m.K]\n",
    "print\"NOTE:In textbook this value of hio is wrongly calculated as 3975.5..So we will take this\"\n",
    "hio=3975.5\n",
    "k1=45.0       #Tube material in [W/sq m.K]\n",
    "k2=2.25     #For scale[W/m.K]\n",
    "Uo=1.0/(1.0/ho+1.0/hio+(x1*Dw)/(k1*Do)+(x2/k2))     #Overall heat transfer coeff in W/sq m.K\n",
    "Q=ms_dot*lambda_s       #[kJ/h]\n",
    "Q=Q*1000.0/3600.0           #[W]\n",
    "\n",
    "A=Q/(Uo*dT)             #[sq m]\n",
    "n=A/(math.pi*Do*L)          #from A=n*math.pi*Do*L \n",
    "#Result\n",
    "print\"Steam consumption is\",round(ms_dot),\"kg/h\" \n",
    "print\"Capacity is\",round(mv_dot),\"kg/h\"\n",
    "print\"Steam economy is \",round(eco,3)\n",
    "print\" No. of tubes required is \",round(n)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "subslide"
    }
   },
   "source": [
    "## Example no:6.16 ,Page no:6.50"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Steam consumption is 3159.6 kg/h\n",
      "Heat transfer area is 47.91 m^2\n",
      " Now,Steam consumption is 3253.42 kg/h\n",
      "Economy of evaporator  0.84\n",
      "Now,Area is 49.33\n",
      "If enthalpy of water vapour Hv were based on the saturated vapour at the pressure\n",
      "the error introduced is only 2.97 percent\n"
     ]
    }
   ],
   "source": [
    "#Single effect evaporator\n",
    "#Variable declaration\n",
    "bpr=40.6         #[K]\n",
    "Cpf=1.88        #[kJ/kg.K]\n",
    "Hf=214      #[kJ/kg]\n",
    "H1=505      #[kJ/kg]\n",
    "mf_dot=4536     #[kg/h] of feed solution\n",
    "ic=0.2       #Initial conc\n",
    "fc=0.5       #Final concentration\n",
    "m1dot_dash=(ic/fc)*mf_dot       #Thisck liquor flow arte[kg/h]\n",
    "mv_dot=mf_dot-m1dot_dash        #[kg/H]\n",
    "Ts=388.5         #Saturation temperature of steam in [K]\n",
    "bp=362.5        #b.P of solution in [K]\n",
    "lambda_s=2214      #[kJ/kg]\n",
    "P=21.7       #Vapor space in [kPa]\n",
    "Hv=2590.3        #[kJ/kg]\n",
    "\n",
    "#Calculation\n",
    "#Enthalpy balance over evaporator\n",
    "ms_dot=(m1dot_dash*H1+mv_dot*Hv-mf_dot*Hf)/lambda_s     #[kg/h\n",
    "print\"Steam consumption is\",round(ms_dot,1),\"kg/h\" \n",
    "dT=Ts-bp        #[K]\n",
    "U=1560      #[W/sq m.K]\n",
    "Q=ms_dot*lambda_s           #[kJ/h]\n",
    "Q=Q*1000/3600               #[W]\n",
    "A=Q/(U*dT)      #[sq m]\n",
    "print\"Heat transfer area is\",round(A,2),\"m^2\"\n",
    "\n",
    "#Calculations considering enthalpy of superheated vapour\n",
    "\n",
    "Hv=Hv+Cpf*bpr   #[kJ/kg]\n",
    "ms_dot=(m1dot_dash*H1+mv_dot*Hv-mf_dot*Hf)/lambda_s     #[kg/h]\n",
    "print\" Now,Steam consumption is\",round(ms_dot,2),\"kg/h\" \n",
    "eco=mv_dot/ms_dot       #Steam economy\n",
    "print\"Economy of evaporator \",round(eco,2)\n",
    "Q=ms_dot*lambda_s       #[kJ/h]\n",
    "Q=Q*1000.0/3600.0           #[w]\n",
    "A2=Q/(U*dT)              #Area\n",
    "print\"Now,Area is\",round(A2,2) \n",
    "perc=(A2-A)*100/A           #%error in the heat transfer area \n",
    "#Result\n",
    "print\"If enthalpy of water vapour Hv were based on the saturated vapour at the pressure\\nthe error introduced is only\",round(perc,2),\"percent\"\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}