All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
AIM:- To write a MATLAB program for simulating an Air standard Otto cycle and calculating its efficiency OBJECTIVE:- To plot a P-V graph in MATLAB To calculate the Thermal efficiency of the cycle INTRODUCTION:- An Otto cycle is an idealized Thermodynamic cycle that describes the functioning of a typical…
Tushar Singh
updated on 12 Aug 2020
AIM:-
To write a MATLAB program for simulating an Air standard Otto cycle and calculating its efficiency
OBJECTIVE:-
To plot a P-V graph in MATLAB
To calculate the Thermal efficiency of the cycle
INTRODUCTION:- An Otto cycle is an idealized Thermodynamic cycle that describes the functioning of a typical spark ignition piston engine. It is the thermodynamic cycle most commonly found in automobile engines.
The program in MATLAB is to simulate an Otto cycle.
The assumptions that are made in an Air standard cycles are as follows:-
1)The working fluid is air which follows the perfect gas law i.e PV=nRT.
2)The specific heat of air does not vary with temperature.
3)The mass of air in the cycle remains fixed i.e the engine operates as a closed system, so that working fluid is restored to its initial state at the end of each cycle. Thus, there are no intake and exhaust process.
4)Heat addition and rejection takes place with the help of external heat reservoir, due to heat transfer.
5)All the processes are internally reversible and compression and expansion process are isentropic.
6)The working fluid is homogeneous throughout and no chemical reaction takes place.
GOVERNING EQUATION:-
PROCESSES:-
Process(1-2):-It is an Isentropic compression process where the piston moves from bottom dead centre (BDC) to top dead centre (TDC) thereby compressing the working fluid
Process(2-3):-It is a constant volume Heat addition process where heat is transferred from an external source to the working fluid.
Process(3-4):-It is an Isentropic expansion process where the piston moves from top dead centre (TDC) to bottom dead centre (BDC) thereby completing the expansion process
Process(4-1):-It is a constant volume heat rejection process where heat is expelled by the working fluid to the surrounding.
FORMULAS USED:-
For ISENTROPIC Process we will use
P⋅Vγ=Constant
Where P=pressure of Ideal gas
V=volume of Ideal gas
γ=CpCv
C_p=specific heat at constant pressure
C_v=specific heat at constant volume
Pâ‹…VT=Constant
VVc=1+12⋅(cr−1)⋅[R+1−cos(θ)−(R2−(sin(θ))2)0.5]
where V=volume of compression or expansion
Vc=clearance volume
cr=compressionratio
R=cra
a=crank pin radius
η=1−1cγ−1r
where η=thermal efficiency of otto cycle
PROGRAM:-
%plotting otto cycle
%engine parameters
bore=0.1;
stroke=0.1;
con_rod=0.15;
cr=12;
gamma=1.4;
%Efficiency of otto cycle is given by Eotto=1-1/cr^(gamma-1)
TERM1=gamma-1;
TERM2=cr^TERM1;
TERM3=1/TERM2;
Eotto=1-TERM3;
%calculating volume and clearance volume
k=1/(cr-1);
v_s=pi/4*bore^2*stroke;
v_c=k*v_s;
v1=v_s+v_c;
v2=v_c;
cr=v1/v2;
%state variables at 1
p1=101325;
t1=500;
t3=2000;
%state variables at 2
%Governing equation will be p1*v1^gamma=p2*v2^gamma
p2=p1*(v1/v2)^gamma;
t2=t1*cr^gamma;
constant1=p1*v1^gamma;
V_compression=engine_kinematics(bore,stroke,con_rod,cr,0,180);
P_compression=constant1./V_compression.^gamma;
%state variables at 3
%Governing equation will be p2*v2/t2=p3*v3/t3
v3=v2;
p3=p2*t3/t2;
constant2=p3*v3^gamma;
%state variables at 4
%Governing equation will be p3*v3^gamma=p4*v4^gamma
v4=v1;
p4=(v3/v4)^gamma*p3;
V_expansion=engine_kinematics(bore,stroke,con_rod,cr,180,0);
P_expansion=constant2./V_expansion.^gamma;
%plotting
figure(1)
hold on
xlabel('volume')
ylabel('pressure')
plot([v2,v3],[p2,p3],'linewidth',1.5,'color','r')
plot(V_compression,P_compression,'linewidth',1.5,'color','b')
plot([v4,v1],[p4,p1],'linewidth',1.5,'color','r')
plot(V_expansion,P_expansion,'linewidth',1.5,'color','b')
OUTPUT:-
GRAPH:-
PROGRAM FOR SOLVING PISTON KINEMATICS EQUATION
function [V]=engine_kinematics(bore,stroke,con_rod,cr,start_crank,end_crank)
%inputs
%engine parameters
a=stroke/2
R=con_rod/a
k=1/(cr-1);
%swept and clearance volume
v_s=pi/4*bore^2*stroke;
v_c=k*v_s;
v1=v_s+v_c;
v2=v_c;
cr=v1/v2;
%engine kinematics
theta=linspace(start_crank,end_crank,100)
term1=(cr-1).*0.5
term2=R+1-cosd(theta)
term3=(R^2-sind(theta).^2).^0.5
V=(1+term1*(term2-term3)).*v_c
end
OUTPUT:-
The piston kinematics will be solved by calling the function i.e engine kinematics and the right P-V diagram will be achieved
ERRORS MADE:-
I did not mentioned the dot(.) operator while dividing by 'V'
CONCLUSION:-
From this program we can compare different Otto cycles and their thermal efficiency to get a better and desired product.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Week 3 - 2D meshing for Sheet metal
Objective:- For the given Hood model, Take the mid surface for all the components after checking the geometrical errors and mesh the mid surface with the given element Quality criteria.S. No Quality Criteria Value 1Target/Average length 52Minimum Length 23Maximum Length 74Aspect 35Warpage156Skewness457Jacobian 0.78Minimum…
19 Mar 2023 03:12 PM IST
Project 1 : CFD Meshing for Tesla Cyber Truck
Objective:- For the given model, check and solve all geometrical errors and Assign appropriate PIDs. Perform meshing with the suitable Target length and element Quality criteria. Target lengths for the different parts of a model can be decided by your own. Finer mesh will give good results and will compromise with the…
03 Oct 2022 02:19 PM IST
Week 4 Challenge : CFD Meshing for BMW car
Objective:- For the given model, check and solve all geometrical errors on half portion and Assign appropriate PIDs. Perform meshing with the given Target length and element Quality criteria. After meshing the half model, Do symmetry to the other side.Target lengths for the different parts of a model are as follow:Body…
29 Sep 2022 03:22 PM IST
Week 5 Challenge : Surface wrap on Automotive Assembly
Objective:- For the given models, check for the geometrical errors and delete surfaces which are unwanted for Surface wrap as shown in the videos. After clearing geometry, Merge all 3 models and perform surface wrap. Target length for Wrap = 3 mmProcedure:- Load all the three models in ANSAENGINETRANSMISSIONGEAR BOXDeleting…
28 Aug 2022 03:04 PM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.