summaryrefslogtreecommitdiff
path: root/2837/CH13/EX13.3
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2837/CH13/EX13.3
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2837/CH13/EX13.3')
-rwxr-xr-x2837/CH13/EX13.3/Ex13_3.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/2837/CH13/EX13.3/Ex13_3.sce b/2837/CH13/EX13.3/Ex13_3.sce
new file mode 100755
index 000000000..50ae6f893
--- /dev/null
+++ b/2837/CH13/EX13.3/Ex13_3.sce
@@ -0,0 +1,24 @@
+clc
+clear
+//Initialization of variables
+p1=50 //psia
+t1=100+460 //R
+R1=48.3
+R2=55.2
+v1=4 //cu ft
+p2=100 //psia
+v2=3 //cu ft
+t2=200+460 //R
+cv1=0.157
+cv2=0.177
+cpm=0.219
+J=778
+//calculations
+m1=144*p1*v1/(R1*t1)
+m2=144*p2*v2/(R2*t2)
+tf=(m1*cv1*(t1-460) + m2*cv2*(t2-460))/(m1*cv1+m2*cv2)
+Po2=v1/(v1+v2) *(tf+460)/t1 *p1
+ds=cpm*log((tf+460)/t1) - R1/J *log(Po2/p1)
+dss=ds*m1
+//results
+printf("Change in entropy = %.4f unit",dss)