Firstly, I'm trying to program a simulation of fluid drag, taking into account the shape of an object. I know I've seen somewhere (I think on Wikipedia, but I've looked again and can't find it) an equation which allows the calculation of drag by calculating the drag coefficient for an object, the precise shape of which is known, at different points throughout the shape, but I don't know where to find it, and I probably wouldn't know how to use it were I to; hence I'm wondering if I can find help here.

Secondly, is it possible to accurately calculate the distance traveled (or time taken for landing, or any equation I can rearrange) - because the calculation to me seems to require an infinitely recursive function, making infinitesimal steps forward with time, and ergo requiring an infinite amount of time to calculate?

Thanks for any help!

  • 1
    $\begingroup$ Welcome on Physics SE :) Is your question about the actual physical equations or about the numerical implementation of these? $\endgroup$
    – Sanya
    Commented Aug 8, 2016 at 15:53
  • 4
    $\begingroup$ Thanks for the welcome; and mostly the physical equations, although if they involve more complex calculus to rearrange them, then an explanation for that would be appreciated - although I can always research that in my own time and come back here if I still can't find it. $\endgroup$ Commented Aug 8, 2016 at 15:56
  • $\begingroup$ Secondly, is it possible to accurately calculate the distance traveled (or time taken for landing, or any equation I can rearrange) Could you just expand on that, I take it to mean you need another equation, combined with the drag equation, to model take off to landing. ? I ask this because surely the drag equation on its own won't provide enough information to model a typical flight. Sorry, I know I have the wrong end of the stick here. Also, could you not include discrete time "jumps" to speed up calculations? I know that's obvious to you, I just don't follow why you can't. $\endgroup$
    – user108787
    Commented Aug 8, 2016 at 16:16
  • $\begingroup$ Well, as far as I know, I'd need kinematics to calculate the flight, and I know it wouldn't be typical, but it'd be as close as I need for this. Secondly, I just wanted to know if there was a limit equation as the 'jumps' tended towards being infinitely small. $\endgroup$ Commented Aug 8, 2016 at 16:51
  • $\begingroup$ @ThatGuyOverThere, for your distance simulation, there is a practical way to proceed. Start with a moderately long delta time for your iterations and calculate distance traveled. Then, recalculate distance traveled using a new delta time that is 1/2 of the original value, or twice as many iterations as the first calculation. Continue, noting the distance traveled for each calculation. You should see the results converge to one number, which is the number that you are looking for. $\endgroup$ Commented Aug 8, 2016 at 18:57

1 Answer 1


There are really two distinct questions here - I will wave my hands to answer one, and give a "better" answer for the other.

First - "real" drag is very, very messy. Flow of liquid around objects (even mathematically simple spheres) changes depending on the velocity of the flow, density and viscosity of the liquid, and the "characteristic length" of the object. This is captured in the dimensionless Reynolds number

$$\rm{Re} = \frac{\rho v L}{\mu}$$

Where $\rho$ is density, $v$ is velocity, $L$ is the characteristic length (diameter, for a sphere) and $\mu$ the viscosity.

When the Reynolds number is very small (microscopic objects, or larger objects at very low velocities) the flow is laminar and can be analyzed mathematically; but as soon as the flow becomes turbulent, the mathematics becomes approximate. A full description of this fills many volumes - and is completely outside the scope of this answer.

For laminar flow, the drag is proportional to velocity - because the drag is viscous, and viscous shear scales with velocity gradient. For a given shape, the distance over which the velocity gradient approaches zero is roughly constant, from which it follows drag is linear with velocity.

When you go to a higher velocity regime, flow becomes turbulent. This is the case for most macroscopic objects (tennis balls etc). When flow is turbulent, you leave "a mass of disturbed air" in the wake of the object. If you consider the object (say a ball) punching a hole in the fluid in front of it, you can see that the mass of air you interact with per second is equal to the projected area of your object $A$ multiplied by the velocity $v$ (to the the length of a tube traversed in one second) and multiplied by the density $\rho$. To bring that mass of air up to a velocity $v$ would require a force equal to $mv$ per unit time; this tells us that drag will be of the form $\rho A v^2$. In fact, the equation is

