single particle beam dynamics codes

37
Winni Decking Single Particle Beam Dynamics Codes Winni Decking DESY –MPY- HHH Workshop CERN 2004

Upload: masako

Post on 22-Jan-2016

47 views

Category:

Documents


0 download

DESCRIPTION

Single Particle Beam Dynamics Codes. Winni Decking DESY –MPY- HHH Workshop CERN 2004. Overview. Introduction Code repository Models used Programming philosophy Examples Summary This is a workshop contribution: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Single Particle Beam Dynamics Codes

Winni Decking

Single Particle Beam Dynamics Codes

Winni Decking

DESY –MPY-

HHH Workshop CERN 2004

Page 2: Single Particle Beam Dynamics Codes

Winni Decking

Overview

• Introduction• Code repository

– Models used– Programming philosophy

• Examples• Summary

This is a workshop contribution:

The description of methods and their implementation in the various beam dynamics codes is not complete, not always accurate and maybe wrong at all.

Page 3: Single Particle Beam Dynamics Codes

Winni Decking

Definition

• Describes the motion of a particle in the 6 dimensional phase space under the influence of external fields

• Linear Motion– Fitting of linear optic functions etc.– Definition of magnets and alignment– Definition of geometry

• Nonlinear Motion– Nonlinear perturbations– Dynamic Aperture

Page 4: Single Particle Beam Dynamics Codes

Winni Decking

Point of view

• The physicist who cares only about the methods/assumptions used

• The programmer who wants to implement the newest programming techniques

• The user (also a physicist/programmer) who doesn’t care about methods and programming but likes a well documented, usable, cross-checked code to get the work done

Page 5: Single Particle Beam Dynamics Codes

Winni Decking

Program Layout

1. Get the data/lattice into the code - the lattice parser

2. Calculate• Linear optics functions• Tracking• Construct Map

3. Analyze the result• Display optics function• Calculate DA, frequency map, nonlinear distortions

Page 6: Single Particle Beam Dynamics Codes

Winni Decking

A legacy of beam dynamics codes

• Many beam dynamics codes written over the years• Here is a – surely – not complete list:

AT, BETA, BMAD, COMFORT, COSY-INFINITY, DIMAD, ELEGANT, LEGO, LIAR, LUCRETIA, MAD, MARYLIE, MERLIN, ORBIT, PETROS, PLACET, PTC, RACETRACK, SAD, SIXTRACK, SYNCH, TEAPOT, TRACY, TRANSPORT, TURTLE, UAL

Page 7: Single Particle Beam Dynamics Codes

Winni Decking

Model – Ray Tracing

