Air standard Cycle
An Otto cycle is an idealized thermodynamic cycle that describes the functioning of a typical spark ignition piston engine. It is the thermodynamic cycle most commonly found in automobile engines.
Assumptions:
1. Sp. Heat Ratio (γ) = 1.4
2. Temp. after compression = 2500K
3. `P_1`= 101325 Pa
4. `T_1`= 400K
5. Bore Diameter = 0.2m
6. Stroke = 0.2m
7. Compression Ratio (CR) = 12
8. Connecting rod length = 0.23m
Thermal efficiency
`eta_(thermal) = 1-1/(CR^( gamma -1))`
we have to calculate values of pressure and temperature at different stages of the cycle i.e. 1 to 4 using governing equations of different types of processes being used then we have to Plot the graphs mentioned in the objectives and find the thermal efficiency.
so the Matlab code is
clear all
close all
clc
%Assumptions as inputs
gamma = 1.4;
t3 = 2500;
%state variables at 1
p1 = 101325;
t1 = 400;
%engine geometric parameters
bore = 0.2;
stroke = 0.2;
con_rod = 0.23;
cr = 12;
%Calculation of swept and clearance volune
v_swept = (pi/4)*bore^2*stroke;
v_clearance = v_swept/(cr-1);
v1 = v_swept + v_clearance;
v2 = v_clearance;
%state variables at pt 2
%p2v2^gamma = p1v1^gamma
p2=p1*cr^gamma;
%p1v1/t1 = p2v2/t2
t2 = p2*v2*t1/(p1*v1);
constant_c = p1*v1^gamma;
v_comp = otto_2_piston(bore,stroke,con_rod,cr,180,0);
p_comp = constant_c./(v_comp.^gamma);
%state point 3
v3 = v2;
%p3v3/t3 = p2v2/t2
p3 = p2*t3/t2;
constant_c = p3*v3^gamma;
v_exp = otto_2_piston(bore,stroke,con_rod,cr,0,180);
p_exp = constant_c./(v_exp.^gamma);
%state point 4
v4=v1;
%p3v3^gamma = p4v4^gamma
p4 = p3*(v3/v4)^gamma;
%thermal efficiency
ther_eff = 1-(1/(cr^(gamma-1)));
finaleff = ther_eff*100+"%"
figure(1)
hold on
grid on
plot(v1,p1,'*','color','r')
plot(v_comp,p_comp)
plot(v2,p2,'*','color','r')
plot(v3,p3,'*','color','r')
plot(v_exp,p_exp)
plot(v4,p4,'*','color','r')
plot([v2,v3],[p2,p3],'color','b')
plot([v4,v1],[p4,p1],'color','b')
Coding for the function is
%Creating a function named otto_2_piston whose output is v and input
%parameters are bore diameter, stroke length, length of connecting rod,
%compression ratio, staarting and ending crank angle.
function [v] = otto_2_piston(bore,stroke,con_rod,cr,start_crank,end_crank)
%geometric dimensioning
a = stroke/2;
R = con_rod/a;
%Swept and clearance volume
v_s = (pi/4)*bore^2*stroke;
v_c = v_s/(cr-1);
%specifying an array of angles for crank angle theta
theta = linspace(start_crank,end_crank,100);
%for finding the volume in terms of clearance volume, compression ratio and
%geometric dimensions
term1 = 0.5*(cr-1);
term2 = R+1-cosd(theta);
term3 = (R^2-sind(theta).^2).^0.5;
v = (1+term1*(term2-term3)).*v_c;
end
Output:-
Observed the plot of each of the processes i.e isentropic, isochoric happening in the cycle between different state points
finaleff =
"62.9893%"
So the thermal efficiency = 62.9893%