summaryrefslogtreecommitdiff
path: root/1922/CH4/EX4.3/4_3.sce
diff options
context:
space:
mode:
Diffstat (limited to '1922/CH4/EX4.3/4_3.sce')
-rwxr-xr-x1922/CH4/EX4.3/4_3.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/1922/CH4/EX4.3/4_3.sce b/1922/CH4/EX4.3/4_3.sce
new file mode 100755
index 000000000..cc9151fa2
--- /dev/null
+++ b/1922/CH4/EX4.3/4_3.sce
@@ -0,0 +1,15 @@
+
+clc
+clear
+//Initialization of variables
+ratio=1/2
+R=8.314
+p1=0.5 //kPa
+p2=0.1 //kPa
+//calculations
+ya=ratio/(1+ratio)
+ds=-ya*R*log(ya) - (1-ya)*R*log(1-ya)
+dss=R*log(p1/p2)
+//results
+printf("Entropy of mixing = %.3f kJ/kmol K",ds)
+printf("\n Total entropy change of the universe = %.2f kJ/kmol K",dss)