diff options
Diffstat (limited to '2705/CH5/EX5.21/Ex5_21.sce')
-rwxr-xr-x | 2705/CH5/EX5.21/Ex5_21.sce | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/2705/CH5/EX5.21/Ex5_21.sce b/2705/CH5/EX5.21/Ex5_21.sce new file mode 100755 index 000000000..a5cdcb432 --- /dev/null +++ b/2705/CH5/EX5.21/Ex5_21.sce @@ -0,0 +1,43 @@ +clear;
+clc;
+disp('Example 5.21');
+
+// aim : To determine the
+// (a) work transferred during the compression
+// (b) change in internal energy
+// (c) heat transferred during the compression
+
+// Given values
+V1 = .1;// initial volume, [m^3]
+P1 = 120;// initial pressure, [kN/m^2]
+P2 = 1200; // final pressure, [kN/m^2]
+T1 = 273+25;// initial temperature, [K]
+cv = .72;// [kJ/kg*K]
+R = .285;// [kJ/kg*K]
+
+// solution
+
+// (a)
+// given process is polytropic with
+n = 1.2; // polytropic index
+// hence
+V2 = V1*(P1/P2)^(1/n);// [m^3]
+W = (P1*V1-P2*V2)/(n-1);// workdone formula, [kJ]
+mprintf('\n (a) The work transferred during the compression is = %f kJ\n',W);
+
+// (b)
+// now mass is constant so,
+T2 = P2*V2*T1/(P1*V1);// [K]
+// using, P*V=m*R*T
+m = P1*V1/(R*T1);// [kg]
+
+// change in internal energy is
+del_U = m*cv*(T2-T1);// [kJ]
+mprintf('\n (b) The change in internal energy is = %f kJ\n',del_U);
+
+// (c)
+Q = del_U+W;// [kJ]
+mprintf('\n (c) The heat transferred during the compression is = %f kJ\n',Q);
+
+// End
+
|