Simulating Otto Air Standard Cycle
Otto cycle- The air standard Otto cycle analysis was developed to model the thermal efficiency of a spark ignition (SI) engine, which was originally envisioned as an engine in which thermal energy was added at constant volume by combustion of the working fluid. Typical P-V diagram for SI engine are shown in figure 1.
Fig.1 Typical P-V diagram for a SI engine
In order to develop a closed form solution for the indicated thermal efficiency, assumptions must be made to simplify the cycle. These assumptions are:
- Air is assumed to be the sole working fluid
- The specific heats of air are assumed to be constant
- The intake and exhaust stroke are neglected
- The four-process remaining in the cycle are idealized
- The compression process is assumed to be reversible and adiabatic (isentropic)
- Neglect the effects of spark timing, the finite duration of combustion, and the relatively large heat losses
- Expansion process is assumed to be reversible and adiabatic (isentropic)
- The exhaust blowdown process is replaced by an equivalent external heat rejection.
For a piston engine, the volume varies with crack angle, theta, via the relationship:
Equation 1. Volume depending of crank angle
Equation 2 is the air standard Otto cycle model for the indicated thermal efficiency for a SI. It indicates that the compression ratio dominates the indicated thermal efficiency.
Eq. 2 Thermodynamic efficiency of a SI
The first step to produce a P-V diagram is to calculate the volume at a specific cranck angle. the following function calculates the volume given a specific bore, stroke ,connecting lenght, compression ratio, start angle crank, and end angle crank.
function [v] = otto_kinematics (bore, stroke ,connecting_rod, compression_ratio,start_crank, end_crank)
%% Engine Geometry
cranck_radius= stroke/2; %crank radius
R= connecting_rod/cranck_radius;
v_swept= (pi/4)*bore^2*stroke; % volume that piston displace
v_clearance= v_swept/(compression_ratio-1); % volume when piston at TDC
%%
theta= linspace(start_crank,end_crank,100);
term1= 0.5*(compression_ratio-1);
term2= R+1-cosd(theta);
term3= ( R*R - sind(theta).^2 ).^0.5;
v= (1+ term1.*(term2-term3) ).* v_clearance;
end
The following code calls the function to obtain the volume at a specific crank angle. We only use this function when the volume changes in expansion and compression process. We use the angle 180 to 0 when is compression and for expansion 0 to 180. From the assumption, we conclude that p1v1^gamma=p2v2^gamma. From this equation, we can plot the expansion and compression part for the P-V diagram. Also, for the constant volume 2-3 and 4-1 point on the P-V is it just a straight line given the assumptions.
clear all
close all
clc
%% inputs
gamma= 1.4;
T_3= 2300; %kelvin
%% State variables
P_1= 101325 ; % atmospheric pressure in pascal
T_1= 500; % kelvin
%% Engine Geometry
bore= 0.1;
stroke= 0.1;
connecting_rod= 0.15;
compression_ratio= 12;
%% Swept volume
v_swept= (pi/4)*bore^2*stroke; % volume that piston displace
v_clearance= v_swept/(compression_ratio-1); % volume when piston at TDC
v_1= v_swept+v_clearance; % volume when piston at BDC
v_2= v_clearance ; % volume when piston at TDC
%% state variables at state 2
% (p2*v2)^gamma=(p1*v1)^gamma
P_2 = P_1*compression_ratio^gamma;
% p1*v1/t1= p2*v2/t2
T_2= (P_2*v_2*T_1)/(P_1*v_1);
constant_c= P_1*v_1^gamma;
v_comp= otto_kinematics (bore, stroke ,connecting_rod, compression_ratio,180, 0);
P_comp= constant_c./v_comp.^gamma;
%% state variables at state 3
v_3=v_2;
P_3= P_2*T_3/T_2;
constant_c= P_3*v_3^gamma;
v_exp= otto_kinematics (bore, stroke ,connecting_rod, compression_ratio,0, 180);
P_exp= constant_c./v_exp.^gamma;
%% state variables at state 4
v_4=v_1;
% p3v3^gama=p2v3^gamma
P_4= P_3 *(v_3/v_4)^gamma;
%% plot
figure (1)
hold on
plot ( v_1 ,P_1, '*' , 'color', 'red')
plot (v_comp , P_comp)
plot ( v_2 ,P_2, '*' , 'color', 'red')
plot ( v_3 ,P_3, '*' , 'color', 'red')
plot (v_exp , P_exp)
plot ( v_4 ,P_4, '*' , 'color', 'red')
plot([v_2 v_3], [P_2 P_3],'color', 'red')
plot([v_4 v_1], [P_4 P_1],'color', 'red')
title('P-V Diagram')
xlabel(' Volume ')
ylabel('Pressure ')
%% Thermal Efficiency
N_th= 1 - (1)/(compression_ratio^(gamma-1))
P-V Diagram