Does anyone have any input into this MATLAB code for max vehicle speed? How would you incorporate CVT and gearbox ratio into this equation. I found this on a teams report, I do not take ownership of this code.
% This Program will allow for a maximum vehicle velocity to be calculated % from a number of given inputs % Maximum Power at the rear wheels (assuming 85% efficient driveline) Pmax = 550*.84*(8.9); % (ft*lb/s)
% Frontal Car Area A = 2016/144; % sq ft
% Drag Coefficient Cd = 1.08;
% Density of Air at standard conditions rho = 2.38 * (10^(-3)); %slugs/(cubic foot)
% Vehicle weight W = 420; %lbf
% Coefficient of Rolling Resistance Crr = .068;
% Maximum Vehicle Velocity (Just an initialization) Vmax = 0; % ft/s roots = 0; while (1) RHS = (1/2)*(Cd)*(A)*(rho)*(Vmax^3) + (Crr*W)*Vmax; eapprox = abs((Pmax - RHS)/Pmax)*100; if eapprox < .1; fprintf('The maximum attainable vehicle velocity is approximately\n') fprintf(' %.4f mph \n',Vmax*(3600/5280)) break else Vmax = Vmax + .01; end end
|