summaryrefslogtreecommitdiff
path: root/779/CH10/EX10.6/10_6.sce
diff options
context:
space:
mode:
Diffstat (limited to '779/CH10/EX10.6/10_6.sce')
-rwxr-xr-x779/CH10/EX10.6/10_6.sce30
1 files changed, 30 insertions, 0 deletions
diff --git a/779/CH10/EX10.6/10_6.sce b/779/CH10/EX10.6/10_6.sce
new file mode 100755
index 000000000..41f412451
--- /dev/null
+++ b/779/CH10/EX10.6/10_6.sce
@@ -0,0 +1,30 @@
+P0 = 1000;
+T0 = 3;
+V0 = 0.001;
+R = 287;
+n = (P0*V0)/(R*T0); // Number of moles
+// Process ab
+Wab = 0;
+cv = (3/2)*R;
+Ta = T0; Tb = 300;
+Qab = n*cv*(Tb-Ta);
+Ua = 0; // Given internal energy
+Ub = Qab+Ua;
+Uab = Ub-Ua;
+// Process bc
+Qbc = 0; Uc = 0; Ubc = Uc-Ub;
+Wbc = -Ubc;
+// Process ca
+Tc = Ta;
+g = 5/3; // gamma
+Vcb = (Tb/Tc)^(3/2); // Vc/Vb
+Wca = -n*R*Tc*log(Vcb);
+Qca = Wca ;
+Uca = 0;
+//
+disp("J",Wab+Wbc+Wca,"Work done in the cycle is")
+disp("J",Uab+Ubc+Uca,"Internal energy change in the cycle is")
+disp("J",Qab+Qbc+Qca,"Heat transfer in the cycle is")
+// Part (b)
+e = (Qab+Qca)/Qab;
+disp("%",e*100,"Thermal efficiency of the system is")