# Automotive Calculate car velocity, acceleration and drag

1. Oct 20, 2014

### Evgenit

I'm making a drag racing game. But I'm only 11th grade, and I'm not the best with physics. I won't ask you to make the game, but what formulas to use.
I have the following variables(?). From these I have to make a car move realistically :D

//Car specs
car="2010 Ford Shelby GT500";

//Engine specs
engine_model=V8;
engine_capacity=5.4;
horsepower=540;
compressor=intercooled_supercharger;

//Transmission
transmission_type=manual;
gears=6;
axle_ratio=3.55;
gear_ratio1=2.97;
gear_ratio2=1.78;
gear_ratio3=1.30;
gear_ratio4=1.00;
gear_ratio5=0.80;
gear_ratio6=0.63;
current_gear_ratio=1;
gear=1;
final_gear=0;

//Drivetrain
drive_type=rear_wheel;
front_tires="255/40ZR19.0 BSW";
rear_tires="285/35ZR19.0 BSW";
tire_diameter=27;

//Other
exhaust=base_dual_exhaust;
suspension=sport;
weigth=1777;

Some of these probably won't be used for physics, but for else.

I have tried this

final_gear=current_gear_ratio*axle_ratio;
rpm=(axle_ratio*speed*current_gear_ratio*336.13)/tire_diameter;

But it just doesn't work. Sorry for my stupidity.

2. Oct 20, 2014

### jack action

You can used this acceleration simulator as a base, along with the theory behind it.

Not knowing something doesn't mean you're stupid; especially when you are in the 11th grade. You have to start somewhere.

3. Oct 21, 2014

### Evgenit

It's kinda useful, but I can't really understand it.
I will tell you what I have to do. I basically have to accelerate the car when I press the button. I have all these variables I don't know how to use them.
I have this running every step speed=(rpm/60*(1/final_gear)*2*3.14*tire_radius)*3.6*0.9
and when I press accelerate button it sets rpm=(130+axle_ratio*current_gear_ratio*336.13)/tire_diameter; and the car accelerates. But the horsepower and torque are not a factor, and they should be!

4. Oct 22, 2014

### Evgenit

I can't understand what are these:
Ftf
Ftr
frg

CDA
frCLA

5. Oct 22, 2014

### jack action

The most important equations that you want to solve are the one related to the motion of the car. These equations are on this page. They create a relationship between the time taken, distance traveled, speed increase and the acceleration of the vehicle. That means that you have 4 unknowns and there are only 2 equations on the page (To solve a problem you need as many equations as you have unknowns).

One of the other equation is to determine the acceleration (I'll come back to that one). For the other unknown you will actually have to declare it yourself. On the site, it was chosen to determine the speed increase at which the calculations are done. But you could chose the time difference or the distance interval, it would work as well. It is better to used the speed interval because most of the characteristics of the car will vary with its speed. So you want to make sure you control that interval and that it is kept as small and as constant as possible.

Back to acceleration. As said on the page, it is defined with equation (1b) from the accelerating page.

The basis for that equation is Newton's 2nd law, $F= ma$ or $a=\frac{F}{m}$.

The most complicated thing (and what is missing in your analysis) is to define the net force $F$.

There are 2 main forces that compose that net force: The aerodynamic drag ($= \frac{1}{2}\rho C_DAv^2$) and the tire force ($= F_t$).

The acceleration equation on the web page consider also the rolling resistance of the tire ($= f_r F_v$; $F_v$, the net vertical force, is defined on the accelerating page) and the aerodynamic lift ($= \frac{1}{2}\rho C_LAv^2$). But they can be omitted in most cases to simplify the equations (by setting $f_r= 0$ and $C_L= 0$).

The tire force depends on 2 things: The force coming from the powertrain and the maximum friction force that the tire can handle (which cannot be exceeded, otherwise the tire start to spin).

The first one is defined on this page ($F_t = \frac{P_t}{v}$). $P_t$ is the power available at the wheel, which is the power of the engine minus the inefficiencies of the transmission, cluch and differential. The power at the tire is usually assumed to be between 85% and 95% of the engine power. The site choose 89% (see the section Converting engine power to wheel power).

The site assumes the engine is kept at maximum power all the time (which is the case if you want to extract the maximum performance from your vehicle). For more precision, you can find the actual rpm of the engine (with the known speed of the vehicle and the gear ratio, like you were trying to do), and find the actual power from the power band of the engine.

Finally, the maximum friction force of the tire is defined on this page. If the engine power creates a greater force than this one, the maximum friction force of the tire must be used instead.

6. Oct 22, 2014

### Evgenit

Thanks for the throughout reply, although I still don't understand some things, maybe because my native language is not english, I will still try to make this work :)

7. Oct 31, 2014

### Kozy

Put very simply.
Power = Force x speed.
Therefore Force = Force = Power/Speed.

In your case Power is 540hp or 400KW so you can then work out the accelerative force at any speed by dividing the power by the speed in M/S.

For example, at 70mph speed in M/S is 31.3m/s. 400KW/31.3m/s = 12779N.

Once you have this, you divide the force (in Newtons) by the weight of the car (in Newtons) to get the rate of acceleration in units G.

Weight of the car is 1777kg = 17432N

Acceleration = 12779/17432 = .733G

Acceleration in m/s/s2 = G x 9.81 = 0.733 x 9.81 = 7.19m/s2

This is all very simple. The next bit is not so much. You must employ some calculus to determine the distance, speed, and acceleration at small intervals. For simplicity, start with 1 second intervals.

So at 0 seconds the D=0, V=0, A=0. After one second you have accelerated at lets assume 1G so your V=9.81m/s, A=9.81m/s, and D=9.81m. In the next interval, your speed has increased so the acceleration will reduce slightly, so you work it out again with the new acceleration rate, and so on.

Fill out the table (if working in excel) or loop (if programming) and you can eventually lookup the time taken to travel a set distance (the quarter mile) or time taken to reach a set speed (0-60mph).

The results will be hugely inaccurate though. From this starting point you will need to add lots more refinements to get more accurate results. One of the most important one will be the fact that the engine does not produce a constant power output, so you will need to work out how to calculate the engine power in relation to road speed taking in to account the gear ratios. The next most important thing is to work out some way to limit the power that can be applied at low speeds (because deploying 400KW at 10mph will produce a lot of smoke and not a lot of acceleration), otherwise you'll be calculating accelerations in the region of 2-3G off the line, which is clearly innaccurate.

Have fun with it, it'll make your brain hurt.

Here's my finished model in web format if you want to have a play: www.blackartdynamics.com/Transmission/ThrustIndexMX5.php

If you have any other questions, I'm happy to help, having programmed that thing from scratch. :)

Last edited: Oct 31, 2014