Galaxy simulations are at last matching reality—and producing surprising insights into cosmic evolution

Philip Hopkins, a theoretical astrophysicist at the California Institute of Technology in Pasadena, likes to prank his colleagues. An expert in simulating the formation of galaxies, Hopkins sometimes begins his talks by projecting images of his creations next to photos of real galaxies and defying his audience to tell them apart. "We can even trick astronomers," says Hopkins, a leader of FIRE, the Feedback in Realistic Environments simulation. "Of course, it's not a guarantee that the models are accurate, but it's sort of a gut check that you're on the right track."

For decades, scientists have tried to simulate how the trillions of galaxies in the observable universe arose from clouds of gas after the big bang. But in the past few years, thanks to faster computers and better algorithms, the simulations have begun to produce results that accurately capture both the details of individual galaxies and their overall distribution of masses and shapes. "The whole thing has reached this little golden age where progress is coming faster and faster," says Tiziana Di Matteo, a numerical cosmologist at Carnegie Mellon University in Pittsburgh, Pennsylvania, and a leader of the BlueTides simulation.

As the fake universes improve, their role also is changing. For decades, information flowed one way: from the astronomers studying real galaxies to the modelers trying to simulate them. Now, insight is flowing the other way, too, with the models helping guide astronomers, says Stephen Wilkins, an extragalactic astronomer at the University of Sussex in Brighton, U.K., who works on BlueTides. "In the past the simulations were always trying to keep up with the observations," says Wilkins, who is using BlueTides to predict what NASA's James Webb Space Telescope will see when it launches in 2020 and peers deep into space and far back in time. "Now we can predict things that we haven't observed."

For example, the models suggest that the earliest galaxies were oddly pickle-shaped, that wafer-thin spiral galaxies are surprisingly rugged in the face of collisions, and that to explain the evolution of the universe, galaxies must form stars far more slowly than astrophysicists expected.

The simulations also sound a cautionary note. Some cosmologists hope galaxy formation will ultimately turn out to be a relatively simple process, governed by a few basic rules. However, modelers say their faux universes suggest that, like maturing teenagers, galaxies are unpredictable. It's hard, for example, to tell why one turns into a graceful spiral but another evolves into a blob. "It's clear from everything that we've done that the physics of galaxy formation is incredibly messy," Wilkins says.

Before you can cook up a universe, you need to know the ingredients. From various measurements, cosmologists have deduced that just 5% of the mass and energy of the cosmos is ordinary matter like that in stars and planets. Another 26% consists of mysterious dark matter that, so far, appears to interact only through gravity—and presumably consists of some undiscovered particle. The remaining 69% is a form of energy that stretches space and is speeding up the expansion of the universe. That "dark energy" may be a property of the vacuum of space itself, so physicists call it the cosmological constant, denoted lambda (Λ).

Cosmologists also know the recipe's basic steps. The universe sprang into existence in the big bang as a hot, dense soup of subatomic particles. Within a sliver of a second, it underwent an exponential growth spurt called inflation, which stretched infinitesimal quantum fluctuations in the particle soup into gargantuan ripples. Slowly, dense regions of dark matter coalesced under their own gravity into a vast tangle of clumps and filaments known as the cosmic web. Attracted by the dark matter's gravity, gas settled into the clumps, also called haloes, and condensed into the fusing balls of hydrogen called stars. By 500 million years after the big bang, the first galaxies had formed. Over the next 13 billion years, they would drift on cosmic gravitational tides and grow by merging with one another.

Computer simulations helped develop that theory. In the 1980s they showed that to form clumps large enough to bind the observed clusters of galaxies, dark matter particles had to be slow moving and cold. The basic theory, which assumes a cosmological constant, became known as Λ cold dark matter (ΛCDM). As the theory grew more refined, so did the simulations. By 2005 the Millennium simulation, led by researchers at the Max Planck Institute for Astrophysics in Garching, Germany, produced a rendering of the cosmic web whose structure closely matched how the galaxies are strewn through space in clusters, threads, and sheets.

