SIMPLEX: a simple & fast FEL simulation code

Welcome to SIMPLEX home page

2024/10/01: Version 3.1.0 has been released.
  • What is SIMPLEX?

    SIMPLEX is a computer program to support designing the accelerator components in the FEL facility and help the FEL user estimate the optical properties of FEL radiation. Various kinds of FEL simulations can be performed using SIMPLEX.
  • Related Publications

    If the users are presenting or publishing their results obtained with using SIMPLEX, they are kindly requested to cite the related reference(s).
  • Request to those who are reporting a bug

    When reporting a bug found in SIMPLEX, the users are kindly requested to attach the input file (*.json) in the e-mail, which is created before starting any calculation. The input file is placed in the directory specified in the "Output File" subpanel of the GUI, with the prefix specified in the same subpanel as well.
  • Important Notes on Brilliance Calculation

    In version 10.0, rigorous estimation of brilliance based on the Wigner function method has become available, which is in contrast to the traditional method based on the Gaussian approximation. Although the brilliance estimation by the Gaussian approximation is still available for compatibility with the older versions, it is referred to as GA.Brilliance (Gaussian-Approximated) and is distinguished from the rigorous estimation.
  • Functions supported

    SIMPLEX offers many functions to characterize the synchrotron radiation as follows.
    • Time-indpenedent simulation with seeding
    • Time-dependent simulation with shot noise
    • Loading the undulator-field distribution data
    • Loading the bunch profile of the electron beam
    • Wakefield calculation and implementation
    • Calculation of lattice functions
    • Various error manipulation (trajectory, phase slippage, undulator field, misalignment, etc.)
    • Postprocessing and visualization of the simulation results based on a GUI.
  • Acknowledgements

    This software includes the work that is distributed in the Apache License 2.0, and relies on a number of libraries & database as summarized below, which are gratefully appreciated.

    • Node.js: Javascript runtime environment to run Javascript code without a web browser (https://nodejs.org/en/).
    • tauri: application toolkit to build software for all major desktop operating systems using web technologies. (https://tauri.app/)
    • Plotly.js: Javascript graphing library to facilitate data visualization (https://nodejs.org/en/)
    • Boost C++: Set of libraries for the C++ language (https://www.boost.org/)
    • mathjax: Javascript library to display mathematical formulas in HTML documents (https://www.mathjax.org/)
    • picojson: JSON parser for C++ language (https://github.com/kazuho/picojson)
    • General Purpose FFT Package (https://www.kurims.kyoto-u.ac.jp/~ooura/fft.html)
  • Contact Information

    Author

    Takashi Tanaka

    Address

Getting Started

To quickly get started with SIMPLEX, follow the steps below.
  1. When started, SIMPLEX tries to open a parameter file that was last opened (or load default parameters), and shows the parameters and options in the GUI window. If you need to open another parameter file, run [File]-[Open a Parameter File] command, or run [File]-[Create a New Parameter File] command to start with a new parameter file.
  2. Before starting a simulation, you need to specify the output file in terms of the format, folder (directory to save the output file), prefix (sort of a data name) and serial number (if necessary) in [Output File] subpanel.
  3. Run [Run]-[Start Simulation] command to start a simulation with the current parameters shown in the subpanels.
  4. In order to specify more than one calculation, run [Run]-[Create Process] command to create a "process", which saves all the parameters currently shown in the GUI to a temporary memory and appends the created process to the current calculation list. Repeat it until all the desired calculation processes are specified. Then run [Run]-[Start Calculation] command, which starts the calculations in series.
  5. A progress bar pops up to let the user know the status of simulation status.
  6. When the simulation is finished, the output file is automatically imported in [Post-Processing] panel to visualize the result. The plot can be 1-dimensional or 2-dimensional, depending on the calculation type.

Version-up History

  • Ver. 3.1

    • Ver. 3.1.0 (2024/10/01)
      • Python interface (simplex-ui) and client-side web-application version have been added.
      • Fixed many bugs found in the process of changing the GUI library in ver. 3.0.
  • Ver. 3.0

    • Ver. 3.0.0 (2023/11/01)
      • Renewal of the GUI with new libraries..
      • Change of the input and output format (JSON).
      • Official support to utilize the solver without the GUI.
      • and many others ...
  • Ver. 2.1

    • Ver. 2.1.1 (2017/08/12)
      • Implemented a "Sort" option to rearramge the macroparticles when former simulations are used as an input file.
      • Fixed bugs related to post-processor configurations.
      • Linux versions have been compiled as statically as possible to be compatible with as many distributions as possible.
    • Ver. 2.1.0 (2015/07/31)
      • Helical, elliptical and multi-harmonic undulators have been supported.
      • Algorithm for optimization of quadrupole strength and initial Twiss parameters for the betatron matching condition has been improved.
      • Postprocessor has been improved with a lot of new functions.
      • Reference manual has been renewed.
      • Simulations without installing the MPI environment has become possible (parallel computing is not available in this case).
      • Fixed a lot of bugs.
      • Parallel computing in the MS-Windows version is now based on MS-MPI instead of MPICH2 (Mac OS X and Linux versions are still based on MPICH2).
  • Ver. 2.0

    • Ver. 2.0.2 (2012/05/01)
      • Self-seeding option has been implemented.
      • Reference manual has been renewed.
      • Parallel computing option has been disable under the default setting to avoid initial problems.
    • Ver. 2.0.1 (2011/10/18)
      • Supported parallel computing using MPICH2.
  • Ver. 1.3

    • Ver. 1.3.0 (2008/08/01)
      • Simulations with non-linear hamronic generation (NHG) have been supported.
      • Arbitrary macroparticle distribution in the 6-D phase space, which is obtained by start-to-end simulations for accelerator components, has become available as input data.
      • Results of a simulation with SIMPLEX in terms of the macroparticle distribution and radiation field profile have become availabe as input data for another simulation. Taking advantage of this, high gain harmonic generation (HGHG) scheme can be investigated in conjunction with the functions for NHG.
      • Error magnetic model of undulators with a random number generator has becom available.
      • Effects due to the alignment error of undulator can now be included in terms of the K-value variation.
      • Beam size and angular divergence of FEL radiation can now be calculated with the postprocessor.
      • A new function for the postprocessor has been added: spectrogram. This is a spectrum of radiation as a function of the bunch position along the electron bunch. By means of this, photon flux in the energy-time 2-D phase space can be characterized.
  • Ver. 1.2

    • Ver. 1.2.1 (2005/03/01)
      • Reference manual has been fully updated and is now ditributed in the PDF format as well as HTML documents.
      • Modified several GUI controls.
      • Added rough estimation of brilliance, total flux, and energy/bunch.
    • Ver. 1.2.0 (2004/09/01)
      • SIMPLEX home page has been created and version 1.2.0 has been released.

Download SIMPLEX (ver. 3.1.0)

  • Before downloading, pay attention to the followings:

    • Even if you suffer losses and damages by using SIMPLEX, the authors are not responsible for compensating for them.
    • Even if problems and bugs are found about SIMPLEX, the authors are not responsible for version up.
  • Notice on the release of Ver. 3.0 or later

    • The input and output formats have been changed to JSON
    • The output file name is automatically determined, without the file selection dialog box; before starting any calculation, specify the data folder and prefix (+ serial number)
    • 32-bit versions are not supported any longer
    • Calling the solver without GUI has been officially supported; refer to the reference manual for details

    Notice on parallel computing

    • You need to install MPI to enable the parallel computing option; MS-MPI for Windows, and MPICH for Mac OS and Linux.
  • Windows Version

    • simplex_win.zip
    • - uncompress the zipped file and move the whole directory ("simplex") to a desired path. Note: self-executable installer is no more available.
  • Mac OS Version (compiled on OS14 - Sonoma)

    Important Notes for Users of Mac OS X 10.12 (Sierra) or Later
    • Because of the security enhancement made in 10.12, many (freely-available) applications downloaded from anywhere out of the App Store may fail, which is known as an "App Translocation" problem. To avoid this and run SIMPLEX correctly, try the following steps.
      1. Uncompress the *.tgz file in a directory to install simplex (e.g., /Users/you/bin/)
      2. Open "Terminal" app and change directory to /Users/you/bin
      3. Run "xattr -rc simplex_macosx(_m)" to remove "extended attributes" of all the files.
  • Linux Version

    Both of the above are compiled on Ubuntu 20.04, and may be run in later Ubuntu distributions. Support for Other Linux distributions has been terminated. Those who are using other distributions are kindly recommended to use the

    non-desktop version.

  • Source Code (solver)

    • simplex_src.zip
    • To build the solvers (simplex_solver and simplex_solver_nompi) from the source files, you need to have build tools (CMake and C++ compilers) and MPI library (optional) installed in your system. In addition, Boost Math C++ library is needed for Mac OS, because one of the special functions (expint) is not included in the C++ standard library.

Non-Desktop Versions

  • Besides the general desktop application, SIMPLEX is available in two forms. One is a web application that runs in a common web browser, while the other runs as a python script.
  • Web-Application Version

    The web-application version of SIMPLEX was first released in 3.0 as the so-called "server-side" application, in which the numerical computation was performed in the server computer. Although the user does not have to install the software as long as a modern web browser is available, the computation time depends on the performance of the server computer, and the computer resource (CPU time, memory) should be shared by users whose number can be potentially large. To avoid potential issues that may be caused by operationg the web-application in the server, the computer resource per user was considerably limited and this version has not been widely available.
    To solve these issues, the wave-application version has been redesigned in ver 3.1 to run as a "client-side" application, in which the numerical computation is done by the local (client-side) computer, without any load on the server. It should be noted that parallel computing is not available for the moment, and the computation speed is about half of the desktop version (withuot parallel computing). Even so, it is recommended to actively use the web-application version, for example just to check how SIMPLEX works before installing the desktop version.
    The new web-application version is available here. Note that a few options are not available, which require to import an external data file. This is attributable to the security issue that the web browser cannot load local files that are specified by the full path in the local computer.
  • Python Version

    To support the expanding users of python language, SIMPLEX has started official support for python, since ver. 12.0. To make use of this function, you need to have
    • python version 3.8 or later
    • web browser (Chrome, Edge or FireFox; Safari is not supported)
    installed; then, install a python package "simplex-ui" (SIMPLEX User Interface) by simply runing the pip (or pip3) command.
    pip install simplex-ui (--user)
    For Windows and Mac OS platforms, binary packages are available and are downloaded/installed. In Linux platforms, the above command downloads the source package and tries to compile the source files with the C++ compiler installed in the local system. Thus the installation process needs some time. In addition, MPI library (OpenMPI or MPICH) should be installed if parallel computing is required.
    Once installed, it can be run as a module
    python -m simplex
    which mimics the desktop application. More flexible operation is possible as in other python applications, which helps the user to do a batch job. For details of how to get started with simplex-ui, refer to the instructions and try with the sample files available here.
    For Mac OS users
    Even after closing the python application using simplex-ui, more than one Browser's icon may be shown in the Dock. If you feel it annoying, kill "Show suggested and recent apps in Dock" option, which is found in the Dock setting.