Otto Cycle
Objective: clear allclose allclc%Inputs gamma = 1.4; % Engine Geometric Parameters:bore = 0.1;stroke = 0.1;r = 12;con_rod = 0.15; % Calculating the swept volume and clearance volumev_s = (pi/4)*bore^2*stroke;v_c = v_s/(r-1); % State Variable at point 1display(\'Input state variables for point 1:\');p1 = input(\'Pressure:\');t1 =…