Millennium and similar simulations suffered from a fundamental shortcoming, however. They modeled the gravitational interactions of dark matter alone, which are easy to simulate because, as far as scientists know, dark matter flows through itself without friction or resistance. Only once the haloes formed did the programs insert galaxies of various sizes and shapes, following certain ad hoc rules. In such simulations, "The fundamental assumption is that the galaxies occupy the haloes and don't do anything to them," says Yu Feng, a cosmologist at the University of California (UC), Berkeley. "The interaction is all one way."

Now, modelers include the interactions of ordinary matter with itself and with dark matter—processes that are far harder to capture. Unlike dark matter, ordinary matter heats up when squeezed, generating light and other electromagnetic radiation that then pushes the matter around. That complex feedback reaches an extreme when gas clouds collapse into glowing stars, stars blow up in supernova explosions, and black holes swallow gas and spew radiation. Critical to the behavior of galaxies, such physics must be modeled by using the equations of hydrodynamics, which are notoriously difficult to solve, even with supercomputers.



Cosmic web Satellite galaxy Supermassive black hole 10 million years after the big bang 500 million years 6 billion years Present (13.8 billion years) 1 2 3 4 Dark matter halo Gas Stream of gas Protogalaxies Present distribution of dark and ordinary matter Original distribution of dark and ordinary matter Central black holes Supernova Supernova The life stages of a galaxy Galaxies evolved hand in hand with the large-scale structure of the universe. After the big bang, dark matter (blue) and ordinary matter (gold) filled space unevenly. The dark matter then began to coalesce under its own gravity into a scaffolding of clumps and filaments known as the cosmic web. Computer models show how ordinary matter poured into the clumps to form the first small, irregularly shaped galaxies, which grew over time in mergers. 4 Middle age The galaxy settles down. As it ages further, radiation from the central black hole will eventually drive out gas, bringing star formation to a halt. 1 Birth The seeds of galaxies lie in dense clumps of dark matter called haloes, which draw in the hydrogen gas that collapses into stars. 2 Childhood As stars turn on, the first small proto- galaxies emerge, lumpy and pickle-shaped. Streams of cold gas, flowing along threads of dark matter, feed the galaxies and their central black holes. 3 Adolescence The young galaxy grows through violent mergers, which trigger bursts of star formation, even as supernovae blow out gas and limit the process.

In general, modelers attack the problem by breaking it into billions of bits, either by dividing space into a 3D grid of subvolumes or by parceling the mass of dark and ordinary matter into swarms of particles. The simulation then tracks the interactions among those elements while ticking through cosmic time in, say, million-year steps. The computations strain even the most powerful supercomputers. BlueTides, for example, runs on Blue Waters—a supercomputer at the University of Illinois in Urbana that can perform 13 quadrillion calculations per second. Merely loading the model consumes 90% of the computer's available memory, Feng says.

For years such simulations produced galaxies that were too gassy, massive, and blobby. But computer power has increased, and, more important, models of the radiation-matter feedback have improved. Now, hydrodynamic simulations have begun to produce the right number of galaxies of the right masses and shapes—spiral disks, squat ellipticals, spherical dwarfs, and oddball irregulars—says Volker Springel, a cosmologist at the Heidelberg Institute for Theoretical Studies in Germany who worked on Millennium and leads the Illustris simulation. "Until recently, the simulation field struggled to make spiral galaxies," he says. "It's only in the last 5 years that we've shown that you can make them."

The models now show that, like people, galaxies tend to go through distinct life stages, Hopkins says. When young, a galaxy roils with activity, as one merger after another stretches and contorts it, inducing spurts of star formation. After a few billion years, the galaxy tends to settle into a relatively placid and stable middle age. Later, it can even slip into senescence as it loses its gas and the ability make stars—a transition our Milky Way appears to be making now, Hopkins says. But the wild and violent turns of adolescence make the particular path of any galaxy hard to predict, he says.

