Otto cycle
Objective: The presented code solves an ottoc cycle and corresponding PV diagram is plotted with respect to given temperature and pressure. clear all close allclcgamma=1.4;t3=2300;% state variablesp1=101325;t1=500;%Engine geometric parametersbore=0.1;stroke=0.1;con_rod=0.15;cr=12;v_s=(pi/4)*bore^2*stroke;v_c=v_s/(cr-1);v1=v_s+v_c;v2=v_c;%state…