Skip to main content
Dark matter
Courtesy of Illustris

Creating the universe in a computer

Computer simulations help cosmologists unlock the mystery of how the universe evolved.

Astronomers face a unique problem. While scientists from most fields can conduct experiments—particle physicists build massive particle colliders to test their theories of subatomic material, and microbiologists probe the properties of microbes on petri dishes—astronomers cannot conduct experiments with the stars and planets. Even the most advanced telescopes can provide only snapshots of the cosmos, and very little changes during our lifetimes. 

Yet many questions remain, such as how the Milky Way formed, what dark matter is and the role of supermassive black holes at the center of galaxies. In an attempt to edge closer to answering these unsolved mysteries, some scientists have embarked on ambitious projects: creating virtual universes.

supermassive black holes help shape galaxies

The EAGLE simulation shows how supermassive black holes help shape galaxies.

Courtesy of EAGLE

Evolving the cosmos 

The earliest observational evidence of the universe come from the cosmic microwave background, the afterglow created by the Big Bang. Computational cosmologists use this data to model the conditions at this time, when the universe was around a few hundred thousand years old. 

Then they add the basic ingredients: baryonic (or ordinary) matter, from which the stars and planets form; dark matter, which enables galactic structures to grow; and dark energy, the mysterious force behind cosmic acceleration. These are coded into a simulation along with equations that describe various physical processes such as supernova explosions and black holes. Cosmologists then wait as the simulation evolves: The virtual universe expands, gas condenses into small structures and eventually form into stars and galaxies. 

“The exciting thing is that if you do this, the universe that develops in a computer looks remarkably like the real universe,” says Joop Schaye of Leiden University and the principal investigator of the EAGLE (Evolution and Assembly of GaLaxies and their Environments) Project. “You get galaxies of all kinds of sizes and morphologies that look a lot like the real galaxies.”

A number of groups around the world are working on these simulations. In 2014, both the EAGLE Project and the Illustris Project, led by theoretical astrophysicist Mark Vogelsberger from MIT, made major steps forward with their groundbreaking, realistic universes. Both simulations are massive, covering a cubic space of around 300 million light years on each side. They also require a hefty amount of computing power—just one complete run requires large supercomputers to run for months at a time. 

“What we ended up doing is running the big simulation once, but we want to understand why the universe behaved as it did,” says Richard Bower, a cosmologist at Durham University and member of the EAGLE Project. “So we’ve been running lots of other simulations where we change things a little bit.” 

These simulations have already revealed some interesting properties of evolving galaxies. Bower and his colleagues, for instance, discovered that the number and size of galaxies is dependent on a fine balance between supernovae and black holes. 

Using their simulation, they found that without supernovae, the universe created far too many galaxies. This is because without supernovae exploding, many small galaxies were not being blown apart. 

On the other hand, they found that including only supernovae made galaxies grow too massive—10 times the mass of the Milky Way. To manage the size of those galaxies, they needed to also include black holes. 

“The supernovae and the black holes are both kind of competing to use up the material that's supplied to the galaxy,” explains Bower. “Once the supernovae begin to wane, the black hole takes over, and it's the end of forming stars and the beginning of forming bigger and bigger black holes.”

Dark matter density (left) transitions to gas density (right).

Dark matter density (left) transitions to gas density (right).

Courtesy of Illustris

Zooming in  

There are two type of simulations in this field of study—representative volume simulations, which model huge volumes of the observable universe, and zoom simulations, which focus on individual galaxies or galaxy clusters. 

As astronomers collect more and more detailed snapshots of the universe, cosmologists such as Andrew Pontzen at the University College London are using zoom simulations to try to investigate the properties of individual galaxies at the same level of specificity. “We’re trying to push forward on understanding the individual galaxies in enough detail that we can make meaningful comparisons to this really cutting-edge data,” Pontzen says. 

To do so, Pontzen and his colleagues have developed a technique called genetic modification, which involves creating many different versions of galaxies. “It almost becomes like an experiment,” says Pontzen. “You have your control over how a particular object forms, and then you can say if it forms in this particular way, then the galaxy that comes out at the end looks like this.” For example, they can change the way that mass arrives in galaxies over time and see how it affects the galaxy that emerges. 

In a similar way, cosmologists working on larger-scale simulations can “turn the knobs” by changing certain variables—the laws of gravity or the properties of dark matter, for example—and see what the universe that emerges looks like. “I think what's very interesting is to try to constrain the properties of dark matter and dark energy through these simulations,” says Vogelsberger. “We don't know what they are, but by tweaking minor parameters of these models we can try to constrain the properties of dark matter or dark energy in more detail.”

These scientists also work closely with observers to compare how the simulations stack up against what is actually out there in the universe. “That’s the critical part,” says Pontzen. “We want to be able to link all of these things together.”