3

I'm writing a computer program/game and can't figure something out; I want to be able to calculate the resulting velocities of 4 particles (hexagons, specifically) after they simultaneously (elastically) collide, given their initial velocities. They all have the same size and mass, and in the specific case I'm trying to solve currently, one hexagon is fired at three stationary hexagons (as shown below).

I've seen many many problems on here and other sites dealing with the collision of 2 or 3 objects simultaneously, but none dealing with 4. Is it solvable? I've tried to solve it through looking at the forces, as well as through conservation of momentum/energy, but I can only ever get 3 equations, and there are 4 unknowns. Am I missing something?

I read something suggesting that many simultaneous collisions could be simplified by pretending they weren't actually simultaneous, and I'm looking into that, but I would like to better understand how this stated problem can be solved, or why it can't be solved if that ends up being the case.

Edit: I just wanted to update that this can't be simplified by pretending it isn't simultaneous,

Edit after being answered: In case anyone else is trying to do something similar, two solutions were given, the accepted answer solves the general case, while another answer below solves the specific case I asked about.

enter image description here

  • If it is ideal then it is solvable, unless there is also rotations involved which makes it so much more complicated because it is not going to be in contact with all the bodies at the same time. – John Alexiou Apr 03 '15 at 16:44
  • It's defined to be exactly ideal, with no rotations; all forces are assumed to act directly towards the center of mass of each hexagon. Also location is essentially quantized, so when the A hexagon moves, it will instantly be one hexagon-width to the right, and then again. At the moment of the second move, the collision happens; So all the collisions happen simultaneously. – HammerN'Songs Apr 03 '15 at 18:21
  • The collisions are all also defined to occur over the same period of time. – HammerN'Songs Apr 08 '15 at 03:17
  • To say that the collisions are all defined to occur over the same period of time can be problematic. Here you have a case where an infinitesimal difference in the interation can cause a significant difference in the final outcome, and that in a sense renders a numerical simulation meaningless since the solution is not numerical stable to extremely small noises. – Xiaolei Zhu Apr 12 '15 at 06:04

4 Answers4

7

The problem is equivalent to 4 spheres colliding simultaneously, where top sphere center is at $60^o$ relative to the $x'x$ axes (same goes for bottom sphere):

enter image description here

We'll name them: sphere A (dark blue), and spheres 1, 2, and 3.

During the collision the spheres will behave like springs with an infinite hook constant. The forces on the spheres will be infinite and the duration of interaction will be 0.

collision

