🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

[CAR SIM] "Advanced" aerodynamics: Drafting / slipstreaming

Started by
10 comments, last by Jaroslaw Dekowski 4 years, 6 months ago

Hi, I dusted off my old car sim project recently and started adding some AI, and it urged the need for some more advanced aerodynamic calculations.
Namely: slipstreaming.

I searched the net and it's pretty difficult to find anything that is useful physics wise.

What I imagined so far is a sort of cone behind the car that has a length and width and depending on where my car is inside that cone I "guess" a value that scales the drag/downforce.
but, I believe it's not that simple, as it generates some suction, and is highly related to the speed and probably not a linear thing.

Also I found a note about the rear car is pushing the air, so it affects (speeds up) the leading car.

More concerns: How it affects air speed that cools down brakes and tires, and what about "dirty" turbulent air?

 

So, does anyone have any experience on this? Some direction or fact that I can hook on? :) 

thanks in advance

Advertisement

Now I'm gonna prefix everything that I say with the fact, that I have no experience whatsoever implementing this kind of stuff, but besides coding, I waste a lot of my time in semi-sim games driving high downforce cars ( mostly GP3 and Formula Renault equivalent stuff in Project CARS 2 ). So disregard everything what I say if it sounds stupid.
 

1 hour ago, bmarci said:

What I imagined so far is a sort of cone behind the car that has a length and width and depending on where my car is inside that cone I "guess" a value that scales the drag/downforce.
but, I believe it's not that simple, as it generates some suction, and is highly related to the speed and probably not a linear thing.

That cone is more like a widening wedge, with its front edge being around the front wing or the splitter. The trickier part is handling this in corners. Basicly as the cars moves forward it throws air upwards and sideways, and creates a low pressure area on the line it takes, that can persist for seconds in a noticable way. Practical example is turn 3 of Catalunya (a high speed right hander), in a high downforce cars it feels entirely different taking it alone, and behind another car.

The first idea that comes to mind that possibly could handle this, is attaching a really coarse "voxel" grid to the track surface, where each grid cell has a certain amount of air in it. As the car goes through the cells it subtract from them, and adds the subtracted amount to neighbouring unoccupied cells. Also as the car move forward it can query the cells in front of it, and from the amounts read back, drag can be calculated/scaled. Apart from this, an extra "pressure equalization" pass is needed on the whole grid ( this is probably the expensive par computationally ).

Another solution could be to bend the wedge to fit the line the car took in the last few seconds, but I have a feeling that more problems would come up with this, that the grid solution.

9 hours ago, LandonJerre said:

that can persist for seconds in a noticable way. Practical example is turn 3 of Catalunya (a high speed right hander), in a high downforce cars it feels entirely different taking it alone, and behind another car.

Thanks for the ideas! That's a good one, what is the difference? Less down force hence worse cornering?

 

The voxel grid and "fluid simulation" could be an overkill :) Then again I didn't think about cornering, so a straight wedge glued to the back of the car would not work nicely.

A simple solution that has just came to my mind is a sort of air-bubble-particle sort of thing. So as the car moves, it "emits" shockwaves, which is technically a circle that grows in time, as it grows the suction attenuates. The only thing I will have to do is to check which of these bubbles did I hit and where. Maybe that would be a good start... I'll think about it :)

4 minutes ago, bmarci said:

A simple solution that has just came to my mind is a sort of air-bubble-particle sort of thing. So as the car moves, it "emits" shockwaves, which is technically a circle that grows in time, as it grows the suction attenuates.

Yeah that's what i do :D Spawn large spherical particles behind the car that expand and fade out their "strength" over time. If an aerodynamic surface is touching one of those particles, the airflow is reduced when calculating lift/drag.

11 hours ago, bmarci said:

Also I found a note about the rear car is pushing the air, so it affects (speeds up) the leading car.

I haven't read a lot about that -- but the way that air tumbles behind a car is a huge part of the aerodynamics. The rear diffuser is designed to create suction that pulls air under the car and create a smooth flow at the back. I'm not sure if having a convoy of cars improves this for the leading car or not.

11 hours ago, bmarci said:

More concerns: How it affects air speed that cools down brakes and tires, and what about "dirty" turbulent air?

Reduced airflow for cooling is definitely a concern too. Turbulent air can very approximately be modeled by simply reducing lift values for surfaces in the turbulent areas...

9 hours ago, bmarci said:

Thanks for the ideas! That's a good one, what is the difference? Less down force hence worse cornering?

