The SIMPA Project

Introduction

The SIMPA Project is a collection of libraries for the physically valid representation and evaluation of electromagnetic fields. It contains code to create field maps and evaluate them efficiently. It also contains code for symplectic charged particle tracking. The main motivation and focus of the development are for particle accelerator tracking code. Symplectic tracking in general electromagnetic fields is a difficult problem and was not fully solved before, to our best knowledge. There are two important requirements for the representation of the electromagnetic field to be physically valid:

  • It has to satisfy Maxwell's equations close to machine precision.
  • The field must be continuous everywhere in the volume of interest, no cut is allowed.

There are two published papers about the algorithm:

The first paper describes the initial ideas behind the algorithm here:

https://doi.org/10.1016/j.nima.2019.162841

The second paper describes improvements to the algorithm making it faster and more general. It also describes the first application for frequency analysis and dynamic aperture of the ELENA machine at CERN. It can be found here:

https://doi.org/10.1103/PhysRevAccelBeams.23.104002

 

Getting started

A quick overview of the algorithm can be found on this poster made for IPAC22. For the most recent description of the algorithm please read the relevant part of the COOL23 paper, which is in the section "THE SIMPA ALGORITHM".  You need at least a basic knowledge of the algorithm to use the command line interface and understand what the commands do. 

Next install the SIMPA software and the examples. First execute the example  in the directory 'simple'.

It will take a while to run. If all went good try to follow the workflow command by command reading the help for the next command.  You can get the help from the command line interface with "help some-command".

Running the SIMPA CLI

If you installed with the default location the executable can be found in: /opt/simpa-acc/bin/simpa-acc

It will open the interactive command-line interface (CLI), there are two ways of using commands:

1. Enter commands one by one into the CLI.  This is good to try out a short sequence of commands and verify each step. The disadvantage of this way of working is that if an error occurs, there is no guarantee( at the moment, we might improve this later) that the state of the program stays correct, so in this case, you better start from the beginning.

2. Write a group of commands to a text file and call that script from the CLI with the command:

call -f "..\command_file.simpa", where "..\command_file.simpa"  is the name of your script. It is good practice to store the command files above of the working directory to not mix them together with the output files produced by the simpa commands. See how the examples are organized.

The advantage of working this way is that if an error occurs, it is still better to restart the CLI, but you don't lose your work.

Examples

There are  examples available for running the application, they can be found at:

Please consult the tutorial, the documentation, and the command reference for information about using the application.

 

Core

The Core library contains the main general functionality of  SIMPA. It is used as a base for symplectic charged particle tracking in particle accelerators (ACC package). It is intended to be a general library to represent electromagnetic fields such that the Maxwell equations are satisfied to nearly machine precision and are evaluated efficiently. At the moment it handles only static magnetic fields, electric fields are coming soon. General time-varying electromagnetic fields seems also possible and will come later.

ACC

The ACC package is an extension to the Core package that contains code specific to accelerator physics which allows the user to construct an accelerator simulation using the API in Java or the command-line interface (CLI) as text command files.