Print Page | Close Window

Speed Calculation

Printed From: Official Baja SAE Forums
Category: General
Forum Name: File Depot
Forum Description: Have a useful spreadsheet or want to show off a .par file? This is the place
URL: http://forums.bajasae.net/forum/forum_posts.asp?TID=2473
Printed Date: Jan/28/2023 at 8:53am


Topic: Speed Calculation
Posted By: Ghost
Subject: Speed Calculation
Date Posted: Aug/30/2016 at 10:31pm
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



Print Page | Close Window