Air standard Otto Cycle - PV diagram using MATLAB Code, Also Evaluation of Thermal Efficiency of the cycle
AIM:
Derivation of PV diagram using MATLAB Code and also calculating the Thermal Efficiency of the cycle
GOVERNING EQUATIONS IF ANY:
- Ideal Gas Equation PV =mRT
where : - P –Absolute Pressure (in Pa)
V – Volume( in m3)
m – Mass (in Kg)
R – characteristic gas constant( KJ/Kmol K)
T - Temperature (in K )
- Instantaneous Total Volume inside the engine as a function of Clearance Volume
Where : - V –Total Volume at a particular
Vc – Clearance Volume
rc - Compression ratio
R – Connecting rod length/ crank Pin
– Crank angle
- Isotropic process: PV γ = constant
- Compression ratio (CR) =`(Total volume) / (CLEarance volume)`
- Thermal efficiency of otto cycle: 1 – (`1/(r)`)γ-1 = net work done / heat added ;
- Volume swept: Vs = `(pi/4)*d^2.L`
d- bore
L – stroke
OBJECTIVES OF THE PROJECT:
1. Plotting a PV diagram for Otto cycle with the help of MATLAB .
2. Calculation of Thermal Efficiency of otto cycle .
THEORY :
Thermodynamics behind IC- Engine working.The engine is called a four-stroke engine because there are four movements, or strokes, involved in piston during one cycle. A stroke refers to the Complete cycle of the piston along the cylinder, in either direction. All the strokes are termed:
- Intake: The fuel is been injected inside the engine cylinder.
- Compression: The air-fuel charge is compressed and ignited by sparkplug (heat addition).
- Combustion: Due to spark ignition combustion of the fuel takes place which results in a power stroke (expansion).
- Exhaust: This action expels the spent air-fuel mixture and the combustion products through the exhaust valve (heat rejection).
Air Standard Assumptions
In power engines, energy is provided by burning fuel within the system boundaries, i.e., internal combustion engines. The following assumptions are commonly known as the air-standard assumptions:
- The working fluid is air, which continuously circulates in a closed loop (cycle). Air is considered as ideal gas.
- All the processes in (ideal) power cycles are internally reversible.
- Combustion process is modeled by a heat-addition process from an external source.
- The exhaust process is modeled by a heat-rejection process that restores the working fluid (air) at its initial state.
Assuming constant specific heats, (@25°C) for air, is called cold-air-standard assumption.
IDEAL PV DIAGRAM (OTTO CYCLE)
ACTUAL PV DIAGRAM (OTTO CYCLE)
PROGRAM CODING USING MATLAB :
clear all
close all
clc
%input
gamma = 1.4
%state variable given
t1 = 500 %(K)
t3 = 2300 %(K)
p1 = 101325 %(Pa)
%piston-cylinder geometery
bore = 0.1
stroke = 0.1
con_rod = 0.15
cr =12
%calculation of swept volume and clearance volume
v_swept = (pi/4)*stroke*(bore)^2 ;
v_clearance = v_swept/(cr-1) ;
v1 = v_clearance+ v_swept;
v2 = v_clearance ;
%to plot compression curve and visualize the variation in (p,v) from
% state 1 to state 2
constant_c = p1.*v1.^gamma;
v_compressinon = piston_cylinder_kinematics(bore,stroke,con_rod,cr,180,0);
p_compression = constant_c./(v_compressinon).^gamma ;
%calculation of all variable at point 2.
p2=p1*(cr)^gamma ;
t2 = (t1/cr)*(p2/p1) ; %v2 = v3 ; we already know v2,hence we know state 2,
%calcualtion of state 3 ,
v3=v2
p3 = (t3/t2)*p2
%FROM p3,v3,t3 we have state point 3
constant_c = p3.*v3.^gamma;
v_expansion = piston_cylinder_kinematics(bore,stroke,con_rod,cr,0,180);
p_expansion = constant_c./(v_expansion).^gamma ;
%calculation of state point 4 , where v1=v4,
v4=v1;
t4 = t3/(cr)^(gamma - 1) ;
p4 = p1*(t4/t1);
%we know this change in heat at const volume is m*Cv*dT
%LET WE HAVE m=1kg ; Cv = 0.718 Kj/kg K
m=1;
Cv=0.718
heat_add = m*Cv*(t3 - t2);
%NET WORK = HEAT ADDED - HEAT REJECTED
work_net = m*(Cv*(t3-t2))-m*(Cv*(t4-t1))
%To calculate thermal efficiency we have two methods, from basics its Efficiency = work_net/heat_add;
%also we can calculate efficiency by 1-(1/cr)^(gamma-1)
thermal_efficiency = work_net/heat_add
figure(1)
hold on
%FROM STATE 1 TO STATE 2 :- ISENTROPIC COMPRESSION RPOCESS
plot(v1,p1,'*','color','r')
plot(v_compressinon,p_compression,'linewidth',3)
plot(v2,p2,'*','color','r')
%FROM STATE 2 TO STATE 3 :- Constant volume process known as isochoric
%process
plot(v3,p3,'*','color','r')
plot(v_expansion,p_expansion,'linewidth',3,'color','g')
plot(v4,p4,'*','color','r')
%line joining state 3 to state 4 :- Isentropic expansion
plot([v2 v3] ,[p2 p3],'linewidth',3,'color','b')
%line joining state 4 and state 1 :- isochoric process
plot([v4 v1] ,[p4 p1],'linewidth',3,'color','b')
xlabel('volume(m^3)')
ylabel('pressure(Pa)')
title('PV Curve OF OTTO CYCLE')
function [v] = piston_cylinder_kinematics(bore,stroke,con_rod,cr,start_crank,end_crank)
a = stroke/2
R = con_rod/a;
v_s = (pi/4)*stroke*bore^2 ;
v_c = v_s/(cr-1) ;
theta = linspace(start_crank,end_crank,720);
%we know v/(clearance vol.) = 1+0.5*(cr -1)*[R+1-cosd(theta)-(R^2-(sind(theta))^2)^0.5 ]
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
* ERRORS OCCURRED –
ERROR – DIDN’T GIVEN MULTIPLICATION (*) SIGN BETWEEN PARENTHESIS , AND Cv .
CONCLUSION:
- The final PV diagram for otto cycle.
- Thermal Efficiency