Warp Wiki Home
Warp is an extensively developed open-source particle-in-cell Python package designed for simulation of plasmas and high current particle beams in a range of applications. 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 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.
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.
The user interface of Warp is the Python interpreter with dynamically loaded compiled modules. This allows flexible problem descriptions in Python scripts, giving the advantage of the full versatility of Python and allowing interactive steering of runs, while using compiled code for the underlying computations for efficiency. A mix of interpreter-linked compiled code modules and flexible scripts can be employed for highly adaptable and flexible problem descriptions without requiring modification or recompilation of the source code. Many diagnostics and tools are built in, mostly written in Python, with in-line documentation. A user can develop additional elaborate tools and diagnostics, as needed, by extending and building on the scripts within Python for specific applications.
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 beam envelope models useful for problem setup. A broad variety of particle movers and field solvers are available. Warp can operate in a boosted-frame mode.
Particle movers include leap-frog models as well as gyro-kinetic models. Particles can be scraped by internal conducting structures and secondary particles emitted. Extensive options exist to initialize the particle distributions, including space-charge effects, and particles can also be self-consistently injected off sources using Child-Langmuir-like emission. Limited inter- and intra-species particle scattering and inelastic collision models are available.
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 electrostatic field solvers 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.
Electromagnetic field solvers are available in 3D, transverse x-y, and r-z packages. Both FDTD and pseudo-spectral solvers are available. There are options to control the dispersion and smoothing.
Extensive provisions are included to define realistic lattice elements in accelerator modeling and standard MAD-style lattice element descriptions can be employed.
Warp can be compiled in serial and in parallel using pyMPI or mpi4py. Detailed instructions are provided for Linux/Unix and Mac OSX systems. (Windows machines are not supported.) Warp has been run on machines ranging from single processor laptops to 100,000 core high performance supercomputers.
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 available for download from Bitbucket. Example run scripts are provided. Users are encouraged to contact members of the Warp team to correct, improve, and extend this online manual.
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).