summaryrefslogtreecommitdiff
path: root/2090/CH4/EX4.2/Chapter4_Example2.sce
diff options
context:
space:
mode:
Diffstat (limited to '2090/CH4/EX4.2/Chapter4_Example2.sce')
-rwxr-xr-x2090/CH4/EX4.2/Chapter4_Example2.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/2090/CH4/EX4.2/Chapter4_Example2.sce b/2090/CH4/EX4.2/Chapter4_Example2.sce
new file mode 100755
index 000000000..4da6abaf4
--- /dev/null
+++ b/2090/CH4/EX4.2/Chapter4_Example2.sce
@@ -0,0 +1,19 @@
+clc
+clear
+//Input data
+r=18;//The compression ratio
+l=6;//The cut off taking place corresponding of the stroke in percent
+sc=2;//The specific heat at constant volume increases in percent
+cv=0.717;//The specific heat at constant volume in kJ/kgK
+R=0.287;//Gas constant in kJ/kgK
+
+//Calculations
+Vs=(r-1);//The ratio of swept volume and volume 2
+B=((l/100)*Vs)+1;//The cut off ratio
+cp=cv+R;//The specific heat at constant pressure in kJ/kgK
+R1=cp/cv;//The ratio of specific heats
+n=1-[[[[(1/r)^(R1-1)]*(B^R1-1)]/(R1*(B-1))]];//The efficiency of the diesel cycle
+dn=[((1-n)/n)*[(R1-1)*((log(r))-(((B^R1)*log(B))/(B^R1-1))+(1/B))]*(sc/100)]*100;//The efficiency decrease in percent
+
+//Output
+printf('The efficiency decreases by %3.3f percent ',dn)