summaryrefslogtreecommitdiff
path: root/1709/CH12/EX12.3/12_3.sce
diff options
context:
space:
mode:
Diffstat (limited to '1709/CH12/EX12.3/12_3.sce')
-rwxr-xr-x1709/CH12/EX12.3/12_3.sce26
1 files changed, 26 insertions, 0 deletions
diff --git a/1709/CH12/EX12.3/12_3.sce b/1709/CH12/EX12.3/12_3.sce
new file mode 100755
index 000000000..c08607c7e
--- /dev/null
+++ b/1709/CH12/EX12.3/12_3.sce
@@ -0,0 +1,26 @@
+clc
+//Initialization of variables
+P=100 //psia
+//calculations
+disp("From mollier diagram,")
+h1=1357 //500 psia, 700F
+h2=1194 //100 psia
+h3=935//2 psia
+h4=93.99 //sat liq at 2 psia
+vf=0.01613
+vf2=0.01774
+P5=100 //psia
+P4=2 //psia
+dh4=vf*(P5-P4)*144/778
+h5=h4+dh4
+h6=298.4
+P7=500 //psia
+P6=100 //psia
+dh6=vf2*(P7-P6)*144/778
+h7=dh6+h6
+m=(h6-h5)/(h2-h5)
+W=h1-h2 + (1-m)*(h2-h3) - (1-m)*(h5-h4) -(h7-h6)
+Q=h1-h7
+etath=W/Q
+//results
+printf("Thermal efficiency = %.1f percent",etath*100)