Project

ENGINE KINEMATICS

OTTO CYCLE

1.OBJECTIVE: To create a PV plot of the engine process and to calculate thermal efficiency.

2.PROGRAM:

  • The engine parameters such as engine bore dia, compression ratio, stroke length, and connecting rod length are given as input.
  • Initial conditions such as temperature and pressure at first state point and temperature at state point 3 are given and constant gamma is specified.
  • Using the above input volume is calculated.
  • State 2, state 3 and state 4 variables are calculated, using conditions and formulas.
  • To visualize the actual variation of volume with pressure between state 1 to 2 and state 3 to 4, Functions \'engine_kinematics\' is created.In function start_angle, end_angle are the crank angles( it defines the piston position in the cylinder and hence also defines volume).
  • volume relation `V/Vc = (1)+(0.5)*(cr-1)((r+1-cos(theta)-(r^2-sin(theta)^2)^0.5)`
  • State points, process path are defined plotted using \'PLT.plot()\'
  • Thermal efficiency calculated using relation thermal efficiency = 1-(1/cr^(gamma-1))

3.CODE

# OTTO CYCLE ENGINE

import math
import matplotlib.pyplot as PLT

# FUNCTION TO TRACE VOLUME VS PRESSURE DURING COMPRESSION AND EXPANSION

def engine_kinematics(stroke,conrod,cr,start_angle,end_angle):

	# ENGINE PARAMETERS AND INITIAL CONDITIONS
	# a = stroke/2 ; R = conrod/a

	R = 2*conrod/stroke

	# EQUATION OF V = (1+term1+term2+term3)*clearance volume

	initial_theta = math.radians(start_angle)
	final_theta = math.radians(end_angle)
	num_values = 50
	point_theta = (initial_theta-final_theta)/(num_values-1)
	VOLUME = []

	for i in range(0,num_values):

		theta = initial_theta+(i*point_theta)
		term1 = 0.5*(cr-1)
		term2 = R+1-math.cos(theta)
		term3 = pow(pow(R,2)-pow(math.sin(theta),2),0.5)

		VOLUME.append((1+term1*(term2-term3))*v_clr)

	return VOLUME

# FUNCTION ENDS
# ENGINE PARAMETERS AND INITIAL CONDITIONS

bore = 0.1
stroke = 0.1
conrod = 0.15
cr = 10
gamma = 1.4
p1 = 101325
t1 = 500 
t3 = 2300

# VOLUME CALUCLATIONS

v_swept = math.pi/4*pow(bore,2)*stroke
v_clr = v_swept/(cr-1)
v_total = v_clr + v_swept

# STATE POINTS 1

v1 = v_total

# STATE POINTS 2

v2 = v_clr
p2 = p1*pow(v1/v2,gamma)
constant = p1*v1/t1
t2 = p2*v2/constant
constant_value1 = p1*pow(v1,gamma)

v_compression = engine_kinematics(stroke,conrod,cr,180,0)
p_compression = []

for x in v_compression:

	p_compression.append(constant_value1/pow(x,gamma))


# STATE POINTS 3

v3 = v_clr
p3 = constant*t3/v3

# STATE POINTS 4

v4 = v_total
p4 = p3*pow(v3/v4,gamma)
t4 = p4*v4/constant
constant_value2 = p3*pow(v3,gamma)

v_expansion = engine_kinematics(stroke,conrod,cr,0,180)
p_expansion = []

for y in v_expansion:

	p_expansion.append(constant_value2/pow(y,gamma))

# PLOT

PLT.plot([v1,v2,v3,v4],[p1,p2,p3,p4],\'*\')

PLT.plot(v_compression,p_compression,label=\'compression\')
PLT.plot([v2,v3],[p2,p3],label=\'heat addition\')
PLT.plot(v_expansion,p_expansion,label=\'expansion\')
PLT.plot([v4,v1],[p4,p1],label=\'heat rejection\')

PLT.xlabel(\'volume [meter cube]\')
PLT.ylabel(\'pressue [pascals]\')
PLT.title(\'OTTO CYCLE\')
PLT.legend(loc=\'best\')

PLT.show()

# THERMAL EFFICIENCY
# thermal efficieny = work done/ heat supplied.
# derived equation, thermal efficieny= 1 -(1/cr^(gamma-1))

power = gamma-1

n_therm = 1-(1/pow(cr,power))

#n_therm in percentage

n_therm100 = n_therm*100


print(\'THERMAL EFFICIENCY\',n_therm100)

4.RESULT:

1. PV plot for the otto cycle is obtained.

2. output of thermal efficiency is shown.

\"PV

\"thermal

THANK YOU

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.