From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2705/CH5/EX5.21/Ex5_21.sce | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 2705/CH5/EX5.21/Ex5_21.sce (limited to '2705/CH5/EX5.21/Ex5_21.sce') 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 + -- cgit