Kinematics of a particle with drag

Click For Summary

Discussion Overview

The discussion revolves around the kinematics of a particle experiencing drag, specifically in the context of a Java 2D object simulation. Participants explore how to calculate the object's velocity and position over time given an initial velocity and position, while also considering the effects of drag during motion.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant presents a model where acceleration is proportional to the square of velocity, leading to a derived expression for velocity as a function of time.
  • Another participant suggests that the position can be updated using the derived velocity without needing to re-derive it, proposing a time-stepping approach for position updates.
  • A later reply indicates that the integration for position should consider the constant initial velocity, leading to a logarithmic expression for position.
  • One participant challenges the idea of separating velocity components, stating that they are coupled in one-dimensional motion unless additional forces are considered.
  • Another participant expresses uncertainty about the validity of separating components and notes issues that arise when the initial velocity is large.
  • Discussion includes a suggestion to update velocity using a formula that incorporates drag directly, questioning the use of a general formula for step-by-step updates.

Areas of Agreement / Disagreement

Participants do not reach a consensus on whether the velocity components can be separated, and there are differing opinions on the best approach to implement drag during motion. The discussion remains unresolved regarding the most effective method for updating position and velocity.

Contextual Notes

Some participants express uncertainty about the assumptions made in their calculations, particularly regarding the treatment of drag and the coupling of motion components. There are also unresolved mathematical steps related to the integration and application of drag forces.

chimpz
Messages
7
Reaction score
0
(this is all in context to a java 2d object and is not homework related)

I have an object with velocity v and position x.
Its acceleration is directly proportional to velocity squared ie a=k v^{2}.
Given the objects initial velocity u and its initial position x_{0} how would i work out its velocity and position at time t?

I have tried integrating:

a = \frac{dv}{dt} = kv^{2}

\int^{v}_{u} v^{-2} dv = \int^{t}_{0} k dt

\frac{1}{u} -\frac{1}{v} = kt

v = \frac{1}{\frac{1}{u} - kt}

tbh I got a lot further while writing this post than I did trying to work it out before
trying to get the new position:

\int v^{-2} dv = \int k dt

-\frac{1}{v} = kt

v = \frac{dx}{dt} = -\frac{1}{kt}

\int^{x}_{x_{0}}1\:dx=\int^{t}_{0}-\frac{1}{kt}dt

x-x_{0}=-\frac{1}{k}\left[\:ln|t|\:\right]^{t}_{0}

But you can't ln|0| :/
So, without bounds:

x=-\frac{1}{k}ln|t| + c

Now I'm stuck.

How would I update the location?

Also, how would I implement drag while the engines were on?

Part of my code:
Code:
public void update(double delta) {
	if (engines) {
		double dv = Math.sqrt(2 * powerToWeight * delta);
		Vector2f temp = dir.copy(); //dir is the direction of the engine's force
		temp.scale(dv);
		velo.add(temp);
		double dx = dv * delta * 2 / 3;
		temp = velo.copy();
		temp.scale(dx);
		loc.add(temp);
		// TODO add drag
	} else {
		velo.i = (float) (1 / ( (1 / velo.i) - drag * delta ));
		velo.j = (float) (1 / ( (1 / velo.j) - drag * delta ));
		// TODO update location
	}
}

Pleased with myself for using the itex tags for the first time :D

Edit: could this be considered a hw-type question?
 
Last edited:
Physics news on Phys.org
chimpz said:
v = \frac{1}{\frac{1}{u} - kt}
You can integrate this to get the position, there is no need to derive v(t) again.

How would I update the location?
If you do it in time steps: ##x += v \delta t##

Also, how would I implement drag while the engines were on?
Add this as acceleration, try to derive v(t) again. If that does not work, do it in time steps.
 
I forgot u was a constant :P ok so:

\int^{x}_{x_{0}}1\;dx=\int^{t}_{0}\frac{1}{\frac{1}{u} - kt}dt

x-x_{0} = -\frac{1}{k}\;[\;ln|\frac{1}{u} - kt|\;]^{t}_{0} <br /> = -\frac{1}{k}(\;ln|\frac{1}{u} - kt|\; - \;ln|\frac{1}{u}|\;) = -\frac{1}{k}\;ln|1-ktu|

so I'm guessing i do this separately for each component of the vector :)
Thank you for pushing me xD
 
In general, you cannot separate those components, they are coupled. Without other sources of acceleration, the motion happens in one dimension only, so you can rotate that x in the appropriate direction.
 
O .. i was pretty sure you could separate the i and j components.
but a problem occurs when u is a large positivehere is part of my update method now when there are no other forces on the object:
Code:
if (velo.i != 0) {
	loc.i += (float) (Math.log(1 - dragConst * delta * velo.i) / dragConst);
	velo.i = (float) (1 / ((1 / velo.i) - dragConst * delta));
}

if (velo.j != 0) {
	loc.j += (float) (Math.log(1 - dragConst * delta * velo.j) / dragConst);
	velo.j = (float) (1 / ((1 / velo.j) - dragConst * delta));
}
 
Last edited:
Wait... if you update it step by step, why do you use the general formula?
What about velo.i = velo.i - velo.i*sqrt(velo.i^2 + velo.j^2)*k?

I hope I got the angles right.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
Replies
9
Views
1K
  • · Replies 18 ·
Replies
18
Views
1K
  • · Replies 30 ·
2
Replies
30
Views
3K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 7 ·
Replies
7
Views
6K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
6
Views
2K