diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2510/CH21/EX21.1 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2510/CH21/EX21.1')
-rwxr-xr-x | 2510/CH21/EX21.1/Ex21_1.sce | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/2510/CH21/EX21.1/Ex21_1.sce b/2510/CH21/EX21.1/Ex21_1.sce new file mode 100755 index 000000000..d8d30f789 --- /dev/null +++ b/2510/CH21/EX21.1/Ex21_1.sce @@ -0,0 +1,22 @@ +//Variable declaration: +m = 1 //Mass flowrate (lb) +cP = 1 //Heat capacity (Btu/lb. F) +//From figure 21.3: +T1 = 300 //Temperature of hot fluid leaving exchanger ( F) +T2 = 540 //Temperature of hot fluid entering exchanger ( F) +T3 = 60 //Temperature of cold fluid leaving exchanger ( F) +T4 = 300 //Temperature of cold fluid entering exchanger ( F) + +//Calculation: +DSh = m*cP*log((T1+460)/(T2+460)) //Entropy for hot fluid (Btu/ F) +DSc = m*cP*log((T4+460)/(T3+460)) //Entropy for cold fluid (Btu/ F) +DSa = DSh+DSc //Entropy for one exchanger (Btu/ F) +DSt = DSa*2 //Total entropy change (Btu/ F) + +//Result: +printf("The entropy chage is : %.4f Btu/ F .",DSt) +if (DSt>0) then + printf("There is a positive entropy change.") +else + printf("There is a negative entropy change.") +end |