All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
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) …
Sourabh Lakhera
updated on 09 May 2020
AIM:
Derivation of PV diagram using MATLAB Code and also calculating the Thermal Efficiency of the cycle
GOVERNING EQUATIONS IF ANY:
m – Mass (in Kg)
R – characteristic gas constant( KJ/Kmol K)
T - Temperature (in K )
Where : - V –Total Volume at a particular
Vc – Clearance Volume
rc - Compression ratio
R – Connecting rod length/ crank Pin
– Crank angle
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:
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:
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:
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...
Project 1 - Data Cleaning and Transformation using Pivot table and Charts for the Report on requirement of Team Hiring
Project Documentation: Optimizing Team Hiring Insights through Data Cleaning and TransformationIntroductionIn today's data-driven environment, businesses thrive on informed decision-making. At ABC Private Limited, a manufacturer and seller of diverse products ranging from Classic Cars to Trucks and Buses, understanding…
26 Sep 2024 02:54 PM IST
Project 2
Project Documentation: Alumni Career Choices AnalysisAimThe aim of this project is to analyze the career choices of alumni from two universities with respect to their passing year and the courses they completed. This analysis helps in understanding the career growth of alumni, which plays a crucial role in the institute's…
10 Jul 2024 08:03 AM IST
Project 1
From the series of queries and actions conducted on the ecommerce database, several insights can be derived regarding the user demographics and their activities on the platform. Firstly, the database contains information about users' demographics, such as their gender, country, language, and usage of applications like…
28 Feb 2024 07:45 PM IST
Project 2 - EDA on Vehicle Insurance Customer Data
EDA on Vehicle Insurance Customer Data Aim: The aim of this project is to perform exploratory data analysis (EDA) and data cleaning on two datasets containing customer details and policy details. The objective is to prepare the data for future analysis and modeling, identify patterns, and derive insights to aid business…
19 Feb 2024 08:36 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.