summaryrefslogtreecommitdiff
path: root/2657/CH3/EX3.1/Ex3_1.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2657/CH3/EX3.1/Ex3_1.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 '2657/CH3/EX3.1/Ex3_1.sce')
-rwxr-xr-x2657/CH3/EX3.1/Ex3_1.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/2657/CH3/EX3.1/Ex3_1.sce b/2657/CH3/EX3.1/Ex3_1.sce
new file mode 100755
index 000000000..7613d8f65
--- /dev/null
+++ b/2657/CH3/EX3.1/Ex3_1.sce
@@ -0,0 +1,21 @@
+//Effect of variable specific heat on efficiency
+clc,clear
+//Given:
+r=7 //Compression ratio
+g=1.4 //Specific heat ratio(gamma)
+cv=0.718 //(Assume)Specific heat at constant volume in kJ/kgK
+dcv=1*cv/100 //Change in specific heat in kJ/kgK
+//Solution:
+R=cv*(g-1) //Specific gas constant in kJ/kgK
+eta=round(100*(1-1/r^(g-1)))/100 //Efficiency when there is no change in specific heat
+function [eta]=Otto(cv) //Defining efficiency as a function of specific heat
+ eta=1-1/r^(R/cv)
+endfunction
+funcprot(0)
+detaBydcv=derivative(Otto,cv) //Derivative of efficiency wrt to specific heat at initial value of specific heat
+detaByeta=detaBydcv*dcv/eta //Change in efficiency wrt to initial value of efficiency
+//Results:
+printf("\n The percentage change in the efficiency of Otto cycle = %.3f percent",detaByeta*100)
+if (detaByeta < 0) then
+ disp("decrease")
+end