27
Symplectic Integrators applied to Beam Dynamics in Circular Accelerators Basis for Constructing Integration Schemes for Hamiltonian Systems Laurent S. Nadolski Synchrotron SOLEIL - Beam Dynamics Group [email protected] Version 1.4, February 2011 NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 1 / 53 Outline Introduction Overview of course Numerical integration Integration Methods Symplectic Integration ab Ovo Refresher on Hamiltonian Mechanics Application to Single Element Conclusion References NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 2 / 53

Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Symplectic Integrators applied to BeamDynamics in Circular Accelerators

Basis for Constructing Integration Schemes for HamiltonianSystems

Laurent S. NadolskiSynchrotron SOLEIL - Beam Dynamics Group

[email protected]

Version 1.4, February 2011

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 1 / 53

Outline

IntroductionOverview of course

Numerical integration

Integration Methods

Symplectic Integration ab Ovo

Refresher on Hamiltonian Mechanics

Application to Single Element

Conclusion

References

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 2 / 53

Page 2: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Overview of the course

1. Understand what is numerical integration and especiallythe use classes of symplectic integrators.

2. Basic schemes of integration.3. How to build integrators to an arbitrary order.4. Integration of simple elements as straight sections, dipole,

quadrupole, and sextupole magnets.�� ��These methods can be applied in many other contexts

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 3 / 53

Outline

Introduction

Numerical integration

Integration Methods

Symplectic Integration ab Ovo

Refresher on Hamiltonian Mechanics

Application to Single Element

Conclusion

References

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 4 / 53

Page 3: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Definition

I Let us start with a dynamical system of n degrees offreedom ruled by system of differential equations,

dxk

dt= f (x , t), k = 1 . . . n (1)

What are the solutions xk (t)?

I Case of a pendulum, n = 2

H(q, p) =p2

2+ cos q (2)

