# Perfectly elastic collision of spheres

1. ### janismac

4
Hey guys!

I am currently developing a simulation that involves sphere (or if you like particle) collision in 3D space. And I want it to be accurate (on the level of classic mechanics).

The algorithm to do the job would take in the velocities, masses and relative position (aka line of impact) of two colliding particles and compute their new velocities short after the collision.

So I tried to develop this algorithm and ran into a problem.
I set up the equations for the conservation of momentum and conservation of kinetic energy.
That gave me four equations, one for the kinetic energy (scalar) and three for the momentum (one for each of the three dimensions).

Since the result of this calculation has six variables (the two new velocity vectors) it needs six equations to be solved. Obviously two more are necessary. I dont know how to set them up but they certainly have to take the relative position into account.

Well, I just hope that someone here can help me solve this.
In case I have left something unclear, just ask.

Regards, janismac

### Staff: Mentor

How have you used the angle of impact parameter? There are (as you've just discovered) multiple solutions that conserve momentum and energy; they correspond to different angles into and out of the collision.

79
You can simplify by using spherical coordinates based on the center-of-mass.
Conserve angular momentum.

4. ### janismac

4
where is there such a parameter?

my equations are:
$image=http://latex.codecogs.com/gif.latex?m_1%5Cvec%7Bv_1%7D+m_2%5Cvec%7Bv_2%7D%3Dm_1%5Cvec%7Bv%27_1%7D+m_2%5Cvec%7Bv%27_2%7D&hash=3177eb8dcd675141be433aa991b234bd$ momentum

$image=http://latex.codecogs.com/gif.latex?m_1%5Cvec%7Bv_1%7D%5E2+m_2%5Cvec%7Bv_2%7D%5E2%20%3D%20m_1%5Cvec%7Bv%27_1%7D%5E2+m_2%5Cvec%7Bv%27_2%7D%5E2&hash=ddbca9ac61d8f36ddb188b938511327d$ kinetic energy (equation multiplied by 2)

### Staff: Mentor

Right, and that's not sufficient to completely specify the initial conditions, which is why you're finding multiple solutions. You have six unknowns, four equations leaves you with two unknowns. You can make up a value for one of these two, then solve for the last one, and you'll have a complete solution; but you can make up a different value for the fifth unknown and you'll get a different but perfectly good solution. So... multiple solutions.

In physical terms, imagine the two balls approaching each other at equal speeds. The could bounce away at any angle, and as long as they're traveling at the same speed and in exactly opposite directions after the collision, you have a solution that conserves energy and momentum. Your two extra unknowns correspond to the the two angles the balls actually take.

Tadchem's answer (use conservation of angular momentum - that will give you the two extra equations you need to solve for those last two unknowns) is good.

### Staff: Mentor

When you line up a shot in pool, you draw an imaginary line between the pocket and center of the ball you are aiming at. You then try to hit the ball you are aiming with the cue ball at the intersection of the imaginary line with far surface of the ball you are aiming at. So the collision of two balls in not only a function of the initial velocities, but also their offset trajectories.

7. ### janismac

4
To be honest I am not sure how to set this equation up but I'll give it a try.

$image=http://latex.codecogs.com/gif.latex?%5Cvec%7Bx_1%7D%20%5Ctimes%20m_1%5Cvec%7Bv_1%7D%20+%20%5Cvec%7Bx_2%7D%20%5Ctimes%20m_2%5Cvec%7Bv_2%7D%20%3D%5Cvec%7Bx_1%7D%20%5Ctimes%20m_1%5Cvec%7Bv%27_1%7D%20+%20%5Cvec%7Bx_2%7D%20%5Ctimes%20m_2%5Cvec%7Bv%27_2%7D&hash=7c16433d11d0a285e39a710148a43735$

Vector x is the absolute position of a particle in my coordiante system.
This equation would set the center-of-rotation to the origin. May I just do that?

This would give me three new equations instead of two... so it's most likely wrong. But I dont know any better. Couldnt someone just give me the equation?

8. ### janismac

4
I have another idea that may lead to a solution.

The old velocity vector, the new velocity vector and the force that acts on a particle have to lie in one plane (dont they?)

so I could express this in two equations, one for each particle:

$image=http://latex.codecogs.com/gif.latex?%5Cfn_jvn%20%5Cnewline%28%5Cvec%7Bf%7D%20%5Ctimes%20%5Cvec%7Bv_1%7D%29%20%5Ccdot%20%5Cvec%7Bv%27_1%7D%20%3D%200%20%5Cnewline%20%5Cnewline%28%5Cvec%7Bf%7D%20%5Ctimes%20%5Cvec%7Bv_2%7D%29%20%5Ccdot%20%5Cvec%7Bv%27_2%7D%20%3D%200%20%5Cnewline%20%5Cnewline%20%5Cvec%7Bf%7D%20%3D%20%5Cvec%7Bx_2%7D-%5Cvec%7Bx_1%7D&hash=a9d7e7cd0f21c53f57cbe3b33f18ca81$

does that make sense?

9. ### haruspex

13,121
I assume you start off with known trajectories for the particles before impact. From those you can compute the point of impact on each particle. I'll further assume the particles are smooth, so you don't have to worry about spin.
You can arbitrarily fix one particle as the reference frame by subtracting its velocity from the other. Further, you can rotate the frame so that the mass centres, point of impact and velocity of approaching particle are all in the XY plane. The direction of departure of the previously 'stationary' particle is obvious, so you only have three scalar unknowns to determine and still 3 scalar equations to make use of.

79
Back in 1993 I wrote up the details of this in a non-peer-reviewed paper: "A simple and accurate method for calculating viscosity of gaseous mixtures", US Bureau of Mines Report of Investigations 9456, Govt. Doc Number I 28.23:9456. In the appendix I analyzed in detail the mechanics of the transfer of momentum in an elastic collision between two perfect spheres of arbitrary masses.
The choice of center-of-mass coordinates allows one to disregard the net velocity of the system (conserved before and after the collision), and aligning the z-axis of a spherical coordinate system with the angular momentum pseudovector removes two degrees of freedom. There is no individual momentum of the spheres parallel to the z-axis, leaving r and theta. All momentum *transfer* occurs along the r coordinate, and (angular) momentum remains unchanged along the theta coordinate.
The problem is thus reduced to the one-dimensional problem along the line connecting the centers of the spheres.
The physics revealed is that the efficiency of the transfer of momentum is a maximum when the masses are equal. Dissimilar masses result in the smaller mass recoiling from the impact while the larger mass only transfers some of its momentum to the smaller mass, yielding a lower efficiency of momentum transfer
The importance is that the efficiency of the transfer of momentum from one portion of a fluid to another is called fluidity, which is better known through its reciprocal - viscosity. This helps explain the viscosity anomaly - the fact that a mixture of fluids of different molecular weights always has a higher viscosity than the corresponding linear combination of the separate viscosities of the individual fluids.