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
|
{
"metadata": {
"name": "",
"signature": "sha256:abd0537a9b98c6cb49f3032d9229bd28210acff6f4a7d9f1c5434293bf15ef92"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 4:The First Law of Thermodynamics"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.1:PG-62"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#initialization of variables\n",
"K=100 # spring constant in kN/m\n",
"d=0.8 # dispacement of spring in m\n",
" # to get total work we integrate from 0 to 0.8 displacement\n",
"x1=0; # lower limit of integration\n",
"x2=0.8; # upper limit of integration\n",
"from scipy.integrate import quad\n",
"\n",
"# we find work\n",
"def integrand(x,K):\n",
" return K*x\n",
"\n",
"W12, err = quad(integrand, x1, x2, K) # integrating to get work\n",
"Q12=W12; # by first law of thermodynamics\n",
"print \"The Heat transfer is \",int(Q12),\" J\"\n",
"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Heat transfer is 32 J\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.2:PG-65"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# initialization of variables\n",
"P= 5*746 # power of fan converted in watt\n",
"t=1*60*60 # time converted to seconds\n",
"\n",
"# by first law of thermodynamics Q=delU + W\n",
"# Q=0 hence -W=delU\n",
"# first we find work input\n",
"W=-P*t # work in J\n",
"delU=-W # from 1st law\n",
"print \"The internal energy increase is \",float(delU),\" J\"\n",
"# The answer is approximated in textbook\n",
"# our answer is precise\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The internal energy increase is 13428000.0 J\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.3:PG-65"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# initialization of variables\n",
"P=400 # pressure in kPa\n",
"T1=200 # initial temperature in degree celsius\n",
"V1= 2 # initial volume in m^3\n",
"Q=3500 # heat added in kJ\n",
"v1=0.5342 # specific volume of steam at 200 degree celcius and 0.4 Mpa pressure from table C.3\n",
"u1=2647 # specific internal energy in kJ/kg @ pressure = 0.4 MPa\n",
"m=V1/v1 # mass in kg\n",
"# we have a relation Between u2 and v2 from 1st law of thermodynamics\n",
"v2=1.06 # specific volume at state 2 by trial and error and interpolation\n",
"V2=m*v2 \n",
"u2=((3500-400*(V2-V1))/m)+2647 # specific internal energy for v2=1.06 by trial and error\n",
"\n",
"# on interpolation from steam table at 0.4 MPa we get temperature \n",
"T2=644 # temperature in degree celsius\n",
"print \"The temperature for u2=\",round(u2),\" kJ and v2 =\",round(v2,3),\" kg/m^3 is \\n \",int(T2),\" degree celsius\"\n",
"# this numerical is solved by trial and error thus refer to Appendix C"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The temperature for u2= 3372.0 kJ and v2 = 1.06 kg/m^3 is \n",
" 644 degree celsius\n"
]
}
],
"prompt_number": 17
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.4:PG-67"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# initialization of variables\n",
"P=400 # pressure in kPa\n",
"T1=200 # initial tmperature in degree celsius\n",
"V=2 # initial volume in m^3\n",
"Q=3500 # heat added in kJ\n",
"\n",
"#solution\n",
"h1=2860 # initial enthalpy @ 200*C and 400 kPa from steam table\n",
"v=0.5342 # specific volume from steam table C.3 \n",
"m=V/v;\n",
"h2=(Q/m)+h1; # final enthalpy in kJ/kg from energy equation\n",
"\n",
"# NOW USING THIS ENTHLAPY AND INTERPOlATING FROM STEAM TABLE\n",
"\n",
"T2=600+(92.6/224)*100\n",
"\n",
"print \"The Final temperature is \",int(T2),\" degree Celsius\"\n",
"# result is obtained from interpolation on steam table\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Final temperature is 641 degree Celsius\n"
]
}
],
"prompt_number": 20
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.5:PG-71"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# initialization of variables\n",
"T1=300 # initial temperature in degree celsius\n",
"T2=700 # final temperature in degree celsius\n",
"P=150 # pressure in kPa\n",
"m=3 # mass of steam in kg\n",
"\n",
"# solution\n",
"# part (a)\n",
"from scipy.integrate import quad\n",
"\n",
"# now we make function to integrate\n",
"def integrand(T):\n",
" return 2.07+(T-400)/1480\n",
"\n",
"I, err = quad(integrand, T1, T2) # integrating specific heat over temperature range\n",
"delH=m*I #integrate('2.07+(T-400)/1480','T',T1,T2) # expressing as function of temperature and integrating\n",
"\n",
"print\" The change in Enthalpy is \",int(delH),\" kJ \\n\"\n",
" \n",
"# part(b)\n",
"CPavg=delH/(m*(T2-T1)) # avg value of specific heat at constant pressure\n",
"print \" The average value of Cp is \",round(CPavg,2),\" kJ/kg.*C\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The change in Enthalpy is 2565 kJ \n",
"\n",
" The average value of Cp is 2.14 kJ/kg.*C\n"
]
}
],
"prompt_number": 24
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.6,PG-72"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"m=1 # mass of nitrogen in kg\n",
"T1=300 # initial temperature in Kelvin\n",
"T2=1200 # final temperature in Kelvin\n",
"M=28.0 # in kg/kmol\n",
"# part(a)\n",
"# the enthalpy change is found from gas table in App.E\n",
"delh=36777-8723 # from gas table\n",
"delH=delh/M \n",
"print \" The entalpy change from gas table is \",round(delH),\" kJ/kg \\n\"\n",
"\n",
"# part (b) \n",
"Cp=1.042 # from table B.2\n",
"delH=Cp*(T2-T1)\n",
"print \" The entalpy change by assuming constant specific heat is \",round(delH),\" kJ/kg\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The entalpy change from gas table is 1002.0 kJ/kg \n",
"\n",
" The entalpy change by assuming constant specific heat is 938.0 kJ/kg\n"
]
}
],
"prompt_number": 29
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.7:PG-76"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# initialization of variables\n",
"x=0.7 # quality of steam\n",
"P1=200 # initial pressure in kPa\n",
"P2=800 # final pressure in kPa\n",
"V=2 # volume in m^3\n",
"# The values are taken from TABLE C.2\n",
"vf1=0.0010 # specific volume of saturated liquid at 200 kPa\n",
"vg1=0.8857 # specific volume of saturated gas at 200 kPa\n",
"uf1=504.5 # specific internal energy of saturated liquid @ state 1\n",
"ug1=2529.5 # speciific internal energy of saturated gas @ state 1\n",
"\n",
"v1=vf1+x*(vg1-vf1); # specific volume of vapour\n",
"m=V/v1\n",
"\n",
"u1=uf1+x*(ug1-uf1) # specific internal energy of vapour @ state 1\n",
"v2=v1 # constant volume process\n",
"u2=((0.6761-0.6203)*(3661-3853)/(0.6761-0.6181))+3853 # from steam table @ 800kPa by interpolating\n",
"Q=m*(u2-u1) # heat transfer\n",
"print \"The heat transfer is \",round(Q,3),\" kJ\"\n",
"# The answer in the textbook is approximated"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The heat transfer is 5630.537 kJ\n"
]
}
],
"prompt_number": 34
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.8:PG-76"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# initialization of variables\n",
"V=0.02 # volume in m^3\n",
"P=400 # pressure in kPa\n",
"T1=50+273 # initial temperature in kelvin\n",
"T2=700+273 # final temperature in kelvin\n",
"Q=50 # heat added in kJ\n",
"R=287 # constant for air\n",
"Cp=1 # constant for specific heat of air\n",
"\n",
"# using the ideal gas equation\n",
"\n",
"m=P*1000*V/(R*T1) # mass of air in kg\n",
"W=Q-(m*Cp*(T2-T1)) # work done from first law\n",
"# result\n",
"print \"The Paddle work is \",round(W,2),\" kJ\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Paddle work is -6.09 kJ\n"
]
}
],
"prompt_number": 37
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.9,PG-77"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# initialization of variables\n",
"V1=2 # initial volume in m^3\n",
"V2=0.2 # final volume in m^3\n",
"T1=20+273 # temperature in kelvin\n",
"P=200 # pressure in kPa\n",
"R=0.287 # constant for air\n",
"gama=1.4 # polytropic index for air\n",
"Cv=0.717 # specific heat at constant volume for air\n",
"\n",
"#solution\n",
"\n",
"#using the ideal gas equation\n",
"m=(P*V1)/(R*T1) # mass in kg\n",
"# process is adiabatic thus\n",
"T2=T1*((V1/V2)**(gama-1)) # final temperature\n",
"\n",
"W=-m*Cv*(T2-T1) # work from first law\n",
"print \"The Work is \",int(W),\" kJ\"\n",
"# solution is approximated in textbook"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Work is -1510 kJ\n"
]
}
],
"prompt_number": 41
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.10:PG-79"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# initialization of variables\n",
"P1=2000.0 # initial pressure in kPa\n",
"T1=600.0 # initial temperature in degree celsius\n",
"p2=600.0 # final pressure in kPa\n",
"T2=200.0 # final temperature in degree celsius\n",
"d1=0.06 # diameter of inlet pipe in metre\n",
"d2=0.120 # diameter of outlet pipe in metre\n",
"V1=20.0 # velocity at inlet in m/s\n",
"\n",
"# solution\n",
"# from superheat table C.3 values are noted\n",
"v1=0.1996 # specific volume of superheated steam @ 600*C and 2000 kPa\n",
"v2=0.3520 # specific volume of superheated steam @ 200*C and 2000 kPa\n",
"rho1=1/v1 # initial density\n",
"rho2=1/v2 # final density\n",
"A1=(math.pi*d1**2)/4 # inlet area\n",
"A2=(math.pi*d2**2)/4 # exit area\n",
"\n",
"V2=(rho1*A1*V1)/(rho2*A2) # from continuity equation\n",
"print \" The Exit velocity is \",round(V2,2),\" m/s \\n\"\n",
"\n",
"mdot=rho1*A1*V1 # mass flow rate\n",
"print\" The mass flow rate is \",round(mdot,3),\" kg/s\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The Exit velocity is 8.82 m/s \n",
"\n",
" The mass flow rate is 0.283 kg/s\n"
]
}
],
"prompt_number": 45
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.11:PG-82"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# initialization of variables\n",
"P1=8000 # initial pressure in kPa\n",
"T1=300 # temperature in degree celsius\n",
"P2=2000 # final pressure in kPa\n",
"\n",
"# solution\n",
"h1=2785 # specific enthalpy of steam in kJ/kg @ 8000 kPa and 300 degree celsius from steam table\n",
"h2=h1 # throttling process thus enthalpy is constant\n",
"T2=212.4 # from steam table as we know enthalpy and pressure\n",
"hf2=909 # specific enthalpy of saturated liquid @ 2000 kPa and 300 degree celsius\n",
"hg2=2799.5 # specific enthalpy of saturated gas @ 2000 kPa and 300 degree celsius\n",
"x2=(h2-hf2)/(hg2-hf2) # quality of steam\n",
"\n",
"vg2=0.0992 # specific volume of saturated gas @ 2000 kPa and 212.4*c\n",
"vf2=0.0012 # specific volume of saturated liquid @ 2000 kPa and 212.4*c\n",
"v2=vf2+x2*(vg2-vf2) # from properties of pure substance\n",
"\n",
"print \"The Final Temperature and Specific volume is \",round(T2,1),\"*C and \",round(v2,3),\" m^3/kg\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Final Temperature and Specific volume is 212.4 *C and 0.098 m^3/kg\n"
]
}
],
"prompt_number": 50
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.12:PG-84"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# initialization of variables\n",
"P1=4000 # inlet pressure in kPa\n",
"T1=500 # inlet temperature in degree celsius\n",
"V1=200 # inlet steam velocity in m/s\n",
"d1=0.05 # inlet diameter in 'm'\n",
"P2=80 # exit pressure in kPa\n",
"d2=0.250 # exit diameter in 'm'\n",
"\n",
"# solution\n",
"v1=0.08643 # specific volume from steam table @ 4000 kPa and 500*C\n",
"v2=2.087 # specific volume from steam table @ 80 kPa and 500*C\n",
"rho1=1/v1 # density at inlet\n",
"rho2=1/v2 # density at outlet\n",
"A1=(math.pi*d1**2)/4 # inlet area\n",
"A2=(math.pi*d2**2)/4\n",
"mdot=rho1*A1*V1 # mass flow rate\n",
"mdot=round(mdot,3) # rounding to 3 significant digits\n",
"\n",
"#now using table C.3\n",
"h1=3445 # initial specific enthalpy @ 4000 kPa and 500 *C \n",
"h2=2666 # final specific enthalpy @ 80 kPa and 500 *C\n",
"WT=-mdot*(h2-h1) # maximum power from first law\n",
"print \" The power output is \",round(WT),\" kJ/s \\n \"\n",
"\n",
"V2=(A1*V1*rho1)/(A2*rho2) \n",
"V2=round(V2) # rounding of digits\n",
"delKE=mdot*((V2**2)-(V1**2))/2 # the change in kinetic energy\n",
"print \" The change in K.E is \",round(delKE),\" J/s\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The power output is 3540.0 kJ/s \n",
" \n",
" The change in K.E is -6250.0 J/s\n"
]
}
],
"prompt_number": 78
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.13:PG-85"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# initialization of variables\n",
"Wdot=10 # pump power in hp\n",
"g=9.81 # acceleration due to gravity\n",
"rho=1000 # density of water in kg/m^3\n",
"d1=0.06 # inlet dimeter in 'm'\n",
"d2=0.10 # oulet diamter in 'm'\n",
"V1=10 # velocity of water at inlet in m/s\n",
"\n",
"#solution\n",
"A1=math.pi*(d1**2)/4 # area of inlet\n",
"A2=math.pi*(d2**2)/4 # area of outlet\n",
"V2=A1*V1/A2 # oulet velocity from continuity equation\n",
"\n",
"mdot=rho*A1*V1 # mass flow rate\n",
"delP=((((Wdot*746)/mdot)-((V2**2)-V1**2)/(2*g))*rho)/1000 # change in pressure in kPa\n",
"print \"The rise in pressure is \",round(delP),\" kPa\"\n",
"# The answer is approximated in textbook , our answer is precise \n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The rise in pressure is 268.0 kPa\n"
]
}
],
"prompt_number": 80
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.14:PG-85"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"# initialization of variables\n",
"P1=7000.0 # inlet pressure in Pa\n",
"T1=420.0 # inlet temperature in degree celsius\n",
"V1=400.0 # inlet velocity in m/s\n",
"d1=0.200 # inlet diameter in 'm'\n",
"V2=700.0 # exit velocity in m/s\n",
"k=1.4 # polytopic index for air\n",
"Cp=1000 # specific heat at constant pressure for air in j/kg.K\n",
"R=287 # specific gas constant for air\n",
"\n",
"#solution\n",
"\n",
"#part (a)\n",
"T2=(((V1**2)-V2**2)/(2*Cp))+T1 # outlet temperature in degree celsius\n",
"print \" The exit temperature is \",round(T2),\" *C \\n\"\n",
"\n",
"#part (b)\n",
"\n",
"rho1=P1/(R*(T1+273)) # density at entrance\n",
"A1=(math.pi*d1**2)/4\n",
"mdot=rho1*A1*V1 # \n",
"print \" The mass flow rate is \",round(mdot,3),\" kg/s \\n\"\n",
"\n",
"# part (c)\n",
"\n",
"rho2=rho1*(((T2+273)/(T1+273))**(1/(k-1))) # density at exit\n",
"# now we find the exit diameter\n",
"d2=math.sqrt((rho1*V1*(d1)**2)/(rho2*V2))\n",
"print \" The outlet diameter is \",round(d2,3),\" m\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The exit temperature is 255.0 *C \n",
"\n",
" The mass flow rate is 0.442 kg/s \n",
"\n",
" The outlet diameter is 0.212 m\n"
]
}
],
"prompt_number": 87
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex4.15:PG-89"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# initialization of variables\n",
"mdots=100 # mass flow rate of sodium in kg/s\n",
"Ts1=450 # inlet temperature of sodium in degree celsius\n",
"Ts2=350 # exit temperature of sodium in degree celsius\n",
"Cp=1.25 # specific heat of sodium in KJ/kg.*C\n",
"Tw1=20 # inlet temperature of water in degree celsius\n",
"Pw=5000 # inlet pressure of water in kPa \n",
"\n",
"# solution\n",
"hw1=88.65 # enthalpy from table C.4\n",
"hw2=2794 # enthalpy from table C.3\n",
"mdotw=(mdots*Cp*(Ts1-Ts2))/(hw2-hw1) # mass flow rate of water\n",
"print \" The mass flow rate of water is \",round(mdotw,2),\" kg/s \\n\"\n",
"Qdot=mdotw*(hw2-hw1) # heat transfer in kW using energy equation\n",
"# result\n",
"print \" The rate of heat transfer is \",round(Qdot),\" kW\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The mass flow rate of water is 4.62 kg/s \n",
"\n",
" The rate of heat transfer is 12500.0 kW\n"
]
}
],
"prompt_number": 90
}
],
"metadata": {}
}
]
}
|