where <...> here denotes a transverse distribution average and no centroid offset (i.e., <x> = 0 = <x'>, etc.) is assumed for simplicity. The numerical factors of 2 and 4 in the coefficients are motivated by a Kapchinskij-Vladimirskij (KV) distribution. For a KV distribution the factors give boundary-edge measures appropriate for uniformly filled beam phase-space projections. These factors are then applied to other distributions which may be far from having uniform projections. This convention was taken in Warp since the code was historically developed for simulating space-charge dominated beams where the factors are conventionally used this they apply fairly well to most distributions with strong space-charge. Care should be taken by Warp users to understand factors employed in quantities such as rms emittance measures. Unfortunately, there is no broad standard in accelerator physics for conventions in incorporating factors for effective edge meaures in envelope and emittance definitions.
emit_x = 4*sqrt( <x*x><x'*x'> - <x*x'><x*x'> ) edge measure of x-x' phase-space area
b = 2*sqrt(<y*y>) edge measure of y-width of transverse distribution
a = 2*sqrt(<x*x>) edge measure of x-width of transverse distribution
Many variables used in Warp to express quantities such as statistical beam extents (transverse rms radii) and phase-space areas (transverse rms emittances) and are conventionally expressed in so-called "edge measures" with
The physical constants were obtained from 2010CODATA, http://physics.nist.gov/cuu/Constants/bibliography.html.
In almost all cases, Warp uses MKS units. The one notable exception is that sometimes the energy, for example top.ekin which can be used to set the initial axial kinetic energy of the beam, is in units of electron volts.
There are a number of convenient multiplying factors to convert quantities to MKS units. For example, cm will convert centimeters to meters:
will result in x being set to 2 cm in meters. Below is a list of conversion factors and their values.
Warp also has numerous mathematical and physical constants available which can aid in setup of problem descriptions. These include:
emit_y = 4*sqrt( <y*y><y'*y'> - <y*y'><y*y'> ) edge measure of y-y' phase-space area
Warp Variables and Packages
Warp has literally thousands of variables/parameters used to specify and control simulations. These include real numbers, integers, and arrays. These are organized around packages with names including:
top Main control
env Envelope equation solver
w3d 3D PIC
wxy Two dimensional transverse x-y slice PIC
wrz Two dimensional axisymmetric r-z PIC (depreciated use 3D package)
f3d 3D electrostatic field solver
fxy 2D fieldsolver for x-y slice PIC
frz 2D fieldsolver for axisymmetric r-z PIC
util Utility routines
More information on these can be found in the source web pages. Fortran surce code files (".F" suffix) and associated variable description files (".v" suffix) can be found for each package. Variables are functionally grouped within each package constituting common blocks in the source code.
The "top" package contains many overall simulation control parameters used by fortran routines and linked with the python interpreter interface. When obtaining documentation on specific variables like a simulation timestep top.dt, information can be obtained by (quotes are necessary):
and the value to the variable can be found byto print the present value. The doc("dt") command above returns
giving the package (top) and group (InGen) within the package that the variable is defined in, variable attributes and type, address info (platform dependent), and a comment describing the variable. Much information can be deduced by examining variable description file top.v used in comping Warp. The source web pages have enhanced formatting making them easier to read.