summaryrefslogtreecommitdiff
path: root/2090/CH4/EX4.1
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2090/CH4/EX4.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 '2090/CH4/EX4.1')
-rwxr-xr-x2090/CH4/EX4.1/Chapter4_Example1.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/2090/CH4/EX4.1/Chapter4_Example1.sce b/2090/CH4/EX4.1/Chapter4_Example1.sce
new file mode 100755
index 000000000..53b49c86b
--- /dev/null
+++ b/2090/CH4/EX4.1/Chapter4_Example1.sce
@@ -0,0 +1,12 @@
+clc
+clear
+//Input data
+r=8.5;//The compression ratio
+sv=1.4;//The specific heat at constant volume in percent
+
+//Calculations
+n=1-(1/r)^(sv-1);//The efficiency of the otto cycle
+ef=[((1-n)/n)*(sv-1)*(log(r))*(sv/100)]*100;//The percentage change in efficiency of an otto cycle and is negative
+
+//Output
+printf('The efficiency decreases by %3.3f percent ',ef)