summaryrefslogtreecommitdiff
path: root/1709/CH12/EX12.9/12_9.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1709/CH12/EX12.9/12_9.sce
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 '1709/CH12/EX12.9/12_9.sce')
-rwxr-xr-x1709/CH12/EX12.9/12_9.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/1709/CH12/EX12.9/12_9.sce b/1709/CH12/EX12.9/12_9.sce
new file mode 100755
index 000000000..341624e9c
--- /dev/null
+++ b/1709/CH12/EX12.9/12_9.sce
@@ -0,0 +1,21 @@
+clc
+//Initialization of variables
+P1=14.7 //psia
+P4=14.7 //psia
+T1=530 //R
+T3=1960 //R
+P2=60 //psia
+P3=P2
+g=1.4
+eta1=0.85
+eta2=0.9
+//calculations
+T2=T1*(P2/P1)^((g-1)/g)
+T4=T3*(P4/P3)^((g-1)/g)
+T2d=(T2-T1)/eta1 + T1
+T4d=-eta2*(T3-T4) +T3
+Wact=0.24*(T3-T4d - (T2d-T1))
+Qh=0.24*(T3-T2d)
+etath=Wact/Qh
+//results
+printf("Thermal efficiency = %.1f percent",etath*100)