WOLFRAM

Narrowing the Design Space: Wolfram Language in the Design of the Sirius Beamlines

Harry Westfahl Jr., Director, Brazilian Synchrotron Light Laboratory

"I used Wolfram Language to convince myself I was wrong, or convince myself that this is the right way to go."

Challenge

The microscopic structure of matter can be revealed in a synchrotron laboratory using x-rays, ultraviolet light or infrared light. Harry Westfahl Jr., director of the Brazilian Synchrotron Light Laboratory (LNLS), calls it the most versatile way of understanding the microscopic nature of natural and synthetic materials.

A synchrotron generates an intense beam of radiation covering a broad range of wavelengths. This radiation is then selected and precisely controlled at different beamlines, allowing researchers to use different parts of the spectrum to probe matter at different scales and reveal different aspects of its structure and properties.

In 2013, Westfahl took on the responsibility for the design and construction of Sirius, one of the world's few fourth-generation light sources. That work poses a complex design problem:

  • The parameter space is enormous. Specifying the elliptical mirrors that focus the beam means fixing working distance, mirror length, incidence angle, horizontal and vertical figure, and the fraction of the beam accepted at the slit—each of which shifts all the others.
  • Every variable is also a cost. Mirrors are polished to atomic precision, and, in Westfahl's words, "The more precise the mirror, the more expensive and then the longer it takes" to manufacture. A longer mirror costs more; a shallower angle cuts off energies the beamline was meant to deliver. Technical decisions are also budget and schedule decisions.
  • The authoritative simulations are expensive. Simulating wave propagation across those surfaces in detail is a heavy computational undertaking—each data point in a design study is an extensive run. They can confirm a choice; they cannot be used to explore all the options.
  • The decision has to be made before the detailed work starts. "Is this good enough," Westfahl asks, "or do we really need to spend much more and much more time designing this?"

There is a further organizational constraint. The lab is a heterogeneous workplace running every kind of scientific and engineering research, and the teams are full of scientists, engineers and technicians with PhDs. "They are not simply convinced because you said so," Westfahl says. A director who wants to steer a decision needs compelling evidence at the moment the question is asked, not months later.

Solution

Designing the beamline options for Sirius starts with building a semianalytical model of the mirror system in Wolfram Language, and then building an interactive interface to vary the vertical and horizontal shapes of the mirrors and their positions and watch the resulting spot size respond. That establishes a working distance, a mirror length that can actually be manufactured and an incidence angle that preserves the energy range the science requires.

Only then do the designers run the full simulations and ask the manufacturers whether such a mirror can be made. When the finished mirrors arrive, their measured surfaces are fitted back into the same models to check the design still holds.

Westfahl's team also used Wolfram to develop the beamline suite for LNLS's new biosafety laboratory, which will be the first level-4 facility in Latin America. It will be used for x-ray tomography of cells, tissues and model animals infected with dangerous pathogens to study questions such as how hemorrhagic fever progresses at tissue level or how viruses build replication factories inside cells.

Westfahl used Wolfram Language to compute the photon exposure required to resolve 15 nanometers as a function of tissue thickness and beam energy from 1 to 30 keV. The resulting contour plot separates cleanly into three regimes—cells, tissue and whole animals each require a different energy range and therefore different optics. This determined how many beamlines and what energies would be needed for the biosafety lab.

Benefits

Across the project, Wolfram Language supplies:

  • Semianalytical models that narrow a very large space of possible solutions before researchers commit to expensive simulation or detailed engineering
  • Interactivity for multiparameter exploration, with substantial numerical computation running behind an interface that responds instantly
  • Analytical, numerical and graphical work in a single environment, so a derivation, a computation and the visualization that drives decisions live in the same notebook
  • Rapid prototyping of analysis methods on real experimental data, to be handed on for production implementation
  • Interoperation with domain-specific packages for detailed magnetic design

All this lets Westfahl and his teams weigh technical performance against manufacturing cost and lead time in the same model; answer design questions at the speed a meeting moves; and refit measured hardware into the original models to confirm a delivered component performs as specified.

The deeper benefit is one of persuasion. Westfahl is explicit that a director's job is to inspire teams toward decisions, and that in a technical organization this means evidence. "We all come with our prejudice, our priors of where we should go," he says. "But Mathematica always helped me to increase the likelihood of convincement."

More information:

The Wolfram Edge

  • Explore an enormous engineering design space semianalytically before committing to expensive detailed simulation
  • Combine analytical, numerical and graphical work in one language, so the calculation and the plot that confirms it share a notebook
  • Turn multiparameter models into interactive interfaces that make a complicated tradeoff legible to technical teams

Who Can Benefit

  • Designers of large scientific instruments and research facilities
  • Accelerator physicists, x-ray optics designers and beamline scientists
  • Technical directors and project leads who must justify design decisions to expert teams
  • Researchers prototyping analysis methods on experimental data before production implementation