{dqdt = ∂H

∂q = pdpdt = −∂H

∂p = sin q.(3)

-4

-2

0

2

4

-3 -2 -1 0 1 2 3

p

q

-4

-2

0

2

4

-3 -2 -1 0 1 2 3

p

q

(a)

-4

-2

0

2

4

-4 -2 0 2 4

ν0

p

(c)

-4

-2

0

2

4

-4 -2 0 2 4

νπ

p

(b)

I Objective: find a numerical method for integrating theseequations and study the dynamics of the system(convergence, fixed point, stability, resonance, etc.).

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 5 / 53

Definition (Con’t)

I Integration of the equations of the motion is often referredas Tracking code in Accelerator Physics.

I Let us study a circular accelerator made of manymagnets (dipole, quadrupole, and sextupole magnets)

1. Define a global Hamiltonian→ complicated and not sopractical

2. Define a local Hamiltonian for each individual elementwith its local reference frame (curvilinear, rectangular, ...)determined by its geometry (shape, symmetry of themagnetic-field)→ LEGO approach�

���

Building a tracking code is an entirely local prob-lem.Each element is defined by a local Hamiltonian.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 6 / 53

Page 4: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

LEGO Approach: Defining BlocksI Two main families of blocks can be defined.

(a.) Rectilinear block consisting of two parallel entrance and exitfaces separated by a distance L.→ useful for straight section, quadrupole, sextupolemagnets

(b.) Curvilinear block where the vertical axes are parallel but thehorizontal are tilted by an angle θ. We have then L = ρθ.→ suitable for a dipole magnet of curvature radius ρdeviating the particle trajectory by approximatively θdegrees.

ρ

(b)(a)

θ

L

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 7 / 53

Transfer Application or Flow: ~x f =Mi→f~x i

I For each block, we need to construct an applicationmapping the entrance coordinates to the exit coordinates,which we call resp. initial (i) and final (f) coordinates.

I This application is call the transfer map or the flow of thesystem:

~x f =Mi→f~x i

I Remarks:1. A magnetic element can be defined as a collection of

such a block.2. A physical element is defined as set of blocks (rectilinear or

curvilinear) and a model defining the transfer map

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 8 / 53

Page 5: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Properties of Transfer Maps (i)Law of composition

I Let be two elements (1) and (2)I Let beM0→1 andM1→2 their transfer mapsI Then the transfer map of the system (1–2) is given by the

composition of both maps:

M0→2 =M1→2M0→1 (4)

Transfer map of the full ring and stability

I Let be an autonomous system modeling a ringI Its transfer map is then the composition of flow of all m

elements of ring of circumference 2πR:

A2πR =M(m−1)→m . . .M0→1 (5)

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 9 / 53

Properties of Transfer Maps (ii)

Transfer map and stability

I Moreover, the map over n-turns is:

A2nπR→2(n−1)πR . . .A2πR→4πRA0→2πR = (A0→2πR)n (6)

I The stability is given by the iteration of this map overinitial condition ~x i

I This is indeed a local approach where each element ismodeled using a Hamiltonian expressed in the mostsuitable coordinates.�

�� A complex problem of integration

has been broken out in a few simple onesHow to compute the map of an individual element modeled byan Hamiltonian H? numerical integration is a solution.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 10 / 53

Page 6: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Outline

Introduction

Numerical integration

Integration MethodsRequired Properties for AcceleratorsDifferent MethodsDifferent Symplectic Methods

Symplectic Integration ab Ovo

Refresher on Hamiltonian Mechanics

Application to Single Element

Conclusion

ReferencesNPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 11 / 53

Integrator Properties

Tracking over many turns (thousands for lepton machines,billions for hadron machines). This requires:

I Very good stability of the numerical integrator (no spuriousdamping, no divergence)

I Few error accumulations (systematic and methoderrors): controled or bounded errors

I High precision (order of the integrator) to reduce the thenumber of steps whence the time of computation.

I Conservation of the Hamiltonian, i.e. the energy of thesystem (symplecticity)

I Conservation of the angular momentum, n-form, . . .�� ��What classes of integrators are available?

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 12 / 53

Page 7: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Integration Classes

Runge Kutta Schemes

I Order 3, 4I 4/5 with adaptative stepsize

Predicator/Corrector MethodsAdams’ schemesThese are rather slow numerical integration methods

Symplectic Integrators

I Split operator symplectic integratorI Monomial full integrabilityI Energy conservation

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 13 / 53

Building Symplectic Schemes

Implicit methods

I Implicit Runge–Kutta (Sanz-Serna, 1998)I Generating functions (Channel and Scovel, 1990)

Explicit methods

I D. Ruth first introduced in 1983 based on successivecanonical transformations

I Neri (1988) extended using Lie AlgebraI Yoshida (1990) give a general scheme for building 2n + 2

order integrator based on a 2n order integrator.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 14 / 53

Page 8: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

A short History of Symplectic Integration

I First Introduction: R. DeVogelaere for FFAGs at MURAproject (1956).

I Big gap for many years ...I Method: symplectic integrator (Dragt and Finn, 1976)

I Hk = Ak + εBk where Ak and Bk are full integrable=⇒ full ring: A =

∏kMk

I Chosen scheme in this lecture: Integrators (McLachlan(1998), Laskar and Robutel, 2000)=⇒ symmetric, positive steps, accuracy

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 15 / 53

Outline

Introduction

Numerical integration

Integration Methods

Symplectic Integration ab Ovo

Refresher on Hamiltonian Mechanics

Application to Single Element

Conclusion

References

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 16 / 53

Page 9: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Particle Trajectory Computation

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 17 / 53

Local Hamiltonian Approach

I Motion with respect to areference particle.

I Canonical variables(x ,px), (y ,py ), (l , δ)

I Time-like variable s

Potential vector (Ax , Ay , As)

I Maxwell equationsI SymmetriesI Longitudinal rectangular

magnetic profile

H = −(1+h(s)x)√(1 + δ)2 − (px − eAx)2 − (py − eAy )2−eAs+δ+1

(7)

−eAs(x , y) = Re

( ∞∑n=1

bn + jan

n(x + jy)n

)(8)

with h(s) = 1/ρ(s).an and bn coefficients: skew and normal 2n–poles

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 18 / 53

Page 10: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Outline

Introduction

Numerical integration

Integration Methods

Symplectic Integration ab Ovo

Refresher on Hamiltonian MechanicsPoisson BracketConstruction SchemeKick Drift or Leap Frog IntegratorHigher order schemes: Yoshida schemeMcLachlan and Laskar Scheme

Application to Single Element

Conclusion

References

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 19 / 53

Quick RefresherI Let H be the Hamiltonian of a system with n degrees of

freedom (DOF)I Let ~x = (pj ,qj)j=1..n be generalized positions and

momenta and s, the independent variable.I Then the equations of motion are given by the Hamilton

equations:

dpj

ds= −∂H

∂qj,

dqj

ds=∂H∂pj

for j = 1..n (9)

I Let us define the Poisson bracket of two functions f and gdepending on the ~x variable by:

{f ,g} def=∑

j

∂f∂pj

∂g∂qj− ∂f∂qj

∂g∂pj

(10)

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 20 / 53

Page 11: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Poisson BracketI Then the equations of the motion can be written as:

d~xds

= {H, ~x} = LH~x , (11)

where LH is a differential operator (Lie derivative)defined by LHf def

= {H, f}.I The equations of motion can then be formally integrated

for a vector ~x i of initial conditions:

~x f =∑n≥0

sn

n!LnH~x

i def= esLH~x i (12)

I It is not trivial to determine esLH~x i , since this convergentpower series is most of a time slowly convergent. So inpractice, one need the evaluation of many terms. Moreoverthe truncation is not symplectic.

I How to approximate esLH?NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 21 / 53

Symplecticity

I Mathematically, the previous solution (12) is symplecticI The flow transporting the initial conditions to the s position

along the system of energy H preserves the 2-form:

dpf ∧ dqf = dpi ∧ dqi (13)

I Any integration method verifying this condition is called ansymplectic integrator.

I A symplectic method conserves the volume (LiouvilleTheorem, and more generally the Poincare invariants)

I Remarks: A Taylor development truncated at order n doesnot verify most of the time the symplectic condition

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 22 / 53

Page 12: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Symplecticity

I In addition, we ask for the energy conservation. If theHamiltonian is non integrable, such a scheme may notexist in general (Ge and Marsden, 1998).

I However this symplectic integrator conserves theHamiltonian H seen as a perturbed system H

H = H+∑k≥1

skHk (14)

where Hk is a function of the derivative of order j ≤ k de H(Yoshida, 1990a, 1990b).

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 23 / 53

Explicit Symplectic Integrators: Construction Principle

I Let us write the Hamiltonian as H = A + εBI We look for an approximate Hamiltonian flow~x f = esLH~x i by a product of integrable flows esLA and esLεB .

I LA and LεB do not commute in general

The Baker-Campbell-Hausdorff (BCH) theorem states

esLAesLεB = esLH (15)

with the formal Hamiltonian:

H = A + εB +s2{A, εB}+ s2

12({A{A, εB}}+ {εB{εB,A}}) +

s3

24{{{A, εB},A}, εB}+ . . . (16)

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 24 / 53

Page 13: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Applications of BCH Theorem

Simplest symplectic integrator of first order is:

esLH = esLAesLεB +O(sε) (17)

Using the BCH theorem 15 arbitrary order n integrators (Sn)can be built:

Sn(s) =n∏

i=1

eci sLAedi sLεB (18)

where the coefficients (ci ,di)i=1..n are found in order to obtain arest of order n: O(snε). It can be easy shown the the twofollowing properties have to be met (exercise):

n∑i=1

ci = 1 etn∑

i=1

di = 1 (19)

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 25 / 53

Symmetric integrators

From now on we study time reversal or symmetricintegrators, i.e. S−1

n (s) = Sn(−s). Show that by constructionthese integrators are of even rest O(s2nε).

The famous integrator of order 2 leapfrog integrator is writtenas (Ruth, 1983):

S2 = ec1sLAed1sLεB ec1sLA (20)

avec c1 = 12 et d1 = 1.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 26 / 53

Page 14: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Yoshida SchemeI Using the work of Yoshida (1990), a fourth order

integrator can be built by composing second orderintegrators.

S4(s) = S2(as)S2(bs)S2(as) (21)

Noticing that the total step has to be s and second orderterm have to be canceled, one gets:{

2a + b = 12a3 + b3 = 0

⇐⇒

a = 1

2−213

b = − 213

2−213

(22)

I Generally Yoshida has proven that a 2n + 2 orderintegrator can be built from 2n order integrators by meansof the symplectic scheme:

S2n+2(s) = S2n(as)S2n(bs)S2n(as) (23)

One gets easily that : a = 12− 2n+1√2

et b = −2n+1√2

2− 2n+1√2.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 27 / 53

Application to Ruth and Forest Scheme4th order symplectic integrator (Ruth 1983, Forest and Ruth1990)

S4(s) = ed1sLAec2sLεB ed2sLAec3sLεB ed2sLAec2sLεB ed1sLA (24)

with c2 = 11+α , c3 = (α− 1)c2︸ ︷︷ ︸

−1.7024

, d1 = c22 , d2 = αd1, and

α = 1− 213 .

RUTH(b)(a) SABA1

B

A

A

B

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 28 / 53

Page 15: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Application to 6th Order Integrator6th order integrator S6 (Yoshida, 1990)

S6(s) = S2(ds)S2(cs)S2(bs)S2(as)S2(bs)S2(cs)S2(ds) (25)

with 3 sets of coefficients (cf. Tab. 1) but always a big negativestep

Solution 1 Solution 2 Solution 3a -0.117767998417887E1 -0.213228522200144E1 +0.152886228424922E2b +0.235573213359357E0 +0.426068187079180E2 -0.214403531630539E1c +0.784513610477560E0 +0.143984816797678E1 +0.144778256239930E1d 1-2(a+b+c)

Table: Three sets of coefficients for building a 6th order symplecticintegrator using Yoshida method. In every case, there is a bignegative step since Eq. 19 has to be satisfied: d + 2(a + b + c) = 1.

Negative steps give numerical instabilities: in practice we nevergo beyond 6th order integration.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 29 / 53

McLachlan (1995) and Laskar Scheme (2001)

�� ��Avoiding negative steps & decreasing the number of terms to evaluate

SABA and SBAB ClassesLet us split the Hamiltonian into two parts A et B, symmetricsymplectic integrators can be obtained from one of the twoclasses SABAk and SBABk :

SABA2n : ec1sLA ed1sLεB . . . ednsLεB ecn+1sLA ednsLεB . . . ed1sLεB ec1sLA

SABA2n+1 : ec1sLA ed1sLεB . . . ecn+1sLA edn+1sLεB ecn+1sLA . . . ed1sLεB ec1sLA (26)

SBAB2n : ed1sLεB ec2sLA ed2sLεB . . . ednsLεB ecn+1sLA ednsLεB . . . ed2sLεB ec2sLA ed1sLεB

SBAB2n+1 : ed1sLεB ec2sLA ed2sLεB . . . ecn+1sLA edn+1sLεB ecn+1sLA . . . ed2sLεB ec2sLA ed1sLεB

NB: k is the number of evaluations of eck sLA (edk sLεB ) operators.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 30 / 53

Page 16: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

First ApplicationsI For example the second order leapfrog integrator (Eq. 20)

belongs to the SABA1: H = A + εB +O(s2ε).I the 4th order Forest and Ruth integrator (Eq. 24) belongs

to SABA3 with H = A + εB +O(s4ε).Two negative steps in this method give absolute valuelarger than 1: d1 ≈ 0.6756, d2 ≈ −0.1756, c2 ≈ 1.3512 etc3 ≈ −1.7024.�� ��For large integration steps, lost of efficiency (high cost, num. instab.)

I Suzuki (1991) demonstrated the impossibility to build up ansymplectic integrator or order higher that n > 2 with onlypositive steps.

I Nevertheless this problem can be partly solvedIndeed the small parameter ε has not been exploited upto now.

I Solution: computing (cj ,dj) of the integrators Eq. 26 to geta rest of order O(snε+ s2ε2) instead of O(snε).

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 31 / 53

Second Order ClassExample of 4th order integrator SABA2:

SABA2 = ec1sLAed1sLεB ec2sLAed1sLεB ec1sLA (27)

with a unique solution for the coefficients:

d1 =12, c1 =

12(1− c2), and, c2 =

1√3

with

H = A + εB + s2ε2(− 1

24+

c1

4

){{A,B},B}+O(s4ε)︸ ︷︷ ︸

O(s4ε+s2ε2)

(28)

Similarly for integrator SBAB2, on gets,

SBAB2 = ed1sLεB ec2sLAed2sLεB ec2sLAed1sLεB (29)

with the unique triplet:d1 = 1

6 , d2 = 23 et c2 = 1

2NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 32 / 53

Page 17: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Improvementif A is quadratic in the momenta and B depends only of thepositions, the scheme can be improved by introduction acorrector term C (Laskar and Robutel, 2000):

C = e−s3ε2 c2 L{{A,B},B} (30)

where c is chosen to cancel the term of order O(s2ε2).Remark: the corrector term introduces a negative step whichdecreases with the order of the integration scheme.

n SABAn SBABn1 1/12 −1/242 (2−

√3)/24 1/72

Table: Coefficient c for the corrector for SABAn et SABAn (Laskarand Robutel, 2000)

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 33 / 53

Application

Typical symplectic scheme for SABA2 integrator:

SABAC2 = e−s3ε2 c2 L{{A,B},B}SABA2e−s3ε2 c

2 L{{A,B},B} (31)

the integrator is still symmetric with a rest of orderO(snε+ s4ε2).

In theory, the Yoshida scheme can be used to build anintegrator of order 2n + 2 using an integrator of order 2n, with:

S2n+2(s) = S2n(s)S2n(cs)S2n(s) (32)

by choosing the c term in such a way that the 2n order term iscanceled i.e. c = −2

12n+1 . In practice, this new integrator has a

step 2 + c, with c ≈ 1. Nevertheless the cost is around threetimes more expensive than that the cost of the S2n integrator.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 34 / 53

Page 18: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Bounded Error of Symplectic Integrators

Remarkable Properties

I High stabilityI Slow phase shift with timeI Error is bounded

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0 2000 4000 6000 8000 10000 12000 1400016000 18000 20000

N

SABAC2

-2

-1

0

1

2

0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000

N

RUTH

-6e-14

-4e-14

-2e-14

0

0 100 200 300 400 500 600 700 800 900 1000

∆E

/E

N

exact

-3e-08

-2e-08

-1e-08

0

1e-08

0 100 200 300 400 500 600 700 800 900 1000

∆E

/E

N

SABAC2

-9e-08

-6e-08

-3e-08

0

3e-08

0 100 200 300 400 500 600 700 800 900 1000

∆E

/E

N

SBABC2

0

1e-07

2e-07

3e-07

4e-07

5e-07

0 100 200 300 400 500 600 700 800 900 1000

∆E

/E

N

RUTH

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 35 / 53

Computation Accuracy

Application fora combined dipole

4th order integratorsForest and Ruth (1990)SABAC2 and SBABC2

-11

-10

-9

-8

-7

-6

-5

-4

-1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0

log

10

(∆E

/E)

log10(s)

RUTHSBABC2SABAC2

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 36 / 53

Page 19: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Outline

Introduction

Numerical integration

Integration Methods

Symplectic Integration ab Ovo

Refresher on Hamiltonian Mechanics

Application to Single ElementStraight sectionDipole or Bending MagnetsQuadrupole MagnetsMultipole Magnets

Conclusion

ReferencesNPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 37 / 53

Local Hamiltonian Approach

I Motion with respect to areference particle.

I Canonical variables(x ,px), (y ,py ), (l , δ)

I Time-like variable s

Potential vector (Ax , Ay , As)

I Maxwell equationsI SymmetriesI Longitudinal rectangular

magnetic profile

H = −(1+h(s)x)√(1 + δ)2 − (px − eAx)2 − (py − eAy )2−eAs+δ+1

(7)

−eAs(x , y) = Re

( ∞∑n=1

bn + jan

n(x + jy)n

)(8)

with h(s) = 1/ρ(s).an and bn coefficients: skew and normal 2n–poles

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 38 / 53

Page 20: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Straight Section: Definition & EquationI Element of length L without magnetic field (eAs = 0).I Linear equation: the cinematic term is approximated at first

order (paraxial or small angle approximation).I Hamiltonian in rectangular coordinates (h = 0) (cf. Eq. 7)

H(x , y , l ,px ,py , δ) =p2

x + p2y

2(1 + δ)(33)

I (x , y , l) are cyclic coordinates so their conjugatedmomentum is a first integral of the motion

dxds = px

1+δdyds =

py1+δ

dlds = − p2

x +p2y

2(1+δ)2

dpxds = 0dpyds = 0dδds = 0

(34)

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 39 / 53

Straight Section: Transfer Map

The differential system 34 is fully integrablex f = x i + pi

x1+δs

y f = y i +pi

y1+δs

l f = l i − (pix )2+(pi

y )2

2(1+δ)2 s

pf

x = pix

pfy = pi

y

δf = δ

(35)

where the i et f are the canonical coordinates respectivelyat entrance and exit of the straight section of L = s.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 40 / 53

Page 21: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Dipole Magnets: Definition & Equations

I Element with a curvature radius ρc and a length LI On average it curves the particle trajectory by an angleθ = L/ρc

I Assumption: ρc = ρ = h−1

I Potential for a dipole magnet: −eAs = h(s)(

x + x2

2ρc

)I Quadratic term in x means a horizontal purely geometric

focusing.I Hamiltonian in curvilinear coordinates using Eq. 7:

H(x , y , l ,px ,py , δ) = (1+hx)p2

x + p2y

2(1 + δ)−hx(1+δ)+h

(x +

x2

2ρc

)(36)

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 41 / 53

Combined Dipole: General case

I Hamiltonian H(x , y , l ,px ,py , δ) is derived from equations 7and 8:

H =p2

x + p2y

2(1 + δ)+ hx

p2x + p2

y

2(1 + δ)− hx(1 + δ) + h(x + h

x2

2) +

b2

2(x2 − y2)

=p2

x + p2y

2(1 + δ)+ hx

p2x + p2

y

2(1 + δ)− hδx + h2 x2

2+

b2

2(x2 − y2)

(37)

with b2 the gradient termI Term of small machine: often neglected (e.g. BETA,

TRACY) except in MAD (Iselin, 1985b) source ofchromaticities.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 42 / 53

Page 22: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Combined dipole: Reduction of the Hamiltonian

I Approximations: large rings, small angle, and hard edgeI Reduction of the Hamiltonian to:

H(x , y , l ,px ,py , δ) =p2

x + p2y

2(1 + δ)− hδx + h2 x2

2+

b2

2(x2 − y2)

(38)

I Equations of motion:dxds = px

1+δdyds =

py1+δ

dlds = − p2

x +p2y

2(1+δ)2 − hx

dpxds = hδ − (h2 + b2)xdpyds = b2ydδds = 0

(39)

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 43 / 53

Combined Dipole: Transfer MapI Equations 39 are fully integrable.I We prefer to use the previous symplectic integration

scheme (more stable numerical solutions).I Hamiltonian split into 2 parts: A (straight section or drift)

and B (multipole or kick). Sometimes called kick–driftmethod.

H = A+B with A =p2

x + p2y

2(1 + δ)and B = −hδx + h2 x2

2+

b2

2(x2 − y2)

(40)

I Conditions for using an integrator of class SABAn orSBABn

I Computation is eased up: only one Poisson bracket tocompute!

esLA :

x f = x i + pi

x1+δs

y f = y i +pi

y1+δs

l f = l i − (pix )2+(pi

y )2

2(1+δ)2 s − hx is − h pix

1+δs2

2

pf

x = pix

pfy = pi

y

δf = δ

(41)NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 44 / 53

Page 23: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Combined Dipole: Transfer Map (ii)I Transfer map for B part

esLB :

x f = x i

y f = y i

l f = l i

pf

x = pix −

((b2 + h2)x i − hδ

)s

pfy = pi

y + b2y isδf = δ

(42)

I Improvement of the integration scheme with adding acorrector term given by the double Poisson bracketC = {{A,B},B}:

{{A,B},B} = 11 + δ

((α+ kx)2 + b2

2y2)

(43)

with α = −δh et k = b2 + h2.I Corrector transfer map:

esL{{A,B},B} :

{x f = x i

y f = y i

{pf

x = pix −

2k(α+kx i )1+δ s

pfy = pi

y −2b2

21+δy is

(44)

with s = −s3 c2 cf. Eq. 30.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 45 / 53

Quadrupole Magnet: Definition & Equation

I Element of length L and gradient b2 = K focusing thebeam in on plane and defocusing it in the other one.

I Small angle approximation and hard-edge modelI Hamiltonian in rectangular coordinates 7 et 8 :

H(x , y , l ,px ,py , δ) =p2

x + p2y

2(1 + δ)+

K2(x2 − y2) (45)

I Equation of motion are (l is cyclic):dxds = px

1+δdyds =

py1+δ

dlds = − p2

x +p2y

2(1+δ)2

dpxds = −Kxdpyds = Kydδds = 0

(46)

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 46 / 53

Page 24: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Quadrupole Magnet: Direct Integration

I Direct integration for K > 0:

x f = cos(ωs)x i + 1ω(1+δ)

sin(ωs)pix

y f = cosh(ωs)y i + 1ω(1+δ)

sinh(ωs)piy

l f = l i + ∆l

pf

x = −ω(1 + δ) sin(ωs)x i + cos(ωs)pix

pfy = ω(1 + δ) sinh(ωs)y i + cosh(ωs)pi

y

δf = δ

(47)

with ω =√

K1+δ

, s = L and

∆l =14ω

(12

sin(2ωs)− ωs)

(x i )2 −14ω

(12

sinh(2ωs)− ωs)

(y i )2

−14

1(1 + δ)2

(sin(2ωs)

2ω+ s)

(pix )2 −

14

1(1 + δ)2

(sinh(2ωs)

2ω+ s)

(piy )2

(48)

12

sin2(ωs)

1 + δx i pi

x −12

sinh2(ωs)

1 + δy i pi

y

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 47 / 53

Multipole Magnets

I Sextupole magnet of length L and strength b3 = SI Small machine approximation and hard-edge model.I Hamiltonian in rectangular coordinates Eq. 7 and 8

H(x , y , l ,px ,py , δ) =p2

x + p2y

2(1 + δ)︸ ︷︷ ︸A(px ,py ,δ)

+S3

(x3 − 3xy2)︸ ︷︷ ︸B(x ,y)

(49)

I Equations of the motion (l est cyclique) :dxds = px

1+δdyds =

py1+δ

dlds = − p2

x +p2y

2(1+δ)2

dpxds = −S(x2 − y2)dpyds = 2Sxydδds = 0

(50)

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 48 / 53

Page 25: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

Generalization to 2n-poles

I 2-n pole of length L and strength bn

H(x , y , l ,px ,py , δ) =p2

x + p2y

2(1 + δ)︸ ︷︷ ︸A(px ,py ,δ)

+bn

nRe((x + jy)n)︸ ︷︷ ︸

B(x ,y)

(51)

I A(px ,py , δ) is the Hamiltonian of a straight sectionI Integration of B(x , y)

esLB x i :

x f = x i

y f = y i

l f = l i

pf

x = pix − bnRe(x + jy)n−1 s

pfy = pi

y + bnIm(x + jy)n−1 sδf = δ

(52)with s = L.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 49 / 53

Outline

Introduction

Numerical integration

Integration Methods

Symplectic Integration ab Ovo

Refresher on Hamiltonian Mechanics

Application to Single Element

Conclusion

References

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 50 / 53

Page 26: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

ConclusionI General methods have been given to integrate the

equations of motion governed by a Hamiltonian system.I Symplectic integrators are the best candidate when

space phase volume and energy have to be conservedI Symplectic integrators have remarkable properties. They

are well adapted for long term integration (tracking overmany turns, computation of the motion of celestial bodiesover million of years ...).

I Their error is bounded and its size depends of theintegrator order chosen

I They are easy to construct and of use, cost effective.I Examples of tracking through a few few standard magnets

have been givenI The next step is to have a refined Fourier analysis tool

for exploring the (beam) nonlinear dynamics.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 51 / 53

Outline

Introduction

Numerical integration

Integration Methods

Symplectic Integration ab Ovo

Refresher on Hamiltonian Mechanics

Application to Single Element

Conclusion

References

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 52 / 53

Page 27: Dynamics in Circular Accelerators Symplectic Integrators applied …npac2013.lal.in2p3.fr/2010-2011/Cours/AccConcepts/... · 2013-02-27 · Symplectic Integrators applied to Beam

References I

Ruth, R. : 1983, A canonical Integration Technique, IEEETrans. Nucl. Sci., Ns-30, pp. 2669–2671

Forest, E., Ruth, R.D. : 1990, Fourth-order symplecticintegration, Physica D, vol. 43(1), pp. 105–117

Yoshida, H. : 1990a, Conserved Quantities of SymplecticIntegrators for Hamiltonian Systems, Preprint

Yoshida, H. : 1990b, Construction of high order symplecticintegrators, Phys. Let. A, vol. 150, No. 5–7, pp. 262-268

Forest, E. : 1998, Beam Dynamics: a new Attitude andFramework, Harwood Academic Publisher

Laskar, J., Robutel, P.: High order symplectic integrators forperturbed Hamiltonian systems, Celestial Mechanics andDynamical Astronomy, Vol. 80, No. 1., pp. 39–62.

NPAC 2010–2011 (v1.4) Laurent S. Nadolski Symplectic Integrators 53 / 53