Fig.  X-Z projection of an inductively focused/accelerated short-pulse beam in the NDCX-II accelerator. Solenoid and induction cell elements are shown and beam particles are color coded by axial kinetic energy (D.P. Grote, 2010). 

Warp is a extensively developed open-source particle-in-cell code designed to simulate charged particle beams with high space-charge intensity. The name "Warp" stems from the code's ability to simulate Warped (bent) Cartesian meshes. This bent-mesh capability allows the code to efficiently simulate space-charge effects in bent accelerator lattices (resolution can be placed where needed) associated with rings and beam transfer lines with dipole bends. Warp was first developed by Alex Friedman in the 1980s at LLNL following a Livermore Lab model of steerable compiled code modules linked to an interpreter. The Warp code has been continuously and extensively extended by David Grote (LLNL/LBNL) from the late 1980s to the present with key contributions from others in the Warp team to achieve it's present highly developed state.

Warp has a broad variety of integrated physics models and extensive diagnostics -- most of which work in multiple dimensions to allow examination of modeling idealizations within a common framework. The code is setup around the interactive python interpreter with dynamically loaded compiled code modules. This allows flexible problem descriptions in python scripts which can exploit the full versatility of python and compiled packages as well as allowing interactive steering of runs. A mix of interpreter-linked compiled code modules and flexible scripts can be employed for highly adaptable and flexible problem descriptions without modifying or recompiling the source code. Many diagnostics and tools are built in, mostly written in python, which are documented in-line. A user can develop additional elaborate tools and diagnostics, as needed, by extending and building on the scripts within python for specific applications. Extensive provisions are included to define realistic lattice elements in accelerator modeling and standard MAD-style lattice element descriptions can be employed. Warp has a hierarchy of multi-species models ranging from full 3D, transverse slice x-y
(including pz), and axisymmetric r-z (including ptheta), as well as simple envelope models useful for problem setup. Warp can operate in a boosted-frame mode. A broad variety of particle movers and field solvers are available. Particle movers include leap-frog models as well as gyro-kinetic models. Electrostatic and electromagnetic field solvers are included. Electrostatic field solvers include FFT, multi-grid, and multigrid with mesh refinement (both static and dynamic) options. The fieldsolvers work with bent (x-plane) meshes. A variety of conducting structures can be loaded on the grid with subgrid resolution and various boundary conditions can be employed. Particles can be scraped consistently with conducting structures and secondary particles (for e-cloud modeling) emitted. Electromagnetic field solvers are available in 3D, transverse x-y, and r-z packages. There are options to control the dispersion and smoothing. Extensive options exist to initialize the beam distributions including space-charge effects and beams can also be consistently injected off sources using Child-Langmuir-like emission. Warp is also a plasma code and has been used for electron cloud and plasma modeling. Limited scattering and inelastic collision models are available, as well as models for particle interactions with surfaces. Warp can be compiled in serial and in parallel using pyMPI or mpi4py.  Detailed instructions are provided for Linux/Unix and Mac OSX systems. 

Documentation of Warp is organized in "How To's" under the menu bar to the left which cover how to install Warp, make basic runs, and more advanced features. The full Warp source code is linked under "Warp source" with enhanced documentation features. Documentation on all python scripts can also be found here. Example run scripts are provided. Users are encouraged to contact members of the Warp team to correct, improve, and extend this online manual.


  • Reorganization of scripts A major reorganization has been done in the scripts directory, moving files into categorized subdirectories. When installing Warp after the update, the old installation needs to be completely removed. The ...
    Posted Feb 2, 2016, 4:10 PM by David Grote
  • Warp wiki now available The goal of this wiki is to provide useful instruction and examples showing how to use the Warp code.
    Posted Jun 17, 2014, 6:17 AM by David Grote
Showing posts 1 - 2 of 2. View more »