summaryrefslogtreecommitdiff
path: root/3845/CH15/EX15.5/Ex15_5.sce
blob: 4c087b820073fe1cd784f5003302ed58ab2a3c3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//Example 15.5
Tc=-15;//Cold reservoir temperature (C)
Tc=Tc+273;//Cold reservoir temperature (K)
Th=45;//Hot reservoir temperature (C)
Th=Th+273;//Hot reservoir temperature (K)
Eff_C=1-Tc/Th;//Carnot efficiency
COP_hp=1/Eff_C;//Coefficient of performance of the heat pump
printf('Coefficient of performance for the heat pump = %0.2f',COP_hp)
printf('\nHeat transfer Q_h is %0.2f times the work input W',COP_hp)
//Since COP_hp=Q_h/W
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest