Overview


Bmad

Bmad is an object oriented, open source, subroutine library for charged-particle dynamics simulations in accelerators and storage rings. Bmad has been developed at Cornell University's Laboratory for Elementary Particle Physics and has been in use since the mid 1990s. The Bmad subroutines were developed to:

Bmad has a wide range of routines to do many things. Bmad can be used to study both single and multi--particle beam dynamics. It has routines to track both particles and macroparticles. Bmad has various tracking algorithms including Runge--Kutta and symplectic (Lie algebraic) integration. Wakefields, and radiation excitation and damping can be simulated. Bmad has routines for calculating transfer matrices, emittances, Twiss parameters, dispersion, coupling, etc. The elements that Bmad knows about include quadrupoles, RF cavities (both storage ring and LINAC accelerating types), solenoids, dipole bends, etc. In addition, elements can be defined to control the attributes of other elements. This can be used to simulate the ``girders'' which physically support components in the accelerator or to easily simulate the action of control room ``knobs'' that gang together, say, the current going through a set of quadrupoles. Bmad, by interfacing with Etienne Forest's (Patrice Nishikawa) PTC code, Bmad can, for example, compute Taylor maps to arbitrary order and do normal form analysis.

Bmad also has X-Ray tracking capabilities. The idea is to be able to do a "complete" simulation of accelerated charged-particle beams and the x-ray beams they create. Ultimately a complete framework for simulations from a Gun cathode (including space-charge) to x-ray generation, to x-ray tracking through to the experimental end-stations is envisioned. The ability to define multiple X-Ray beam lines and the ability to do tracking with mirror, crystal, and capillary elements has already been implemented.

To be able to extend Bmad easily, Bmad has been developed in a modular, object oriented, fashion to maximize flexibility. As just one example, each individual element can be assigned a particular tracking method in order to maximize speed or accuracy and the tracking methods can be assigned via the lattice file or at run time in a program.


Tao

There have been a number of simulation programs that have been developed that use Bmad as the calculational engine. By far the most important is Tao which is a general purpose design and simulation program. Even if your plan is to use or create a different bmad based program, learning to use Tao is useful since it allows you to do things like quickly check lattice parameter values, plot quantities like Twiss functions, orbit, etc., draw machine layouts, etc., etc.

Recommendation for beginners: Learning how to use Tao is essential since it allows you to quickly examine lattices including viewing lattice element parameters, orbits, Twiss parameters, etc. A tutorial for using Tao and Bmad is available for download: