Project

Air standard cycle

List of steps for programming:

  • Create a function for calculating engine parameters and save in as a separate program
  • Create another program with the following steps
    • Define the state variables
    • Declare the engine parameters
    • Calculate swept volume and clearance volume
    • Calculate isentropic compression
    • Calculate heat added in constant volume process
    • Calculate pressure in isometric expansion
    • Calculate heat rejection in constant volume cycle
    • Calculate efficiency of the Otto cycle
    • Plot all the calculated pressure and volume to get otto cycle

Function programme for engine parameters:

%Programme for function
function [v]=engine_parameters(bore,stroke,connecting_rod,cr,TDC_angle,BDC_angle)
%Engine dimensions
a=stroke/2;
R=connecting_rod/a;

%Volume calculation
v_swept=(pi/4)*bore^2*stroke;
v_clearance=v_swept/(cr-1);

theta=linspace(TDC_angle,BDC_angle,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_clearance;
end

Programme for creating an air standard cycle:

clear all
close all
clc
%state variables
p1=101325
t1=550
gamma=1.4
t3=2200

%engine parameters
bore=0.1;
stroke=0.1;
connecting_rod=0.15;
cr=12;

%Volume calculation
v_swept=(pi/4)*bore^2*stroke;
v_clearance=v_swept/(cr-1)

%State 1 (Isentrophic condition)
v1=v_swept+v_clearance;

%State 2(Constant volume heat addition)
constant_c=p1*v1^gamma;
v_compression=engine_parameters(bore,stroke,connecting_rod,cr,180,360)
p_compression=constant_c./(v_compression.^gamma)
v2=v_clearance
p2=p1*cr^gamma
t2=(p2*v2*t1)/(p1*v1)

%state 3(Isentropic expansion)
v3=v2;
p3=(p2*t3)/t2;
constant_e=p3*v3^gamma;
v_expansion=engine_parameters(bore,stroke,connecting_rod,cr,0,180);
p_expansion=constant_e./(v_expansion.^gamma);

%state 4(Constant volume heat rejection)
v4=v1;
p4=p3*(v3/v4)^gamma;

%thermal efficiency calculation
efficiency=(1-(1/cr^(gamma-1)))*100;

%plotting of otto-cycle
figure(1)
hold on
xlabel('Volume')
ylabel('Pressure')
plot(v1,p1,'*','color','r')
plot(v_compression,p_compression,'color','b')
plot(v2,p2,'*','color','r')
plot([v2 v3],[p2 p3],'color','r')
plot(v3,p3,'*','color','r')
plot(v_expansion,p_expansion,'color','r')
plot(v4,p4,'*','color','r')
plot([v4 v1],[p4 p1],'color','b')

Output chart:

Efficiency value:

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.