Ideal Otto cycle thermodynamics
Aim:
Internal Combustion (IC) Engines have been widely used for decades in powering automobiles, aircrafts, ships, small scale generators and in power generation applications. They has been a continuous improvement in increasing the thermal efficiency and power output of IC engines over the last century. In this project, the governing thermodynamic cycle of spark-ignition (SI) engines and compression ignition (CI) engines is studied with attention to the thermal efficiency and calculation of state variables. The calculations are presented for the Otto cycle.
Governing Equations:
In the case of spark-ignition (SI) engines, the governing thermodynamic cycle is called the Otto Cycle and has four main processes:
`1→2`: Isentropic compression
`2→3`: Constant volume heat addition
`3→4` : Isentropic expansion
`4→1`: Constant volume heat rejection
It should be noted that the processes listed above are for an ideal Otto cycle. In reality, there is some deviation from the ideal processes due to the irreversibilities. The various cycle processes can be related to the engine piston location inside the cylinder as shown below:
Ref: Research Gate
The following figure illustrates the approximate start and stop timing of each process.
Ref: Research Gate
Some of the major governing equations for the Otto cycle are mentioned below:
Equation of state:
`P= ρRT` (or) `Pv= RT`
Where,
P – pressure [Pa]
T – temperature [K]
`ρ` – fluid density [kg/m3]
R – molecular gas constant [J/kgK]
`v` – specific volume [m3/kg]
For an isentropic process,
`Pv^γ= C` (or) `Tv^(γ-1)= C`
Where,
C - constant [-]
`γ`– specific heat ratio defined as `C_p/C_v` [-]
The engine compression ratio (CR) is defined as,
CR = Vmax/Vmin
Where,
Vmax - Cylinder volume when piston is at TDC
Vmin - Cylinder volume when piston is at BDC
TDC – top dead centre
BDC – bottom dead centre
The swept volume is calculated based on the geometric parameters as follows:
Vswept = `(πD^2/4)*L`
Where,
D – outer diameter of the piston or cylinder bore [m]
L – piston stroke length [m]
The volume change that occurs during the compression and expansion processes is calculated using the following equation:
`V/V_c =1+1/2*[CR-1][R+1-cosθ-(R^2-(sinθ)^2 )^(1/2) ]`
Where,
Vc – clearance volume [m3]
R – connecting rod length / crank pin radius [-]
`θ`– angle between crankshaft and connecting rod [degrees]
V – actual volume inside the cylinder as enclosed by the piston [m3]
Crank pin radius = stroke/2
The thermal efficiency of the Otto cycle is given by,
In the case of compression ignition engines, the governing thermodynamic cycle is called the Diesel Cycle and has four main processes:
`1→2`: Isentropic compression
`2→3`: Constant pressure heat addition
`3→4` : Isentropic expansion
`4→1`: Constant volume heat rejection
As compared to the Otto cycle, only the second process occurs at constant pressure instead of constant volume in the Diesel cycle. It should be noted that the processes listed above are for an ideal Diesel cycle. In reality, there is some deviation from the ideal processes due to the irreversibilities. The various cycle processes can be related to the engine piston location inside the cylinder as shown below:
Ref: Research Gate
The ideal gas law and the process equations used for the Otto cycle are equally applicable to the Diesel cycle and so is not repeated here.
The thermal efficiency of the Diesel cycle is given by,
`η_(diesel)=1-1/(CR)^(γ-1) [(r_c^γ-1)/(γ(r_c-1)) ]`
`r_c=V_3/V_2`
`Where, r_c –` cut off ratio [-]
Objectives:
The main objective of this project is to understand the basic working cycle of Internal Combustion Engines. While the suggested case is for the Spark Ignition engines using the Otto cycle, the project can be extended to other internal combustion engines as well.
Main Content:
The following Matlab code calculates the state variables in an Otto Cycle and finally computes the thermal efficiency of the cycle. The code also plots the thermal efficiency vs compression ratio and for different specific heat ratios. Comments are provided at each step of the code to explain the command.
Program Algorithm:
Main Code:
|
Line No. |
Explanation |
|
1,2,3 |
Code title and description |
|
4,5,6 |
Clear all previous data/screen and close windows of previous code execution |
|
8-11 |
Initialize cylinder inlet temperature, pressure and combustion exit temperature |
|
13-18 |
Initialize the engine geometric parameters such as connecting rod, piston diameter, etc. |
|
19 |
Initialize the engine compression ratio |
|
21,22 |
Calculating the swept and clearance volume using the geometric parameters |
|
23,24 |
Calculating the cylinder volume enclosed by the piston at states 1,2 |
|
27-32 |
Calculating the variables at state 2 using the isentropic and ideal gas relations |
|
39-41 |
Calculating the volume change during the isentropic compression process using a function called “ic_engine_kinematics”; Pressure change is computed using the isentropic relation |
|
44,45 |
Computing the volumes at states 3,4 using the constant volume process relations |
|
46-52 |
Computing the pressure and temperatures at states 3,4 using the isentropic and ideal gas relations |
|
53 |
Calculating the isentropic process constant for process 3à4 |
|
55-58 |
Calculating the volume change during the isentropic expansion process using a function called “ic_engine_kinematics”; Pressure change is computed using the isentropic relation |
|
60-70 |
Using the plot command to display the P-V diagram for the Otto cycle in a figure window |
|
72 |
setting the text font size |
|
74,75 |
Providing labels for the X and Y axis |
|
77,78 |
Turning the major and minor grid lines ON in the plot |
|
82-85 |
Defining an array of compression ratios and multiple gamma values as inputs for the cycle thermal efficiency |
|
86-88 |
Calculating the Otto cycle thermal efficiency for different gamma values |
|
90,91 |
Using the plot command to display the Thermal efficiency curve for the Otto cycle in a figure window |
|
93 |
setting the text font size |
|
95,96 |
Using the plot command to display the Thermal efficiency curve for the Otto cycle in a figure window |
|
98 |
Defining the plot legend |
|
100,101 |
Providing labels for the X and Y axis |
|
103,104 |
Turning the major and minor grid lines ON in the plot |
%-----------------Start of Program-----------------------
%Ideal Otto cycle thermodynamics calculations - Srikrishna Mahadevan
%Clear and close all previous calculations, figures, etc.
clear all
close all
clc
%Inputs for constants and state variables
gamma = 1.4; %specific heat ratio
P1 = 101325;%inlet pressure to the cylinder in 'Pa'
T1 = 500;%inlet temperature to the cylinder in 'K'
T3 = 2300;%temperature of the combustion gases in 'K'
%Piston,Crank shaft, Connecting rod geometric parameters
bore = 0.1;%cylinder inside diameter in [m]
stroke = 0.1;%piston travel length from BDC to TDC in [m]
conn_rod = 0.15;%length of the connecting rod in [m]
a = stroke/2; %crank pin radius
R = conn_rod/a; %ratio of connecting rod length to crank pin radius
theta = linspace(0,180,180); %crankshaft angle
CR = 12; % engine compression ratio (Vmax/Vmin)=V1/V2
%Volume calculations
V_swept = (pi()/4)*(bore^2)*stroke;
V_clearance = V_swept/(CR-1);
V1 = V_swept + V_clearance;
V2 = V_clearance;
%Calculating the variables at state 2
%P1V1^gamma = P2V2^gamma
P2 = P1*(CR)^gamma;
% P1V1/T1 = P2V2/T2
% T2/P2V2 = T1/P1V1
T2 = T1*(P2/P1)*(1/CR);
Const_1_2 = P2*V2^gamma;
%Volume change in the cylinder during isentropic compression process
% term_1 = 0.5*(CR-1);
% term_2 = R+1-cosd(theta);
% term_3 = ((R^2)-(sind(theta)).^2).^0.5;
% V_change = (1+term_1*(term_2-term_3))*V_clearance;
V_compression = ic_engine_kinematics(bore,stroke,conn_rod,CR,180,0);
% P_compression*V_compression^gamma = Constant
P_compression = Const_1_2./(V_compression.^gamma);
% Calculating the variables at state 3 and 4
V3 = V2;%due to constant volume process
V4 = V1;%due to constant volume process
% P3V3^GAMMA = P4V4^gamma
% [P2V2/T2] = [P3V3/T3]
P3 = (T3*P2)/T2;
P4 = P3*(V3/V4)^gamma;
%T3V3^(gamma-1) = T4V4^(gamma-1)
%T4 = T3*[V3/V4]^(gamma-1)
T4 = T3*(V3/V4)^(gamma-1);
Const_3_4 = P3*V3^gamma;
%Volume change in the cylinder during isentropic expansion process
V_expansion = ic_engine_kinematics(bore,stroke,conn_rod,CR,0,180);
% P_compression*V_compression^gamma = Constant
P_expansion = Const_3_4./(V_expansion.^gamma);
%Plotting the P-V diagram for the Otto cycle
figure(1)
hold on
plot(V1,P1,'o','color','r','linewidth',3)
plot(V2,P2,'o','color','g','linewidth',3)
plot(V_compression,P_compression,'color','r','linewidth',3)
plot(V3,P3,'o','color','m','linewidth',3)
plot([V2 V3],[P2 P3],'color','b','linewidth',3)
plot(V4,P4,'o','color','b','linewidth',3)
plot(V_expansion,P_expansion,'color','r','linewidth',3)
plot([V4 V1],[P4 P1],'color','b','linewidth',3)
%setting the text font size
set(gca,'fontsize', 18);
%Defining the plot axis labels
xlabel('Cylinder volume as enclosed by Piston [m^3]')
ylabel('Cylinder Pressure [Pa]')
%enabling the grid display
grid on
grid minor
%Thermal efficiency of the engine using ideal Otto cycle
%for multiple compression ratios
CR_array = linspace(1,20,20);
gamma_1 = 1.3; %for carbon dioxide
gamma_2 = 1.4; %for air
gamma_3 = 1.667; %for argon or helium
eta_1 = 1-(1./(CR_array.^(gamma_1-1)));
eta_2 = 1-(1./(CR_array.^(gamma_2-1)));
eta_3 = 1-(1./(CR_array.^(gamma_3-1)));
%Plotting the thermal efficiency for various gamma values
figure(2)
plot(CR_array,eta_1,'color','black','linewidth',3)
%setting the text font size
set(gca,'fontsize', 18);
hold on
plot(CR_array,eta_2,'color','blue','linewidth',3)
plot(CR_array,eta_3,'color','red','linewidth',3)
%Defining the plot legend
legend('gamma = 1.3','gamma = 1.4','gamma = 1.667');
%Defining the plot axis labels
xlabel('Engine compression ratio [-]')
ylabel('Thermal Efficiency [-]')
%enabling the grid display
grid on
grid minor
%Thermal efficiency for CR = 12
eta_otto = 1-(1/(CR^(gamma_2-1)))
%------------------------End of Program--------------------------------
Function:
|
Line No. |
Explanation |
|
5 |
Definition of function including function name inputs and output variables |
|
6,7 |
Specifying the piston and cylinder geometric parameters |
|
8,9 |
Swept and Clearance volume calculations |
|
10 |
Defining the crankshaft angle array |
|
12-15 |
Volume change calculation using engine geometric parameters for isentropic compression and expansion processes |
|
16 |
End statement for the function |
%---------------------------------Start of Function--------------------------
%Function to calculate the Volume change in the cylinder during
%isentropic compression and expansion process
%Using piston and cylinder geometric parameters
function [V_change] = ic_engine_kinematics(bore,stroke,conn_rod,CR,start_crank_angle,end_crank_angle)
a = stroke/2; %crank pin radius
R = conn_rod/a; %ratio of connecting rod length to crank pin radius
V_swept = (pi()/4)*(bore^2)*stroke;%Swept volume
V_clearance = V_swept/(CR-1);%clearance volume
theta = linspace(start_crank_angle,end_crank_angle,180); %crankshaft angle
%Volume change in the cylinder during isentropic compression/expansion process
term_1 = 0.5*(CR-1);%term 1 in the volume change equation
term_2 = R+1-cosd(theta);%term 2 in the volume change equation
term_3 = ((R^2)-(sind(theta)).^2).^0.5;%term 3 in the volume change equation
V_change = (1+term_1*(term_2-term_3))*V_clearance;%Volume change calculation
end
%---------------------------------End of Function--------------------------
Results and Discussion:
Figure 1 - P-V diagram for an ideal Otto cycle
The P-V diagram for an ideal Otto cycle is shown in figure 1. It exhibits the variation of cylinder pressure as a function of the volume enclosed by the piston inside the cylinder. It physically represents the work done in the cycle, i.e. both work done by the piston on the working fluid and on the piston by the hot combustion gases. The net work extracted from an engine operating on Otto cycle is equal to the area enclosed by the curves as indicated on P-V diagram.
Figure 2 - Thermal efficiency of an ideal Otto cycle
The thermal efficiency of an ideal Otto cycle for various compression and specific heat ratios are shown in figure 2. It is evident that the thermal efficiency continuously increases with compression ratio since the temperature and pressure of air entering the combustion process is higher producing a higher work output. By changing the working fluid from air to carbon dioxide (gamma = 1.3), there is a reduction in the work output as the specific heat at constant pressure is relatively lower. On the other hand, gases with higher gamma values such as Argon or Helium (gamma = 1.667) result in higher thermal efficiency for an ideal Otto cycle.
Conclusions:
The Otto cycle thermodynamics enables us to understand the fundamental processes that occur in the gasoline engines which we see almost daily in our lives. Any improvement in the cycle efficiency depends on many factors such has compression ratio, process irreversibilities, efficient and complete combustion, etc. In summary, this challenge is the first step in understanding the internal combustion engines and can be also extended to explore continuous combustion engines such as Gas Turbines.