, ),,,,,(0P

PzyyxxX

• Orbit vector• Transport through elements

using R matrix• Linear optics calculations• Concatenated by Matrix multiplication • Extended to higher order (TRANSPORT)

• NOT symplectic

AT, BETA, BMAD, COMFORT, COSY-INFINITY, DIMAD, ELEGANT, LEGO, LIAR, LUCRETIA, MAD, MARYLIE, MERLIN, ORBIT, PETROS, PLACET, PTC, RACETRACK, SAD, SIXTRACK, SYNCH, TEAPOT, TRACY, TRANSPORT, TURTLE, UAL

if XX

R

m,il,iklm

j,ijklml,ikl

j,ijklk

j,ijkfj xxxxxxx UTR,

Page 8: Single Particle Beam Dynamics Codes

Winni Decking

Symplecticity

Given a transfer Map

And its Jacobian

J is symplectic if

if zz

M

SSJJ T

• A Hamiltonian system is symplectic, i.e. a map which fulfills the symplectic conditions describes a Hamiltonian system

• Important test to verify validity of chosen approximations• If violated, artificial damping/excitation of motion

ib

fai

ab z

zzJ

)(

Page 9: Single Particle Beam Dynamics Codes

Winni Decking

Model – Element by Element Kick Code

• Elements described by thin lens kicks and drifts• Always symplectic• Long elements to be sliced =>slow

AT, BETA, BMAD, COMFORT, COSY-INFINITY, DIMAD, ELEGANT, LEGO, LIAR, LUCRETIA, MAD, MARYLIE, MERLIN, ORBIT, PETROS, PLACET, PTC, RACETRACK, SAD, SIXTRACK, SYNCH, TEAPOT, TRACY, TRANSPORT, TURTLE, UAL

Page 10: Single Particle Beam Dynamics Codes

Winni Decking

Model – Lie Maps

• Lie map methods allow extension of linear concepts in the non-linear Regime

• Lie transformation• Lie maps can be factorized and truncated without loosing

symplecticity

AT, BETA, BMAD, COMFORT, COSY-INFINITY, DIMAD, ELEGANT, LEGO, LIAR, LUCRETIA, MAD, MARYLIE, MERLIN, ORBIT, PETROS, PLACET, PTC, RACETRACK, SAD, SIXTRACK, SYNCH, TEAPOT, TRACY, TRANSPORT, TURTLE, UAL

• Concatenation formulae exist

if xfx

:)exp(:

Page 11: Single Particle Beam Dynamics Codes

Winni Decking

Example – Different Transfer functions in BMAD

The computation method used for tracking and calculating transfer maps can be set individually for each element.

Page 12: Single Particle Beam Dynamics Codes

Winni Decking

Model – Differential Algebra

• Differential Algebra techniques allow computation of Taylor maps

• Basic idea is to “track” a power-series element-by-element• Taylor Map is again not symplectic but can be used to

obtain factorized Lie map

• AT, BETA, BMAD, COMFORT, COSY-INFINITY, DIMAD, ELEGANT, LEGO, LIAR, LUCRETIA, MAD, MARYLIE, MERLIN, ORBIT, PETROS, PLACET, PTC, RACETRACK, SAD, SIXTRACK, SYNCH, TEAPOT, TRACY, TRANSPORT, TURTLE, UAL

Page 13: Single Particle Beam Dynamics Codes

Winni Decking

Application of One Turn Maps

• One turn map tracking– One-turn Taylor Map– Construct mixed-variable generating functions– Cremona maps

• Normal form analysis– Extracts higher order lattice function perturbations and

their parameter dependence as well as driving terms out of one-turn map

– Very useful

Page 14: Single Particle Beam Dynamics Codes

Winni Decking

PTC-TWISS MAD-X ModulePTC-TWISS MAD-X Module

E. Courant et al, “A comparison of several Lattice Tools for Computation of Orbit Functions of an Accelerator”, published in PAC2003 Portland, shown is x versus p/p for a simple cyclotron. Standard MAD-X gives the green curve which deviates since the MAD-X (like MAD8) uses the expanded Hamiltonian. In PTC the exact attribute allows to the treat the true Hamiltonian. Note, that PTC has read-in the structure from MAD-X input. There is now PTC_TWISS as attribute of the PTC MAD-X module (still rudimentary!) that allows to produce the Ripken/ Willeke lattice functions called TWISS3 in MAD8.

Normal Form MAD-X ModuleNormal Form MAD-X Module

There is now also a NORMAL attribute of the PTC MAD-X module (still rudimentary!) to calculate dispersion, tune and anharmonicities to high orders and as function of delta. This module will be eventually become the replacement of the DYNAMIC/STATIC of MAD8.

Example for the Afternoon

Page 15: Single Particle Beam Dynamics Codes

Winni Decking

Programming Philosophies

• Integrate the physics into a high level mathematics software (like Mathematica, MatLab, …)

• Many existing codes can be ‘operated’ from high level software

• Only few codes are ‘embedded’ into MatLab AT, BETA, BMAD, COMFORT, COSY-INFINITY, DIMAD,

ELEGANT, LEGO, LIAR, LUCRETIA, MAD, MARYLIE, MERLIN, ORBIT, PETROS, PLACET, PTC, RACETRACK, SAD, SIXTRACK, SYNCH, TEAPOT, TRACY, TRANSPORT, TURTLE, UAL

• Advantages:– Input/output dealt with built in math functions– Easy implementation in control system

• Disadvantage: Slow

Page 16: Single Particle Beam Dynamics Codes

Winni Decking

Programming Philosophies

• Provide the user with a toolbox (library) rather than an existing program which does contain the needed elements and procedures

• Realized in C++, F90, Pascal

AT, BETA, BMAD, COMFORT, COSY-INFINITY, DIMAD, ELEGANT, LEGO, LIAR, LUCRETIA, MAD, MARYLIE, MERLIN, ORBIT, PETROS, PLACET, PTC, RACETRACK, SAD, SIXTRACK, SYNCH, TEAPOT, TRACY, TRANSPORT, TURTLE, UAL

• Can be tailored to specific problem, should be easy to maintain and extend

Page 17: Single Particle Beam Dynamics Codes

Winni Decking

Programming Philosophies

• A more or less advanced process control is implemented in the code itself and allows complicated run logic

AT, BETA, BMAD, COMFORT, COSY-INFINITY, DIMAD, ELEGANT, LEGO, LIAR, LUCRETIA, MAD, MARYLIE, MERLIN, ORBIT, PETROS, PLACET, PTC, RACETRACK, SAD, SIXTRACK, SYNCH, TEAPOT, TRACY, TRANSPORT, TURTLE, UAL

Page 18: Single Particle Beam Dynamics Codes

Winni Decking

Programming Philosophies

• Programs tailored to more or less specific needs• Not universal, but usually the code is not as complex and

allows easy changes• Often only used at only one laboratory and closely linked to

the specific facility and control system

AT, BETA, BMAD, COMFORT, COSY-INFINITY, DIMAD, ELEGANT, LEGO, LIAR, LUCRETIA, MAD, MARYLIE, MERLIN, ORBIT, PETROS, PLACET, PTC, RACETRACK, SAD, SIXTRACK, SYNCH, TEAPOT, TRACY, TRANSPORT, TURTLE, UAL

Page 19: Single Particle Beam Dynamics Codes

Winni Decking

Input Format

• A common format for input and output does not exist• A mad-like description of beam lines seems is the most

accepted approach• Much more information on a beam line element needed

– Errors, Aperture, Wakefields, ….– Magnet errors

• Systematic• Random

– Time dependent variation of magnet strength, magnet positions– Correlation between errors important

• Girder motion• Correlated systematic errors

• Attempt for unified input (SXF) Status?

Page 20: Single Particle Beam Dynamics Codes

Winni Decking

Input Format

Performance Simulation

Modelling of real machine

construction

Basic Lattice Design

• Simple models (sequences of elements)

• Tend to work with smaller modules

• Fitting, constraints etc. Lattice matching

• ‘Generic’ magnet families

• Definition of basic parameters

• (may have more than one possible optics)

QuadrupoleLK1 value or range of K1 values

(Typical) Life Cycle of an Accelerator Project (from N. Walker)

Page 21: Single Particle Beam Dynamics Codes

Winni Decking

Basic Lattice Design

Input Format

Modelling of real machine

construction

• More complex (complete) models

• Tolerance studies

• Simulation of a range of “errors”

• Refinement of parameter specifications

• Definition of prototype component

• Tuning algorithms, diagnostics specs.

• Power supplies (circuits), Klystrons etc.

Performance Simulation

QuadrupoleLPole tip radiusmax / min pole-tip fieldTolerances (used to generate random errors)

(Typical) Life Cycle of an Accelerator Project (from N. Walker)

Page 22: Single Particle Beam Dynamics Codes

Winni Decking

Performance Simulation

Basic Lattice Design

Input Format

Modelling of real machine

• Engineering design of accelerator components

Quadrupole prototype (family)LPole tip radiusmax / min pole-tip fieldTolerances Documentation (drawings, cad files etc)

construction

(Typical) Life Cycle of an Accelerator Project (from N. Walker)

Page 23: Single Particle Beam Dynamics Codes

Winni Decking

construction

Performance Simulation

Basic Lattice Design

Input Format

• Complete model of real machine

• Used for

• Online modelling

• Continued performance studies

• Tuning studies etc.

Quadrupole QF10 (now unique)LPole tip radiusmax / min pole-tip fieldMeasured field mapOther unique physical attributes

Modelling of real machine

(Typical) Life Cycle of an Accelerator Project (from N. Walker)

Page 24: Single Particle Beam Dynamics Codes

Winni Decking

Input Format

Basic Lattice Design

Performance Simulation

Modelling of real machine

construction

(Typical) Life Cycle of an Accelerator Project (from N. Walker)

Input Format should support all stages of the project

Page 25: Single Particle Beam Dynamics Codes

Winni Decking

Example – HERA-e Synchro-Betatron Resonances

• Working Point close to integer was found to have low lifetime

• Incomplete cancellation of chromatic perturbations in the two IR’s north and south

• Analytic treatment with perturbation theory by F. Willeke (EPAC04)

Page 26: Single Particle Beam Dynamics Codes

Winni Decking

Example – HERA-e Synchro-Betatron Resonances

• Tracking with SIXTRACK– constant initial amplitude in x, y, d– change of coherent tune with arc FODO quads– Frequency Map analysis of 2048 turns

Page 27: Single Particle Beam Dynamics Codes

Winni Decking

Example – Frequency Map at BESSY II

• Model incorporates:– Linear coupled model based on orbit-response measurements– Dipole and quadrupole fringe fields– Longitudinal variation of sextupole field– Systematic octupole in quadrupole– Sextupole and decapole components created by steering magnets

from P. Kuske (BESSY) – EPAC04

Measurement Model

Page 28: Single Particle Beam Dynamics Codes

Winni Decking

Measurement ALS Off-Momentum Aperture

• Excitation of increasing horizontal beam centroid motion with single turn kicker

• (Static) momentum variation by change of RF frequency

• Single turn BPM’s provide tune of kicked beam (lower figure)

• Beam intensity monitor records beam losses (upper figure, dot size corresponds to relative intensity loss)

Page 29: Single Particle Beam Dynamics Codes

Winni Decking

ALS Off-Momentum Aperture

• Tracking with ALS model after orbit response measurement• Beam loss on 6th order resonance reproduced

Page 30: Single Particle Beam Dynamics Codes

Winni Decking

Early Indicators – Survival Plots

• Huge number of turns • Early indicators for chaotic

motion – Frequency maps– Lyapunov coefficient– Survival plot

extrapolation– Diffusion rates in

amplitude space

• Difficulty with time dependent process (ripple, events)

HERA-p , 2000 Model

Page 31: Single Particle Beam Dynamics Codes

Winni Decking

Beam Dynamics Measurements with Hadrons

• Measurements at SPS, FermiLab, Hera-p, …• Optional control off non-linearity with additional sextupoles

and octupoles• Optional additional application of ps-ripple to simulate tune

variations• Phase space reconstruction with kicker and single-turn

BPM’s• Resonance driving term analysis from single-turn BPM data• Model verified by tune-shift with amplitude measurements

(often difficult if aperture restriction does not allow large kick amplitudes)

• Measurement of DA agrees with predictions within 20 %

Page 32: Single Particle Beam Dynamics Codes

Winni Decking

Measurements at SPS 2002

Page 33: Single Particle Beam Dynamics Codes

Winni Decking

Resonance driving terms at HERA

• Resonance line amplitudes obtained from single-turn PM data

• Line amplitude can be calculated form normal form theory

Page 34: Single Particle Beam Dynamics Codes

Winni Decking

Conclusion

• The ideal beam dynamics code looks like– Library type architecture – Linear and nonlinear matching– Symplectic map tracking through arbitrary fields with time

and s dependence– Normal form analysis– Element by element kick tracking as alternative to the

above• Pre processing

– Connection to data base and control system– Uniform format only important for big collaborations

• Post processing– Includes FMA, early indicators etc.– Can be done by external math program

Page 35: Single Particle Beam Dynamics Codes

Winni Decking

Conclusion

• Single particle dynamics is mature field with many available tools

• Codes have been benchmarked against experiments with good agreement if the accelerator model is refined enough

• Modern tools like Lie algebra and normal form should be promoted and used more frequently

• But: For today’s accelerator physics problems the single particle approach is less and less valid:– Beam-beam, space charge, geometric wakes, ion-and e-

cloud, coherent synchrotron radiation, ….

Page 36: Single Particle Beam Dynamics Codes

Winni Decking

Model Usage CommentsAT(Matlab) C Spear,ALSBETA S Kick ESRF, BESSYBMAD C,S Matrix, Kick, Lie, PTC CornellCOMFORT Matrix DESYCOSY-INFINITY Taylor, Lie, DA WorldDIMAD Matrix, GF SLACELEGANT L,S Matrix, Kick APS, WorldLEGO C Da, Lie PEP-II beam-beamLIAR L Matrix SLAC wakefieldLUCRETIA L SLAC project startedMAD C,S,L Matrix, Kick, Lie, PTC WorldMARYLIE Lie, GF WorldMERLIN L Matrix, Kick WorldORBIT C particle interactionPETROS C Matrix DESYPLACET L Matrix CERN, World wakefieldPTC C,S Kick World (BMAD, MAD)RACETRACK S Kick ElettraSAD C,S,L Matrix, Kick KEKSIXTRACK C,S Kick WorldSYNCHTEAPOT C Kick (UAL)TRACY S Kick SLS, Soleil, ALSTRANSPORT C,S,L Matrix WorldTURTLE L MatrixUAL C Matrix, Kick(Teapot) RHIC

Page 37: Single Particle Beam Dynamics Codes

Winni Decking

EXE SOURCE DOC Optimisation Input LanguageAT(Matlab) U,L,W y MatLab, DLLBETABMAD U,L y y y madlike F90, C++, LibCOMFORT F77COSY-INFINITY y y y mad,sxf C++DIMAD U,L y y y madlike,sxf F90ELEGANT U,L,W y y y madlike CLEGO C++, LibLIAR U,L,W y y n F90LUCRETIA MatLab, DLLMAD U,L,W y y y mad C,F77,F90MARYLIE y y y F77MERLIN U,L,W y madlike C++, LibORBIT C++PETROS F77PLACET U y y n CPTC U,L,W y (y) n F90RACETRACK F77SAD U,L y y madlikeSIXTRACK U,L y y n F90SYNCHTEAPOT F77TRACY C++TRANSPORT y y F77TURTLE y y F77UAL y y y sxf C++