summaryrefslogtreecommitdiff
path: root/555/CH4/EX4.2/2.sce
diff options
context:
space:
mode:
Diffstat (limited to '555/CH4/EX4.2/2.sce')
-rw-r--r--555/CH4/EX4.2/2.sce26
1 files changed, 26 insertions, 0 deletions
diff --git a/555/CH4/EX4.2/2.sce b/555/CH4/EX4.2/2.sce
new file mode 100644
index 000000000..6208ed766
--- /dev/null
+++ b/555/CH4/EX4.2/2.sce
@@ -0,0 +1,26 @@
+// Implementation of example 4.2
+// Basic and Applied Thermodynamics by P.K.Nag
+// page 73
+
+clc
+clear
+
+Qacb=84 // (heat flow into system along path acb in kJ)
+Wacb=32 // (work done by system along path acb in kJ)
+Wadb=10.5 // (work done by system along path adb in kJ)
+Wab=21 // (work done on system along curved path b to a in kJ)
+Ua=0 // (internal energy at a in kJ)
+Ud=42 // (internal energy at d in kJ)
+Wdb=0 // (since it is following an isochoric path)
+
+Uab=Qacb-Wacb;
+Qadb=Uab+Wadb;
+Qab=(Uab+Wab);
+Wad=Wadb-Wdb;
+Qad=(Ud-Ua)+Wad;
+Qdb=Qadb-Qad;
+printf("Heat flow into the system along path adb = %.2f kJ \n",Qadb);
+printf("The system liberates %.2f kJ of heat \n",Qab);
+printf("heat absorbed along path ad = %.2f kJ \n",Qad);
+printf("heat absorbed along path db = %.2f kJ \n",Qdb);
+// end \ No newline at end of file