Plotting PV diagram of Otto Cycle and calculating Efficiency
Objective: close allclear allclc p1=101325;t1=500;gamma=1.4;t3=2300; bore=0.1;stroke=0.1;con_rod=0.15;cr=12; v_swept=(pi/4)*bore^2*stroke;v_clearance=v_swept/(cr-1); v1=v_swept+v_clearance;v2=v_clearance; p2=p1*cr^gamma;t2=p2*v2*t1/(p1*v1); constant_c=p1*v1^gamma;v_compression=engine_kinematics (bore,stroke,con_rod,cr,180,0); p_compression=constant_c./v_compression.^gamma;…