Not just a pretty interface: Easier access to simulations frees up time for physics
The growing use of simulation tools in computational science raises the question how their accessibility and performance can be improved, typically focusing on higher execution speeds. Now a research team from Germany and Great Britain has tackled the interface between the researcher and the simulation software and developed a workflow that allows researchers to spend far less time on the syntax and data formats of the simulation package and to work with the data immediately. Their work has been published in IEEE Transactions on Magnetics.
In its study, the team from the Max Planck Institute for the Structure and Dynamics of Matter (MPSD) in Hamburg, Germany, Imperial College London and the University of Southampton (UK) used computational micromagnetics as the application domain for the study. Here, the researcher’s general workflow is identical to many areas of computational science and consists of the following steps:
1. Decide what problem needs to be solved.
2. Translate this physics-based problem into the syntax understood by the simulation tool (often a configuration file or a script file).
3. Run the simulation to compute results and write data files.
4. Read, analyse, and visualise data files to obtain tables and plots.
5. Summarise and write up results and insights in a scientific manuscript or technical report.
In this process, steps 1 to 4 may be repeated iteratively many times.
Simulation packages are written in different languages, often combining one language for the computational core, which solves the numerical problem, and a different language or syntax for the problem definition and user interface. Researchers using such a package need to understand at least the syntax for the problem definition as the workflow’s step 2 requires the translation of the physics problem into the simulation tool syntax.
For the data analysis and visualisation in workflow step 4, researchers generally need to understand the data file formats and conventions used by the simulation package to be able to read the output files and obtain research results through data analysis.
Reviewing the workflow steps, the team of investigators noted that researchers must comprehend the capabilities, installation, configuration, user interfaces, and data formats of the simulation package they use (in steps 2 and 4). If they need to use multiple simulation tools, they need to repeat this learning for each tool. The total effort and complexity of this familiarization process lengthens the learning curve as well as the time spent on the use of simulation software in science.
To tackle this problem, the team developed an improved workflow for micromagnetic simulations (implemented in Ubermag) which reduces the learning barrier. It simplifies the overall process, making such studies more effective from a usability and user-centred perspective.
Lead author Marijan Beg explains: „We have found a way to simplify steps 2 and 4. Instead of the researchers translating the computational problem into the syntax of the simulation package, they describe the computational problem in a machine-readable but simulation tool-independent way. The translation of this problem definition (step 2) is then done automatically by our Ubermag software. Similarly, the reading of the simulation results (step 4) is done by the Ubermag software and the researcher can focus on working with the data immediately – rather than having to worry about reading the simulation’s data format correctly first.“
Hans Fangohr, initiator of the project and coordinating author, says: „In conceptual terms, Ubermag introduces a machine-readable definition of a micromagnetic problem and an abstraction layer above existing simulation tools. The problem’s numerical solution is delegated to an existing simulation package by automatic translation of the problem definition into the tool-specific configuration syntax and subsequent execution of the simulation tool.“
The simplification of this process will help more researchers run simulations, adds Martin Lang, co-author and lead member of the Ubermag software team: „As simulation tools are used increasingly to complement experiments, we get a large number of users with less time for computational training. They will benefit particularly from the simplified access to a simulation tool that enables them to focus on the physics they care about rather than the implementation details of the simulation tools they use.“
The Figure demonstrates the workflow simplifications and abstractions introduced by Ubermag in a typical use case ¬– here the computation of the dynamics of a magnetic vortex in a ferromagnetic nanostructure. The whole simulation can be driven from a single Jupyter notebook as shown in the central column. The researcher defines the physical problem (cell 2) and the system to study (cell 3). Both can be visualised directly inside the notebook as indicated on the lefthand side. Ubermag internally communicates with a low-level simulation tool (cells 3, 4 and cell 6) shown as the autonomous backend in the right column, and returns the simulation results in a high-level format (cells 5 and 7). Plots of the simulation results and further data analysis are part of the notebook. The notebook shown here is a simplified and shortened version of an introductory notebook available at https://ubermag.github.io/demo.html.
Marijan Beg, lead author (Imperial College London): firstname.lastname@example.org
Hans Fangohr, co-author (MPSD): email@example.com