A team of astrophysicists has hurled a couple of stars at a range of black holes in a series of simulations and documented what occurs.

It's the first study of its kind, according to the researchers, that integrates Einstein's general theory of relativity with realistic models of main-sequence star densities. The findings will aid our understanding of what we see when we see light flares from distant black holes shredding stars.

When a star approaches a black hole too closely, things soon become violent. Due to tidal forces - the stretching of one body due to the gravitational attraction of another - the black hole's intense gravitational field begins deforming and ultimately pulling the star apart.

There is no way out for the star in the worst-case situation. The star's material is gulped down into the black hole like a spaghetti noodle, causing catastrophic disruption.

However, this is not the case in every interaction between a black hole and a star. Some stars have been discovered to be still alive. The simulations, conducted by astrophysicist Taeho Ryu of Germany's Max Planck Institute for Astrophysics, were created to determine what factors contributed to the life of a star.

Six simulated black holes with masses ranging from 100,000 to 50 million times that of the Sun were constructed by the scientists. After that, each of these black holes collided with eight main-sequence stars with masses ranging from 0.15 to 10 times that of the Sun.

They discovered that the initial density of a star was the most important influence in its survival. The denser a star is, the better its chances of surviving a run-in with a black hole. These encounters may be seen in the movie above, which takes place around a supermassive black hole with a mass one million times that of the Sun. Yellow stars have the maximum density, whereas blue stars have the lowest.

The scientists also discovered that partial disruptions happen at the same pace as whole disruptions, and that the proportion of the star's mass loss can be expressed using a simple expression.

Future research will better model the effects of these contacts, including the hitherto underappreciated partial disruption occurrences, scientists said.

This will show what happens to a star after it survives a close encounter with a black hole, such as whether it continues on its main sequence or becomes a stellar remnant, and whether it will remain in orbit around the black hole until it is completely disrupted at a later point in time.

The paper was published in The Astrophysical Journal.