summaryrefslogtreecommitdiff
path: root/2063/CH1/EX1.22/1_22.sce
blob: db9455ed31b8cc73526c557691d674dba76bdae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clc
clear
//Input data
r=12;//Compression ratio of an oil engine, working on the combustion cycle
r1=1.4;//Isentropic ratio
P1=1;//Pressure at the 
P3=35;//Pressure at the end of constant volume heat addition in bar

//Calculations
rho=1+(1/10)*(r-1);//Cut off ratio at 1/10th of the stroke
P2=P1*(r)^r1;//Pressure at the end of isentropic compression in bar
a=P3/P2;//Pressure ratio
n=(1-(1/r^(r1-1))*(a*rho^r1-1)/((a-1)+(r1*a*(rho-1))))*100;//Air standard efficiency in percent

//Output
printf('The air standard efficiency of an oil engine working on the combustion cycle is %3.2f percent',n)