racer home

Adding wings


Home Wings can give a lot of downforce and are important for high speed racing.

Dolphinity Organiser - free planning, project management and organizing software for all your action lists


Wings and general body aerodynamics are very important for the performance of a car. Aerodynamic forces can be split into 2 sections: drag and downforce. Drag comes from the fact that the car is trying to push through all that air. At a certain moment, the drag forces will be an important factor for the top speed that can be obtained. Downforce is the vertical force; mostly a force pushing the car down onto the track. In Formula 1, the engine must often be powerful enough to push the car through both drag and downforce at straights, while the wings are set to generate a lot of downforce to be able to get through the corners faster.

Important note: starting from v0.8.7, wings & body aero center are specified relative to the nullpoint, not the CG (as it was in v0.8.6)! This has an effect on all cars where the CG is not (0,0,0). In that case, move the wings with the same CG offset, so that they are now defined relative to the nullpoint, instead of the CG (center of gravity).

Calculating coefficients

Aerodynamic forces have the following form: F = 0.5 * A * coeff * ro * v^2.

Here, F = force, A = area of application (for example the total area of the front of the car, as viewed from the front), v is the speed of the car (in m/s), ro is the air density (1.225 at 15 degrees Celcius is a default value; check here for more information; it is defined in racer.ini in environment.air_density, see also the racer.ini reference), and coeff is the aerodynamic coefficient which is specified in the car.ini files. Furthermore, 'A' can be split for wings into span and cord (width and depth), where A = span * cord.

For wings, you can also (for the linear region) add the angle (in radians) into this, so you get:

F = 0.5 * span * cord * angle * coeff * ro * v^2

An example

It is said that a Formula 1 car can drive upside down at 200 km/h as a result of its massive downforce. So how would you calculate the resulting wing coefficients for that?

As a start, let's get some figures for an F1-like car an get an approximation. An F1 car weighs about 690 kg. This amounts to 690 * 9.81 (gravity) ~ 6770 N(ewton). As our F1 car has 2 wings, one in front and one in rear, that would mean roughly 3380N of downforce per side (given the CG is the center, while in real life it is really more towards the back).

Now, 200 km/h = 200*1000/3600 = 55.56 m/s. Take a wing with span 1.2, cord 0.2, making a total area of 0.24 m^2, and an angle of 10 degrees, which is about 0.173 radians.

So, to get the downforce to reach the same level as gravity (so the car would float when hanging upside down), we can fill in:

So here we end up with a theoretical aerodynamic coefficient of 43.1 on each side (which may seem much too large, but note the angle was taken in). You can fill these in the aero section of the car.ini file (see data/cars/default/car.ini for an example). Make sure to supply a correct center application point (which is roughly the center point of the wing) such as around (0, 0, 2.0) for the front (assuming a car which is 4 meters long).

So how much is drag? Generally, drag is lower than the downforce coefficient (i.e. the wings are better at generating downforce than they are generating drag, which is ofcourse by design). I can't give good figures for the drag coefficient, but try starting at half the downforce coefficient, or even less.

The body

Note that the body as a whole can be seen as a subtle wing itself. The same formula applies, but this time it will be applied near the center of gravity of the body. Even without wings this aerodynamic phenomenon takes place.

Coefficients of cars tend to vary between 0.2 for supersleek cars to 0.4 or even 0.5 for older or less aerodynamically efficient cars. Generally, even a sports car will do even 0.30. As a starting point, try 0.35. As an approximation of the frontal area of the F1 car, take 1.6 m^2.

Note that this doesn't take an angle in its formula, so that's why the coefficients here are smaller. I can't say whether the wing coefficients that Racer uses are common in the real life aerodynamics field; I think they're too large for that. If you know what makes the difference from myapproach to the real approach, let me know. :)

Setting parameters in Racer

You set the wing coefficients in the car's car.ini file (data/cars/<yourcar>/car.ini). See the racer physics reference for more information.

Verifying the parameters

In Racer v0.8.7, the wings are drawn schematically when using 'show carpoints' in the console or settings gfx.show_car_points to 1 in racer.ini. Note that the angle isn't used, so it will always appear as a flat rectangle.


Dolphinity Organiser - free planning, project management and organizing software for all your action lists

(last updated November 13, 2012 )