summaryrefslogtreecommitdiff
path: root/2837/CH20/EX20.2/Ex20_2.sce
blob: f3ab250ceca8a8cedd3095eaaf6af901b1362e17 (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
clc
clear
//Initalization of variables
s2=1.5263
sfg=1.8456
sf=1.9782 
h2=1201.1 //Btu/lb
hf=1106 //Btu/lb
hfg=1036.3 //Btu/lb
v=0.01616 //m^3/kg
p2=250 //psia
p1=1//psia
J=778
//calculations
x3=1+ (s2-sf)/sfg
h3=hf-(1-x3)*hfg
h4=69.7
Wp=v*144*(p2-p1)/J
h1=h4+Wp
etat=((h2-h3)-Wp)/(h2-h1) *100
eta2=(h2-h3)/(h2-h4)*100
//results
printf("\n In case 1, Efficieny = %.2f percent",etat)
printf("\n In case 2, Efficieny = %.2f percent",eta2)