Media playback is unsupported on your device Media caption Pallab Ghosh explains the significance of the visual simulation

An international team of researchers has created the most complete visual simulation of how the Universe evolved.

The computer model shows how the first galaxies formed around clumps of a mysterious, invisible substance called dark matter.

It is the first time that the Universe has been modelled so extensively and to such great resolution.

The research has been published in the journal Nature.

Now we can get to grips with how stars and galaxies form and relate it to dark matter Prof Richard Ellis, Caltech

The simulation will provide a test bed for emerging theories of what the Universe is made of and what makes it tick.

One of the world's leading authorities on galaxy formation, Professor Richard Ellis of the California Institute of Technology (Caltech) in Pasadena, described the simulation as "fabulous".

"Now we can get to grips with how stars and galaxies form and relate it to dark matter," he told BBC News.

The computer model draws on the theories of Professor Carlos Frenk of Durham University, UK, who said he was "pleased" that a computer model should come up with such a good result assuming that it began with dark matter.

"You can make stars and galaxies that look like the real thing. But it is the dark matter that is calling the shots".

Cosmologists have been creating computer models of how the Universe evolved for more than 20 years. It involves entering details of what the Universe was like shortly after the Big Bang, developing a computer program which encapsulates the main theories of cosmology and then letting the programme run.

The simulated Universe that comes out at the other end is usually a very rough approximation of what astronomers really see.

Image copyright Illustris Image caption The real Universe photographed by the Hubble telescope is on the left. On the right is what emerges from the simulation

The latest simulation, however, comes up with the Universe that is strikingly like the real one.

You can make stars and galaxies that look like the real thing. But it is the dark matter that is calling the shots Prof Carlos Frenk, Durham University

Immense computing power has been used to recreate this virtual Universe. It would take a normal laptop nearly 2,000 years to run the simulation. However, using state-of-the-art supercomputers and clever software called Arepo, researchers were able to crunch the numbers in three months.

Cosmic tree

In the beginning, it shows strands of mysterious material which cosmologists call "dark matter" sprawling across the emptiness of space like branches of a cosmic tree. As millions of years pass by, the dark matter clumps and concentrates to form seeds for the first galaxies.

Then emerges the non-dark matter, the stuff that will in time go on to make stars, planets and life emerge.

But early on there are a series of cataclysmic explosions when it gets sucked into black holes and then spat out: a chaotic period which was regulating the formation of stars and galaxies. Eventually, the simulation settles into a Universe that is similar to the one we see around us.

According to Dr Mark Vogelsberger of Massachusetts Institute of Technology (MIT), who led the research, the simulations back many of the current theories of cosmology.

"Many of the simulated galaxies agree very well with the galaxies in the real Universe. It tells us that the basic understanding of how the Universe works must be correct and complete," he said.

In particular, it backs the theory that dark matter is the scaffold on which the visible Universe is hanging.

"If you don't include dark matter (in the simulation) it will not look like the real Universe," Dr Vogelsberger told BBC News.

Image copyright Illustris Collaboration Image caption The simulation produces galaxies of different shapes and sizes that astronomers see in the real Universe

The simulation is the first to show visible matter emerging from dark matter. It will also help cosmologists learn more about another mysterious force called dark energy that is powering the continued acceleration of the Universe.

The European Space Agency (Esa) is planning to launch a spacecraft called Euclid in 2020 to measure the acceleration of the Universe. Accurate simulations, such as the one published today, will help in that search, according to Dr Joanna Dunkley, of Oxford University.

"In order to use the data from Euclid we will need to simulate what we expect to see for dark energy and compare it with what we see," she said.

Cosmologist Dr Robin Catchpole of the Institute of Astronomy in Cambridge, added a note of caution, however.

Although he hailed the simulation as "spectacular", he added, "one must not be taken in by the sheer visual beauty of the thing. You get things that look like galaxies without them being much to do with the physics of how galaxies emerged".

Follow Pallab on Twitter