Project

OTTO CYCLE SIMULATION USING MATLAB

AIR STANDARD CYCLE SIMULATION USING ATLAB

1.AIM:

  • Writing a code to simulate an Air standard cycle using matlab
  • Creating a plot for P-V
  • Obtaining thermal efficiency of an engine

2.INTRODUCTION:

Generally a heat engine cycle is a series of thermodynamic process through which a working fluid passes in certain sequence of stages . At the completion of the cycle , the working fluid returns to its original condition , i.e, the working fluid at the end of the cycle has the same pressure volume temperature and internal energy that it had at the begining of the cycle .Some where during every cycle , heat is recieved by the working fluid . It is then the object of the cycle to convert as much of this heat energy as possible to useful work . The heat energy which is not converted , is rejected by the working fluid during some process of the cycle .

OTTO CYCLE : Otto cycle or constant volume cycle is an ideal heat engine cycle which was proposed in 1862 by Bean de Rochas . In 1876 Dr . Otto designed an engine to operate this cycle . The otto engine immediately became so succesful from a commercial stand point , that its name was affixed to the cycle used by it . This cycle is in use in all gas and petrol engines together with many types of all engines .

The Ideal p-v and temperature- entropy diagrams of this cycl eshown below

The above pictures containing P-V and T-S diagram of otto cycle and essential calculations involved in it. If we can say the ossumptions in the otto cycle : The working fluid in the engine cylinder is air , and it behaves as perfect gas i.e, Obeys the gas laws and has constant specific heats. The air is compressed adiabatically (eithout the frioction ) in the engine cylinder during the compression stroke . The heat is supplied to the air at constant volume by bringing a hot body in contact with the end of the engine cylinder . The air expands in the engine cylinder adiabatically (without friction ) during the expansion stroke . The heat is rejected from the air at constant volu,me by bringing a cold body in contact with the end of the engine cylinder . We can also note that compression and expansion processes in the otto cycle are considered as reversible adiabatic process. In place of exhaust process, It is replaced by an equivalent heat rejection process.

Otto cycle is one of the pioneer in air standard cycle .It approximates the processes in petrol or diesel engines . Completyely based on constant volume heat addition (combustion) and heat rejection processes and isentropic compression and expansions . The actual P-V diagram for an engine has rounded corners because of the process of combustion takes place at finite rate . The otto cycle has sharp corners because combustion is switched on off instantaneously . We can also notre that area of an otto cycle is larger than actual cycle . This otto cycle is similar to the cycle in engines .

The basic otto cycle is made up of four processes :

  1. Isentropic Compression
  2. Constant Volume Heat Addition
  3. Isentropic Expansion
  4. Constant Volume Heat Rejection

3. CODE :

clear all
close all 
clc
%Inputs 
gamma =1.4
t3=2300
%state variables 
p1 = 101325
t1=500
% Engine 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;
 % state varaibles at point 3
 v3=v2;
 %p3v3/t3 =p2v2/t2 |p3 =p2*t3/t2
 p3 =p2*t3/t2
 constant_c = p3*v3^gamma;
 V_expansion =Engine_kinematics(bore,stroke,con_rod,cr,0,180);
 P_expansion = constant_c./V_expansion.^gamma;
 
 % state variables at point 4
 v4=v1;
 %p3v3^gamma =p4v4^gamma  | p4 = p3(v3/v4)^gamma 
 p4 = p3*(v3/v4)^gamma
 t4 = (p4*t1/p1)
  % Efficiency of  otto cycle 
 efficiency = 1-((t4-t1)/(t3-t2))
figure(1)
 hold on 
 plot(v1,p1,'*','color','r')
 plot(V_compression, P_compression)
 plot(v2,p2,'*','color','r')
 plot([v2,v3],[p2,p3],'color','r')
 plot(v3,p3,'*','color','r')
 plot(V_expansion, P_expansion)
 plot(v4,p4,'*','color','r')
 plot([v4,v1],[p4,p1],'color','r')
 xlabel('Volume')
 ylabel('Pressure')
 figure(2)
 plot([v1 v2 v3 v4 v1],[p1 p2 p3 p4 p1],'color','r')
 xlabel('Volume')
 ylabel('Pressure')

Function Used In This Code :

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(0,180,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

4. OUTPUT :

gamma =

    1.4000


t3 =

        2300


p1 =

      101325


t1 =

   500


v1 =

   8.5680e-04


v2 =

   7.1400e-05


v_s =

   7.8540e-04


v_c =

   7.1400e-05


p3 =

     5593140


v_s =

   7.8540e-04


v_c =

   7.1400e-05


p4 =

   1.7251e+05


t4 =

  851.2465


efficiency =

    0.6299

5. PLOTS :

6.CODE EXPLANATION :

  1. Here Engine parameters and gamma and t1,p1 taken as inputs
  2. using ideal gas equation and state equations state variables at 2 3 4 are calsulated and using a function engine efficiency is also calculated as 0.6299 or 62%
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.