Week 2 Air standard Cycle
OBJECTIVE:
To solve an Otto cycle and plot the PV diagram, we'll first define the necessary thermodynamic processes. The Otto cycle consists of four key processes:
- Isentropic Compression (Process 1-2): Compression of the air-fuel mixture.
- Constant Volume Heat Addition (Process 2-3): The fuel ignites, raising the pressure at constant volume.
- Isentropic Expansion (Process 3-4): Expansion of gases.
- Constant Volume Heat Rejection (Process 4-1): Heat is rejected, lowering the pressure at constant volume.
Requirements:
- PV Diagram: A plot of pressure vs. volume for the entire cycle.
- Thermal Efficiency: Calculate the thermal efficiency of the Otto cycle.
Key Equations:
Thermal Efficiency:
where is the compression ratio and is the specific heat ratio (usually 1.4 for air).
Isentropic Relation: For an isentropic process:
Assumptions:
- Air behaves as an ideal gas.
- The specific heat ratio
- The compression ratio .
MATLAB PROGRAM:
% Constants
gamma = 1.4; % Specific heat ratio (Cp/Cv for air)
r = 8; % Compression ratio
T1 = 300; % Initial temperature in Kelvin
P1 = 101325; % Initial pressure in Pa
V1 = 1; % Initial volume in m^3
Qc_in = 500; % Heat added during combustion (J)
% State 1
V2 = V1 / r; % Compression volume
% Process 1 -> 2 (Isentropic Compression)
T2 = T1 * (V1 / V2)^(gamma - 1);
P2 = P1 * (V1 / V2)^gamma;
% Process 2 -> 3 (Constant volume heat addition)
% Applying energy balance: Q_in = Cv*(T3 - T2)
Cv = Qc_in / (T2 - T1); % Find Cv based on known Q_in
T3 = T2 + Qc_in / Cv; % T3 after heat addition
P3 = P2 * (T3 / T2); % Constant volume, P3 = P2 * T3 / T2
% Process 3 -> 4 (Isentropic Expansion)
V3 = V2; % Constant volume
V4 = V1; % Expansion back to original volume
T4 = T3 * (V3 / V4)^(gamma - 1);
P4 = P3 * (V3 / V4)^gamma;
% Process 4 -> 1 (Constant volume heat rejection)
P1 = P4 * (T1 / T4); % P1 returns to initial state (ideal)
% Thermal efficiency of Otto cycle
efficiency = 1 - 1 / r^(gamma - 1);
% Plotting PV Diagram
V = [V1, V2, V2, V1];
P = [P1, P2, P3, P4];
figure;
plot(V, P, '-o', 'LineWidth', 2);
title('Otto Cycle PV Diagram');
xlabel('Volume (m^3)');
ylabel('Pressure (Pa)');
grid on;
% Display thermal efficiency
fprintf('Thermal Efficiency of the Otto Cycle: %.2f%%\n', efficiency * 100);
Explanation of the Code:
Isentropic Compression (Process 1-2):
- We calculate the pressure using the isentropic relation: .
Constant Volume Heat Addition (Process 2-3):
- At this point, the volume stays constant, and we assume a temperature ratio . The new pressure is calculated using the ideal gas law.
Isentropic Expansion (Process 3-4):
- The gas expands isentropically, and we calculate the pressure using the same isentropic relation for expansion.
Constant Volume Heat Rejection (Process 4-1):
- The heat is rejected, and we return to the initial state.
Thermal Efficiency:
- The efficiency of the Otto cycle is calculated using the formula:
PV Diagram:
- We plot the pressure vs. volume curve, which shows the four processes of the Otto cycle.
Results:
- The thermal efficiency of the Otto cycle is printed based on the compression ratio and specific heat ratio.
- The PV diagram displays the four stages of the cycle: isentropic compression, constant volume heat addition, isentropic expansion, and constant volume heat rejection.
Therefore, Thermal efficiency of the Otto cycle: 56.47%
Enhancements:
- You can change the compression ratio, initial pressure, or temperature ratio to simulate different Otto cycles.
- More advanced models could include detailed heat addition and rejection models instead of fixed temperature ratios.