The simulations are far from perfect. They cannot come close to modeling individual stars—even though the simulations point to the importance of feedback effects on that scale, such as the winds and radiation from supernovae and from galaxies' central black holes. Instead, each grid element or particle stands for hundreds to millions of solar masses of stars and gas, depending on the resolution of the simulation. Researchers then employ ad hoc "subgrid" rules to describe how all that material behaves on average. "It's like you're looking through foggy glasses and trying to describe this shape that you cannot see perfectly," says Avishai Dekel, a cosmologist at the Hebrew University of Jerusalem and a leader of the VELA simulation.

It’s clear from everything that we’ve done that the physics of galaxy formation is incredibly messy. Stephen Wilkins, University of Sussex

Those ad hoc rules include dozens of parameters that researchers tune to reproduce known features of the universe, such as the tallies of galaxies of different masses. That tuning raises the question of whether the models explain reality or merely mimic it, like a painting. But researchers say the models should be reliable as long as they avoid predictions that depend strongly on the tuning. "We're not going to get away from subgrid prescriptions, there's no way," Di Matteo says. "But this is not some kind of magic. It's still physics."

The models have already overturned some long-held assumptions. For example, astrophysicists believed that when two delicate disk galaxies like our Milky Way collide and merge, the process would wad them up into a single blobby elliptical galaxy. However, the models show that spiral galaxies are tougher than expected, if they hold enough gas. "You have disks partially surviving and recovering so quickly," Springel says. That finding was a big surprise, Hopkins says.

The usual explanation of what determines galactic size has also been knocked down, says Sandra Faber, an astronomer at UC Santa Cruz who works with VELA. Astrophysicists had assumed that a galaxy's size is determined by the spin of the dark matter halo enveloping it, with faster-spinning haloes producing larger, more diffuse galaxies, she says. But simulations show no such connection, she adds. "We're now at a loss," Faber says. "What makes a big galaxy big and a small galaxy small?"

The shapes of newborn galaxies yield another surprise. Most galaxies today are spherical or oblate, like flattened spheres. Ellipticals are thick, like round cakes of soap; disks are much flatter. But the models predict that early in the universe, emerging galaxies were prolate—longer than they were wide, Faber says. "They're pickles," she says. "You try to make a pickle out of gas. It's not easy." NASA's Hubble Space Telescope has begun to spot examples of these pickle-shaped galaxies, she says.

The models predict other subtle phenomena that observers can try to spot. For example, astrophysicists had assumed that gas flows into a growing galaxy equally from all directions. However, the simulations show that gas pours into a galaxy in cold streams that flow along the dark matter filaments connecting its halo to the cosmic web, Dekel says. Observers with the Atacama Large Millimeter/submillimeter Array, a battery of 66 radio dishes in Chile, have begun to peer into space for evidence of the streams.

Simulations great and small Some models operate at cosmic scales, whereas others generate individual, realistic-looking galaxies. They divide space into volume elements or model matter as swarms of particles, then trace their interactions. Name Simulation size (light-years) Number of volume elements/particles Minimum element mass (solar masses) Focus First papers Millennium 2.2 billion 10 billion 1 billion Dark matter only 2005 VELA 45 million 500 million 1000 Individual galaxies 2009 FIRE 3 million–10 million Few hundred million–1 billion 200–2000 Individual galaxies 2014 EAGLE 80 million–325 million 100 million–7 billion 1.8 million Cosmic evolution 2014 BlueTides 1.9 billion 700 billion 2 million First galaxies 2015 IllustrisTNG 110 million–1 billion 270 million–30 billion 1 million–10 million Cosmic evolution 2018

