summaryrefslogtreecommitdiff
path: root/2024/CH10/EX10.7/10_7.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2024/CH10/EX10.7/10_7.sce
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 '2024/CH10/EX10.7/10_7.sce')
-rwxr-xr-x2024/CH10/EX10.7/10_7.sce27
1 files changed, 27 insertions, 0 deletions
diff --git a/2024/CH10/EX10.7/10_7.sce b/2024/CH10/EX10.7/10_7.sce
new file mode 100755
index 000000000..591bc538e
--- /dev/null
+++ b/2024/CH10/EX10.7/10_7.sce
@@ -0,0 +1,27 @@
+clc
+//Initialization of variables
+m1=1 //lbm
+m2=0.94 //lbm
+M1=29
+M2=18
+p1=50 //psia
+p2=100 //psia
+t1=250 +460 //R
+R0=1.986
+cpa=6.96
+cpb=8.01
+//calculations
+xa = (m1/M1)/((m1/M1)+ m2/M2)
+xb=1-xa
+t2=t1*(p2/p1)^(R0/(xa*cpa+xb*cpb))
+d=R0/(xa*cpa+xb*cpb)
+k=1/(1-d)
+dsa=cpa*log(t2/t1) -R0*log(p2/p1)
+dSa=(m1/M1)*dsa
+dSw=-dSa
+dsw=dSw*M2/m2
+//results
+printf("Final remperature = %d R",t2)
+printf("\n Change in entropy of air = %.3f btu/mole R and %.5f Btu/R",dsa,dSa)
+printf("\n Change in entropy of water = %.4f btu/mole R and %.5f Btu/R",dsw,dSw)
+//The answers are a bit different due to rounding off error in textbook