blob: 7767c13d59f10f98aac6a83c2da0d016d75ccab9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
clc
clear
//Initialization of variables
T1=100 //F
P2=1000 //psia
x=0.6
J=778.16
//calculations
disp("From table 3,")
v=0.01613 //ft^3/lbm
P1=0.9 //psia
wrev=-v*(P2-P1)*144/J
dv=0.000051 //ft^3/lbm
wcomp=(P2+P1)/2 *dv*144/J
wact=wrev/x
//results
printf("Work done = %.1f Btu/lbm",wrev)
printf("\n In case 2, work required = %.1f Btu/lbm",wact)
|