# Roche Fragmentation

If an object comes within a certain distance of its Orbital Parent, tidal forces from the parent object will be strong enough to tear apart the orbiting object, creating fragments. This critical distance, known as the Roche limit, depends on the radius of the parent object and the densities of both objects.

## Models

Roche fragmentation occurs when the force of gravity from other objects in the simulation is stronger than the internal forces holding an object together (including its own gravity). Due to performance constraints, Universe Sandbox generally simulates an object as a single body rather than a collection of bodies held together by gravity. To model the interplay between these competing forces, each object with a radius larger than 100 km contains 100 "sample fragments". These non-attracting objects are not visible to the user and do not collide with each other or with other objects, but their motion is simulated by the N-body integrator as they feel the effects of gravity from other objects in the simulation, including their own parent object.

The sample fragments are created inside their parent object, randomly oriented at a distance of 0.8R from the object's center, where R is the radius of the parent object. They are given the same velocity as the parent object, but are then allowed to move under the influence of gravity. If a fragment is pulled too close to the center of the object, it is placed back at the 0.8R distance. If a fragment is pulled too far from the center, to a distance of 0.9R, this indicates that the forces of gravity from other objects is large enough to cause Roche fragmentation. The sample fragment is replaced with a true Fragment object, which will be visible to the user as it is pulled out of the parent object's surface. This object is given the position and velocity of the sample fragment it replaced.

The mass of each new Fragment object is calculated by estimating the rate at which mass would be lost to Roche fragmentation, such that each fragment can carry away no more that 1/100 of the mass of the parent object. This mass is then subtracted from the mass of the parent object. The density of each fragment is randomly chosen from the range of 0.1ρ-ρ, where ρ is the density of the parent object, and the radius of the fragment is calculated from its mass and density. The fragment is given a randomly oriented rotation axis and a rotation period equal to the parent object's.