summaryrefslogtreecommitdiff
path: root/2168/CH3/EX3.1/Chapter3_example1.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2168/CH3/EX3.1/Chapter3_example1.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 '2168/CH3/EX3.1/Chapter3_example1.sce')
-rwxr-xr-x2168/CH3/EX3.1/Chapter3_example1.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/2168/CH3/EX3.1/Chapter3_example1.sce b/2168/CH3/EX3.1/Chapter3_example1.sce
new file mode 100755
index 000000000..9b7e95257
--- /dev/null
+++ b/2168/CH3/EX3.1/Chapter3_example1.sce
@@ -0,0 +1,12 @@
+clc
+clear
+//Input data
+p=[1,8]//Pressure at the beginning and end of compression in kg/m^3
+g=1.4//Ratio of specific heats
+
+//Calculations
+r=(p(2)/p(1))^(1/g)//Compression ratio
+n=(1-(1/r)^(g-1))*100//Air standard efficiency in percent
+
+//Output
+printf('Air standard efficiency of an engine working on the Otto cycle is %3.1f percent',n)