[Physics] How to compute drag coefficient given initial position, initial velocity and final resting position

homework-and-exerciseskinematicsvelocity

The equations I'm using are:

x = x + (DT * vx)
vx = vx * C

My DT is always 0.01 and the coefficient C (related to a linear drag coefficient, as mentioned in the comments) is greater than 0 and less than 1. The above will keep happening until x naturally reaches its limit.

What I want is an equation to find C given the other three inputs: initial x, initial velocity x and final resting x(this is where the object has come to a stop and vx = 0). Right now it's tedious because I have to plug in ix, ivx and C and run my simulation to see where the object stops. Then I have to do further tweaking to get exactly what I'm looking for.

Here are some samples:

initial x = 3.5
velocity x = -12.0
acceleration = 0.92
final resting x = 2.0

initial x = 3.5
velocity x = -14.0
acceleration = 0.92
final resting x = 1.75

For example(from the first dataset), we start at 3.5 we want to end at 2.0 and our velocity is -12.0 .. what do we need to use for C?

Best Answer

Basically what you're doing is calculating a discrete time series: you're finding an discrete series of positions $x_n$ (where $n\in\mathbb{Z}_+$) which are paired with times $t_n = t_0 + n\Delta t$. But there are a couple of ways you could interpret this time series, and the formula you're looking for depends on which one you use.

Exact positions

One option is to say that $x_n$ represents the exact position of the particle at time $t_n$. In order to find the asymptotic position as $n\to\infty$ (that is, the position where the particle stops), you need to convert your iterative formulas,

$$\begin{align}x_n &= x_{n-1} + v_{n-1}\Delta t \\ v_n &= Cv_{n-1}\end{align}$$

into direct formulas. Hopefully you can see that, because the speed gets multiplied by $C$ at every step, the speed at the $n$'th step will be given by

$$v_n = C^n v_0$$

Then figuring out the formula for $x_n$ is probably most easily done by finding a pattern:

$$\begin{align}x_1 &= x_0 + v_0\Delta t \\ x_2 &= x_1 + v_1\Delta t \\ &= x_0 + v_0\Delta t + Cv_0\Delta t \\ x_3 &= x_2 + v_2\Delta t \\ &= x_0 + v_0\Delta t + Cv_0\Delta t + C^2v_0\Delta t\end{align}$$

You wind up with

$$x_n = x_0 + v_0\Delta t \sum_{k=0}^{n}C^k$$

In the limit as $n\to\infty$, this simplifies to

$$x_\infty = x_0 + \frac{v_0\Delta t}{1-C}$$

which you can solve for $C$. This equation reproduces the sample results you listed.

It's important to note that the value of $C$ you get from this interpretation depends on your choice of $\Delta t$. To simulate the same motion using a different time step, you'll need to change the value of $C$. Only the ratio $\frac{\Delta t}{1-C}$ is fixed.

Discrete approximation

The other way in which one could interpret your time series is as a discrete approximation to some continuous function $x(t)$ that describes the actual motion. If you find it strange that the result depends on the time step $\Delta t$, this might be worth looking into.

To motivate this interpretation, you need to know something about finite difference approximations. In a nutshell, when you want to use a computer to numerically solve a differential equation, you can replace the derivative operator with a finite difference operator:

$$\frac{\mathrm{d}f}{\mathrm{d}t} \to \frac{f(t + \Delta t) - f(t)}{\Delta t}$$

The thing on the right here is merely the simplest example of a finite difference operator. (It also happens to be quite inaccurate.) This particular one looks a lot like the definition of the derivative, except that $\Delta t$ is finite, not infinitesimal (hence the name).

Your iteration equations can be written in the form

$$\begin{align}\frac{x_n - x_{n-1}}{\Delta t} &= v_{n-1} \\ \frac{v_n - v_{n-1}}{\Delta t} &= \frac{C - 1}{\Delta t}v_n\end{align}$$

You can assume that this is the finite difference approximation to some exact differential equation, and work backwards to find the equation. For example, by replacing the finite difference operator in the position equation with a derivative, you get

$$\frac{\mathrm{d}x}{\mathrm{d}t} = v(t)$$

If you try to do the same thing with the velocity, well, you can't, because the right side doesn't have a defined limit as $\Delta t\to 0$. But there are a couple of little hacks you can use, for example: choose some characteristic time scale $\tau$ and set $\Delta t = \tau$ on the right, while still taking the limit on the left. You wind up with

$$\frac{\mathrm{d}v}{\mathrm{d}t} = \frac{C - 1}{\tau}v(t)$$

Solving this differential equation gives you

$$\begin{align}v(t) &= v(0)e^{-t(1-C)/\tau} \\ x(t) &= x(0) + \frac{v(0)\tau}{1-C} \bigl(1 - e^{-t(1-C)/\tau}\bigr)\end{align}$$

and in the limit as $t\to\infty$,

$$x(\infty) = x(0) + \frac{v(0)\tau}{1-C}$$

which, again, you can solve for $C$. It turns out to be the same thing as before, only with $\tau$ instead of $\Delta t$. This is only the case because this is an exceptionally simple equation, and because of the particular way in which I chose to define the time scale $\tau$. In general, these two methods won't give identical results, in part because of the inaccuracies of the particular finite difference approximation I used.

Related Question