Menu

Executive Programs

Workshops

Projects

Blogs

Careers

Placements

Student Reviews


For Business


More

Academic Training

Informative Articles

Find Jobs

We are Hiring!


All Courses

Choose a category

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

All Courses

All Courses

logo

CHOOSE A CATEGORY

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

Top Job Leading Courses

Automotive

CFD

FEA

Design

MBD

Med Tech

Courses by Software

Design

Solver

Automation

Vehicle Dynamics

CFD Solver

Preprocessor

Courses by Semester

First Year

Second Year

Third Year

Fourth Year

Courses by Domain

Automotive

CFD

Design

FEA

Tool-focused Courses

Design

Solver

Automation

Preprocessor

CFD Solver

Vehicle Dynamics

Machine learning

Machine Learning and AI

POPULAR COURSES

coursePost Graduate Program in Hybrid Electric Vehicle Design and Analysis
coursePost Graduate Program in Computational Fluid Dynamics
coursePost Graduate Program in CAD
coursePost Graduate Program in CAE
coursePost Graduate Program in Manufacturing Design
coursePost Graduate Program in Computational Design and Pre-processing
coursePost Graduate Program in Complete Passenger Car Design & Product Development
Executive Programs
Workshops
For Business

Success Stories

Placements

Student Reviews

More

Projects

Blogs

Academic Training

Find Jobs

Informative Articles

We're Hiring!

phone+91 9342691281Log in
  1. Home/
  2. NAVEEN SWAMI/
  3. Air Standard Cycle Simulator

Air Standard Cycle Simulator

AIM:  Plotting P-V diagram and efficiency calculation of the Otto Cycle.GOVERNING EQUATIONS:Otto cycle is a gas power cycle that is used in a spark-ignition internal combustion engine (modern petrol engines). It is an air standard cycle which approximates the processes in petrol or diesel…

  • BIM
  • CAE
  • CFD
  • FEA
  • PYTHON
  • NAVEEN SWAMI

    updated on 16 May 2020

AIM:  Plotting P-V diagram and efficiency calculation of the Otto Cycle.

GOVERNING EQUATIONS:

Otto cycle is a gas power cycle that is used in a spark-ignition internal combustion engine (modern petrol engines). It is an air standard cycle which approximates the processes in petrol or diesel engines.

An Otto cycle consists of four processes:

  1. Two isentropic (reversible adiabatic) processes
  2. Two isochoric (constant volume) processes


These processes can be easily understood if we understand p-V (Pressure-Volume) and T-s (Temperature-Entropy) diagrams of the Otto cycle.

         

In the above diagrams,

p → pressure  V → Volume   T → temperature   s → Entropy   Vc → Clearance Volume  Vs → Stroke Volume

 

Processes in Otto Cycle:

Process 1-2: Isentropic compression

In this process, the piston moves from the bottom dead centre (BDC) to top dead centre (TDC) position. Air undergoes reversible adiabatic (isentropic) compression. We know that compression is a process in which volume decreases and pressure increases. Hence, in this process, the volume of air decreases from V1 to V2 and pressure increases from p1 to p2. Temperature increases from T1 to T2. As this an isentropic process, entropy remains constant (i.e., s1=s2).


Process 2-3: Constant Volume Heat Addition:

Process 2-3 is isochoric (constant volume) heat addition process. Here, piston remains at the top dead centre for a moment. Heat is added at constant volume (V2 = V3) from an external heat source. Temperature increases from T2 to T3, pressure increases from p2 to p3 and entropy increases from s2 to s3.

In this process,

Heat Supplied = mCv(T3 – T2)

where,

m → Mass

Cv → Specific heat at constant volume

 

Process 3-4: Isentropic expansion

In this process, air undergoes isentropic (reversible adiabatic) expansion. The piston is pushed from the top dead centre (TDC) to bottom dead centre (BDC) position. Here, pressure decreases from p3 to p4, volume rises from v3 to v4, the temperature falls from T3 to T4 and entropy remains constant (s3=s4).


Process 4-1: Constant Volume Heat Rejection

The piston rests at BDC for a moment and heat is rejected at constant volume (V4=V1). In this process, the pressure falls from p4 to p1, temperature decreases from T4 to T1 and entropy falls from s4 to s1.

In process 4-1,

Heat Rejected = mCv(T4 – T1)

Thermal efficiency (air-standard efficiency) of Otto Cycle,

                                        

                                         

 

 1 to 2 and from 3 to 4 are isentropic, therefore

                             

Volume swept by the piston, Vs = (π*(bore)2*stroke)/4

Clearance volume, Vc = Vs/(cr-1)

Volume swept as a function of theta:

