in reply to Re^10: [OT] Forces.
in thread [OT] Forces.
Unless it's already in motion
Okay. You've got me back with that bit. It makes sense (to me).
This bit worries me a little:
and you haven't by luck gotten to a spot where v=0 and a=0 at the same time
But I can suspend/defer that worry.
you have to have some initial position and velocity (zero is a valid choice for both)
I do have to have an initial position, and can pretty much pick one arbitrarily. So, A aligned with B aligned East (0°) is as good as any and better than most.
I do not have (from the simulation's perspective, do not need) an initial velocity. The forces acting at any given position are the same regardless of how quickly it arrived there. An assumption of zero velocity is perfectly valid as the model simply has no provision for knowing it.
I if make the initial position 0 ° and 0 rads/s; and the calculated forces have a 0 Y component and a massive (pos or neg) X component, nothing will move and there will be no acceleration. Your code will get F(perp) = 0, times scale still 0; v remains 0; theta remains 0. Nothing moves. Perfect!
Same initial position; X=0, Y= some big value. F(perp) = F(y); v = 0 + F(perp) * scale; Theta = 0 + v.
So in order to make things useful, I need to set scale such that v adjusts theta by a small amount rather than causing it spin around like a whirling dervish.
For that I need a rough approximation of the maximum value F(perp) might attain, and then chose scale to adjust that to produce my desired ~1 degree of rotation per step.
The maximum values I'm seeing from the sim (X or Y) are ~330, which if both components reached that simultaneously (not sure that's possible) gives an F(perp) of 466. If it results in too small a steps, tweak it later.
Adjust the position of A with respect to B in the model by the change in theta. Adjust the position of the body with respect to A by that same delta theta * 90/360 to account for my known rate of precession. And iterate.
Hm. It should become obvious after 5 or 10 iterations of the loop whether I've chosen an appropriate scaling factor. 5 or 10 hours to see what happens. (Hmmm :)
There are various design factors that influence the forces involved. I've seen pairings (for the 0 ° starting point) as high a x=300+ y:<-1; and as low as x=62 y=-69. So if I start with a scale factor of 1/200 it should ensure that I start to see some movement fairly quickly and be able to get a feel for how to adjust it from there.
I guess I'll give it a go and get back to you with the results.
Sorry for forcing you to lead me by the hand(nose) through this, but whilst I familiar with using integration to reduce one variable to an effective 0; I've never (knowingly) seen it used to effectively discard all but one variable. I've written software to perform integrations -- basically just implement the formula and stick the values in -- but never used it in this way.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^12: [OT] Forces.
by bitingduck (Deacon) on Feb 16, 2016 at 07:15 UTC |