PV DIAGRAM FOR OTTO CYCLE
Objective: clear allclose allclc %State variables at state point 1gamma=1.4p1=101325t1=500t3=2300 %Engine Geometric Parametersbore=0.1;stroke=0.1;con_rod=0.15;cr=12; %Calculating swept volume and clearance volumev_swept=(pi/4)*bore^2*stroke;v_clearance=v_swept/(cr-1);v1=v_swept+v_clearancev2=v_clearance %State variables at state…