Yeah, less drag means less downforce ( there is less air to work the cars body ), and that means the car will understeer off the track if you don't account for it. It can be particularly tricky if the corner is after a long straight, like turn 1 in Snetterton. Because you're slipstreaming, you reach a significantly higher speed by the corner, so you have to adjust your braking point, and then get through the corner, fighting understeering the whole way through, all the while trying to stay close to the car before you, because you want to get past it asap.

Sidenote: https://youtu.be/xIp7wi5mfiM?t=370 In really simplified terms this describes how the leading car can benefit from someone closely slipstreaming them, what you also mentioned originally. The particle idea can work here too, you just attach a fixed particle to the back of the car that adds drag to that car if unoccupied. Now the question is what is the proper math behind this.

12 hours ago, Hodgman said:

Yeah that's what i do :D Spawn large spherical particles behind the car that expand and fade out their "strength" over time. If an aerodynamic surface is touching one of those particles, the airflow is reduced when calculating lift/drag.

Same mindset, cool :)

1 hour ago, LandonJerre said:

Now the question is what is the proper math behind this.

I think, I'll approach it with my usual naive way, and experiment.

Well. The first iteration is done, but I'm not 100% satisfied.

I used the car's frontal area and speed to determine how long/intense the turbulence will persist. Nothing scientific, just educated guess values.

From the current position I get a scaling factor that decreases the drag/lift coeffs for aero components, so less drag/downforce...etc.

The whole thing looks fancy enough, but I didn't gain as much advance as I hoped for. Also the reduced downforce gives less traction, longer brake distances, more understeer... etc

I attach a video about how it looks. Any comments, whether the trail is too long/short or the radius looks bad are more than welcome. There is a debug text: "Slipstream" in the middle, the number is the actual scale factor, eg: 0.5 means half aero-drag.

https://www.youtube.com/watch?v=jauwdN1IihQ

As a conclusion, I found a research paper regarding this topic, and the result was:

The aerodynamic drag reduced by about 70% when a sedan was driving at 100km/h, 30cm (!!!) behind a semi-truck.

So, according to this, the effect is not that miraculous. Probably it gets escalated with formula cars with high aerodynamic sensitivity.

bmarci said:

As a conclusion, I found a research paper regarding this topic, and the result was:

The aerodynamic drag reduced by about 70% when a sedan was driving at 100km/h, 30cm (!!!) behind a semi-truck.

So, according to this, the effect is not that miraculous. Probably it gets escalated with formula cars with high aerodynamic sensitivity.

I mean 30 cm isn't an unreasonable distance from another car with GT or similar cars. :) ( A small demonstration of this: https://www.youtube.com/watch?v=wzhx6S0PT7o ) The effect is not nearly as noticable there, as with high downforce cars ( like formula type cars or any kind of Le Mans/Daytona prototypes ), but depending on tracks it is still something you have to calculate with as a driver. Try looking up quali laptimes from WTCC races on the Salzburgring, I remember a quali from there, where noone wanted to overtake the front cars, because slipstreaming gave a significant enough laptime advantage, and as a result everyone missed their last lap.

From fluid mechanics point of view behind the car you have wake which is caused by flow separation (https://en.wikipedia.org/wiki/Flowseparation#/media/File:1915caabgerfluegel(cropped_and_mirrored).jpg) at the aft side of the car. From simplistic point of view you have dynamic pressure (static pressure + effect of velocity) from front, viscosity forces +static pressure on the sides and only static pressure behind where air is moving the same speed as a car. Behind the car it generates sheer layer (https://aerospace.illinois.edu/sites/default/files/images/Mc-019-mixing-layer.jpg)between static (relative to car) air and air moving around the car. https://cdn4.explainthatstuff.com/laminar-turbulent-flow-wind-tunnel.jpg

hhhttps://www.researchgate.net/profile/Pete_Bachant/publication/315865543/figure/fig39/AS:614317493866497@1523476112008/Contours-of-velocity-magnitude-generated-using-the-unsteady-DES-turbulence-model-for.png

when other car is getting into this wake it gets smaller dynamic part of the pressure from front, because it "sees" mainly air of the speed of first car. (Image above shoes lower pressure in blue.

Size of the wake, its spreading angle depends on Reynolds number. Viscosity is relatively constant so mainly it depends on size of the car (smaller from width or height) and its velocity. Drag reduction would be proportional to velocity^2 , size proportion between cars (if second one is able to hide) and inversely proportional to distance between first and second car (look at the blue area in the picture above).

Sorry for terminology I was trying to keep it as little scientifically as I can.

Do not even think about trying to solve fluid mechanics!!!! Use simple equations from distance coverage and velocity. If You would need help with equation I could try to sketch something based on the paper you found.

This topic is closed to new replies.

Advertisement