The red area is where the spheres are compressed during the collision. If sphere 2 is compressed by $l$, and spheres 1 and 3 by $d$, then $\frac{d}{l}=sin30^o$ (trigonometry involved but i couldn't draw it here) and finally $l=2d$.

The energy stored in each spring is given by the formula $U=\frac{1}{2}kx^2$, and it will be converted to kinetic energy. Therefor, $K_1=K_3=\frac{1}{4}K_2$ and $v_1=v_3=\frac{1}{2}v_2$.


Before the collision sphere A has velocity $v_A$ and after the collision, $v_B$.

Conservation of energy:
$K_A = \frac{1}{2}mv_A^2 = \frac{1}{2}m(v_B^2+v_1^2+v_2^2+v_3^2)$, that is $v_A^2=v_B^2+v_1^2+v_2^2+v_3^2=v_B^2+\frac{3}{2}v_2^2$ (1)

Conservation of momentum:
$mv_A=mv_B+mv_1+mv_2+mv_3$, that is, $v_A=v_B+v_{1x}+v_2+v_{3x}$

Momentum on y axes is 0, since $v_{1y}=v_{3y}$. Also, $v_1$ forms a $60^o$ angle, so $v_{1x}=\frac{1}{2}v_1=\frac{1}{4}v_2$ and

$v_B=v_A-\frac{3}{2}v_2$ (2)

Finally:
Using (1) and (2) we get a single solution $v_2=0.8v_A$. The other velocities can be easily calculated, since we have found $v_2$.

user
  • 1,270
  • That's perfect! The math seems correct, I'll check back once I've derived it myself. I guess I assumed for some reason that I couldn't treat them as springs, thinking that'd mean I'd have to also find the forces involved. It never came to mind that I could solve it using the spring energy. I'll mark it as correct, because even if your math is wrong somewhere I'm fairly sure that's an accurate way of solving it. – HammerN'Songs Apr 14 '15 at 16:08
  • 1
    I got also $\frac{4}{5} v_A$ for an elastic collision which means the math is probably correct, yet with the impulse method I described you can make the collision inelastic or plastic and also account for different initial conditions. – John Alexiou Apr 14 '15 at 16:26
  • 2
    @ja72 My solution might not be the best; I m not very experienced with collisions. I saw it mostly as a challenge and tried to solve it. I m glad we got the same result, no need for anyone to review our solutions. – user Apr 14 '15 at 16:39
  • 1
    @user5061 if instead of using springs you use some other force, such as an inverse repulsive square law (coulomb), you will obtain a different result. So this solutions is a functions of the format of the interaction force –  Apr 15 '15 at 05:09
  • @brucesmitherson Trying to solve it the way you describe is quite interesting. However i think it is not identical to the solution i presented, because the interaction (collision) doesn't have the characteristics i assumed with the springs. Namely: collision duration is not nearly 0, forces are not infinite and they don't act "locally". You might be able to solve it though if you assume something witty, e.g. force being proportional to $r^{-c}$, c being a huge (nearly infinite) number, and proportional to a huge constant k. (it's a guess, i might be wrong) – user Apr 15 '15 at 11:45
  • @user5061 you can always "switch" the force on when the objects are very close. I suspect that the solution does not depend on this particular distance, but it does on the particular shape of the force (how it depends on x, and thus the final energy rations). Very interesting and also shows that the problem has an infinite number of solutions depending on the details of the interactions. The spring is a reasonable one but not the only plausible one. –  Apr 15 '15 at 14:19
3

Here is how you deal this this problem as a system of equations. For each contact pair assign a normal direction $\hat{n}_k$ and and impulse $J_k$. The possible contacts are AB, AC, and AD. We can introduce symmetries and simplifications later.

The initial velocity if body A is $v_A$ along the horizontal axis, and after the collision it is $v_A + \Delta v_A$. From the change in momentum you can work out

$$ m \Delta v_A = -J_{AB} \frac{1}{2} -J_{AC} - J_{AD} \frac{1}{2} $$

where the factors of 1/2 come from $\cos 60°$. This is simplification of the general equation $$m_i \Delta \vec{v}_i = \sum_k \hat{n}_k J_k$$ when projected along the x-axis.

Now we look at the momentum change of body C along the horizontal axis also

$$ m \Delta v_C = J_{AC} $$ and the momentum change for the rest of the bodies is measured along the contact normals (60° from horizontal) as $$m \Delta v_B = J_{AB} \\ m \Delta v_D = J_{AD}$$.

For fun I am including the possibility of inelastic collision with $\epsilon$ the coefficient of restitution. The collision rules are expressed along the contact normals where the final relative speed is a negative fraction of the impact relative speed

$$\begin{align} \frac{1}{2}(v_A+\Delta v_A)-(v_B+\Delta v_B) & = -\epsilon (\frac{1}{2}v_A-v_B) \\ (v_A+\Delta v_A)-(v_C+\Delta v_C) & = -\epsilon (v_A-v_C) \\ \frac{1}{2}(v_A+\Delta v_A)-(v_D+\Delta v_D) & = -\epsilon (\frac{1}{2}v_A-v_D) \end{align}$$

In the above three equations the changes of speed as substituted from the momentum equations such as $$\begin{align} \Delta v_A &= (-J_{AB} \frac{1}{2} -J_{AC} - J_{AD} \frac{1}{2})/m \\ \Delta v_B &= J_{AB}/m \\ \Delta v_C &= J_{AC}/m \\ \Delta v_D &= J_{AD}/m \end{align} $$

The above becomes a 3×3 system of equations for the impulses

$$ \frac{1}{m} \begin{bmatrix} -\frac{5}{4} & -\frac{1}{2} & -\frac{1}{4} \\ -\frac{1}{2} & -2 & -\frac{1}{2} \\ -\frac{1}{4} & -\frac{1}{2} & \frac{-5}{4} \end{bmatrix} \begin{pmatrix} J_{AB} \\ J_{AC} \\ J_{AD} \end{pmatrix} = -(\epsilon+1) \begin{pmatrix} \frac{1}{2}v_A-v_B \\ v_A-v_C \\ \frac{1}{2} v_A - v_D \end{pmatrix}$$

When B, C and D are at rest initially the above is solved for

$$ \begin{align} J_{AB} &= (\epsilon+1) \frac{m v_A}{5} \\ J_{AC} & = (\epsilon+1) \frac{2 m v_A}{5} \\ J_{AD} &= (\epsilon+1) \frac{m v_A}{5} \end{align} $$

Now the final velocities are found by $$\begin{align} v_A+\Delta v_A & = \frac{v_A (2-3\epsilon)}{5}\\ v_B+\Delta v_B &= \frac{v_A (\epsilon+1)}{5} \\ v_C+\Delta v_C &= \frac{2 v_A (\epsilon+1)}{5} \\ v_D+\Delta v_D &= \frac{v_A (\epsilon+1)}{5} \end{align}$$

For an elastic collision ($\epsilon=1$) the final speed of B is $v_B+\Delta v_B = 0.8 v_A$.

NOTE: Solution of n-body collision https://physics.stackexchange.com/a/91069/392

John Alexiou
  • 38,341
  • That's also perfect.. the other person answered before you and answered my question specifically, but you answered more the general case, which I'm going to need. I want to eventually have this be 3D and be able to work even if all the particles are moving, and it'd be great if I could add in inelastic collisions. I already selected his though, so I think all I can say is sorry and thank you very much for this :) Unless there's some standard method of dealing with multiple good answers that I'm not aware of. – HammerN'Songs Apr 14 '15 at 16:27
  • 1
    For 3D use http://physics.stackexchange.com/a/92132/392 – John Alexiou Apr 14 '15 at 16:30
  • 1
    @nogrodoth There is an implicit assumption that the ratio of speed change for these objects remains the same throughout the course of collision. This also implies that the contact with all 3 objects starts exactly the same time, and lasts exactly the same duration. This of course can't be achieved in a real system, but will have to be assumed to work out the outcome. Just be advised that the outcome is not stable to your initial condition, that is, even you move one block an almost infinitely small amount, the outcome will be completely different. – Xiaolei Zhu Apr 14 '15 at 21:42
  • I had the same concerns but the OP stated in comments that this is really more like a game and not a simulation. The positions are quantized (snapped) to a hex grid so the collision will occur at the same time. – John Alexiou Apr 14 '15 at 23:28
  • @ja72 I do not understand the energy equations where you introduce $\epsilon$: why the speeds are not squared and why you used 3 separate equations instead of one (what is conserved is the total energy not each individual energy relative to the initial one) –  Apr 15 '15 at 05:04
  • They are not energy equations. They represent the before and after of relative velocity $$v_{final} = -\epsilon v_{initial}$$ See http://scienceworld.wolfram.com/physics/CoefficientofRestitution.html – John Alexiou Apr 15 '15 at 11:41
  • but that is valid only for a single collision. –  Apr 15 '15 at 14:14
  • 1
    For each collision. Apply it three times (hence the three equations) to get the three unknown impulses. This is nothing new here. Read http://www.cs.cmu.edu/~baraff/sigcourse/notesd2.pdf on how to implement algos for multiple collisions. – John Alexiou Apr 15 '15 at 17:43
2

Its pretty much solvable.

enter image description here

Lets name the sides of the Hexagon in the order 1,2,3,4. When the hexagon A collides with B,C,D the 2-3 side collide with C and C moves in a direction of A and it will not effect all the other hexagons. Same way the side 1-2 will collide with D and give it motion in a direction perpendicular to side 1-2 and same for side 3-4... And we see due to symmetry the magnitude of velocity of hexagon D and B will be same.Breaking them in 2 component, one in the direction of A and other perpendicular to A. We will be able to solve for all the hexagons.

P.S.Can't make a good picture with description because of lack of Photoediting skills

1

The problem is ambiguous and has infinite solutions. The reason is that now you cannot ignore the relative forces between the A and B,C and D. For instance, if you solve the problem as non simultaneous collisions you will get a different answer depending on the order of the collisions. Suppose that A collides first with C, then A will stop, C will move at the initial speed of A, and B and D will remain at rest. If you instead make A collide with D and B first you will reach a different solution. In the real case of simultaneous collision for the 4 objects, you really need to also add as additional condition the relative forces between AB AC and AD (which is equivalent to freely chose one of the independent unknowns)

UPDATE: I played a little with the equations, and found (too large to type here) that the actual solution is a function of both the initial momentum of A and the amount of time during which the objects interact. Once you have that you can compute the normal forces between hexagons and then the relation between the momentum's transferred to them. I will leave that as an exercise to you.

  • Ok. At least for this specific problem though, the forces between AB, AC, and AD are assumed to be zero. Shouldn't it therefore have only one possible solution? There are no other free variables, and I can't imagine throwing a hexagon at three others situated as shown and getting different results each time. – HammerN'Songs Apr 01 '15 at 16:13
  • If you do that, then A will not interact with the other objects and the solution will be A "passing trough" them without changing its speed. –  Apr 01 '15 at 16:16
  • I'm stupid, I misread your post. I somehow thought you were talking about the general case in which there would be forces between bc,and dc, when you mentioned the relations between ac,ab,and ad. So I apologize, actual response: I believe that relation you mention at the end is precisely what I'm trying to find. I don't understand how/why/where theres a free variable. – HammerN'Songs Apr 01 '15 at 16:21
  • It is a free variable because the forces between A and the other 3 can be made arbitrary, the equations do not know that they are the same exact material. As for which specific choice of the free variable would make the interaction equivalent to same materials, I never had to do it before, let me think, it might be a trivial choice of the free variable. I'll update as soon as I reach a satisfactory answer. –  Apr 01 '15 at 16:57
  • 1
    I apologize, I didn't notice you updated your answer. Thank you very much for letting me know it is solvable. Before I accept it though, did you use anything besides conservation of force, conservation of momentum, and conservation of energy? If not, could I ask for some form of hint? I'm not simply trying to get my answer and move on - I've been working on this off and on for days now, and the exercise you left me with doesn't seem any different from the one I asked for help with in the first place.. – HammerN'Songs Apr 03 '15 at 18:16
  • I mean thank you still, but I must be misunderstanding something; I have conservation of energy, thats 1 equation. Conservation of momentum in x and y directions, that 2 more equations. Conservation of forces (the only place T can come in) gives identical equations to the conservation of momentum ones divided by time (which is constant for all collisions). And so I end up with still only 3 linearly independent functions. Should that not be true? – HammerN'Songs Apr 03 '15 at 18:20
  • Hi nogrodoth, do not worry, I gotta do some stuff now, but I'll post the detailed analysis, with equations, tonight. –  Apr 03 '15 at 18:37
  • 1
    Actually, I revised my analysis and found some flaws. I will put a bounty to attract more attention –  Apr 07 '15 at 23:26