summaryrefslogtreecommitdiff
path: root/1919/CH5/EX5.8/Ex5_8.sce
blob: 8dba53a38e04bc5b6afd609f21c9754bd95bde7b (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

// Theory and Problems of Thermodynamics
// Chapter 5
// Second law of Thermodynamics
// Example 8

clear ;clc;

//Given data
Q = 100 // rate of energy losses as heat from roof and walls of auditorium in kW per degree celsius
TD = 298.15     // desired temperature to be maintained in K
TW = 273.15     // outside temperature during winter in K
TS = 314.15     // outside temperature during summer in K

// Winter: Device is used as heat pump
TL = TW         // outside temperature
TH = TD         // Desired temperature
QH = Q*(TH-TL)   // total heat loss to surroundings
// COP_HP = QH/W = TH/(TH-TL)
W = QH * (TH-TL)/TH // Power required in kW
mprintf('The power required to operate the device in winter = %5.2f kW', W)

// Summer: Device is used as refrigerator
TL = TD         // Desired temperature
TH = TS         // Outside temperature
QL = Q*(TH-TL)   // Total heat loss to surroundings
// COP_HP = QH/W = TL/(TH-TL)
W = QL * (TH-TL)/TL // Power required in kW
mprintf('\n The power required to operate the device in summer = %5.2f kW', W)