Project

Air Standard Cycle: p-v diagram and thermal efficiency

1. AIM: To write a program to calculate and plot Air Standard Otto Cycle showing all the process using MATLAB.

2. GOVERNING EQUATIONS:

3. OBJECTIVES OF THE PROJECT:

  1. Calculate all the process parameters for the cycle 1-2-3-4
  2. Simulate the Isentropic compression and expansion processes.
  3. Demonstrate the use of function by creating one and effectively implementing in the calculation of isentropic processes.
  4. Calculate thermal efficiency

4. BODY OF THE CONTENT:

clc
clear
close
% constant
gamma = 1.4;
 
%state variables
 
p1 = 101325;
t1 = 500;
t3 = 2000;
 
% Engine geometric parameters
bore = 0.1;
stroke = 0.1;
con_rod = 0.15;
cr = 12;
 
% calculating the swept volume and the clearance volume
v_swept = (pi/4)*bore^2*stroke;
v_clearance = v_swept/(cr-1);
 
v1 = v_swept + v_clearance;
v2 = v_clearance;
 
% state variables at state point 2
% p2v2^gamma = p1v1^gamma
% p2 = p1*(v1/v2)^gamma => p1*cr^gamma
p2 = p1*cr^gamma;
 
% p1v1/t1 = p2v2/t2
% t2 = p2*v2*t1*/(p1*v1)
t2 = p2*v2*t1/(p1*v1);
 
constant_c = p1*v1^gamma;
V_compression = engine_kinematics(bore, stroke, con_rod, cr, 180,0);
P_compression =  constant_c./V_compression.^gamma;
 
% variables at state point 3
v3 = v2;
 
% p3v3/t3 = p2v2/t2 => p3 = p2*t3/t2
 
p3 = p2*t3/t2;
 
 
constant_d = p3*v3^gamma;
V_expansion = engine_kinematics(bore, stroke, con_rod, cr, 0,180);
P_expansion =  constant_d./V_expansion.^gamma;
 
 
% variables at state point 4
v4 = v1;
 
% p3v3^gamma = p4v4^gamma => p4 = p3(v3/v4)^gamma
p4 = p3*(v3/v4)^gamma;
 
thermal_eff = 1 - (v2/v1)^(gamma-1); 
disp('Thermal Efficiency =')
disp (thermal_eff)
 
figure(1)
hold on
grid on
plot(v1,p1,'y')
text(v1,p1,'1')
plot(V_compression, P_compression,'r')
text(0.0001807,895400,'\leftarrow pv^\gamma (Isentropic Compression)')
plot(v2,p2,'y')
text(v2,p2,'2')
plot(v3,p3,'y')
text(v3,p3,'3')
plot(V_expansion, P_expansion,'g')
text(0.0001289,2128000,'\leftarrow pv^\gamma (Isentropic Expansion)')
plot(v4,p4,'y')
text(v4,p4,'4')
plot([v2 v3], [p2 p3], 'b')
plot([v1 v4], [p1 p4], 'b')
title ('Air Standard Otto Cycle')
xlabel ('Volume')
ylabel ('Pressure')

Function:

function [V] = engine_kinematics(bore, stroke, con_rod, cr, start_crank, end_crank)
 
  
a = stroke/2;
R = con_rod/a;
 
v_s = pi/4*bore^2*stroke;
 
v_c = v_s/(cr-1);
 
theta = linspace(start_crank, end_crank,100);
 
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
  1. Start the project by declaring the state variables (p1, T1, V1) at the end of the suction stroke.
  2. Then geometric parameters are fixed.
  3. Swept volume and clearance volume is calculated using the standard formula.
  4. State variables at the end of compression are calculated using standard relations for polytropic process and Standard gas equations.
  5. Similarly state variables are calculated at the beginning and the end of the expansion stroke.
  6. Since the expansion and the compression processes are isentropic in nature, they are not represented as a straight line on the p-v diagram.
  7. To get the required curves we need to calculate the values of pressure and volume at number of points on the isentropic curves. For that a separate function is created. This function is called to calculate an array of values of pressure and volume during expansion and compression.
  8. Finally all four strokes are plotted and labeled.
  9. For the function file, the name of the function and the file name must be same. Both files must be in the same folder. The relation is for Swept Volume in terms of crank rotation angle and TDC to BDC displacement is divided into hundred equal spaces.

5. RESULTS:

6. CONCLUSION:

A separate function file can be written to minimize the clutter in the main program.

7. REFRENCES:

  1. https://in.mathworks.com/help/matlab/learn_matlab/calling-functions.html
  2. https://in.mathworks.com/help/matlab/matlab_prog/command-vs-function-syntax.html
  3. https://in.mathworks.com/help/matlab/ref/function.html
  4. https://in.mathworks.com/help/matlab/ref/text.html
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.