Air Standard Cycle - Otto Cycle P-V Diagram &Thermal Efficiency Calculation
AIM
To write a program to create Otto Cycle P-V diagram and output the thermal efficiency of the engine.
EQUATIONS
CYLINDER VOLUME AT ANY CRANK ANGLE
`V/V_c =1+1/2(r_c-1)[R+1-cos(theta)-(R^2-sin(theta)^2)^(1/2))`
THERMODYNAMIC RELATIONS:
- Ideal Gas Equation: `pv=RTPv=RT`
- Adiabatic Relations:Pvγ=ConstantPvγ=ConstantTvγ−1=ConstantTvγ-1=Constant
- Otto Cycle Efficiency: `eta=1-(1/r_c)^(gamma-1)*100`
OBJECTIVES
- Write a program to plot the curves of PV- diagram of the Otto Cycle.
- Find the Thermal Efficiency of the Otto Cycle.
THEORY
The otto cycle approximates the processes in petrol or diesel engines. At constant volume Heat is transferred to the working fluid. It Consists of four internally reversible processes
- Isentropic compression. (State 1-2)
- Constant volume heat addition. (State 2-3)
- Isentropic expansion. (State 3-4)
- Constant volume heat rejection. (State 4-1)
Process 0 to 1
Referred to as the intake phase, the piston is drawn down to the bottom to allow the volume in the chamber to increase so it can "intake" a fuel-air mixture. In terms of thermodynamics, this is referred to as an isobaric process.
Process 1 to 2
During this phase the piston will be drawn up, so it can compress the fuel-air mixture that entered the chamber. The compression causes the mixture to increase slightly in pressure and temperature—however, no heat is exchanged. In terms of thermodynamics, this is referred to as an adiabatic process. When the cycle reaches point 2, that is when the fuel is met by the spark plug to be ignited.
Process 2 to 3
This is where combustion occurs due to the ignition of fuel by the spark plug. The combustion of the gas is complete at point 3, which results in a highly pressurized chamber that has a lot of heat (thermal energy). In terms of thermodynamics, this is referred to as an isochoric process.
Process 3 to 4
The thermal energy in the chamber as a result of combustion is used to do work on the piston—which pushes the piston down—increasing the volume of the chamber. This is also known as the power stoke because it is when the thermal energy is turned into motion to power the machine or vehicle.
Process 4 to 1 and exhaust phase
From process 4 to 1, all waste heat is expelled from the engine chamber. As the heat leaves the gas, the molecules lose kinetic energy causing the decrease in pressure.[6] Then the exhaust phase occurs when the remaining mixture in the chamber is compressed by the piston to be "exhausted" out, without changing the pressure.
THERMAL EFFICIENCY
In thermodynamics, the thermal efficiency is a dimensionless performance measure of a device that uses thermal energy, such as an internal combustion engine, a steam turbine or a steam engine, a boiler, furnace, or a refrigerator for examples
Thermal efficienct: η=1−(1/(C_r)^gamma(γ)−1)*100
The thermal efficiency of a heat engine is the percentage of heat energy that is transformed into work. Thermal efficiency is defined as. The efficiency of even the best heat engines is low; usually below 50% and often far below.
An ideal heat engine is an imaginary engine in which energy extracted as heat from the high-temperature reservoir is converted completely to work. But according to the Kelvin-Planck statement, such an engine would violate the second law of thermodynamics, because there must be losses in the conversion process. The net heat added to the system must be higher than the net work done by the system.
Thermal efficiency definition, the ratio of the work output of a heat engine to the heat input expressed in the same units of energy
It is impossible for heat engines to achieve 100% thermal efficiency () according to the Second law of thermodynamics. This is impossible because some waste heat is always produced produced in a heat engine
MAIN PROGRAM
%Program_Air_Standard_or_Ideal_otto_cycle_pv_diagram
clear all
close all
clc
% Engine geomentry parametars
bore = 0.1;
stroke = 0.1;
Con_rod = 0.15;
C_r = 12 ;
% Inputs for 1st state variables
p1 = 101325;
t1 = 500;
% Calculation of Swept volume and Clearance volume
V_s = (pi/4)*bore^2*stroke;
V_c = V_s/(C_r-1);
% Calculation 1st State variables
v1 = V_s + V_c;
% Calculating 2nd state variable
v2 = V_c;
% INPUT of gamma
gamma = 1.4;
% To calculate pressure of 2nd state can use Relation of which define isentropic Compression Process 1-2.
p2 = p1*C_r^gamma;
% To calculate Temperature of 2nd state can use Ideal Gas Law Since
t2=p2*v2*t1/(p1*v1);
% To make compression process state 1-2 plot. calling engine kinematice function to compute V_compression and P_compression
constant_c = p1*v1^gamma;
V_compression = engine_kinematics(bore,stroke,Con_rod,C_r,180,0);
P_compression = constant_c./V_compression.^gamma;
% To Calculate 3rd state variables
v3 = v2;
% INPUT of 3rd state Temperature(computeted by assumption)
t3 =2300;
% To compute 3rd state Pressure can we use Ideal gas law(PV/T)
p3 = p2*t3/t2;
% To make expansion process state 3-4 plot. Calling engine kinematice function to compute V_expansion and P_expansion
constant_c = p3*v3^gamma;
V_expansion = engine_kinematics(bore,stroke,Con_rod,C_r,0,180);
P_expansion = constant_c./V_expansion.^gamma;
% To calculate 4th state variables
v4 =v1;
% To compute Pressure of 4th state, we can use relation 3-4 Isentropic Expansion process.
p4 = p3*(v3/v4)^gamma;
% Plotting all 4 state Pressure and volume variables for PV diagram
hold on
plot(v1,p1,'*','color','r')
plot(V_compression,P_compression,'color','b')
plot(v2,p2,'*','color','r')
plot([v2 v3],[p2 p3],'color','b')
plot(v3,p3,'*','color','r')
plot(V_expansion,P_expansion,'color','b')
plot(v4,p4,'*','color','r')
plot([v4 v1],[p4 p1],'color','b')
xlabel('Volume')
ylabel('Pressure')
% Calculation of Thermal efficency of the engine.
thermal_eff =(1-(1/(C_r)^(gamma-1)))*100;
CODE EXPLAINATION:
%Program_air_standard_or_Ideal_otto_cycle_pv_diagram
% simulating and program air standard or Ideal otto cycle P-v diagram using engine kinematics for 4 stroke IC engine
% Four stroke are Intake stroke, Compression stroke,Power stroke and Exhaust stroke
%1-2=Isentropic compression,2-3=Constant volume heat addition,3-4=Isentropic expansion,4-1=Constant volume heat rejection
%Need volume, pressure, temperature values for all 4 states to compute 4 points in P-V diagram.
% To find the 1st state volume that we need Swept volume(V-s)and Clearance volume(V-c)
% To find V_s and V_c and To find how the volume change from 1st to 2nd state that we need Engine Geomentry parametars
clear all
close all
clc
% Engine geomentry parametars
bore = 0.1; % Engine bore for piston movement
stroke = 0.1; % Engine piston movement length from BDC upto TDC
Con_rod = 0.15; % At Piston from mid of Wrist pin(piston pin) bore upto crank shaft mid of crank pin bore
C_r = 12 ; % Compression ratio- if we have V_c value then C_r= (pi/4*b^2*s)+V_c/V_c or v1+v2/v2
% To give Inputs for 1st state variables which is initial process of engine that assumed or actual values
p1 = 101325; % Pressure of 1st state natural value at pascal(1 atm)
t1 = 500; % Temperature of 1st state natural value at Kelvin (500-273.15=226.85 celsius)
% Calculation of Swept volume and Clearance volume
V_s = (pi/4)*bore^2*stroke; % Swept volume compute by space of TDC to BDC.
V_c = V_s/(C_r-1); % clearance volume mean obove the space of TDC. It is not merge with V_s and stroke.
% Calculation 1st State variables
v1 = V_s + V_c; % Means at 1st state is initial process that airfuel intake stroke so we have whole chamber to fill airfuel.
% Calculating 2nd state variable
v2 = V_c; % At compression stroke piston move to TDC,whichmean we have only the clearance volume at above the TDC.
% FOR INFROMATION- Gamma ratio means ratio b/t constant volume and contant pressure also called as Specific Heat ratio. For solid,liquid have same cp&cv,but gases are not.
% The ratio of the specific heats ? = CP/CV is a factor in determining the speed of sound in a gas and other adiabatic processes as well as this application to heat engines
% "Gamma" is just a number whose value depends on the state of the gas. For air, gamma = 1.4 for standard day conditions.
% It depends strongly on Temperature as well as the medium through which a sound wave is propagating.
% INPUT of gamma
gamma = 1.4; % The value of gamma for air. For air cp=1.005&cv=0.714.
% To calculate pressure of 2nd state can use Relation of which define isentropic Compression Process 1-2.
% Relation |p2v2^gamma = p1v1^gamma|as form|p2=p1(v1/v2)^gamma|Here Compression Ratio(C_r) = v1/v2, so 2nd state pressure variable form as p2=p1*C_r^gamma.
p2 = p1*C_r^gamma; % Pressure of compression stroke or 2nd state
% To calculate Temperature of 2nd state can use Ideal Gas Law Since PV/T is constant we can say that in state 1-2(Isentropic compression pressure).
% Relation|p1v1/t1 = p2v2/t2|as form|t2=p2*v2*t1/(p1*v1)|
t2=p2*v2*t1/(p1*v1); % Temperature of 2nd state or compression stroke
% To make compression process state 1-2 plot need volume change for every 1-2 state crank angle. So calling engine kinematice function to compute V_compression and P_compression
constant_c = p1*v1^gamma; % To compute P_compression use this |pv^gamma=constant| Relation at compression process state1-2.
V_compression = engine_kinematics(bore,stroke,Con_rod,C_r,180,0); % function for compute V_compression
P_compression = constant_c./V_compression.^gamma; % Computing P_compression using Relation P_compression * V_compression = constant_c
% To Calculate 3rd state variables
% At 3rd state represents at the end point of constant volume of compression process. State 2-3 have contant volume heat addition process
v3 = v2; % Volume of 3rd state. v2 and v3 is same line as equal value. state 2-3 have constant volume
%In order to facilitate our calculation end of the combustion process we have to assume that the Temperature of the charge(ingnition) is 2000k,that increase the t3 upto 2300k.
% INPUT of 3rd state Temperature(computeted by assumption)
t3 =2300; % Temperature of 3rd state or end point of compression stroke and initial point of power stroke. Its main pushing variable for power consumtion process.
% To compute 3rd state Pressure can we use Ideal gas law(PV/T) as like previous 2nd state, we have t3 values that use to computing 3rd state pressure.
% Use Relation of 2-3 Isentropic expantion process.
% Relation |p3v3/t3=p2v2/t2|as form|p3=p2v2t3/(v3t2)|simplify to|p3=p2t3/t2|which means v3 and v2 are equal(v2=v3) variable, its excuting themself
p3 = p2*t3/t2; % Pressure of 3rd state or Isentropic Expansion.
% To make expansion process state 3-4 plot need volume change for every 1-2 state crank angle. So call engine kinematice function to compute V_expansion and P_expansion
constant_c = p3*v3^gamma; % To compute P_expansion use this |pv^gamma=constant| Relation at expansion process state3-4.
V_expansion = engine_kinematics(bore,stroke,Con_rod,C_r,0,180); % function for compute V_expansion
P_expansion = constant_c./V_expansion.^gamma; % Computing P_expansion using Relation P_expansion * V_expansion = constant_c
% To calculate 4th state variables
% At 4th state represents at the end point of constant volume of Heat rejection process. State 4-1 have contant volume heat rejection process
% At state 4-1 piston back to initial stage at heat rejection process. so volume of state 4 and 1 are equal.
v4 =v1; % Volume of 4th state. v4 and v1 are equal volume at state 4-1, because 4-1 is constant volume heat rejection process.
% To compute Pressure of 4th state, we can use relation 3-4 Isentropic Expansion process.
% Relation |p3v3^gamma=p4v4^gamma|as form|p4=p3(v3/v4)^gamma|
p4 = p3*(v3/v4)^gamma; % Pressure of 4th state or heat rejection process.
% Plotting all 4 state Pressure and volume variables for PV diagram
hold on % To show all plot of points in one figure window.
% plotting Pressure and Volume of all 4 state points indicate with (*) red color.
plot(v1,p1,'*','color','r')% variabel points plot for 1st state
plot(V_compression,P_compression,'color','b') % plot for volume changes state 1-2
plot(v2,p2,'*','color','r')% variabel points plot for 2nd state
plot([v2 v3],[p2 p3],'color','b')%Variabel v2(V_com end point),v3(V_exp start point)have same value because of crank angle position is 0 deg for both points, but pressure points(p2,p3) vary
plot(v3,p3,'*','color','r')% variabel points plot for 3rd state
plot(V_expansion,P_expansion,'color','b')% plot for volume changes state 3-4
plot(v4,p4,'*','color','r')% variabel points plot for 4th state
plot([v4 v1],[p4 p1],'color','b')%Variabel v4(V_exp end point),v1(V_com start point)have same value because of crank angle position is 180 deg for both points, but pressure points(p2,p3) vary
xlabel('Volume')% Name of x-axis
ylabel('Pressure')% Name of y-axis
% Calculation of Thermal efficency of the engine. Thermal efficiency definition, the ratio of the work output of a heat engine to the heat input expressed in the same units of energy
% Thermal efficienct: ?=1?(1/(C_r)^gamma?1)*100
thermal_eff =(1-(1/(C_r)^(gamma-1)))*100;
ENGINE KINEMATICS FUNCTION CODE-SUB PROGRAM:
% Program to solve piston kinamtics equations. This is function program or code template.
function [V] = engine_kinematics(bore,stroke,Con_rod,C_r,start_crank_ang,end_crank_ang)
a = stroke/2;
R = Con_rod/a;
theta = linspace(start_crank_ang,end_crank_ang,180);
V_s = (pi/4)*bore^2*stroke;
V_c = V_s/(C_r-1);
% Formula to determine how the volume inside the engine combustion chamber is going to change.
% V/V_c = 1+ 1/2(r_c-1) [R+1-cosd(theta) - (R^2-sind(theta)^2)^0.5] in this r_c is compression ratio(C_r)
% Spilt this formula to 3 terms to simplify the calculation
term1 = 0.5*(C_r-1);
term2 = R + 1 - cosd(theta);
term3 = (R^2 - sind(theta).^2).^0.5;
V = (1+ term1*(term2-term3)).*V_c;
end
ENGINE KINEMATICS FUNCTION CODE EXPLAINATION:
% Program to solve piston kinamtics equations. This is function program or code template.
function [V] = engine_kinematics(bore,stroke,Con_rod,C_r,start_crank_ang,end_crank_ang)
a = stroke/2; % a is crank pin radius, which is half of the volue of stroke
R = Con_rod/a; % R is ratio b/t connecting rod length and crank pin radius
theta = linspace(start_crank_ang,end_crank_ang,180); % value of the is represents crank angle degree, if theta is 0 piston position at TDC, theta is 180 pistion position an BDC. /
V_s = (pi/4)*bore^2*stroke;
V_c = V_s/(C_r-1);
% Formula to determine how the volume inside the engine combustion chamber is going to change.
% V/V_c = 1+ 1/2(r_c-1) [R+1-cosd(theta) - (R^2-sind(theta)^2)^0.5] in this r_c is compression ratio(C_r)
% Spilt this formula to 3 terms to simplify the calculation
term1 = 0.5*(C_r-1);
term2 = R + 1 - cosd(theta);
term3 = (R^2 - sind(theta).^2).^0.5;
V = (1+ term1*(term2-term3)).*V_c;
end
OUTPUT PLOT:
OUTPUT FOR THERMAL EFFICIENCY
OUTPUT SCREENSHOT FOR MAIN PROGRAM:
OUTPUT SCREENSHOT FOR FUNCTION PROGRAM:
CONCLUION
The Air Srandard Cycle program had coded properly with correct output and P-V daigram. And also The Thermal efficiency computed. The output efficiency is 62.98%.