summaryrefslogtreecommitdiff
path: root/2063/CH1/EX1.4/1_4.sce
blob: fc7fa8be058446e3aa92a54456374ea1f3729e61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clc
clear
//Input data
D=0.1;//Diameter of the cylinder in m
L=0.15;//Stroke length in m
Vc=0.295*10^-3;//Clearance volume in m^3
r=1.4;//Isentropic constant of air

//Calculations
Vs=(3.14/4)*(D^2*L);//Swept volume in m^3
r1=(Vc+Vs)/Vc;//Compression ratio
n=(1-(1/r1)^(r-1))*100;//Otto cycle efficiency in percentage

//Output
printf('The air standard efficiency of air is %3.2f percent',n)