Read: A dinosaur so well preserved, it looks like a statue

Witmer and Ridgely thought that these convoluted airways acted as an elaborate air-conditioning system for the ankylosaurs’ brains. These were big, car-size animals whose bodies would have retained a lot of heat in the Mesozoic sun. “Hot blood would have come up from the core of their bodies to their brains,” says Witmer. “And while these dinosaurs’ brains were famously small, they were still brains.” Brains are especially sensitive to rises in temperature, which is why confusion and fainting are among the first signs of heatstroke. So how did ankylosaurs and other giant dinosaurs keep their noggins from cooking?

It was all in the nose, Witmer guessed. The vessels carrying blood from an ankylosaur’s body to its head ran alongside its long nasal canal. Every time the dinosaur inhaled, cool air would have meandered through that twisty airway, absorbing the heat from the adjacent blood and cooling it before it hit the brain.

WITMER lab / Ohio University

Witmer’s colleagues Jason Bourke and Ruger Porter have now tested this idea. They used medical scanners to create digital replicas of the skulls of two ankylosaurs—Euoplocephalus and Panoplosaurus. Then they simulated the flow of air through these virtual noses, using techniques that are more commonly used by aerospace engineers.

These simulations revealed that, on an inhale, the dinosaurs’ long nasal passages gradually heated air by up to 36 degrees Fahrenheit, taking it from room temperature to body temperature and substantially cooling the adjacent blood. When the dinosaur exhaled, along the same twisty tubes, the air would return most of that heat back to the body. (Our own simple noses work on a similar principle, which is why your breath feels hotter coming from your mouth than from your nose.)

The team members also played around with their virtual skulls. In one experiment, they gave their ankylosaurs short and simple airways, much like ours. In another, they straightened the animals’ airways so they kept their normal length but lacked any twists. In both cases, the heating effect became far less efficient. Inhaled air picked up less heat, and it did so at the very end of the passages—too late to cool the adjacent blood vessels. It’s the passages’ length and their curviness that make them efficient air conditioners.

Read: Meet Zuul, destroyer of shins—a dinosaur named after Ghostbusters

“This is a fascinating deep dive into an aspect of dinosaur biology that’s been difficult to study—how a dinosaur’s breath traveled through its skull,” says Victoria Arbour, an ankylosaur expert at the Royal Ontario Museum in Toronto. “It makes a lot of sense [especially since] many ankylosaurs lived in arid or tropical environments. It’s easy to see how this adaptation arose.”