FUNCTIONING OF OTTO CYCLE USING MATLAB AND SIMULATION
AIM: To find out the how does a otto cycle function.And to find the p-v diagram using matlab.
OBJECTIVE: Our main obejctive is to know the functiong opf otto cycle.Otto cycle is nothing but the internal combustion that takes placed in an automobile engine.Basically an engine consits compression and expansion in its whole process.The main objective of otto cycle is that is to know the what happens to pressure,volume and temperature when the heat is lost in the system.To also plot the p-v digram of it.
fig(1):p-v digram of otto cycle
2-3:COMPRESSION STROKE
3-4:CONSTANT VOLUME PROCESS
4-5:ADIABATIC EXPANSION
5-6:HEAT LOSS
THEORY: Otto cycle is the most important thermodynamic cycle which is essentially used in all autombile engines.Otto cycle is most likely to be a reversible engine process.It actually undergoes four reversible process isentropic process and isophoric process.They are very slow process so they are no able to execute isothermal process.The process of otto cycle can be expalines by four process in detailes
- ISENTROPIC COMPRESSION(1-2): In this process intially spark plug burns the fuel where the piston cylindermoves from bottom to top end of the piston.Intially the piston is at the bottom end once the ai-fuel is compressed as soon as the ignition takes place the piston moves very rapidly from bottom to top end.This is the process where the fuel is compressed and its and there is increse in the internal energy.
- CONSTANT TEMPERATURE(2-3): After the internal combustion is taken place the piston remains in top dead center until the next air-fuel mixture enters the piston.While the piston is at top deat center there will be a constant volume process where there is no loss or gain of energy.
- ISOPORIC EXPANSION(3-4): In this process we come to know that the p[iston in the top end comes back to the bottom dead center and it basically provides the power to the engine.In the process we also understand it that the internal combustion takes place completely.
- HEAT REJECTION(4-1): In this process we can clearly understand that the otto cycle is complete. It has finished its whole combustion process.After the the whole combustion there is some heat in the engine which is been released in the exaust pipe of the engine.After the this the engine will start again from the begining to generate the power to the engine.
PROGRAM:
%FUNCTIONING OF THE OTTO CYCLE USING THE MATLAB:
close all
clear all
clc
%inputs of otto cyclce
gamma=1.4;
t3=2300;
%intial values of pressure and temperature
p1=101;
t1=500;
bore=0.1;
stroke_length=0.1;
con_rod=0.1;
cr=12;
%swept volume & clearance volume
swept=(pi/4)*bore^2*stroke_length;
clearance=swept/(cr-1);
v1=swept+clearance;
v2=clearance;
%pressure at state2
p2=p1*cr^gamma;
t2=(p2*v2*t1)/(p1*v1);
constant=p1*v1^gamma;
V=air_ratio(bore,stroke_length,cr,con_rod,180,360);
P_comp=constant./V.^gamma;
%pressure and volume at state3
v3=v2;
p3=p2*t3/t2;
p1=(p2*t3)/t2;
constant=p3*v3^gamma;
V_expan=air_ratio(bore,stroke_length,cr,con_rod,0,180);
P_expan=constant./V_expan.^gamma;
%pressure and volume at state4
v4=v1;
p4=p1*(v3/v4)^gamma;
figure(1)
hold on
plot(v1,p1,'*','color','b')
plot(V,P_comp)
plot(v2,p2,'*','color','b')
plot(v3,p3,'*','color','b')
plot(V_expan,P_expan)
plot(v4,p4,'*','color','b')
figure(2)
plot([v1 v2 v3 v4],[p1 p2 p3 p4],'color','r')
OUTPUT: F
THERMAL EFFICENCY: Its is defiend as the ratio of work done by the system and heat supplied to the engine.
figure(2): Thermal efficiency of system
figure(3): formula of thermal efficiency
ERRORS: While workin on the code there was many errors occured like syntax errors,case senstive error.To overcome the error we must read in the commad window after knowing the error we can change the errors according to it.
RESULTS: From this we can understand that the otto cycle is the helps to differentiate between pressure and volume.These are the basic for every different engine which are been made in the modern world.By using matlab and simulation we were able to obtain the p-v diagram.