Chapter 1 and Beam Accelerator Physics Group, Journal Club November 9, 2010 and Beam NSLS-II Brookhaven National Laboratory 1.1 (70)
Big Picture for Numerical Accelerator Physics and Beam For single particle dynamics: Particle tracking is everything for a complex ring. (integrator) and physics quantities are in the map : betatron oscillation, spin,... Map can be extracted from the tracking. (TPSA) Map analysis gives every quantity we want: twiss, emittance, (normal form) Here we focus on how to calculate the physics, instead of how to use it. 1.2 (70)
and Beam 1 1.3 (70)
and Beam 1 2 1.3 (70)
and Beam 1 2 3 Implicit s 1.3 (70)
and Beam 1 2 3 Implicit s 4 1.3 (70)
Introduction Over the last century (19th) attention has shifted from the computation of individual orbits towards the qualitative properties of families of orbits. For example, the question of whether a given orbit is stable can only be answered by studying the development of all orbits whose initial conditions are in some sense close to those of the orbit being studied. M. V. Berry and Beam The objective is to answer some questions (what-why-how) and to give some real life examples 1 What is symplecticness, in algebra, in geometry? 2 Why we have to use symplectic integrator? 3 How to prove the symplecticness of an integrator? 4 Popular symplectic integrators. 5 Symplectic integrators in beam dynamics. Particle tracking in different magnets. 1.4 (70)
Hamilton Equations I and Beam Hamilton equations dq i dt = H p i, dp i dt = H q i, (1) or in a compact form dz dt = J zh(z, t) (2) where z (q, p) T, q, p R d, z R 2d, and ( ) 0 Id J I d 0 The solution is a transformation mapping (flow map): (q, p) = Φ t0 t,h(q 0, p 0 ) or simply φ t,h if we set t 0 = 0 as the starting time. (3) 1.5 (70)
Hamilton Equations II and Beam The flow map φ t,h given by a Hamiltonian system has semi-group property, i.e. closed under composition operator: φ t+s,h = φ t,h φ s,h When t = 0, the flow map φ 0,H is the identity map. φ t,h φ t,h = I When using difference method to simulate the evolution of a dynamical system, the time is discretized at t 0, t 1,..., t n, the semi-group property is not exactly hold in general, but only up to certain order of step size. 1.6 (70)
Hamiltonian flow maps are symplectic and Beam A transformation (flow map) z = ψ z z is symplectic if [ψ z (z)] T Jψ z (z) = J Theorem (Poincare 1899) The flow map φ t,h (z) of a Hamiltonian system is symplectic Proof. The Jacobian of the flow map F(t) z φ t,h(z) has F(0) = I 2d. K F(t) T JF(t) is a constant, i.e. dk dt = 0. 1.7 (70)
is the preservation of area η T Jξ is the oriented area of the parallelogram determined by η and ξ For a parallelogram P having a fixed vertex at (q, p), and two vectors as sides, η and ξ. The parallelogram P after transformation ψ has sides ψ z η and ψ z ξ. Vertex (q, p) are now ψ(q, p). Now P and P have same area if and only if η T ψ z T Jψ z ξ = η T Jξ Clearly, this holds if and only if ψ z T Jψ z = J and Beam Figure: Symplectic map preserves the area 1.8 (70)
Preservation of area: differential forms I We can use differential forms as an alternative language to express the preservation of area. The meaning and properties of differential forms is outside of this discussion of numerical simulation, (Arnold 1989, chapter 7). The algebraic manipulation is easy, and good enough to prove the preservation of area. The wedge product of ω 1 (ξ 1, ξ 2 ) and ω 2 (ξ 1, ξ 2 ) is defined as (ω 1 ω 2 )(ξ 1, ξ 2 ) = ω 11(ξ 1, ξ 2 ) ω 12 (ξ 1, ξ 2 ) ω 21 (ξ 1, ξ 2 ) ω 22 (ξ 1, ξ 2 ) =ω 1 (ξ 1, ξ 2 )ω 2 (ξ 1, ξ 2 ) ω 2 (ξ 1, ξ 2 )ω 1 (ξ 1 ξ 2 ) (4) and Beam It is the oriented area of a parallelogram determined by ω 1 and ω 2 in (ω 1, ω 2 ) plane. 1.9 (70)
Preservation of area: differential forms II z = (q, p ) is given by the map ψ z (z), and we have dp = p p dp + p q dq, The wedge product is dp dq = p p + p q dq = q p q p dp dp + p p q p dq dp + p q the wedge product is skew symmetric, q dp + dq (5) q q dp dq q q dq dq q (6) dp dp = dq dq = 0, dp dq = dq dp (7) Then for one degree of freedom (d = 1) dp dq = ( p p q q p q q )dp dq = p p p q p p q q dp dq q (8) and Beam 1.10 (70)
Preservation of area: differential forms III The invariant of dp dq is equivalent to det ψ z (q, p) = 1, i.e. the preservation of area. (for 2 2 matrix, det M = 1 is equivalent to M T JM = J). In General case, d > 1, the transformation ψ is symplectic if an only if dp 1 dq 1 + + dp d dq d = dp 1 dq 1 + + dp d dq d (9) and Beam or dp dq = dp dq (10) We can use this to check if a numerical algorithm is symplectic or not. Suppose ψ z (z) maps from one iteration z n (t n ) to the next z n+1 (t n+1 ), i.e. an integrator, we can check whether it is symplectic by proving dp n+1 dq n+1? = dpn dq n (11) The concatenated map of two symplectic map is symplectic. This is obvious from the invariant of dp i dq i. 1.11 (70)
Remarks on symplecticness and differential two-forms and Beam is an alternative language to describe the preservation of area. For one-degree-of-freedom systems, symplecticness implies preservation of area (differential 2-form). For higher dimensions, the conservation of volume follows from Liouville s theorem (differential 2n-form). is stronger than conservation of volume. In the following sections we can see differential 2-form is easier to use in proving the symplecticness of a numerical integrator. 1.12 (70)
Numerical Integrator I A systems of differential equations and Beam dx dt = f(t, x) (12) where x = (x 1, x 2,..., x n ) T and f(t, x) = (f 1 (t, x),..., f n (t, x)) T. Using t as independent variable and evaluate x at discretized time point t 0, t 1,, t n,. We define h i t i = t i t i 1 or simply h as the current step size in each iteration. Explicit Euler (Forward Euler) Implicit Euler (backward Euler) x n+1 = x n + hf(x n ) (13) Implicit Midpoint(symplectic, order 2) x n+1 = x n + hf(x n+1 ) (14) x n+1 = x n + hf( x n + x n+1 ) (15) 2 1.13 (70)
Numerical Integrator II and Beam Explicit 4th order Runge-Kutta k 1 =f(t n, x n ) k 2 =f(t n + h 2, x n + h 2 k 1) k 3 =f(t n + h 2, x n + h 2 k 2) k 4 =f(t n + h, x n + hk 3 ) x n+1 =x n + h 6 (k 1 + 2k 2 + 2k 3 + k 4 ) (16) 1.14 (70)
Euler Method, a simple example, non-hamiltonian and Beam x n+1 = x n + hf(x n ) (17) It is a first-order integrator, therefore x(t n ) will approach the true solution linearly as h 0. 1.15 (70)
Simple Harmonic Oscillator I and Beam For simple harmonic oscillator H = p 2 + q 2 (18) with initial condition q 0 = 0, p 0 = 1, the solution is q = sin t, p = cos t. The period T = 2π. The solutions are circles in phase space, they are concentric for differential initial conditions. What is wrong in the following numerical solutions? 1.16 (70)
Simple Harmonic Oscillator II and Beam Figure: Forward Euler method: x n+1 = x n + hf (x n), step size h = 2π/12 1.17 (70)
Simple Harmonic Oscillator III and Beam Figure: Backward (implicit) Euler method: x n+1 = x n + hf (x n+1), step size h = 2π/12 1.18 (70)
Simple Harmonic Oscillator IV and Beam Figure: RK4 method, step size h = 2π/5. 1.19 (70)
Simple Harmonic Oscillator V and Beam Figure: RK4 Gauss method (symplectic), step size h = 2π/5. integrate with longer time. 1.20 (70)
Pendulum and Beam Figure: Area preservation of the flow of Hamiltonian system [8] 1.21 (70)
Lennard-Jones oscillator I and Beam H = T + V, V φ L.J. (r) = ɛ[( r r ) 12 ( r r ) 6 ] (19) Figure: Euler method, h = 0.0002, 180k steps 1.22 (70)
Lennard-Jones oscillator II and Beam Figure: RK4, h = 0.0002, 180k steps 1.23 (70)
Lennard-Jones oscillator III and Beam Figure: Stormer-Verlet, second order, h = 0.0002, 180k steps. 1.24 (70)
Lennard-Jones oscillator IV and Beam Figure: Stormer-Verlet, second order, step size h 2 = 10h = 0.002, 18k steps. 1.25 (70)
Some remarks on symplectic integrator and Beam A.K.A Geometric Integrator A.K.A Canonical Integrator. classical theories of numerical integration give information about how well different methods approximate the trajectories for fixed times as step sizes tend to zero. Dynamical systems theory asks questions about asymptotic, i.e. infinite time, behavior. Geometric integrators are methods that exactly conserve qualitative properties associated to the solutions of the dynamical system under study. The difference between symplectic integrators and other methods become most evident when performing long time integrations (or large step size). Symplectic integrators do not usually preserve energy either, but the fluctuations in H from its original value remain small. 1.26 (70)
and Beam In general, one size fits all doesn t happen a lot. When solving numerical Hamiltonian problems, we will treat our problems differently. 1 Composition method, if H is separable as solvable pieces, e.g. H(q, p) = T(p) + V(q). 2 Implicit method, if H can not be solved by parts. We start from the general case where H can not be solved by parts. 1.27 (70)
Euler-A and Euler-B are symplectic integrator I For Hamilton equations dq dt = ph dp dt = qh (20) Using differential two-forms we can prove Euler-A and Euler-B method described in the following are symplectic. They are first order, but we will not prove here (will not prove any order condition in this talk). Euler-A and Beam q n+1 = q n + t p H(q n+1, p n ) p n+1 = p n t q H(q n+1, p n ) (21) Euler-B q n+1 = q n + t p H(q n, p n+1 ) p n+1 = p n t q H(q n, p n+1 ) (22) 1.28 (70)
Euler-A and Euler-B are symplectic integrator II We prove Euler-B is symplectic by proving and Beam dq n+1 dp n+1 = dq n dp n (23) From Equation. (22) we have dq n+1 = dq n + t[h pq dq n + H pp dp n+1 ] (24) dp n+1 = dp n t[h qq dq n + H qp dp n+1 ] (25) where H qp, H pp and H qq are Jacobian matrix H qq = 2 H q i q j, H qp = 2 H q i p j, H pp = 2 H p i p j, Using the skew symmetry and bilinear property H pq = H T qp (26) da db = db da, da (αdb+βdc) = αda db+βda dc (27) We have dq n H qq dq n = 0, dp n H pp dp n = 0 (28) 1.29 (70)
Euler-A and Euler-B are symplectic integrator III and Beam dq n+1 dp n+1 = dq n dp n+1 + th pq dq n dp n+1 (29) while dq n dp n+1 = dq n dp n th T qpdq n dp n+1 (30) We used da Adb = (A T da) db (31) So dq n+1 dp n+1 = dq n dp n (32) Euler-B method is symplectic. Similarly we can prove Euler-A is also symplectic. Now, we have a first order, implicit, symplectic integrator. (disappointed at first order and implicit?) How about higher order? 1.30 (70)
Runge-Kutta Methods and I The most popular RK4 method can be written as k 1 =f (t n, x n ) k 2 =f (t n + h/2, x n + hk 1 /2) k 3 =f (t n + h/2, x n + hk 2 /2) k 4 =f (t n + h, x n + hk 3 ) x n+1 =x n + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ) (33) and Beam 0 1 1 2 2 1 1 2 0 2 1 0 0 1 1 6 2 6 2 6 1 6 Figure: Explicit RK4 [8, Hairer 2006] 1.31 (70)
Runge-Kutta Methods and II Let b i, a ij, (i, j = 1,..., s) be real numbers and let c i = s j=1 a ij. An s-stage Runge-Kutta method is given by [8] k i = f(t 0 + c i h, x 0 + h x 1 = x 0 + h s a ij k j ), j=1 i = 1,..., s (34) s b i k i i=1 The explicit Runge-Kutta methods have a ij = 0 whenever i j. The coefficients are usually displayed as c 1 a 11 a 1s... c s a s1 a ss b 1 b s and Beam 1.32 (70)
Symplectic Runge-Kutta methods I Conditions for symplectic Runge-Kutta methods and Beam Assume the coefficients of the method (34) satisfy the relations b i a ij + b j a ji b i b j = 0, i, j = 1,..., s (35) Then the method is symplectic. The proof using differential forms can be found in ref. [4]. Same as the proof for Euler-A and Euler-B method, we need to prove the differential 2-form is conserved. Now for arbitrary form of H, we have a 4th order symplectic integrator, but it is still implicit as shown in the following lemma. Lemma Symplectic Runge-Kutta methods are necessarily implicit, i.e. a ij 0 for some i, j 1, 2,..., s, j i A class of RK methods usually called Gauss methods meet this condition: 1.33 (70)
Symplectic Runge-Kutta methods II and Beam 1 s = 1 1/2 1/2 1 2 s = 2 1 2 3 6 1 2 + 3 6 1 4 1 4 + 3 6 1 4 3 6 1 4 3 s = 3 1 2 1 2 1 2 15 10 1 2 5 36 5 36 + 15 24 2 9 15 15 2 9 5 36 15 30 5 36 15 24 1 2 + 15 10 5 36 + 15 30 2 9 + 15 15 5 36 5 18 4 s = 4 can be found in ref. [1] 4 9 5 18 1.34 (70)
Symplectic Runge-Kutta methods III 1 2 ω2 ω1 ω 1 ω 3 + ω 4 ω 1 ω 3 ω 4 ω 1 ω 5 1 2 ω 2 ω 1 ω 3 + ω 4 ω 1 ω 1 ω 5 ω 1 ω 3 ω 4 1 2 + ω 2 ω 1 + ω 3 + ω 4 ω 1 + ω 5 ω 1 ω 1 + ω 3 ω 4 1 2 + ω2 ω1 + ω5 ω 1 + ω 3 + ω 4 ω 1 + ω 3 ω 4 ω 1 and Beam 2ω 1 2ω 1 2ω 1 2ω 1 15+2 30 35, ω 1 = 1 8 30 144, ω 1 = 1 8 + 30 144, ω 2 = 1 2 15 2 30 35, ω 3 = ω 2 ( 1 6 + 30 ω 2 = 1 2 ω 4 = ω 2 ( 1 21 + 5 30 ω 5 = ω 2 2ω 3. 5 s = 5 can be found in ref. [1] 24 ), ω 3 = ω 2 ( 1 6 30 24 ), 168, ω 4 = ω 2 ( 1 21 5 30 168, ω 5 = ω 2 2ω 3, 1 2 ω2 ω1 ω 1 ω3 + ω 4 1 2 ω 2 ω 1 ω 3 + ω4 ω 1 1 2 ω 1 + ω 7 ω 1 + ω 7 1 2 + ω 2 ω 1 + ω 3 + ω4 ω 1 + ω 6 1 2 + ω2 ω1 + ω6 ω 1 + ω3 + ω 4 32 225 ω5 ω 1 ω3 ω 4 ω 1 ω 6 32 225 ω 5 ω 1 ω 6 ω 1 ω 3 ω4 32 225 ω 1 ω 7 ω 1 ω 7 32 225 + ω 5 ω 1 ω 1 + ω 3 ω4 32 225 + ω5 ω 1 + ω3 ω 4 ω 1 1.35 (70)
Symplectic Runge-Kutta methods IV and Beam ω 1 = 322 13 70 3600, ω 1 = 322+13 70 3600, ω 2 = 1 35+2 70 2 63, ω 2 = 1 35 2 70 2 63, ω 3 = ω 2 ( 452+59 70 3240 ), ω 3 = ω 2 ( 452 59 70 3240 ), ω 4 = ω 2 ( 64+11 70 1080 ), ω 4 = ω 2 ( 64 11 70 1080 ), ω 5 = 8ω 2 ( 23 70 405 ), ω 5 = 8ω 2 ( 23+ 70 405 ), ω 6 = ω 2 2ω 3 ω 5, ω 6 = ω 2 2ω 3 ω 5, ω 7 = ω 2 ( 308 23 70 960 ), ω 7 = ω 2 ( 308+23 70 960 ). 1.36 (70)
Remarks on Integrating a General Hamiltonian System and Beam What we know so far: Explicit Euler method is not symplectic. No explicit RK method is symplectic. Implicit Midpoint method is symplectic. (did not prove) Euler-A and Euler-B are first order symplectic. RK method with Gauss scheme are symplectic These are for general form of f(x). i.e. no special form of Hamiltonian are assumed. What about H(q, p) = T(p) + V(q) or H(q, p) = H 1 (q, p) + H 2 (q, p) where H 1 and H 2 are solvable? We always hear about drift-kick, what does it really mean for symplectic integrator. 1.37 (70)
Partitioned Euler Method I If H = T(p) + V(q), then Euler-A and Beam becomes q n+1 = q n + t p H(q n+1, p n ) p n+1 = p n t q H(q n+1, p n ) (36) q n+1 = q n + t p T(p n ) p n+1 = p n t q V(q n+1 ) (37) It is explicit now, and a drift-kick scheme. Euler-B q n+1 = q n + t p H(q n, p n+1 ) p n+1 = p n t q H(q n, p n+1 ) (38) becomes q n+1 = q n + t p T(p n+1 ) p n+1 = p n t q V(q n ) (39) This is a kick-drift scheme 1.38 (70)
Stormer-Verlet Scheme and Beam p n+1/2 = p n t 2 qv(q n ) (40) q n+1 = q n + tp n+1/2 (41) p n+1 = p n+1/2 t 2 qv(q n+1 ) (42) We will see that Stormer-Verlet method, which is popular in molecule dynamics simulations, is a second order symplectic integrator. 1.39 (70)
Composition and Symmetry I? H = T + V φ t,t+v = φt,t φ t,v If the above is true, for H = T(p) + V(q), the over all order will depend on the integrator used in T(p) and V(q). We may choose a higher order explicit integrator for it. Theorem If H = H 1 + H 2 + + H n is any splitting into twice differentiable terms, then the composition method Ψ t = φ t,h1 φ t,h2 φ t,hn (43) is (at least) a first order symplectic integrator. This can be proved from the Taylor expansion of φ t,h1 (φ t,h2 (z)). and Beam Even H i are exactly solvable, the overall effect may be only first order. 1.40 (70)
Composition and Symmetry II and Beam Here comes the symmetry. The adjoint method of Ψ t is defined by Ψ t = [Ψ t] 1 ( t t, z n z n+1 ). Euler-A is the adjoint method of Euler-B. A method is symmetric if Ψ t = Ψ t. We can prove that Ψ t = Ψ t/2 Ψ t/2 is symmetric. Theorem The order of a symmetric method is necessarily even (nothing to do with the symplecticness). Compose Euler-A and Euler-B together, we have a symmetric second order symplectic integrator. drift(half)-kick(half)-kick(half)-drift(half). 1.41 (70)
Keppler Problems I and Beam H = T(p) + V(q) = p2 1 + p2 2 2 + 1 q 2 1 + q 2 2 (44) The solution in polar coordinate is r = a(1 e2 ) 1 ± e cos θ, the a eccentricity of the ellipse is e = 2 b 2 a, a,b are semimajor and 2 semiminor axis. 1.42 (70)
Keppler Problems II and Beam Figure: Euler-A and Euler-B, step size h = 0.0015 The angular momentum are exactly conserved, because it is the differential 2-form. 1.43 (70)
Keppler Problems III and Beam Figure: RK4, step size h = 0.0015 1.44 (70)
Keppler Problems IV and Beam Figure: Euler-A and Euler-B, step size h 2 = 10h = 0.015 With larger step size, quantitatively the results changed, but qualitatively the result did not change. 1.45 (70)
Keppler Problems V and Beam Figure: RK4, step size h 2 = 10h = 0.015 1.46 (70)
Keppler Problems VI and Beam Figure: Euler-A and Euler-B, step size h 3 = 100h = 0.15 1.47 (70)
Keppler Problems VII and Beam Figure: RK4, step size h 3 = 100h = 0.15 1.48 (70)
Keppler Problems VIII and Beam Figure: Euler-A and Euler-B, step size h 4 = 120h = 0.18 1.49 (70)
Keppler Problems IX and Beam Figure: RK4, step size h 4 = 120h = 0.18 1.50 (70)
Keppler Problems X and Beam Figure: SV, step size h 4 = 120h = 0.18 1.51 (70)
Generating Function I and Beam R. Ruth and K. Feng developed symplectic integrator independently using generating functions. The generating function methods 1 use generating function to get the iteration scheme, and 2 the new Hamiltonian are approximated to certain order of step size. These two points guarantee the symplecticness and the order. Ruth s method (1983) [2] General Third Order 1.52 (70)
Generating Function II H = g(p) + V(x, t), f = x V and Beam p 1 =p 0 + c 1 hf(x 0, t 0 ) p 2 =p 1 + c 2 hf(x 1, t 0 + d 1 h) p =p 2 + c 1 hf(x 0, t 0 ) x 1 =x 0 + d 1 h dg dp (p 1) x 2 =x 1 + d 2 h dg dp (p 2) x 1 =x 0 + d 3 h dg dp (p) (45a) (45b) (45c) where c 1 = 7/24, c 2 = 3/4, c 3 = 1/24, d 1 = 2/3, d 2 = 2/3, d 3 = 1. Feng and Qin (Implicit)[3] p i =p 0 i hh qi ( p + p 0, q + q 0 ) h3 2 2 4! (H p jp kq i H qj H qk + 2H pjp k H qjq i H qk 2H pjq kq i H pj H qk 2H pjq k H pjq i H qk (46a) 2H pjq k H pj H qkq i + 2H qjq k H pjq i H pk + H qjq kq i H pj H pk ) q i =q 0 i + hh pi ( p + p 0 2, q + q 0 ) + h3 2 4! (H p jp kp i H qj H qk + 1.53 (70)
Generating Function III and Beam 2H pjp k H qjp i H qk 2H pjq kp i H pj H qk 2H pjq k H pjp i H qk (46b) 2H pjq k H pj H qkp i + H qjq kp i H pj H pk + 2H qjq k H pjp i H pk ) where subscripts of H are partial derivatives, e.g. H pjp kq i = 3 H p j p k q i. Same indices are summed up according to Einstein rules. Solve the wrong problem in a right way K. Feng 1.54 (70)
and Yoshida Scheme I and Beam Yoshida developed a method, for H = T(p) + V(q), a 2n-th order symplectic integrator can be constructed from 2(n-1)-th order symplectic integrators. the solution of linear differential equation z = Az is z = e ta e ta e tb e t(a+b) in general Using BCH formula, e ta e tb = e t(a+b)+t2 /2[A,B]+ e td For H = T(p) + V(q), T(p) and V(q) are solvable (as in Euler-A and Euler-B methods) The symmetry can make the integrator be even order. Discretize the time step e hh = e c1ht e d1hv e cnht e dnhv e hk Use BCH form to approximate K to H up to certain order of step size h, and solves for c i and d i. This can be generalized to nonlinear differential equation z = f (z). 1.55 (70)
and Yoshida Scheme II A 2n + 2-order integrator can be constructed by three 2n-order integrators [5]: and Beam S 2n+2 (τ) = S 2n (z 1 τ)s 2n (z 0 τ)s 2n (z 1 τ) (47) where (there is a typo in Yoshida s paper) z 0 = 21/(2n+1) 2 2, z 1 1/(2n+1) 1 = (48) 2 2 1/(2n+1) They are solved from the order condition z 0 + 2z 1 = 1, z 2n+1 0 + 2z 2n+1 1 = 0. 1.56 (70)
and Yoshida Scheme III and Beam Figure: 2nd order symplectic integrator of Yoshida s scheme. Composed by Euler-A and Euler-B method. Figure: 4th order symplectic integrator of Yoshida s scheme. It is composed by three second order integrators symmetrically. 1.57 (70)
and Yoshida Scheme IV and Beam Figure: 6th order symplectic integrator, composed by three 4th order symplectic integrators. The step 4 and 5 can be combined, so can step 8 and 9. 1.58 (70)
Comments on Generating Function and and Beam Yes, using the generating function, we have canonical transformation, it is symplectic. But what about the order? Yes, Lie algebra can give us canonical transformation, e :f : z is symplectic, but e :f : = n=0 1 n! :f :n, it may be not symplectic if the trucation are not careful. 1.59 (70)
Transverse Beam I and Beam H = (1 + x ρ ) p 2 (p x ea x ) 2 (p z ea z ) 2 ea s (49) Where s is the independent variable. B x = 1 h s A s z, If p x and p z are small, B z = 1 h s A s x, h s = 1 + x/ρ (50) H p(1 + x ρ ) + 1 + x/ρ [(p x ea x ) 2 (p z ea z ) 2 ] ea s (51) 2p Divided by p 0, the norminal momentum, δ = (p p 0 )/p 0, choose A x = A z = 0, A s 0, now p x is p x /p 0, p y is p y /p 0. K = (1 + x ρ ) (1 + δ) 2 p 2 x p 2 z ea s p 0 (52) 1.60 (70)
Transverse Beam II and Beam For a sector dipole B 0 ρ = e/p 0 for on momentum particle, B x = 0, B z ρ = e/p 0, and eas p 0 = e p 0 B z (x + x2 2ρ ) = x ρ x2 2ρ 2 For drift K = (1 + x ρ ) (1 + δ) 2 p 2 x p 2 z + x ρ + x2 2ρ 2 (53) K 1 = (1 + δ) 2 p 2 x p 2 z (54) 1.61 (70)
Transverse Beam III and Beam p x (s) = p x (55) dx ds = p x/ (1 + δ) 2 p 2 x p 2 z (56) p z (s) = p z (57) dz ds = p z/ (1 + δ) 2 p 2 x p 2 z (58) δ(s) = δ (59)? = K 1 δ = 1 + δ (60) (1 + δ)2 p 2 x p 2 z (61) 1.62 (70)
Transverse Beam IV For dipoles, it is not in the form of H = T(p) + V(q) that we are familiar. Etienne gives a split of K [9, Forest 2006]: K = (1 + x ρ ) (1 + δ) 2 p 2 x p 2 z + b 1 (x + x2 2ρ ) b 1 (x + x2 2ρ ) ea s }{{}}{{} H 1 H 2 (62) Each part are analytically solvable for arbitrary b n 0. and Beam p Hamiltonian 0 Systems x(s) = ρ ( 1 (1 + p t) 2 p x(s) 2 p 2 y b 1 ρ dpx(s) b 1) (63) ds p x(s) = p x cos( s ρ ) + ( (1 + p t) 2 p 2 x p2 y b1(ρ + x)) sin( s ρ ) (64) y(s) = y + pys b + py (sin 1 p x ( ) sin 1 p x(s) ( )) 1ρ b 1 (1 + p t) 2 p 2 y (1 + p t) 2 p 2 y p y(s) = p y, p t(s) = p t (66) (1 + pt)s t(s) = t + + 1 + pt (sin 1 p x ( ) sin 1 p x(s) ( )) b 1ρ b 1 (1 + p t) 2 p 2 y (1 + p t) 2 p 2 y (67) (65) (68) 1.63 (70)
Transverse Beam V and Beam For straight magnet, ρ. K = T(p) + V(q). Yoshida scheme works well. 1.64 (70)
Summary I is a fundamental geometric property for Hamiltonian system that an integrator should preserve. Using differential 2-form, we can prove the symplecticness of an integrator. Symmetry may increase the order of an integrator. For most of the case, H = T(p) + V(q), composition methods are convenient. We can have an integrator up to arbitrary order (not necessary the most efficient integrator). Sector dipole, rectangular dipole and all the straight magnets can be modeled by high order integrator using the exact form of H. and Beam What about matrix code, still has any attractive advantages? Moving to integrator based tracking code? [9, Forest 2006]. 1.65 (70)
Reference I J. C. Butcher, Implicit Runge-Kutta Processes, Mathematics of Computation 18, 50-64 (1964). Ronald D. Ruth, Nuclear Science, IEEE Transactions On 30, 2669-2671 (1983). K. Feng, M. Z. Qin, The symplectic methods for the computation of Hamiltonian equations, In Y. L. Zhu and B. Y. Guo, editors, for Partial Differential Equations, Lecture Notes in Mathematics 1297, pages 1-37. Springer, Berlin, 1987. J. M. Sanz-Serna, Runge-Kutta schemes for Hamiltonian systems, BIT Numerical Mathematics 28, 877-883 (1988). and Beam H. Yoshida, Construction of high order symplectic integrators, Physics Letters A 150, 262 268 (1990). J. M. Sanz-Serna and M. P. Calvo, Numerical Hamiltonian Problems, 1st ed. (Chapman & Hall, 1994). 1.66 (70)
Reference II and Beam Benedict Leimkuhler and Sebastian Reich, Simulating Hamiltonian (Cambridge University Press, 2005). Ernst Hairer, Christian Lubich, and Gerhard Wanner, Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations, 2nd ed. (Springer, 2006). E. Forest, Geometric integration for particle accelerators, Journal of Physics A: Mathematical and General 39, 5321 5377 (2006). 1.67 (70)
Two-form and Beam A two-form on R 2d is a skew-symmetric bilinear function Ω(ξ, η) with arguments ξ and η. The symplectic two-form is defined as Ω(ξ, η) = ξ T Jη ξ, η R 2d (69) The geometric interpretation of the two-form Ω for d = 1 is the oriented are of the parallelogram spanned by the two vectors ξ and η. ξ T Jη = ξ 2 η 1 ξ 1 η 2, ξ = (ξ 1, ξ 2 ) T, η = (η 1, η 2 ) T For d > 1, we define Ω(ξ, η) = d Ω 0 (ξ (i), η (i) ) (70) i=1 where Ω 0 is standard two-form of a pair of vectors. Ω(ξ, η) is the sum of the oriented area of the parallelograms spanned by the pair of vectors ξ (i) and η (i) Differential 1.68 (70)
Examples 1 Free particle in R 3 H = p 2 /2m, (71) and Beam the flow map is ( q + t φ t,h (q, p) = m p ) p (72) 2 The pendulum. 3 Kepler s problem. H = T + V = p2 2 H = T + V = p2 1 + p2 2 2 cos(q). (73) + 1 q 2 1 + q 2 2 (74) 4 Modified Kepler s problem. H = T + V = p2 1 + p2 2 2 + 1 q 2 1 + q 2 2 ɛ 2 q 2 1 + q2 2 (75) 1.69 (70)
Differential k-form I and Beam ω 1 (ξ 1 ) ω 1 (ξ k ) (w 1 w k )(ξ 1,, ξ k ) = ω k (ξ 1 ) ω k (ξ k ) (76) 1.70 (70)