summaryrefslogtreecommitdiff
path: root/2870/CH5/EX5.7/Ex5_7.sce
diff options
context:
space:
mode:
Diffstat (limited to '2870/CH5/EX5.7/Ex5_7.sce')
-rwxr-xr-x2870/CH5/EX5.7/Ex5_7.sce32
1 files changed, 32 insertions, 0 deletions
diff --git a/2870/CH5/EX5.7/Ex5_7.sce b/2870/CH5/EX5.7/Ex5_7.sce
new file mode 100755
index 000000000..8d097c822
--- /dev/null
+++ b/2870/CH5/EX5.7/Ex5_7.sce
@@ -0,0 +1,32 @@
+clc;clear;
+//Example 5.7
+
+//given data
+P1=2;
+T1=400;
+V1=50;
+z1=10;
+P2=15;
+x2=0.9;
+V2=180;
+z2=6;
+Wout=5*1000;//in kJ
+
+//from Table A-6
+h1=3248.4;
+//similarly for P2
+hf=225.94;
+hfg=2372.3;
+
+//constants used
+g=9.8;//in m/s^2
+
+//calcualtions
+h2=hf+x2*hfg;
+disp((h2-h1),'difference in enthalpies in kJ/kg');
+disp((V2^2-V1^2)/2/1000,'difference in kinetic energy in kJ/kg');//factor of 1000 to convert to kJ/kg
+disp(g*(z2-z1)/1000,'difference in potential energy in kJ/kg');//factor of 1000 to convert to kJ/kg
+wout=-((h2-h1)+(V2^2-V1^2)/2/1000+g*(z2-z1)/1000);//factor of 1000 to convert to kJ/kg
+disp(wout,'work done per unit of mass in kJ/kg');
+m=Wout/wout;
+disp(m,'mass flow rate in kg/s')