- #1
darrencubitt
- 3
- 0
Homework Statement
This isn't exactly homework, but this seemed like the right place for this question. I'm working on an add-on for Orbiter - the space flight simulator - and would like to be able to determine the equation of motion for an object traveling at an initial velocity (v0), with a linear acceleration term (a), a velocity-squared drag proportionality constant (k), and elapsed time (t).
Homework Equations
v = v + a * t - k * v^2 * t
The Attempt at a Solution
Being of limited mathematical ability, I scoured the web for some solutions. I found many dealing with velocity-proportional drag, and also some velocity-squared functions which, unfortunately, assume v0=0. Reluctantly, I tried my own hand and I managed to hammer out an equation which can deal with velocity and drag but, alas, no acceleration.
Looking back at how I came to this solution, I am sure that my logic is utterly, utterly wrong. This is almost certainly a case of being right for the wrong reasons. For your entertainment (and also in the hope of getting an answer), my working follows:
I started by writing the basic equation:
1. vt = v0 - k * v0^2 * t
Obviously, since velocity is constantly changing through time, the (k * v0^2) term will only be valid at t=0, so I divided both sides by v^2 to remove it from this part of the equation:
2. 1/vt = (1/v0 - k * t)
I then reasoned that since I am now dealing with the reciprocal of the velocity, I should add the drag term rather than subtract it.
3. 1/vt = (1/v0 + k * t)
Finally, I multiplied the reciprocals out:
4. vt = v0 / (1 + k * t * v)
And, realising velocity may be negative, used the magnitude of the velocity on the right hand side.
5. vt = v0 / (1 + k * t * |v|)
After studying the relationships between the initial and final velocity, I concluded that displacement could be found by:
6. LOG(1 + k * t * |v|) / k (for k != 0)
I guess you could call eqn. 6 "solving by imperical observation".
I am sure that my workings are hilariously wrong but, to my surprise, these equations actually work. I compared the equation to the output of a numerical approximation and it agrees almost 100%, with some slight deviations which I put down to the latter being an approximation.
I tried repeating this trick when including a linear acceleration term (a) but always end up with a nasty (a/v^2) term stuck inside the equation (replacing the k*v^2 problem I was initially trying to solve).
Can anyone provide me with any hints on how to perform this calculation with linear acceleration included? I have seen some solutions bordering on what I am looking for, but either assume v0=0 or break down in situations with negative acceleration, etc. Is what I am looking for even possible?
Thanks for any help.