Red giant stars up to eight times the mass of our Sun are the birthing suites of nearly half of all the elements in the universe heavier than iron. In their death and dissolution they yield many of the things which make human life worthwhile and pleasurable – but the process by which metals originally form remains cloaked in mystery.

As stars of this particular size reach the end of their lives, they inflate into cool, bright giants while their innermost cores shrink and heat to hundreds of millions of degrees. In the heart of this stellar inferno thermonuclear processes forge new elements — the slow capture of neutrons by atomic cores to build increasingly heavy substances. These weighty fragments, churned to the surface through turbulent mixing, are borne away on a superwind —  the last gasp of the dying star — to form drifting, dusty planetary nebulae.

The nebulae in turn gradually coalesce to form new suns, planets, the lead on your fishing line, the tin in your tinnie, the mercury in your thermometer, the yttrium in your colour TV, the lanthanum in your hybrid car battery, the tantalum in your mobile phone, the neodymium in your wind turbine, the rubidium in your GPS and the barium in your enema.

The US National Academies lists the nucleosynthesis of elements heavier than iron among the 11 great unanswered scientific questions for the 21st century. In the quest to unravel this mystery astronomers at the Australian National University's Research School of Astronomy & Astrophysics are taking the spectral pulse of around 4000 stars in the phase just before they become planetary nebulae in the nearby Magellanic Clouds. To help them interpret what they observe, astrophysicist Dr Amanda Karakas is using Australia's most powerful supercomputer to simulate the inner tumult of giant stars, clarifying the innumerable pathways by which the different elements observed by the astronomers may form.

"This particular family of red giants – known as asymptotic giant stars – make very few heavy elements of their own through most of their existence. It is only when they die that these substances can come into existence," she explains. "All the heavy elements in the universe are formed either by the rapid, or the slow, neutron capture processes: we still know so little about how and where the first occurs – possibly in supernova explosions– that one way to understand it is to study the second, slow neutron capture process, in common stars not much more massive than our own sun. By investigating the s-process and what it produces we will also come to a better understanding of the r-process which is thought to produce metals such as gold, silver and platinum."

Unravelling the heavy element composition of the diffuse nebula has only become possible in the last ten years. Advances in optical detection and atomic physics have enabled astronomers to decipher the content of exotic heavy metals such as xenon, krypton, and barium from the spectra of such nebula. These abundances allow astronomers to get a glimpse into the inner workings of Sun-like stars near the end of their lives, and to better understand the mixing and nucleosynthesis processes. Like a detective working from tenuous and fragmentary evidence, Dr Karakas uses the NCI supercomputer along with the clues from nebula metal abundances to reconstruct what actually took place when those metals were formed in the hearts of ancient stars.

Old stars and planetary nebulae in the outer halo of the Milky Way galaxy date back to the early universe when few elements heavier than iron existed, revealing the process in its infancy. Younger stars in the dusty plane of the Milky Way galaxy speak of a more advanced state where many successive stellar generations have contributed to the metal abundances of the stars we see forming today. By comparing older and younger stars and nebulae, Dr Karakas and her colleagues can step back in time to reconstruct the processes by which almost half the elements in our world have formed.

Observing and modelling these processes not only reveals more about the universe, but also our origins. The proto-planetary nebula that formed our own Solar System shows evidence of extinct radioactivates that could have formed only by neutron capture in stars. Dr Karakas and her colleagues are already reporting new discoveries about how the elements that make up our world came into existence. "Using the NCI we can run models for what happens in many different giant stars simultaneously – something that would take many months on a single computer. It is rapidly delivering fresh insights into how our universe works," she says..