summaryrefslogtreecommitdiff
path: root/3407/CH2/EX2.1
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /3407/CH2/EX2.1
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 '3407/CH2/EX2.1')
-rw-r--r--3407/CH2/EX2.1/Ex2_1.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/3407/CH2/EX2.1/Ex2_1.sce b/3407/CH2/EX2.1/Ex2_1.sce
new file mode 100644
index 000000000..13cf24b46
--- /dev/null
+++ b/3407/CH2/EX2.1/Ex2_1.sce
@@ -0,0 +1,20 @@
+clear all;
+clc;
+funcprot(0);
+
+//given data
+gamma = 1.4;
+pi = 8;//pressure ratio
+T01 = 300;//inlet temperature in K
+T02 = 586.4;//outlet temperature in K
+
+//Calculations
+//Calculation of Overall Total to Total efficiency
+Tot_eff = ((pi^((gamma-1)/gamma))-1)/((T02/T01)-1);
+
+//Calculation of polytropic efficiency
+Poly_eff = ((gamma-1)/gamma)*((log(pi))/log(T02/T01));
+
+//Results
+printf('The Overall total-to-total efficiency is %.2f.\n',Tot_eff);
+printf('The polytropic efficiency is %.4f.',Poly_eff);