$$F_d = \frac12 \rho A v^2 C_D$$

Two factors crept in: a factor $\frac12$, and $C_D$. Both these factors capture the fact that not all the fluid in front of the object needs to be accelerated to the velocity of the object: some of it is pushed sideways. The shaped factor $C_D$ captures the geometric parameter - going from a value of 0.5 for a sphere, it is larger for "less aerodynamic" shapes and lower for things that are deliberately shaped to minimize drag. See for example the wiki article with a list of drag coefficients. Note that $C_D$ is really a function of Reynolds number - this further complicates matters.

Usually the drag coefficient is determined experimentally - if you need results that are better than within 50% or so of the true value. But if you need an approximate value, you can look at the table in the linked article, and find "a shape that matches" best. The biggest factor is the projected area - a smaller area will almost always result in lower drag.

That gets us to part 2: calculating the velocity of an object subject to drag. As you surmised, this could be a very hard problem; but for certain situations you can simplify the equations.

One such situation is free fall. It turns out that free fall with quadratic drag is a problem for which there is an exact mathematical solution (assuming $C_D$ is independent of velocity - otherwise you don't have "true" quadratic drag). This solution is given in numerous places - for example here. I give a bit more detail in this earlier answer

So in the case of free fall with quadratic drag, there is a closed form solution if you know the $C_D$ of your object. Unfortunately, the moment the force and velocity are not aligned, the math becomes more complex, and you need to use numerical methods to solve (this is the case, for example, for a projectile fired at an angle, and subject to gravity). A simple consequence of quadratic drag is the fact that a cross wind will increase your drag (see this answer).

There are good (stable) numerical techniques for tackling this kind of problem; alternatively you can get a "quick and dirty" feeling for it by looking at the code I wrote for this earlier answer. As you can see, by alternating the updates of position and velocity you can improve the stability of the solution without needing to take tiny time steps. I'm providing that link for information only - not because it's a good primer in numerical integration of differential equations. But if you google "Runge Kutta" you will find all the material you need...

  • $\begingroup$ "A full description of this fills many volumes - and is completely outside the scope of this answer." - It was this solution which I was looking for, i understand it would be impractical to post the equation/method of calculation (which I'm willing to bet would be insanely complicated) but would you be able to point me in its direction? I understand the fact that it would probably be insanely laggy for my program to calculate, but I'd quite like to know the way to calculate a more exact solution. $\endgroup$ Commented Aug 8, 2016 at 19:30
  • $\begingroup$ @ThatGuyOverThere - are you working with compressible flow, or will incompressible do? $\endgroup$
    – Floris
    Commented Aug 8, 2016 at 19:34
  • $\begingroup$ Sorry, I am unfamiliar with those terms; if by compressible and incompressible you mean the fluid's reaction to the pressure exerted upon it by the object, then I would prefer compressible, but I'd really appreciate either. (Having just checked on the Holy Grail that is Google, I think my definitions/understanding of those terms are roughly accurate). $\endgroup$ Commented Aug 8, 2016 at 19:37
  • 1
    $\begingroup$ You might want to look at vivekc.com/portfolio/bullet-underwater-dynamics - this talks about the ways in which Maya (a powerful physics engine used for animation and gaming) can be used to create (fairly) realistic simulations of drag in fluids. $\endgroup$
    – Floris
    Commented Aug 8, 2016 at 19:41
  • 1
    $\begingroup$ @ThatGuyOverThere - you're welcome. Did you look at the code snippet I linked in my last paragraph? You can also look for velocity verlet or leapfrog as two techniques that are relatively straightforward to implement (with plenty of examples on the web). $\endgroup$
    – Floris
    Commented Aug 8, 2016 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.