A=(0.5)*(cr-1)
B=R+1-cosd(theta)
C=((R^2)-((sind(theta))^2))^0.5

V=(1+(A*(B-C)))*Vc

 

GIVEN:

 bore=0.8 meters

 stroke=0.2 meters

 connecting rod length = 0.15 meters

 compression ratio (cr) = 10

 p1=101325

 y=1.4

 t1=450

 t3=3050

 

OBJECTIVES OF THE PROJECT: The main objective of the project is to calculate all unknowns of each state by help of governing equations and given values. After that plotting P-V diagram and calculating efficiency of the cycle.

 

PROGRAM:

# Otto cycle simulator

import math
import numpy as np
import matplotlib.pyplot as plt

#Engine geometrical parameters
bore=0.8
stroke=0.2
con_rod=0.15
cr=10

def engine_kinematics(bore,stroke,con_rod,cr,theta1,theta2):

	v_stroke=(math.pi*pow(bore,2)*stroke)/4
	v_clear=v_stroke/(cr-1)
	a=stroke/2;
	R=con_rod/a

	theta=np.linspace(theta1,theta2,180)
	V=[]

	for t in theta:

		A=(0.5)*(cr-1)
		B=R+1-math.cos(math.radians(t))
		C=pow((R**2)-(math.sin(math.radians(t))**2),0.5)
		V.append((1+(A*(B-C)))*v_clear)

	return V

#known state variables
p1=101325
#gamma
y=1.4
t1=450
t3=3050

#calculation of volumes
v_stroke=(math.pi*pow(bore,2)*stroke)/4
v_clear=v_stroke/(cr-1)

#state 1
v1=v_stroke+v_clear

#state 2
v2=v_clear
p2=pow(v1/v2,y)*p1
t2=pow(v1/v2,y-1)*t1

#state 3
v3=v2
p3=p2*(t3/t2)

#state 4
v4=v1
p4=pow(v3/v4,y)*p3
t4=pow(v3/v4,y-1)*t3

#During Compression stroke
v_comp=engine_kinematics(bore,stroke,con_rod,cr,180,0)
c1=p1*pow(v1,y)
p_comp=[]

for v in v_comp:
	p_comp.append(c1/(pow(v,y)))


#During Expansion stroke
v_exp=engine_kinematics(bore,stroke,con_rod,cr,0,180)
c2=p3*pow(v3,y)
p_exp=[]

for ve in v_exp:
	p_exp.append(c2/(pow(ve,y)))


#Calculation efficiency 
n=1-((t4-t1)/(t3-t2))
print('Efficiency of engine = ', n);




#plotting state point
plt.plot(v1,p1,'*')
plt.plot(v2,p2,'*')
plt.plot(v3,p3,'*')
plt.plot(v4,p4,'*')
plt.plot(v_comp,p_comp, "-b",linewidth=3,label="Compression Stroke")
plt.plot([v2,v3],[p2,p3], "-r",linewidth=3,label="Heat Addition")
plt.plot(v_exp,p_exp, "-g",linewidth=3,label="Expansion Stroke")
plt.plot([v1,v4],[p1,p4], "-y",linewidth=3,label="Heat Rejection")

plt.xlabel('Volume (m^3)')
plt.ylabel('Pressure (pa)')
plt.legend()
plt.title('OTTO CYCLE')
plt.grid()
plt.show()





STEPS:

  • 1. All known engine geometry parameters and state variable were defined.
  • 2. The formula for volume swept and volume clearance was given.
  • 3. With the help of Isentropic formulate for process 1-2 and 3-4, all state variable was calculated.
  • 4. By this, we got all four-point of the p-v diagram but for tracing isentropic volume we need to define how the volume changes in the engine piston.
5. For this, we define a function, engine_kinematics which calculates the volume swept for isentropic processes for each value of angle covered by the connecting rod.
6. For this function, bore, stroke, length of connecting rod, cr and swept angle were given as arguments.
7. After this P-V diagram plot was completed by the help of plotting command.
8. The efficiency formula was also defined to get the efficiency of the cycle.

 

ERROR FACED: No Error Faced

OUTPUT:

The program outputs the efficiency of the Otto cycle and plots P-V diagram. In the P-V diagram we can see that for heat addition and heat removal process, the volume is constant and for the isentropic processes, the graph is following an isentropic path.

                           

                           

 

CONCLUSION:

Using PYTHON programming, the efficiency of the Otto cycle was calculated and the P-V diagram is plotted. This is very helpful in the case where there is any change in engine geometry, we can easily update that in the code and quickly see the changes in the P-V diagram.

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.

Please  login to add a comment

Other comments...

No comments yet!
Be the first to add a comment

