  Many sophisticated computer models have been developed to understand the
behaviour of particle accelerators. Even these complex models often do not
describe the measured data. Interactions of the beam with external fields,
other particles in the same beam and the beam walls all present modelling
challenges. These can be challenging to model correctly even with modern
supercomputers. This paper describes OPAL (Object Oriented Parallel Accelerator
Library), a parallel open source tool for charged-particle optics in linear
accelerators and rings, including 3D space charge. OPAL is built from the
ground up as a parallel application exemplifying the fact that high performance
computing is the third leg of science, complementing theory and experiment.
Using the MAD language with extensions, OPAL can run on a laptop as well as on
the largest high performance computing systems. The OPAL framework makes it
easy to add new features in the form of new C++ classes, enabling the modelling
of many physics processes and field types. OPAL comes in two flavours:
OPAL-cycl: tracks particles with 3D space charge including neighbouring turns
in cyclotrons and FFAs with time as the independent variable. OPAL-t: models
beam lines, linacs, rf-photo injectors and complete XFELs excluding the
undulator. The code is managed through the git distributed version control
system. A suite of unit tests have been developed for various parts of OPAL,
validating each part of the code independently. System tests validate the
overall integration of different elements.
