A SBIR Phase II contract was awarded to Radiasoft Llc in June, 2021 for $1,149,538.0 USD from the U.S. Department of Energy.
Next-generation light sources will rely on closely arranged sequences of high-field magnets to achieve ambitious beam parameters and high brightness. Codes available for 3D modeling and design of magnetic systems are inadequate for capturing the overlapping fields from these dense arrays of magnets. Moreover, these codes suffer from poor parallel performance, leading to long turn-around times that significantly hamper the process of design and optimization. Significant improvements to existing software are needed to address these shortcomings. The open source software Radia provides a uniquely effective tool for magnet modeling that allows for design of undulators as well as storage ring magnets. Our aim is to improve the performance of Radia through parallelization of the field calculations, interaction matrix construction, and interaction matrix relaxation. During Phase II of this project, we completed the Python interface to Radia, parallelized major parts of the computation using MPI, and developed a Sirepo interface with important functionality for working with Radia magnet models. We developed didactic documented examples of many important Radia examples using the Jupyter interface and created a software link to allow parallel operation of Radia within Jupyter as well. The Sirepo application allows export of kick-maps, field maps and tabulated undulators that are needed as a part of magnet design in a synchrotron light source. In Phase IIA, we will build off of this success to increase the utility of our Sirepo application by developing a CAD import facility allowing the import of models directly from mechanical tools such as SolidWorks. We will improve integration between Radia and other Sirepo simulation codes. We will parallelize the final component of the Radia computation, the field relaxation, using OpenMP shared memory parallelization. In addition, we will create an interface to our optimization engine rsopt within Sirepo providing convenient access to this powerful tool. Finally, we will create a rich array of parametrized magnet models within Sirepo making it easier to initiate the design of standard accelerator magnets. This project will substantially increase the speed of Radia calculations and its accessibility to a wider range of scientists and engineers throughout the light source community. The unique boundary integral method used by Radia will become more broadly available in industrial applications due to the new ability to import CAD models. Larger magnetic structures will be available for accurate field computation, decreasing risk in compact storage ring magnet designs with strong field interference effects.