Project

Program to Generate P-V Graph and Thermal Efficiency of Otto Cycle

Aim

To Plot P-V Graph of 'Otto Cycle' and generate 'Thermal Efficiency' by using various inputs and variables of Matlab.

Introduction

Otto cycle

Otto cycle is named after 'Nikolaus Otto' (1832-1891; German); he is credited as the first creator of a petroleum fuel based Internal Combustion Engine operating under a four stroke engine.

Process Involved ; TDC-Top Dead Center; BDC - Bottom Dead Center

Isentropic Compresssion (A-B)

The piston moves from BDC to TDC position, Air undergoes adiabatic(Isentropic) Compression, in this process volume decreases, pressure increases, hence Volume decreses from V1 to V2 , Pressure increases from P1 to P2 and Temperature increases from T1 to T2.

Constant Volume Heat Addition (B-C)

It is Isochoric Process in which Constant volume is maintained with addition of heat, the piston remains at TDC for a moment, heat at added from an external heat source (Spark Plug) at constant volume V2=V3, hence temperature increases from T2 to T3 and Pressure increase from P2 to P3.

Heat Supplied = `Mc_v*(T3-T2)` M=Mass `C_v`= Specific Volume

Isentropic Expansion (C-D)

Air undergoes Isentropic (reversible adibiatic) expansion, The pistion is pushed from TDC to BDC position, hence pressure decreases from P3 to p4 and Temperature decreases from T3 to T4.

Constant Volume Heat Rejection(D-A)

The piston rests at BDC for a moment and heat is rejected at constant Volume V4=V1; Pressure decreases from P4 to P1 and Temperature decreases from T4 To T1.

Heat Rejected = `Mc_v*(T4-T1)`

`C_p/C_v=gamma`; This relation is used to derive various functions

`(P1V1 )/ (T1) =( P2V2) / (T2 )= (P3V3 )/( T3)=gamma` ;

`(PV)^gamma` =Constant ;

This relation is also used in various functions to obtain Pressures and Temperature values`

Bore (d);

diameter of piston cylinder

Stroke (L) ;

Length of distance travelled from TDC to BDC which also determines Engine displacement

Connecting Rod ;

It is the link between the piston and crankshaft

Crank Angle(`theta`) ;

Position of engine's crankshft with respect to Piston as it moves from TDC to BDC, Viceversa through the bore

Swept Volume(`V_s`) ;

The amount of fuel displacement from TDC to BDC; Viceversa is defined as Swept Volume.

`V_s= pi/4*d^2*L` ;Where, d= bore; L= Stroke Length

Clearance Volume ( `V_c`) ;

Volume of fuel above TDC when Piston is at TDC position

`V_c= (V_s)/((CR)-1)`;Where, `V_s`=Swept Volume; CR=Compression Ratio

Compression Ratio(CR);

It is defined as ratio between Swept Volume combined with Clearance Volume to Clearance Volume; i.e, Volume of combustion chamber when piston is at TDC.

CR= `(V_s+V_c)/V_c`; Where, `V_s= Swept Volume; V_c =`Clearance Volume

Total Volume(V) = Sum of Swept Volume and Clearance Volume

V= `V_s+V_c`

Inputs

Pressure (P) ; Temperature(T); Volume(V)

Relation between Volume of Fuel in bore to Crank anle

`V/V_c= 1+1/2((CR)-1)[R+1-costheta-(R^2-(sintheta)^2]`

Where, V= Total Volume; `V_c=`Clearance Volume; CR= Compression Ratio; R=(Connecting rod Length/Crank radius) ; `theta=`Crank angle

Thermal Efficiency (`eta`) = `1-(1/((CR)^gamma-1))`

Input Values with Units

`gamma`= 1.4; T3 = 2300K; P1=1012325 Pa; T1=500K; Bore(d)= 0.1m; Stroke(L)=0.1m; Connecting rod Length = 0.15m; CR=12.

Program

clear all
close all
clc
%Inputs
gamma=1.4
t3 = 2300
%variables
p1= 101325 
t1= 500

% Engine Geometric Parameters
bore=0.1;
stroke=0.1;
con_rod=0.15;
cr=12;

%calculating Swept volume and 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 point 2
%p2v2^gamma = p1v1^gamma
p2=p1*cr^gamma;
%p1v1/t1= p2*v2/t2 |t2 =p2*v2*t1/(p1*v1)
t2 = p2*v2*t1/(p1*v1)
constant_c = p1*v1^gamma;
V=engine_kinematics(bore, stroke, con_rod, cr,180,0)

p_compression = constant_c./V.^gamma;

%state variables at point 3
v3 = v2 
%p3v3/t3 = p2v2/t2 | p3 = p2*t3/t2
p3 = p2*t3/t2
%state variables at point 4

constant_c = p3*v3^gamma;
V_exp = engine_kinematics(bore, stroke, con_rod, cr, 0, 180)

p_exp = constant_c./V_exp.^gamma;


v4 = v1 
%p3v3^gamma = p4v4^gamma | p4= p3(v3/v4)^gamma
p4= p3*(v3/v4)^gamma

Thermal_efficiency = (1-(1/(12^(1.4-1))))*100

figure(1)
hold on
plot(v1, p1, '*', 'color','r')
plot(V, p_compression)
plot(v2, p2, '*', 'color','r')
plot(v3, p3, '*', 'color','r')
plot(V_exp, p_exp)
xlabel ('Volume')
ylabel('Pressure')

plot(v4, p4, '*', 'color','r')

plot([v2, v3],[p2, p3], 'color', 'g')

plot([v1 ,v4], [p1,p4], 'color', 'y')
figure (2)
plot ([v1 v2 v3 v4 v1], [p1 p2 p3 p4 p1], 'color','b')

xlabel ('Volume')
ylabel('Pressure')

Calling 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

Output

Thermal_efficiency = (1-(1/(12^(1.4-1))))*100

Thermal_efficiency = 62.9893

Result and Discussion

Plotted P-V diagram and also calculated Thermal efficiency of Otto Cycle; for given values thermal efficiency is found to be 63%; which means that much amount of fuel is used or burnt to convert into Mechanical Energy.

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.