summaryrefslogtreecommitdiff
path: root/1226/CH4/EX4.2/EX4_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '1226/CH4/EX4.2/EX4_2.sce')
-rwxr-xr-x1226/CH4/EX4.2/EX4_2.sce10
1 files changed, 10 insertions, 0 deletions
diff --git a/1226/CH4/EX4.2/EX4_2.sce b/1226/CH4/EX4.2/EX4_2.sce
new file mode 100755
index 000000000..73354bece
--- /dev/null
+++ b/1226/CH4/EX4.2/EX4_2.sce
@@ -0,0 +1,10 @@
+clc;funcprot(0);//EXAMPLE 4.2
+// Initialisation of Variables
+r=8;..........................//Compression Ratio
+ga=1.4;.......................//Degree of freedom for the gas
+Cvinc=1.1;....................//Increase of specific heat at constant volume in percentage
+//Calculations
+eta=1-1/(r^(ga-1));...........//efficiency of otto cycle
+deta=(1-eta)*(ga-1)*log(r)*(Cvinc/100);............//Change in efficiency
+etach=-deta/eta;............................//Percentage change in efficiency of change in efficiency
+disp(etach*100,"The percentage change in the efficiency of otto cycle (in %):")