blob: df3412d9628821880243d68d6a2004bf5f68d9ac (
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=-1.78
etac=0.5
ha=28.06
eta=0.85
hf=471.6
hfg=731.6
hd=1203.2
dhcd=452.7
//calculations
dwabs=dhab/etac
hbd=ha-dwabs
dwcds=dhcd*eta
dqa=hd-hbd
etat=(dwcds+dwabs)/dqa
eta=etat*eta
//results
printf("Thermal efficiency = %.1f percent",etat*100)
printf("\n Overall efficiency = %.1f percent",eta*100)
|