I have an application which computes positions & velocities of objects moving under the influence of gravity. I believe the math and code are both correct, but cannot be certain due to lack of data about known systems. Some of the systems I have simulated behave in a manner contrary to my intuition. I am not sure whether it is my intuition or my application which is wrong.

I have been simulating a system which consists of 3 massive stars (20 solar masses each). They are initially in the XY-Plane 120 degrees apart with radial velocities such that the 3 stars have almost circular orbits around the origin & stay in the XY-Plane. This system acts as I would expect, but the following seem counter-intuitive to me.

I added a 4th star (5 solar masses) at the origin, with a fairly high velocity parallel to Z-Axis. I expected the long term behavior of all 4 objects to be symmetric relative to the XY-Plane. Instead, the 3 circling objects moved off the XY-Plane (in direction of the 4th object's velocity vector), never to return. They seemed to steal momentum from the 4th object.

Next, I next started the 4th object on Z-Axis fairly far from the origin with no initial velocity. Before simulating either system, I expected these systems to be very similar in long term behavior. Id est: I expected the two systems to differ in their inital configuation, but otherwise seem to be the same over a long period of virtual time. In the second system, the 3 circling objects moved off the XY-plane, but never as far off as the above system. In both systems, the 4th object oscillated along the Z-Axis, but not symmetrically with respect to XY-Plane. I have not tried to check symmetry of the 4th object relative to the plane contaning the other 3 objects.

Can somebody with a good knowledge of the pertinent laws of physics give me an opinion about the above. Meanwhile, I am checking my code and simulating other systems.

Thanx for any help/advice you can give.