summaryrefslogtreecommitdiff
path: root/2870/CH7/EX7.20/Ex7_20.sce
blob: 90c91b774560054d0d8b281fa19daa057e5061dc (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
25
26
27
28
29
clc;clear;
//Example 7.20

//given data
P=20;
T1=50+460;//in R
T2=240;
T3=130;
m1=300;
Qout=180;

//from steam tables
//at P and T1
h1=18.07;
s1=0.03609;
//at P and T2
h2=1162.3;
s2=1.7406;
//at P and T3
h3=97.99;
s3=0.18174;

//calculations
// Qout = m1*h1 + m2*h2 - (m1+m2)*h3
m2= (Qout-m1*h1+m1*h3)/(h2-h3);
m3=m1+m2;
// Sin - sout + Sgen = dSsystem/dt
Sgen=m3*s3-m1*s1-m2*s2+Qout/T1;
disp(Sgen,'the rate of entropy generation in Btu/min R')