summaryrefslogtreecommitdiff
path: root/572/CH6/EX6.15/c6_15.sce
diff options
context:
space:
mode:
Diffstat (limited to '572/CH6/EX6.15/c6_15.sce')
-rwxr-xr-x572/CH6/EX6.15/c6_15.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/572/CH6/EX6.15/c6_15.sce b/572/CH6/EX6.15/c6_15.sce
new file mode 100755
index 000000000..2b61425d3
--- /dev/null
+++ b/572/CH6/EX6.15/c6_15.sce
@@ -0,0 +1,21 @@
+//(6.15) An air compressor operates at steady state with air entering at p1 = 1 bar, T1=  20C, and exiting at =p2  5 bar. Determine the work and heat transfer per unit of mass passing through the device, in kJ/kg, if the air undergoes a polytropic process with n = 1.3. Neglect changes in kinetic and potential energy between the inlet and the exit. Use the ideal gas model for air.
+
+//solution
+
+//variable initialization
+P1 = 1 //pressure of entering air in bar
+T1 = 293 //temperature of entering air in kelvin
+P2 = 5 //pressure of exit air in bar
+n = 1.3
+
+T2 = T1*((P2/P1)^((n-1)/n)) //in kelvin
+R = 8.314/28.97
+wcvdot=((n*R)/(n-1))*(T1-T2) //in kj/kg
+
+//from table A-22
+h1 = 293.17 //in kj/kg
+h2 = 426.35 // in kj/kg
+
+Qcvdot= wcvdot + (h2-h1) //in kj/kg
+printf('the work per unit mass passing through the device in kj/kg is: w = %f',wcvdot)
+printf('\nthe heat transfer per unit mass in Kj/kg is : q = %f ',Qcvdot) \ No newline at end of file