Read more Projects by NAVEEN SWAMI (17)

MBD Simulation on IC Engine Valve Train

Objective:

AIM: MOTION ANALYSIS OF IC ENGINE VALVE TRAIN MECHANISM THEORY: Valve Train is a mechanical system in an IC engine that is responsible for controlling the intake and the exhaust of the combustion process. During the intake process, the intake valve opens to let air enter the combustion chamber and during the exhaust process,…

calendar

21 Jun 2020 08:00 AM IST

  • BIM
  • CAE
  • CFD
  • HEV
  • MBD
Read more

MOTION ANALYSIS OF IC ENGINE PISTON ASSEMBLY MECHANISM

Objective:

AIM: MOTION ANALYSIS OF IC ENGINE PISTON ASSEMBLY MECHANISM. THEORY: In IC Engine, the combustion is driven by Slider Crank Mechanism. Inside the cylinder, the piston performs reciprocating motion which results in compression and expansion of gas inside the cylinder. This motion of the piston is guided by the Slider Crank…

calendar

18 Jun 2020 06:12 AM IST

    Read more

    MOTION ANALYSIS OF PLANETARY GEAR SYSTEM

    Objective:

    AIM: MOTION ANALYSIS OF PLANETARY GEAR SYSTEM THEORY: A planetary gear mechanism also is known as Epicyclic Gear Train, is a gear mechanism consisting of 4 components, namely, sun gear A, several planet gears B, internal gear(ring gear) C and carrier D that connects planet gears as seen in the image below. It has a very…

    calendar

    11 Jun 2020 11:28 AM IST

      Read more

      MULTI-BODY DYNAMICS SIMULATION OF INTERNAL GENEVA MECHANISM IN SOLIDWORKS

      Objective:

      AIM: MULTI-BODY DYNAMICS SIMULATION OF INTERNAL GENEVA MECHANISM IN SOLIDWORKS. THEORY: Geneva mechanism is the mechanism through which continuous rotation motion is converted into intermittent rotation motion. In this, the driver wheel rotates continuously and the driven wheel has rotation in regular intervals not continuously.…

      calendar

      02 Jun 2020 09:49 AM IST

      • MBD
      • SOLIDWORKS
      Read more

      Schedule a counselling session

      Please enter your name
      Please enter a valid email
      Please enter a valid number

      Related Courses

      coursecard

      Linear Algebra

      Recently launched

      20 Hours of Content

      coursecardcoursetype

      Post Graduate Program in CFD Solver Development

      4.8

      119 Hours of Content

      coursecard

      Introduction to OpenFOAM Development

      4.9

      18 Hours of Content

      coursecard

      FEA using SOLIDWORKS

      4.8

      4 Hours of Content

      coursecard

      Core and Advanced Python Programming

      4.8

      30 Hours of Content

      Schedule a counselling session

      Please enter your name
      Please enter a valid email
      Please enter a valid number

      logo

      Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.

      https://d27yxarlh48w6q.cloudfront.net/web/v1/images/facebook.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/insta.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/twitter.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/youtube.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/linkedin.svg

      Our Company

      News & EventsBlogCareersGrievance RedressalSkill-Lync ReviewsTermsPrivacy PolicyBecome an Affiliate
      map
      EpowerX Learning Technologies Pvt Ltd.
      4th Floor, BLOCK-B, Velachery - Tambaram Main Rd, Ram Nagar South, Madipakkam, Chennai, Tamil Nadu 600042.
      mail
      info@skill-lync.com
      mail
      ITgrievance@skill-lync.com

      Top Individual Courses

      Computational Combustion Using Python and CanteraIntroduction to Physical Modeling using SimscapeIntroduction to Structural Analysis using ANSYS WorkbenchIntroduction to Structural Analysis using ANSYS Workbench

      Top PG Programs

      Post Graduate Program in Hybrid Electric Vehicle Design and AnalysisPost Graduate Program in Computational Fluid DynamicsPost Graduate Program in CADPost Graduate Program in Electric Vehicle Design & Development

      Skill-Lync Plus

      Executive Program in Electric Vehicle Embedded SoftwareExecutive Program in Electric Vehicle DesignExecutive Program in Cybersecurity

      Trending Blogs

      Heat Transfer Principles in Energy-Efficient Refrigerators and Air Conditioners Advanced Modeling and Result Visualization in Simscape Exploring Simulink and Library Browser in Simscape Advanced Simulink Tools and Libraries in SimscapeExploring Simulink Basics in Simscape

      © 2025 Skill-Lync Inc. All Rights Reserved.

                  Do You Want To Showcase Your Technical Skills?
                  Sign-Up for our projects.