Syndicate this site: (RSS)

November 29, 2008

Approximations for gravity

One of the problems I've been working on lately is a simple center of mass approximation for a gravitational dipole. In other words, how much error is introduced when I approximate two separate but equal masses by using a larger, centrally located mass.

Does the virtual mass accurately represent the pair?

We want to get some sense for how much error is introduced if we use the large virtual mass C as a replacement for the two smaller masses A and B.

Now, as a quick exercise, let's just plug in some numbers and see what happens. We'll simplify the problem by assuming that all of the masses are in a straight line. To keep the math easy, we'll have some care with the numbers that we use - let's assume that the distance to the mass center is 10 units, and that the distance from the mass center to the actual masses is 1 unit.

The force for this problem goes inversely as the square of the distance, so our approximate force is
F'
= m / r ^2
= 2 / 10 ^ 2
= 0.02

Now, in our simplified problem, the actual distance to A is 9 units, and the actual distance to B is 11 units....

F
= ( 1 / 9^2 ) + (1/ 11^2)
= 1/81 + 1/121
= 202 / 99^2
= 0.02061...

So in our simple example, we are about 3% off when the distance is 10% off. In other words, we can express the true force (in this configuration) as
F = ( 1 + 3 Δ ) / R^2
where Δ is the ratio of the distances we are interested in.

Can we derive that? There are two basic approaches that we can take to produce a polynomial expansion that will get the job done. One is to take advantage of the fact that the numerator and denominator are really simple, and work through the problem of polynomial division. The other approach, which produces similar results, is to use a Maclaurin expansion.

In the more general problem, where you relax the simplification that everything is linear, the attraction of polynomial division wanes suddenly, as your denominator becomes a 3/2 root. The distance to the masses is straight forward enough, and the 1/R^2 term stays nice
[( 1 - Δ cos ) ^2 + ( Δ sin ) ^2 ]
[ 1 - 2 * Δ cos + Δ ^2 cos ^2 + Δ ^2 sin ^2]
[ 1 - 2 * Δ cos + Δ ^2 ]
... but that force needs to be projected back onto the horizontal and vertical axes, effectively adding an extra 1/2 power in the denominator.

Projecting the force onto the cosine arm, we get the following result
F
= ( 1 - Δ cos ) [ 1 - 2 Δ cos + Δ ^2 ] ^(-3/2)
= ( 1 - Δ cos ) [ 1 - 3 Δ cos + ( 15 cos^2 - 3 ) (Δ ^2/2) + ... ]
= 1 + 2 Δ cos + 3/2 ( 3 cos^2 - 1 ) Δ ^2

That gives us the force from the closer of the two masses. The force from the further of the two is the same, reversing the sign of all of the cosine terms. When we add these two results together to measure the total horizontal force, the first order terms cancel, and we get:
F = 2 * ( 1 + 3/2 ( 3 cos^2 - 1 ) Δ ^2 )

Setting cos = 1 is equivalent to the simplified problem, and this formula does match pretty well with the 3% error that we found there. Our formula also predicts that we have a -1.5% error for the case where cos = 0 and Δ = 0.1; a bit of trigonometry confirms that result as well.

November 29, 2008 Comments (0) TrackBack (0)

November 14, 2008

Scratch Input

The guys behind this demo are going to become insanely wealthy.

Scratch Input.

November 14, 2008 Comments (0) TrackBack (0)

November 13, 2008

Good problems to have

... a release engineer who keeps starving out the pipeline.

We're trying to define the requirements for our new release process, that he's going to implement for us. And the more crap we bounce back and forth, the better it gets - we haven't even gotten to start playing with it yet, and already the questions we are asking are improving dramatically. Lots of "wouldn't it be cool if X verbed Y?" "Wow, that shouldn't even be hard - we've got all the pieces, at least enough to put together the prototype".

This thing is going to be insanely awesome, and he'll be headlining a bunch of conferences showing our results, or our brains are going to be mounted in glass jars decorating the desk of the Chairman of the Human Physiology department at UT.

November 13, 2008 Comments (0) TrackBack (0)