P-V Diagram Visualization of Otto Cycle
Objective: import math import matplotlib.pyplot as plt def engine_kinematics(bore,stroke,con_rod,cr,start_crank,end_crank): a=stroke/2 R=con_rod/a #Volume Parameters V_s=math.pi*1/4*pow(bore,2)*stroke V_c=V_s/(cr-1) sc=math.radians(start_crank) ec=math.radians(end_crank) n_values=50 dtheta=(ec-sc)/(n_values-1) V=[] for i in range(0,n_values):…