Getting 'negative' force when calculating drag

AI Thread Summary
The discussion revolves around calculating drag forces in a 3D game, particularly when dealing with large, light objects like a flat sheet. The user encounters unexpected upward forces when applying a drag formula, leading to confusion about the object's behavior under low gravity. It is clarified that the issue stems from mishandling the velocity and time step size in the calculations, which can result in unrealistic simulations. Suggestions include using Newton's laws of motion and implementing more sophisticated numerical integration methods, such as Runge-Kutta, to improve accuracy. Ultimately, the correct application of these principles should resolve the issues with drag calculations.
LegendLength
Messages
21
Reaction score
1
I'm trying to add flight physics to a 3d game. When I try to calculate drag I sometimes get a force that pushes the aircraft backwards if I make the wingspan very large (for example).

I have set up a simple scenario: A flat rectangle sheet falling down due to gravity. If I make the gravity force artificially low, or the size of the sheet very large (and light), then the drag force is so large that it actually pushes the sheet upwards.

The formula I am using is:

drag = dragCoefficent * 0.5 * airDensity * (velocity ^ 2) * sheetArea

(dragCoefficent is sheetArea * 1.05)

Just by looking at the formula I can see that if you make the area large enough then the force will be huge and counteract gravity to such a degree that the object goes upwards, rather than tends towards zero velocity.

So what happens if you are on a planet with very low gravity and drop a large, light sheet of metal from a height? Assuming the sheet stays horizontal you would assume it just falls extremely slowly. Yet the formula doesn't seem to reflect that. Am I missing something obvious or is it perhaps the wrong formula?

I want the ability for users to change the scale of drag, gravity etc. with a multiplier. But maybe that is a silly idea because that is what produces this problem in the first place?
 
Physics news on Phys.org
LegendLength said:
So what happens if you are on a planet with very low gravity and drop a large, light sheet of metal from a height? Assuming the sheet stays horizontal you would assume it just falls extremely slowly. Yet the formula doesn't seem to reflect that. Am I missing something obvious or is it perhaps the wrong formula?
The formula is correct. It seems that you are missing or mishandling the velocity. If g is low then the gravitational force will balance the drag force at a very low v, and you will get the correct behavior.

In the formula v is the relative velocity between the fluid and the object, and the drag force is in the direction of v.
 
If the body enters the atmosphere at a velocity higher than the terminal velocity then the net force is opposite to the direction of velocity. So upwards if the velocity is downwards. This does not mean the body moves upwards but simply that the acceleration is negative, the velocity decreases.
On the other hand, if the body starts from rest and gravity is the only other force, beside drag, this situation will never happen.
 
LegendLength said:
Just by looking at the formula...
You should rather calculate it using Newtons Law of motion. Also, in numerical integration you need a sufficiently small step size.
 
Thanks for the replies. It seems my problem is the time step size as suggested.

For example if you have a 1000 meter square, 1 kg sail moving downwards at 1 m/s, it gives an upward force of around half a million N. That is obviously stronger than the downwards force of gravity. My mistake was to apply that force during a single time step which gave it a huge upwards velocity. The next time step comes around and notices the object is going very fast upwards so the drag becomes huge downwards etc..

I guess I need to look at the way game developers handle high forces. I don't know much about numerical integration so I'll look at that too. Thanks again.
 
What you describe sounds like a simple Euler method. Those are known to have this kind of convergence problem. You can probably fix it using a Runge Kutta method instead
 
That was exactly the problem, thanks.
 
Back
Top