Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Force to cover distance with drag calculation

  1. Mar 3, 2010 #1
    1. The problem statement, all variables and given/known data

    Hi everybody, i'm new in the forum, i've been reading some post but couldn't find the information that i need.

    I'm making a game of soccer in 2d, and i need to calculate this:

    I have a basic physics simulation, and when a player has the ball i need to found the force needed to cover a specific distance (to make a perfect pass ).

    2. Relevant equations

    I have the distance, and the drag coeficient, and need the ecuation that gives me the force (or acceleration), not in function of time, that will make the ball travel that distance, then stop (because of the drag force).

    3. The attempt at a solution

    I attempted to solve it with MRUV but it allway give a result in function of time or acceleration.

    Any help will be appreciated!

    Thaks, Guillermo-
  2. jcsd
  3. Mar 3, 2010 #2


    User Avatar
    Homework Helper
    Gold Member

    Hi Guillermo,

    Welcome to Physics Forums!

    You can probably use the relationship,

    [tex] W = \int _P \vec F \cdot \vec {ds} [/tex]

    where W is the work (i.e energy) needed, ds is the path differential, and the integral is over the path. F here would can work as [technically the negative of] your drag force (which I assume you already have a relationship for). (This simplifies considerably if your drag force is constant, such as a dry-friction model.)

    Once you find W, you can calculate the initial velocity the ball needs to be thrown at (using KE = (1/2)mv2).

    Things are not so easy if your drag force is not constant (such as if the drag force is a function of velocity). It still may be possible to solve this, but things may get a lot more complicated quickly. How is the drag modeled?
  4. Mar 4, 2010 #3
    Hi, thanks for the reply! I've modeled the drag force as F = -kV where 0.0<k<1.0

    Sorry if this question sound stupid but... what differences would i seen in the ball behavior if i model the drag force as a constant (dry friction) ?


  5. Mar 4, 2010 #4


    User Avatar
    Homework Helper
    Gold Member

    Hello Guillermo,

    Well, if you modeled it as dry friction, then above work equation simplifies to

    [tex] W = \vec F \cdot \vec s [/tex]

    Where [tex] F [/tex] is a constant. That's the simple case. And your program will know [tex] s [/tex] ahead of time. So everything is easy here.

    Moving on to your present case where F = -kv,

    [tex] \vec F = m \vec a = -k \vec v [/tex]

    Noting that acceleration is the time derivative of velocity,

    [tex] \vec F = m \frac{\partial}{\partial t}\vec v(t) = -k \vec v(t) [/tex]

    But we really want the force equation in terms of s, not v, because we need find how far the ball can go, even as time goes to infinity.

    [tex] \vec F = m \frac{\partial ^2 }{\partial t^2} \vec s(t) = -k \frac{\partial }{\partial t} \vec s(t) [/tex]

    We end up with a second-order, linear differential equation.

    [tex] \ddot{s} = -\frac{k}{m} \dot{s} [/tex]

    Once the differential equation is solved to find s(t), and after applying initial conditions, you can use it to find your initial velocity, given how far you want the ball to go (as t --> infinity). Then have your program always over-kick the ball by a few yards so that the ball always goes at least a little past its intended destination (but at least always passes through the intended destination in a reasonable amount of time).

    (Note that if you model the frictional drag force as -kv, the ball will never actually "stop" on its own. Rather it will asymptotically approach some final position, slowing to a snail's pace when it gets very close. But it won't truly stop. And it won't truly ever reach the destination either -- it just approaches it. That's where the business about calculating the distance as t --> infinity comes from.)

    By the way, is this for a homework assignment or is this a personal project?
    Last edited: Mar 4, 2010
  6. Mar 4, 2010 #5


    User Avatar
    Homework Helper
    Gold Member

    Oh, btw,

    If you model the friction as dry friction, the ball will slow down and stop in a parabolic fashion. Imagine a parabola with its vertex at the origin, position on the y-axis, and time on the x-axis. Now imagine how the position behaves as time comes in, starting from the negative x side, moving to the origin. That should give you an idea of position vs. time (for the dry friction model). Of course your program will have to remove the frictional force once the ball reaches 0 m/s (otherwise it would head back where it came from, on its own!).

    By modeling it using -kv, the distance between the initial destination and the final destination decreases asymptotically. Plot e-t to get an idea of what I mean. This model has another implication. When passed, the ball will always take exactly the same amount of time to reach the half-way point, no matter how close or far away that destination is (ignoring the intentional overkicking, that I discussed in the last message). And for a given destination, that amount of time will exactly equal the amount of time to get from the half way point to the 3/4 of the way point. Which also equals the amount of time from the 3/4 to the 7/8 point, and so on.
  7. Mar 4, 2010 #6
    Collinsmark i will try how it works with the dry friction model.

    Thank you very much, the formulas and explaantions where very useful!

    This is for a personal project for a game of soccer that i'm doing.

  8. Mar 5, 2010 #7


    User Avatar
    Homework Helper
    Gold Member

    Okay, if this is for your own personal project, perhaps I can help you a little further.

    Before you completely abandon the F = -kv method of modeling friction, recall that differential equation.

    \ddot{s} = -\frac{k}{m} \dot{s}.

    Its solution is

    [tex] \vec s(t) = \vec s_0 +\frac{\vec v_0 m}{k} \left(1-e^{\frac{-kt}{m}} \right) [/tex]

    where [tex] \vec s_0 [/tex] is the player's current position (the player with the ball), m is the mass and k is your drag coefficient. As we let t --> infinity, then [tex] \vec s(t) [/tex] becomes [tex] \vec s_d [/tex], where [tex] \vec s_d [/tex] is the desired final destination of the ball.

    [tex] \vec s_d = \vec s_0 +\frac{\vec v_0 m}{k} [/tex].

    So your initial velocity is then

    [tex] \vec v_0 = \frac{k}{m}(\vec s_d - \vec s_0). [/tex]

    You can use this to determine the initial velocity of the ball, given its initial and final positions, the drag coefficient, and the ball's mass. If your computer program does not model mass (and only relies on acceleration, as some computer programs do), then you probably just need to set m to 1. But of course, that's dependent upon your implementation. Oh, and you might want to overshoot a little, as previously discussed.

    Okay, now moving on to dry friction. If you change your program to use a dry friction model, you'll have to change your equation. As previously discussed,

    [tex] F(s_d - s_0) = \frac{1}{2}mv_0^2. [/tex]

    [tex] v_0 = \sqrt{\frac{2F}{m}(s_d - s_0)} [/tex]

    Where F is the constant frictional force, m is the mass, and [tex] s_d [/tex] and [tex] s_0 [/tex] are the final and initial positions respectively. Point the ball in the direction of [tex] \vec s_d - \vec s_0 [/tex] (point F in the opposite direction). Oh, and don't forget you'll have to remove the frictional force when the ball stops.

    So now the question you need to answer is whether to use a dry friction model or the F = -kv model. I don't have an answer for you. I suggest do whichever looks best and/or more realistic. If I had to guess, I'd probably guess the dry friction model might look better for a soccer ball. But I don't know for sure.

    Good luck!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook