|
|
:toc:
|
|
|
[[chp:opalcycl]]
|
|
|
|
|
|
:stem: latexmath
|
|
|
:sectnums:
|
|
|
|
|
|
[[chp:Introduction]]
|
|
|
Introduction
|
|
|
------------
|
|
|
|
|
|
[[aim-of-opal-and-history]]
|
|
|
Aim of `Opal` and History
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
`Opal` is a tool for charged-particle optics in accelerator structures
|
|
|
and beam lines. Using the `mad` language with extensions, `Opal` is
|
|
|
derived from `mad9p` and is based on the `classic` class library, which
|
|
|
was started in 1995 by an international collaboration. IPPL (Independent
|
|
|
Parallel Particle Layer) is the framework which provides parallel
|
|
|
particles and fields using data parallel approach. `Opal` is built from
|
|
|
the ground up as a parallel application exemplifying the fact that HPC
|
|
|
(High Performance Computing) is the third leg of science, complementing
|
|
|
theory and the experiment. HPC is made possible now through the
|
|
|
increasingly sophisticated mathematical models and evolving computer
|
|
|
power available on the desktop and in super computer centers. `Opal`
|
|
|
runs on your laptop as well as on the largest HPC clusters available
|
|
|
today.
|
|
|
|
|
|
The `Opal` framework makes it easy to add new features in the form of
|
|
|
new `C++` classes.
|
|
|
|
|
|
`Opal` comes in the following flavors:
|
|
|
|
|
|
* `Opal-cycl`
|
|
|
* `Opal-t`
|
|
|
|
|
|
`Opal-cycl` tracks particles with 3D space charge including neighboring
|
|
|
turns in cyclotrons with time as the independent variable.
|
|
|
|
|
|
`Opal-t` is a super-set of `Impact-t` and can be used to model guns,
|
|
|
injectors, ERLs and complete XFELs excluding the undulator.
|
|
|
|
|
|
It should be noted that not all features of `Opal` are available in both
|
|
|
flavors. +
|
|
|
The following icon `DOpal-t` means that a feature is not yet available
|
|
|
in `Opal-t`. A similar icon is used for `Opal-cycl`.
|
|
|
|
|
|
[[parallel-processing-capabilities]]
|
|
|
Parallel Processing Capabilities
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
`Opal` is built to harness the power of parallel processing for an
|
|
|
improved quantitative understanding of particle accelerators. This goal
|
|
|
can only be achieved with detailed 3D modelling capabilities and a
|
|
|
sufficient number of simulation particles to obtain meaningful
|
|
|
statistics on various quantities of the particle ensemble such as
|
|
|
emittance, slice emittance, halo extension etc.
|
|
|
|
|
|
The following example is exemplifying this fact:
|
|
|
|
|
|
.Table Parameters Parallel Performance Example
|
|
|
|===
|
|
|
|Distribution | Particles | Mesh | Greens Function | Time steps
|
|
|
|
|
|
|Gauss 3D | latexmath:[10^8] | latexmath:[1024^3] | Integrated | 10
|
|
|
|===
|
|
|
|
|
|
Figure [walldrift] shows the parallel efficiency time as a function of
|
|
|
used cores for a test example with parameters given in Table [pex1]. The
|
|
|
data were obtained on a Cray XT5 at the Swiss Center for Scientific
|
|
|
Computing.
|
|
|
|
|
|
image:figures/drift2c1.png[caption="Parallel efficiency and particles pushed per
|
|
|
as a function of cores",scaledwidth=75.0%]
|
|
|
|
|
|
[[quality-management]]
|
|
|
Quality Management
|
|
|
~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
Documentation and quality assurance are given our highest attention
|
|
|
since we are convinced that adequate documentation is a key factor in
|
|
|
the usefulness of a code like `Opal` to study present and future
|
|
|
particle accelerators. Using tools such as a source code version control
|
|
|
system (https://git-scm.com[git]), source code documentation using
|
|
|
Doxygen (found http://amas.web.psi.ch/docs/opal/html/[here]) and the
|
|
|
extensive user manual you are now enjoying, we are committed to
|
|
|
providing users as well as co-developers with state-of-the-art
|
|
|
documentation to `Opal`.
|
|
|
|
|
|
One example of an non trivial test-example is the PSI DC GUN. In
|
|
|
Figure <<guncomp1>> the comparison between `Impact-t` and `Opal-t` is
|
|
|
shown. This example is part of the regression test suite that is run
|
|
|
every night. The input file is found in Section <<examplesbeamlines>>.
|
|
|
|
|
|
Misprints and obscurity are almost inevitable in a document of this
|
|
|
size. Comments and _active contributions_ from readers are therefore
|
|
|
most welcome. They may be sent to `andreas.adelmann@psi.ch`.
|
|
|
|
|
|
.Comparison of energy and emittance in latexmath:[x] between `Impact-t` and `Opal-t`
|
|
|
[#guncomp1]
|
|
|
image:figures/Gun/GunCompEn.png[scaledwidth=45.0%]
|
|
|
image:figures/Gun/GunCompEx.png[scaledwidth=45.0%]
|
|
|
|
|
|
[[output]]
|
|
|
Output
|
|
|
~~~~~~
|
|
|
|
|
|
The phase space is stored in the H5hut file-format and can be analyzed
|
|
|
using e.g. H5root . The frequency of the data output (phase space and
|
|
|
some statistical quantities) can be controlled using the `OPTION`
|
|
|
statement see Section <<option>>, with the flag `PSDUMPFREQ`. The file is
|
|
|
named like in input file but with the extension .h5.
|
|
|
|
|
|
A SDDS compatible ASCII file with statistical beam parameters is written
|
|
|
to a file with extension .stat. The frequency with which this data is
|
|
|
written can be controlled with the `OPTION` statement
|
|
|
see Section <<option>> with the flag `STATDUMPFREQ`.
|
|
|
|
|
|
.H5root enables a variety of data analysis and post processing task on `Opal` data
|
|
|
image:figures/H5rootPicture1.png[width=300]
|
|
|
image:figures/H5rootPicture2.png[width=300]
|
|
|
image:figures/H5rootPicture3.png[width=300]
|
|
|
|
|
|
[[change-history]]
|
|
|
Change History
|
|
|
~~~~~~~~~~~~~~
|
|
|
|
|
|
See Appendix [changelog] for a detailed list of changes in `Opal`.
|
|
|
|
|
|
[[known-issues-and-limitations]]
|
|
|
Known Issues and Limitations
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
[[opal-cycl]]
|
|
|
`Opal-cycl`
|
|
|
^^^^^^^^^^^
|
|
|
|
|
|
* Restart with the option `PSDUMPLOCALFRAME` does not work yet,
|
|
|
* In complicated geometries such as spiral inflectors, proper particle
|
|
|
deletion at the boundary sometimes fails.
|
|
|
|
|
|
[[acknowledgments]]
|
|
|
Acknowledgments
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
|
The contributions of various individuals and groups are acknowledged in
|
|
|
the relevant chapters, however a few individuals have or had
|
|
|
considerable influence on the development of `Opal`, namely Chris
|
|
|
Iselin, John Jowett, Julian Cummings, Ji Qiang, Robert Ryne and Stefan
|
|
|
Adam. For the `H5root` visualization tool credits go to Thomas
|
|
|
Schietinger.
|
|
|
|
|
|
The following individuals are acknowledged for past contributions:
|
|
|
Yuanjie Bi, Jianjun Yang, Colwyn Gulliford, Hao Zha, Christopher Mayes
|
|
|
and Tulin Kaman.
|
|
|
|
|
|
[[citation]]
|
|
|
Citation
|
|
|
~~~~~~~~
|
|
|
|
|
|
Please cite `Opal` in the following way:
|
|
|
|
|
|
....
|
|
|
@techreport{opal:1,
|
|
|
title = {The OPAL (Object Oriented Parallel Accelerator Library) Framework},
|
|
|
author = {Andreas Adelmann, Christian Baumgarten, Matthias Frey, Achim Gsell, Valeria Rizzoglio,
|
|
|
Jochem Snuverink (PSI) and Christof Metzger-Kraus and Yves Ineichen and
|
|
|
Steve Russell (LANL) and Chuan Wang (CIAE) and
|
|
|
Suzanne Sheehy and Chris Rogers (RAL) and
|
|
|
Daniel Winklehner (MIT)},
|
|
|
institution = {Paul Scherrer Institut},
|
|
|
number = {PSI-PR-08-02},
|
|
|
year = {(2008-2017)}
|
|
|
}
|
|
|
.... |