The simulations also aim to test the basic theory of ΛCDM. By comparing real and simulated galaxies, researchers can test the assumption that dark matter interacts only through gravity. Any discrepancy might point to new interactions and help particle theorists figure out what dark matter is.

None has been seen so far, but the newer simulations have patched up mismatches between observations and earlier dark matter–only simulations. For example, 20 years ago, those simulations spawned swarms of small dark matter haloes around the bigger ones, which suggested that a galaxy like our Milky Way should be surrounded by hundreds of dwarf satellite galaxies. But only a few had been spotted. That deficit was dubbed the missing-satellites problem.

But mix in the ordinary matter, and the predictions change. The gravitational push and pull between dark and ordinary matter smooths things out, reducing the number of small haloes. In those that do emerge, winds kicked up by supernovae tend to overwhelm the halo's relatively weak gravitational pull and blow out the gas, starving the halo of the raw material to make more stars and snuffing out the nascent galaxy. Couple that process with the fact that observers have now found 59 dwarf galaxies surrounding the Milky Way, and the disconnect between observations and simulations largely disappears, Springel says. "I don't see the missing-satellites problem as a problem anymore," he says.

Similarly, the older simulations suggested the concentration of dark matter should peak sharply at the very center of a halo. Yet the speeds of stars in nearby dwarf galaxies indicate that in their cores dark matter is spread out smoothly over a larger volume. The new simulations get that detail right because they capture how the gravitational effects of stars stir up the dark matter and spread it out. "Even if the stars are a small fraction of the mass, they really shake up the halo," Hopkins says.

Perhaps the simulations' single biggest lesson so far is not that scientists need to revise their overarching theory of cosmology, but rather that problems lurk in their understanding of astrophysics at smaller scales. In particular, their theory of star formation comes up wanting, Springel says. To produce realistic galaxies, modelers must drastically reduce the rate at which clouds of gas form stars from what astrophysicists expect, he says. "Basically, the molecular clouds form stars 100 times slower than you'd think," he says.

Most likely, star formation flags because feedbacks from supernovae and supermassive black holes drive gas out of a galaxy. Unfortunately, those processes are far too small to resolve in the simulations. When modelers deposit the energy of a supernova in a larger grid element, not much happens: Instead of generating wind, the energy just radiates away. Similarly, researchers cannot simulate the fitful way that black holes feed on gas and radiate x-rays. To capture these key bits of astrophysics, modelers must rely on the ad hoc subgrid prescriptions that they tune by hand.

Simulators hope to replace such crude assumptions with models based more solidly on physics. To do that, they're hoping to enlist the help of astrophysicists working on much more finely resolved models that simulate the birth of stars from molecular clouds just a few light-years wide and even the evolution of individual stars. Those smaller-scale models are themselves works in progress. For example, astrophysicists modeling supernova explosions still struggle to make their virtual stellar time bombs go off.

Nevertheless, Eve Ostriker, an astrophysicist at Princeton University who models interstellar gas, says she's eager to help put galaxy simulations on a sounder footing. "My interest in this is to replace the tuning with some physics and say, ‘OK, this is what it is, no tuning allowed,’" she says. The hope is to string together results from different size scales in a way that minimizes the need for fudge factors, researchers say. "What you want is a picture that's coherently stitching together across the entire range of scales," Hopkins says.

Ultimately, through observations and simulations, some researchers still hope to develop a unified narrative that can explain how any galaxy gets its shape and properties. Taking an extreme position, Faber predicts all galaxies will ultimately be sorted and explained by just two parameters: mass and radius. "There's a galaxy law that we're only now discovering that makes it simple."

But many galaxy modelers believe the recipes will always be complicated and uncertain. Galaxy formation may be like the weather, which keeps precise predictions forever out of reach because of its chaotic nature, Springel says. "I'm a little bit concerned that we'll understand the big picture but never understand the details," he says. In that case, the increasing realism of galaxy simulations may serve only to underscore a fundamental complexity in the universe.