# Force to cover distance with drag calculation

gbaygon

## Homework Statement

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 ).

## Homework 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).

## 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-

Homework Helper
Gold Member
Hi Guillermo,

Welcome to Physics Forums!

You can probably use the relationship,

$$W = \int _P \vec F \cdot \vec {ds}$$

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?

gbaygon
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) ?

Thanks!

Guillermo.

Homework Helper
Gold Member
Hello Guillermo,

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) ?

Thanks!

Guillermo.

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

$$W = \vec F \cdot \vec s$$

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

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

$$\vec F = m \vec a = -k \vec v$$

Noting that acceleration is the time derivative of velocity,

$$\vec F = m \frac{\partial}{\partial t}\vec v(t) = -k \vec v(t)$$

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.

$$\vec F = m \frac{\partial ^2 }{\partial t^2} \vec s(t) = -k \frac{\partial }{\partial t} \vec s(t)$$

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

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

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:
Homework Helper
Gold Member
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) ?

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.

gbaygon
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.

Guillermo.

Homework Helper
Gold Member
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.

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

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

where $$\vec s_0$$ 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 $$\vec s(t)$$ becomes $$\vec s_d$$, where $$\vec s_d$$ is the desired final destination of the ball.

$$\vec s_d = \vec s_0 +\frac{\vec v_0 m}{k}$$.

So your initial velocity is then

$$\vec v_0 = \frac{k}{m}(\vec s_d - \vec s_0).$$

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,

$$F(s_d - s_0) = \frac{1}{2}mv_0^2.$$

$$v_0 = \sqrt{\frac{2F}{m}(s_d - s_0)}$$

Where F is the constant frictional force, m is the mass, and $$s_d$$ and $$s_0$$ are the final and initial positions respectively. Point the ball in the direction of $$\vec s_d - \vec s_0$$ (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!