E N D
MaryLie/IMPACT:A Parallel, Multi-Physics Simulation Code for Modeling Beam Dynamics in Linacs and RingsRobert D. RyneLawrence Berkeley National Laboratoryfor the ML/I development team:A. Dragt (U. Maryland), R. Ryne, J. Qiang (LBNL), S. Habib, F. Neri, P. Walstrom (LANL), T. Mottershead (LANL, retired), V. Decyk (UCLA), R. Samulyak (BNL), D. Abell (Tech-X), P. Colella, P. McCorquodate, D. Serafini (LBNL/APDEC) SciDAC Project MeetingAugust 11-12, 2004
Many people are contributing to ML/I Wakefields Samulyak Soft-edge Magnets Neri, Walsrom MAD Front end Ryne RMS envelopes Ryne Poisson solvers Colella, Serafini, McCorquodale (APDEC) MaryLie Dragt et al IMPACT Qiang, Ryne, Habib Parallelization Decyk 5th Order RF cavities Abell Optimization w/ space charge Mottershead Map generation from field data Dragt, Walstrom, Mitchell, Venturini Higher order, F1’s Dragt, Cooper
ML/I Overview • MaryLie/IMPACT (ML/I) is a hybrid code that combines the beam optics of MaryLie with the parallel PIC capabilties of IMPACT, and augments them with new capabilities • Embeds operator splitting for all thick elements • allows mixed MaryLie input and MAD input • Thick elements have new “slices” argument, e.g.: slices=10 • Many new software modules (wakefield effects, soft-edge magnet models, …) add functionality and applicability • Performance optimization of tracking routines (25% peak) • User manual • Example suite
ML/I manual describes code usage and new features • Space charge • Acceleration • SIF compatibility • Wakefield effects • Soft-edged magnets • 5th order rf cavity model (under development) • Envelope tracking • Methodical treatment of units • “automatic” commands
ML/I has multi-physics capabilities • Space charge • New solvers added by members of the APDEC team (P. Colella, P. McCorquodale, D. Serafini) • High-order nonlinear optics (5th order) • Includes acceleration • 5th order being implemented by D. Abell, Tech-X • Includes coil stacks and soft-edge magnet models (F. Neri and P. Walstrom) • Wakefields • Includes short-range and long-range capabilities (R. Samulyak, BNL)
ML/I has multiple uses • Map computation & analysis • Particle tracking with/without space charge • Envelope tracking • Fitting and optimization
Treatment of Units in ML/I • Issue of units has no doubt caused many accelerator physicists hours of frustration and lost productivity • note my grey hair; lack thereof of some colleagues • ML/I allows arbitrary specification of l, w, d, where 6-vector is (x/l, px/d, y/l, py/d, wt, pt/wld) • Common choices are: • Magnetostatic systems: d=p0, l =1, w l/c=1 • Systems with acceleration: d=m0c, w=wbunch, l=c/w • New UNITS command: myunits, units: l=1.0, p=0.8, w=2.856e9 myunits, units: type=magnetic, l=1.0 myunits, units: type=dynamic, l=c/w Etc.
RMS Envelope Calculations • based on observation that envelope Hamiltonian is of the form H=Hext+Hsc+emit • envelope tracking can be done using the same split-operator functionality in ML/I as is used for particle tracking • dotrack, autotrack: envelope=true • Subroutines to compute Hsc+emit are easily incorporated into other split-operator based space-charge simulation codes
New Commands (selected) • autoslice: automatic slicing of thick elements • SLICES = # of slices, L = distance between slices, CONTROL = local/global/none • autoapply: automatic application of a commands • NAME= name of menu element or line • autotrack: automatic tracking of particles • TYPE=taylorN/symplecticN • autoconcat: automatic concatenation of maps • poisson: select/set parameters of Poisson solver • NX=,NY=,NZ=,ngridpoints= fixed/variable, boundingbox=fixed/variable... • raytrace: ray trace command • NORDER=, NTRACE=, NWRITE=, SEQUENCELENGTH=, PRECISION=, MIN=, MAX=, INFILE=, OUTFILE=, CLOSE=, FLUSH= • units: specification of units • TYPE=, L = scale length, P = scale momentum , F = scale freq , W = scale angular freq, T = scale time
ML/I incorporates standards being developed and adopted in the SciDAC AST project • Headers in particle data files: • Descriptive text • Scale length • Scale momentum • Scale time • Code can read the prologue, convert the data (if desired) to those units being used in the current simulation • Frees the user from the headache of unit conversion
Test suite(developed in collaboration w/ A. Adelmann, J. Amundson, P. Spentzouris) • KV beam in a FODO channel • Free expansion of a cold, uniform density bunch • Cold beam in a FODO channel with RF cavities • Thermal beam in a constant focusing channel • Bi-thermal beam in a constant focusing channel
Cold Beam in a FODO Channel with RF Cavities Plot of xrms, yrms, and 0.4*trms vs. distance in 1 period of a FODO channel with rf cavities. ML/I results (symbols) are on top of curves obtained from the rms equations
Beam density vs. radius for a high-intensity, bi-thermal distribution with 5% charge in the secondary distribution. The data are plotted on a linear scale (left axis, red curve) and log scale (right axis, green curve). The solid lines show the analytical solution. The data points (blue circles, log scale) show the distribution after 10 focusing lengths, simulated using ML/I with 100 million particles. The halo is well-resolved out to a distance where the radial density is ~one million times smaller than the central density.