summaryrefslogtreecommitdiff
path: root/2705/CH5/EX5.12
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2705/CH5/EX5.12
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2705/CH5/EX5.12')
-rwxr-xr-x2705/CH5/EX5.12/Ex5_12.sce57
1 files changed, 57 insertions, 0 deletions
diff --git a/2705/CH5/EX5.12/Ex5_12.sce b/2705/CH5/EX5.12/Ex5_12.sce
new file mode 100755
index 000000000..e522db8a2
--- /dev/null
+++ b/2705/CH5/EX5.12/Ex5_12.sce
@@ -0,0 +1,57 @@
+clear;
+clc;
+disp('Example 5.12');
+
+// aim : T0 determine
+// (a) change in internal nergy of the air
+// (b) work done
+// (c) heat transfer
+
+// Given values
+m = .25;// mass, [kg]
+P1 = 140;// initial pressure, [kN/m^2]
+V1 = .15;// initial volume, [m^3]
+P2 = 1400;// final volume, [m^3]
+cp = 1.005;// [kJ/kg K]
+cv = .718;// [kJ/kg K]
+
+// solution
+
+// (a)
+// assuming ideal gas
+R = cp-cv;// [kJ/kg K]
+// also, P1*V1=m*R*T1,hence
+T1 = P1*V1/(m*R);// [K]
+
+// given that process is polytropic with
+n = 1.25; // polytropic index
+T2 = T1*(P2/P1)^((n-1)/n);// [K]
+
+// Hence, change in internal energy is,
+del_U = m*cv*(T2-T1);// [kJ]
+mprintf('\n (a) The change in internal energy of the air is del_U = %f kJ',del_U);
+if(del_U>0)
+ disp('since del_U>0, so it is gain of internal energy to the air')
+else
+ disp('since del_U<0, so it is gain of internal energy to the surrounding')
+end
+
+// (b)
+W = m*R*(T1-T2)/(n-1);// formula of work done for polytropic process,[kJ]
+mprintf('\n (b) The work done is W = %f kJ',W);
+if(W>0)
+ disp('since W>0, so the work is done by the air')
+else
+ disp('since W<0, so the work is done on the air')
+end
+
+// (c)
+Q = del_U+W;// using 1st law of thermodynamics,[kJ]
+mprintf('\n (c) The heat transfer is Q = %f kJ',Q);
+if(Q>0)
+ disp('since Q>0, so the heat is received by the air')
+else
+ disp('since Q<0, so the heat is rejected by the air')
+end
+
+// End