English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Keep it simple. I am making a simple Java game where you fire a cannonball at a target. I wanted to add air resistance and wind. I got the wind part down but I don't know about air resistance.

2007-04-15 13:39:59 · 3 answers · asked by Anonymous in Science & Mathematics Physics

3 answers

D = 1/2 rho v^2 Cd A; where rho is mass air density, v = relative wind velocity of your projectile, Cd = drag coefficient, and A = cross sectional area. D is the drag force (air resistance force). While the equation is simple, each factor is a challenge for programming.

Cd is found experimentally; however, some texts will give generic values for common shapes...like a cannon ball sphere. A is the area of the circle you get when you slice the ball in half and A is oriented with its face into the wind or direction of travel. A is probably the easiest factor to program.

rho is another look up. It is best handled in programming by a look up table that varies by temperature and altitude. Or, if you don't mind inaccuracies, you can just assume a standard day mass density and let it go at that. That you can find a standard rho in the texts or on line.

If you use kg-m-sec units, D will be in kg-m/sec^2 units, which by definition is called a Newton. Make sure rho is in kg/m^3 for consistency. And A is in m^2. Cd is just a number, no units.

The physics of a cannon ball flying through the air is quite complex. The wind you talk about, for example, can be natural, relative wind, or both. The relative wind is caused by the ball flying through the air. The natural wind from the weather and the relative wind add as vectors, not scalers. And the vector sum of these two winds is represented by the v in the equation for D.

In addition to the resistance of the two winds, the cannon ball is also acted on by the force of gravity (i.e., its weight). But after that ball leaves the muzzle, there are no more horizontal forces to push the ball along; so the drag forces tend to slow the ball down as it flies through the air. Even so, on impact, there will still be a significant horizontal velocity and some vertical velocity, which is gained from the force of gravity.

2007-04-15 14:10:15 · answer #1 · answered by oldprof 7 · 0 0

Air Resistance Formula Simple

2016-11-08 01:00:17 · answer #2 · answered by ? 4 · 0 0

It is easiest to use linear air resistance, where the force opposes the motion of the ball with magnitude bv
F = -bv where v is the velocity of the ball and b is a parameter which varies depending on the atmosphere and the surface of the ball. It must be experimentally measured. The best thing to do is experiment -- try a value of 1, see how the program behaves, and increase or decrease as necessary.

2007-04-15 14:00:36 · answer #3 · answered by Noachr 2 · 0 1

fedest.com, questions and answers