Researchers have created the most detailed simulation of the history of the universe, complete with exploding gas clouds, swirling galaxies, ravenous black holes and countless stars – born to die in violent supernovae that blast the chemical elements for planets and life out into the cosmos.

Described as one of the most complex computer models ever created, the simulation was crunched on supercomputers that took six months to complete calculations that would have taken an average desktop computer 2,000 years to process.

The simulation draws on the laws of physics and theories for the formation of galaxies and stellar evolution to recreate a large part of the universe from 12m years after the big bang until today, nearly 14bn years later. It will help scientists test how well their theories of the universe work, by comparing the appearance of the virtual cosmos with observations made using telescopes and other instruments. The details have been published in the journal Nature (if you're reading on a mobile device, click here to view the Nature video).

"We have this problem in astrophysics that we can't go and do experiments in the lab to test our theories," said Mark Vogelsberger at MIT, who worked on the simulation. "The only way to test them is to compare our models with the best observations out there."

The computer model simulates the behaviour of dark matter, the invisible material that coalesced in the early universe to form a cosmic web, and dark energy, the mysterious force that drives the expansion of the cosmos.

As the universe evolves, the first galaxies form with fledgling suns and supermassive black holes at their centres. Huge expanses of tenuous gas fill the spaces between the galaxies. At first, the only elements are hydrogen and helium. Heavier elements, such as carbon and oxygen, are forged inside stars, before being ejected into space when the stars explode.

The simulation models what happens in a volume of space 350m light years across. One light year – the distance light travels in one year – is roughly 10 million million kilometres. The simulation is the first to show both large-scale structures such as the distribution of gas, and small-scale features such as the number and chemical signatures of stars in each galaxy.

The scientists checked their simulation against images taken by the Hubble Space Telescope and found remarkable agreement. But discrepancies between observations and the simulation show where scientists need to rethink their explanations of how the universe evolved.

Vogelsberger said they have already found disagreements between the simulation and the real universe that need exploring. Their model gets the proportions of galaxies right, but the stars in low mass galaxies – those about 100 times less massive than the Milky Way – are older than they should be. "That means the simulation is forming those low-mass galaxies too early, so the stars are too old compared to the ones in the real universe," Vogelsberger said.

Michael Boylan-Kolchin, an astrophysicist at the University of Maryland, said: "I'm impressed at their audacity and that they were able to make it work. This will help us with a number of open questions. What were the first galaxies in the universe like? Where are their remnants today? The better the simulations, the better we can answer these questions."

Vogelsberger said that the smallest features the simulation showed were around 1,000 light years across. In 10 years, that might improve to show features a few light years across. To get beyond that, and recreate the individual planets and stars, becomes much harder because the calculations are so large.

One of the major hurdles facing the researchers now is how to share the simulation so that others can study it. "If people want to work on it, we have to copy it over to their institutions, and that takes a few months even if you have a fast internet connection," said Vogelsberger. © Guardian News and Media 2014

[The big bang via Shutterstock]