PV Diagram visualizer Week 2
Objective: %Otto_cycle_using_matlab_for: %create a PV diagram and output the thermal efficiency of the engine. close all clear allclc %state_variablesp1=101325t1=500 %Inputsgamma=1.4t3=2300 %Engine_geometricbore=.1;stroke=.1;cond_rod=.15;cr=12; %Calculating_the swept_volume_and_the_clearance_volumev_swept=(pi/4)*bore^2*stroke;v_clearance=v_swept/(cr-1);v1=v_swept+v_clearancev2=v_clearance…