It’s easy to take the Earth’s magnetic field for granted. It’s always on the job, shielding our life-giving atmosphere from the corrosive effects of unending solar radiation. Its constant presence also gives animals – and us — clues to find our way around.

This vital force has protected the planet since long before humans evolved, yet its source – the giant generator of a heat-radiating, electricity-conducting liquid iron core swirling as the planet rotates – still holds mysteries. Understanding the vast and complex turbulent features of Earth’s dynamo – and that of other planets and celestial bodies – has challenged physicists for decades.

“You can always do the problem you want to, but just a little bit,” says Nick Featherstone, research associate at the University of Colorado Boulder. Thanks to his efforts, however, researchers now have a computer code that lets them come closer than ever to simulating these features in detail across a whole planet or star. The program, known as Rayleigh, is open-source and available to anyone.

To demonstrate the power of Rayleigh’s algorithms, a research team has simulated the dynamics of the sun, Jupiter and Earth in unprecedented detail. The project has been supported with a Department of Energy Innovative and Novel Computational Impact on Theory and Experiment (INCITE) program allocation of 260 million processor hours on Mira, an IBM Blue Gene Q supercomputer at the Argonne Leadership Computing Facility, a Department of Energy user facility.

This big code stemmed from Featherstone’s research in solar physics. Previously scientists had used computation to model solar features on as many as a few hundred processor cores simultaneously, or in parallel. But Featherstone wanted to tackle larger problems that were intractable using available technology. “I spent a lot of time actually looking at the parallel algorithms that were used in that code and seeing where I could change things,” he says.

When University of California, Los Angeles geophysicist Jonathan Aurnou saw Featherstone present his work at a conference in 2012, he was immediately impressed. “Nick has built this huge, huge capability,” says Aurnou, who leads the Geodynamo Working Group in the Computational Infrastructure for Geodynamics (CIG) based at the University of California, Davis. Though stars and planets can behave very differently, the dynamo in these bodies can be modeled with adjustments to the same fundamental algorithms.

Aurnou soon recruited Featherstone to develop a community code – one researchers could share and improve – based on his earlier algorithms. The team initially performed simulations on up to 10,000 cores of NASA’s Pleiades supercomputer. But the scientists wanted to go bigger. Previous codes are like claw hammers, but “this code – it’s a 30-pound sledge,” Aurnou says. “That changes what you can swing at.”

In 2014 Aurnou, Featherstone and their colleagues proposed three big INCITE projects focusing on three bodies in our solar system: the sun, a star; Jupiter, a gas giant planet; and Earth, a rocky planet. Mira’s 786,000 processor cores let the team scale up their calculations by a factor of 100, Featherstone says. Adds Aurnou, “You can think of Mira as a place to let codes run wild, a safari park for big codes.”

‘Earth’s magnetic field is messy. That mess is where all the fun is.’

The group focused on one problem each year, starting with Featherstone’s specialty: the sun. In its core, hydrogen atoms fuse to form helium, releasing high-energy photons that bounce around a dense core for thousands of years. They eventually diffuse to an outer convecting layer, where they warm plasma pockets, causing them to rise to the surface. Finally, the energy reaches the surface, the photosphere, where it can escape, reaching Earth as light within minutes. Like planets, the sun rotates, producing chaotic forces and its own magnetic poles that reverse every 11 years. The processes that cause this magnetic reversal remain largely unknown.

Featherstone broke down this complex mixture of activity into components across the whole star. “What I’ve been able to do with the INCITE program is to start modeling convection in the sun both with and without rotation turned on and at very, very high resolution,” Featherstone says. The researchers plan to incorporate magnetism into the models next.

The team then moved on to Jupiter, aiming to predict and model the results of NASA’s Juno probe, which orbits that planet. In Jupiter’s core – the innermost 95 percent – hydrogen is compressed so tightly that the electrons pop off. The mass behaves like a metal ball, Aurnou says. Its core also releases heat in an amount equal to what the planet receives from the sun. All that convective turbulence also rotates, creating a potent planetary magnetic field, he says.

Until recent results from Juno, scientists didn’t know that surface jets on Jupiter extend deep – thousands of kilometers – into the planet. Juno’s images reveal clusters of geometric turbulence – pentagons, octagons and more – grouped around the Jovian poles.

Even before the Juno results were published in March, the CIG team had simulated deep jets and their interactions with Jupiter’s surface and magnetic core. The team is well-poised to help physicists better understand these unusual stormy features, Aurnou adds. “We’re going to be using our big simulations and the analysis that we’re now carrying out to try to understand the Juno data.”

In its third year the team modeled the behavior of Earth’s magnetic field, a system where they had far more data from observations. Nonetheless, our home still harbors geophysical puzzles. Earth has an outer core of molten iron and a hard rocky crust that contains it. The magnetic poles drift – and can even flip – but the process takes a few hundred thousand years and doesn’t occur on a regular schedule. “Earth’s magnetic field is complex – messy – both in time and space,” Aurnou says. “That mess is where all the fun is.”

Turbulence is difficult to simulate because it includes the cumulative effects of minuscule changes coupled with processes that are occurring over large parts of a planet.

“[In our Earth model] we’ve made, in a sense, as messy a dynamo simulation as possible,” Aurnou says. Previous researchers modeling Earth have argued that tweaks to physics were needed to explain features such as the constant magnetic-pole shifts. “We’ve actually found with our Mira runs, that, no, we don’t need any extra ingredients. We just need turbulence.”

With these results, the team hopes to pare down simulations to incorporate the simplest set of inputs needed to understand our complex terrestrial system.

The INCITE project results are fueling new research opportunities already. Based on the team’s solar findings, in 2017 Featherstone received a $1 million grant from NASA’s Heliophysics Grand Challenge program, which supports research into solar physics problems that require both theory and observation.

The project shows how federal funding can dovetail to help important science reach its potential, Aurnou says. CIG originally hired Featherstone using National Science Foundation funds, which led to the INCITE grant, followed by this NASA project, which will model even more of the sun’s fundamental physics. That information could help protect astronauts from solar radiation and shield our electrical grids from damage and outages during periods of high solar activity.

Eventually the team would like to model the reversal of magnetic poles on Earth, which requires accounting for daily rotation over hundreds of thousands of years. “That’s going to cost us,” Aurnou says. “We need to get a more efficient code for that and faster computers.”