"Otto Cycle. Constant sp. heat ratio. See Problem 5.5" "Engine Data" r_c = 7 "Compression Ratio" "Working Fluid Data" gamma = 1.3 "Specific Heat Ratio" c_v = 0.946 "[kJ/kg-K] Constant Volume Specific Heat" "Fueling Data" Q_LHV = 44000 "[kJ/kg]" AF = 15.0 m_r = (1-x_r)/(1+AF) "ratio of mass of fuel to mass of charge" "Starting Point Data -- Point 1" {T_i = 270} "[K]" T_1 = 360 "[K]" P_1 = 50 "[kPa]" "End of Compression -- Point 2" P_2/P_1 = r_c^gamma T_2/T_1 = r_c^(gamma-1) "Combustion at constant volume -- Point 3" c_v*(T_3-T_2) = m_r * Q_LHV P_3/P_2 = T_3/T_2 "End of Expansion -- Point 4" P_3/P_4 = r_c^gamma T_3/T_4 = r_c^(gamma-1) "Point - 5 describes the gas remaining in the cylinder at the end of blowdown. It has just experienced an isentropic expansion from 4 to 5. Remember, most of the gas has exited." P_5 = 100 (P_5^(1/gamma-1))/(P_4^(1/gamma-1)) = T_4/T_5 "Calculation of Efficiency - Method Involving First Law. Calculate Heat Added minus heat rejected. Set it equal to net work. Divide by heat added." q_add = m_r*Q_LHV q_rej = c_v*(T_4-T_1) w_c = q_add - q_rej eta_1 = w_c/q_add "Calculation of Efficiency - Temperatures" eta_2 = 1 - (T_4-T_1)/(T_3-T_2) "Calculation of Efficiency - Formula with Compression Ratio and Gamma" eta_3 = 1 - r_c^(1-gamma) "Calculation of Imep" c_p = gamma*c_v R = c_p - c_v imep_1 = w_c / ( (R*T_1/P_1)*(1-1/r_c)) "Formula -- 5.32" imep_2 = P_1 * (q_add/(c_v*T_1)) * (1/(gamma-1)) * (r_c/(r_c-1)) * eta_3 "Formula -- 5.33" imep_3 = P_3 * (1/((gamma-1)*r_c^gamma))*(r_c/(r_c-1))*(eta_3/((c_v*T_1/q_add)+1/r_c^(gamma-1))) "Calculate imep ratios" imep|p1 = imep_1/P_1 imep|p3 = imep_3/P_3 "Calculation of residual fraction - equation 5.35" P_e = P_5 P_i = P_1 x_r = 1/r_c * (P_e/P_i)^(1/gamma) / ( 1 + q_add/(c_v*T_1*r_c^(gamma-1)))^1/gamma "Calculation of inlet temperature T_i based on this" T_1 / T_i = (1-x_r)/( 1 - 1/(gamma*r_c)*(P_e/P_i + gamma-1)) "Alternative work calculations based on integrating PV relations" w_12 = c_v*T_1*(1-r_c^(gamma-1)) w_34 = c_v*T_3*(1-1/r_c^(gamma-1)) w_calt = w_34-w_12 "Power calculation" N =2400/60 "[1/s]" n_R = 2 mass = 0.00045 "[kg]" W_ind = mass*w_c P_ig = 4*W_ind * N / n_R P_hp = P_ig*convert(kw,hp) eta_4 = W_ind/(mass*q_add) "Engine Volume Calculations" P_1*V_1 = mass*R*T_1 V_2 = V_1/r_c V_d = V_1-V_2 V_liters = 4*V_d*convert(m^3,liter) "[liter]" "Friction Work and Power" W_p = (P_e-P_i)*(V_1-V_2) "[kJ]" imep_test = W_ind / V_d P_p = 4*W_p * N / n_R P_in = P_ig - P_p eta_5 = (W_ind-W_p)/(mass*q_add) "Fuel Consumption" mass_fuel = mass*m_r mfdot = 4*mass*m_r*N/n_R "[kg/s]" isfc = mfdot/P_ig * convert(kg,mg)/convert(kJ,J) fuel|hr = mfdot*convert(kg/s,kg/hr) density = 0.75 "[kg/liter]" vol|hr = fuel|hr/density "[liter/hr]" speed = 100 "[km/hr]" mileage = speed/vol|hr "[km/liter]" mpg = mileage*convert(km/liter,mile/gal)