Project

Plotting of PV diagram of OTTO CYCLE and finding the Thermal Efficiency of engine using MATLAB

  1. Aim:- Write a programme to solve ‘otto cycle’ using Matlab
  2. Equation Used:-
  • For adiabatic processes

`〖PV〗^γ =constant`

Where;

P = pressure of the ideal gas

V = volume of the ideal gas

`γ = C_p/C_v`

where;

`C_p` = specific heat at constant pressure

`C_v` = specific heat at constant volume

`(PV )/T = constant`

This is the gas equation for all the ideal gases undergoing any process.

`V/V_c = 1+1/2(CR-1) [ R+1- cos(Θ) – ( √(R^2-(sin⁡〖(Θ)〗^2 ) )`

where V = volume during compression or expansion

`V_c` = clearance volume

Θ = crank angle

CR = compression ratio

`R = (CR)/a`, Where a = crank pin radius

`η = 1- 1/(C_r^(γ-1) )`

where η= thermal efficiency

3.Objective:-

  • To plot PV diagram of OTTO CYCLE
  • To find the thermal efficiency of the engine

4.Thoery:-

  • An OTTO CYCLE is a thermodynamic cycle which describes the function of Spark Ignition Piston Engine or Petrol Engine.
  1. Processes of OTTO CYCLE
  • Process(0-1)

A mass of air fuel mixture is drawn in to Piston/Cylinder arrangement at constant pressure.

  • Process(1-2)

It is an adiabatic (isontropic) compression of charge( air fuel mixture) as the piston moves from bottom dead center(BDC) to top dead center(TDC)

  • Process(2-3)

It is a constant-volume heat transfer to the working gas from an external source while the piston is at top dead center. The process is intended to represent the ignition of charge(air fuel mixture) with the help of Spark Plug and the subsequent rapid burning.

  • Process(3-4)

It is an adiabatic (isontropic) expansion . A very high temperature is exerted on the piston. This create a thrust on piston face and because of this piston again moves from Top dead center to Bottom dead center. This stroke is also known as power stroke

  • Process(4-1)

Completes the cycle at constant-volume process in which the heat is rejected from the air.

6. Programming Language Used:- HTML

7.Code1(For plotting PV diagram of OTTO CYCLE along with the Thermal Efficiency of the Engine)

 clear all
 close all
 clc
 
 % Inputs
 gamma = 1.4
 t3 = 2300
 
 % State veriables
 p1 = 101325
 t1 = 500 
 
 % Engine geometric parameters
 bore = 0.1;
 stroke = 0.1;
 con_rod = 0.18;
 cr = 15;
 
 % Calculating the swept volume and te clearence volume
 v_swept = (pi/4)*bore^2*stroke;
 v_clearance = v_swept/(cr-1);
 
 v1 = v_swept + v_clearance
 v2 = v_clearance
 
 % State veriable 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 veriable at state piont 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 veriable at oint 4
 v4 = v1

 %p3v3^gamma = p4v4^gamma | p4 = p3*(v3/v4)^gamma 
 p4 = p3*(v3/v4)^gamma;
 
 % Efficiency of otto cycle
 eff = 1 - (1/(cr^(gamma-1)));
 
 figure(1)
 hold on
 plot(v1,p1,'*','color','r')
 plot(V_compression,p_compression,'color','r')
 plot(v2,p2,'*','color','g')
 plot(v3,p3,'*','color','b')
  plot(V_expansion,p_expansion,'color','b')
 plot(v4,p4,'*','color','r')
 
 
 plot([v2 v3],[p2 p3])

plot([v4 v1],[p4 p1])
ylabel('pressure')
xlabel('volume')
 grid on
 
 

Output

Thermal Efficiency = 0.66150

Code2( The function named as “Engine Kinematics”)

 function [v] = engine_kinematics(bore, stroke, con_rod, cr, start_crank, end_crank)

 
 a = stroke/2;
 R = con_rod/a;
 
 v_swept = (pi/4)*bore^2*stroke;
 v_clearance = v_swept/(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_clearance

end

  

8.Conclusion:-

  • The thermal efficiency of the engine has been found.
  • The PV diagram for OTTO CYCLE has been plotted using Matlab.
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.