summaryrefslogtreecommitdiff
path: root/2735/CH15/EX15.2/Ex15_2.sce
blob: 89d1fdd8240a14fc0d9028375e880bae1a87b5bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
clc
clear
//Initialization of variables
dhab=-123.1
etac=0.5
ha=348.5
etaf=0.75
eta=0.85
hf=471.6
hfg=731.6
hc=1203.2
dhcd=452.7
//calculations
dwabs=dhab/etac
hbd=ha-dwabs
dwcds=dhcd*eta
dqa=hc-hbd
etat=(dwcds+dwabs)/dqa
eta=etat*etaf
//results
printf("Thermal efficiency = %.1f percent",etat*100)
printf("\n Overall efficiency = %.1f percent",eta*100)