Otto Cycle PV diagram and efficiency
Objective: Function to calculate the piston kinematics function [V] = otto_cycle_piston_kinematics(bore,stroke,con_rod,cr,start_crank,end_crank) %inputs theta = linspace(start_crank,end_crank,100); a=stroke/2; R = con_rod/a; v_swept = (pi/4)*bore^2*stroke; v_clearence = v_swept/(cr-1); %the volume of the piston can be calculated…