Friday, July 31, 2009

Collisions in 2D



I want to continue with the analysis of inelastic collisions between particles in two dimensions. I plan to use these for simulations. As we did previously, I will use the notations M and m to refer to two masses which will have a historic meeting. In the diagram, they approach each other in a reference frame where (i) m is at rest and (ii) all of M's velocity is along the x-axis.

To simplify things, I will only consider the case where the masses are equal, M = m. M is the blue circle in the diagram, it approaches m with velocity a. After the collision, M is deflected along angle φ below the x-axis, while m exits with angle θ above the x-axis. We use the same conservation laws which give us three equations:


(1) a = c cosφ + d cosθ
(2) c sinφ = d sinθ
(3) a2 = c2 + d2

Rearrange (1) and square it:
a2 - 2 a c cosφ + c2 cos2φ = d2 cos2θ

then add to the square of (2):
a2 - 2 a c cosφ + c2 cos2φ + c2 sin2φ = d2 cos2θ + d2 sin2θ

use the trigonometric identity
sin2α + cos2α = 1
reduce the above to:
a2 - 2 a c cosφ + c2 = d2

substitute for a2 from 3:
c2 + d2 - 2 a c cosφ + c2 = d2
rearrange:
2c2 = 2 a c cosφ

if c ≠ 0, then:
c = a cosφ

substitute for c2 in (3):
a2 = a2 cos2φ + d2
d2 = a2 (1 - cos2φ)
d2 = a2 sin2φ
d = a sin φ


So, we have solved for c and d in terms of a and the angle φ. Unfortunately, what we will know in our simulation is the positions of the two centers of mass at the moment they touch (i.e. θ). Now, we could go back and solve for θ directly. But I will assert that the following is true by symmetry:

c = a sinθ
d = a cosθ


(There is nothing special about the labels on the particles, so if we switch c and d, as well as θ and φ it should be OK).



Notice that we now have:

d = a sinφ = a cosθ
sinφ = cosθ
φ + θ = π/2


For equal masses, the particles always move away from each other at right angles.

For the x and y-components of the velocities:
cx = c cosφ = c sinθ = a sin2θ
cy = c sinφ = c cosθ = a sinθ cosθ

dx = d cosθ = a cos2θ
dy = d sinθ = a sinθ cosθ


And, as a special bonus, we notice that the 2D case also applies to 3D, because any 3D collision involves two particles whose frame of reference can always be rotated and translated so as to reduce to the 2D case. Next: using these simple equations to simulate a 2D gas.