summaryrefslogtreecommitdiff
path: root/1460/CH7/EX7.5/7_5.sce
blob: fdd94ff078d642ad7cc850d32cc5e390a27428fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
clc
//initialization of variables
v=12.8 //ft^3
T=80+460 //R
P=14 //lb/in^2
Pf=500 //lb/in^2
//calculations
Q=-53.3*T*log(Pf/P) /778
W=778*Q
v2=53.3*T/(144*Pf)
w=v/v2
Qdot=w*Q
Wdot=w*W
ds=Q/T
dsbar=ds*w
//results
printf("Work required = %d ft-lb",Wdot)
printf("\n Heat transfer = %d B",Qdot)
printf("\n Change in entropy = %.3f B/lbm ",dsbar)
//The answer given for Qdot is a printing error in textbook and the values are a bit different due to rounding off error
printf("\n Change in internal energy is 0 cause this is a constant temperature process")