SMMETRIC AND SMPLECTIC METHODS FOR GROCENTER DNAMICS IN TIME-INDEPENDENT MAGNETIC FIELDS by Beibei Zhu, Zhenxuan Hu, ifa Tang and Ruili Zhang Report No. ICMSEC-5-3 November 25 Research Report Institute of Computational Mathematics and Scientific/Engineering Computing Chinese Academy of Sciences
International Journal of Modeling, Simulation, and Scientific Computing c World Scientific Publishing Company SMMETRIC AND SMPLECTIC METHODS FOR GROCENTER DNAMICS IN TIME-INDEPENDENT MAGNETIC FIELDS Beibei Zhu LSEC, ICMSEC, Academy of Mathematics and Systems Science Chinese Academy of Sciences, Beijing 9, P.R. China zhubeibei@lsec.cc.ac.cn Zhenxuan Hu School of Software, Fudan University, Shanghai 223, P.R. China huzhenxuan7@outlook.com ifa Tang LSEC, ICMSEC, Academy of Mathematics and Systems Science Chinese Academy of Sciences, Beijing 9, P.R. China tyf@lsec.cc.ac.cn Ruili Zhang Department of Modern Physics and School of Nuclear Science and Technology University of Science and Technology of China, Hefei, 2326, P.R. China rlzhang@ustc.edu.cn Received (Day Month ear) Accepted (Day Month ear) We apply a second order symmetric Runge-Kutta method and a second order symplectic Runge-Kutta method directly to the gyrocenter dynamics which can be expressed as a non-canonical Hamiltonian system. The numerical results show the overwhelming superiorities of the two methods over a higher-order non-symmetric non-symplectic Runge-Kutta method in long-term tracking ability and near energy conservation. Furthermore, they are much faster than the midpoint rule applied to the canonicalized system to reach given precision. Keywords: Symmetric Runge-Kutta Method; Symplectic Runge-Kutta Method; Numerical Accuracy; Near Energy Conservation. Introduction The gyrocenter dynamics of charged particles in time-independent magnetic fields is a non-canonical Hamiltonian system. We apply a second order symmetric Runge- Kutta method and a second order symplectic Runge-Kutta method directly to Corresponding author
2 B. Zhu et al. the dipole magnetic field and the Tokamak magnetic field, the numerical results show the overwhelming superiorities of the two methods over a higher-order nonsymmetric non-symplectic Runge-Kutta method in long-term tracking ability and and near energy conservation. Furthermore, we show that the first two methods are much faster than the midpoint rule applied to the canonicalized Hamiltonian system. The dynamics of charged particle in magnetized plasma has two components: the fast gyromotion and the slow gyrocenter motion, which rises as a multi-scale problem. One way to resolve the problem is separating the fast gyromotion from the slow guiding center motion. The gyrokinetic theory has been developed,2,3 based on this idea. More generally, gyrokinetics is a useful tool for simulating low-frequency microinstabilities in magnetized plasma. After elimination of the high-frequency elements in the formulation, the gyrokinetic equations usually form a non-canonical Hamiltonian system. Then, the numerical integrators can be adopted for simulating the system. Standard numerical integrators, such as the high-order Runge-Kutta methods, guarantee small error for each single time step. However, they are incapable to prevent error from accumulating over long time integration, which results in large deviations even for sufficiently small step-sizes. Symmetric/revertible methods have been investigated by many researchers and shown to have some good properties which are desired for numerical experiment 4,5. Symplectic integrators, well-known for their long-term tracking ability and global conservation properties, can maintain the numerical accuracy and nearly preserve the energy of the system in long time numerical simulation 5,6,7,8,9,,,2. For non-canonical Hamiltonian systems, since the standard symplectic integrators are not applicable, a common way is to transform them into canonical ones by using coordinate transformations 3,4,5,6, then apply integrators for the canonicalized systems to perform numerical experiments, or equivalently, directly construct symplectic numerical methods via generating functions technique 7,8. Such canonicalization still has two major drawbacks: difficulty in obtaining the coordinate transformation and high computational complexity in numerical simulation. So it is preferable to use symmetric methods and sympletic methods directly to simulate the gyrocenter dynamics without canonicalization. In the literature, we will apply a second order symmetric Runge-Kutta method and a second order symplectic Runge-Kutta method directly to the non-canonical system to simulate the particle s motion. We will show the superior long-term tracking ability and near energy-preserving property of the first two methods, in comparison with a standard third order Rung-Kutta method. Furthermore, the CPU times of the two methods are found to be much less than the midpoint rule applied to the canonicalized system. The paper is organized as follows. A brief introduction to the gyrocenter system and its non-canonical-coordinate expressions are given in Section 2. In Section 3, the conceptions and properties of symmetric Runge-Kutta methods and
symmetric and symplectic methods for gyrocenter dynamics in time-independent magnetic fields 3 symplectic Runge-Kutta methods are displayed. Section 4 presents all the numerical results for comparisons, generated by applying a second-order symmetric nonsymplectic Runge-Kutta method, a second-order symplectic non-symmetric Runge- Kutta method, a third-order non-symmetric non-symplectic Runge-Kutta method to the non-canonical system, and by applying the midpoint rule to the canonicalized system. Finally in Section 5, we give a brief summary of this work. 2. Gyrocenter dynamics The Lagrangian of the gyrocenter system has the expression 2 L(, Ẋ, u, u) = [A() + ub()] Ẋ [ 2 u2 + µb() + ϕ()], where represent the guiding center position, µ is the magnetic moment, u is the parallel velocity of the guiding center and ϕ() is the scalar potential. A() = (A, A 2, A 3 ) is the vector potential which is normalized by cm/e, B() = A is the magnetic field, B() = B and b() = B/B = (b, b 2, b 3 ) is the unit vector along the direction of the magnetic field. The gyrocenter equation is given by the Euler-Lagrange equations of L with respect to = (x, y, z) and u K(v) v = H(v), () where v = (, u), H is a Hamiltonian, given by H(v) = 2 u2 + µb() + ϕ() and K(v) is an antisymmetric matrix with K(v) = a 2 a 3 b a 2 a 23 b 2 a 3 a 23 b 3 b b 2 b 3 It is easy to check that a 2 = ( A 2 x A y ) + u( b 2 x b y ), a 3 = ( A 3 x A z ) + u( b 3 x b z ), a 23 = ( A 3 y A 2 z ) + u( b 3 y b 2 z ). det(k(v)) = a 3 b a 3 b 2 + a 2 b 3 2. If det(k(v)), Equation. () can be rewritten as a non-canonical Hamiltonian system v = K (v) H(v) (2)
4 B. Zhu et al. with K (v) = det(k) b 3 b 2 a 23 b 3 b a 3 b 2 b a 2 a 23 a 3 a 2 Here K(v) = (k lm ) is a non-degenerate matrix which satisfies the Jacobi identity k lm v n + k mn v l + k nl v m =, l, m, n 4.. 3. Symmetric and symplectic methods We consider the system of differential equation Ż = f(z), Z R 2n. (3) Symmetry is an important property of numerical methods which is highly relevant to the order of accuracy and the geometric properties of the solution. Definition (see Refs. 4-5) A numerical method Φ τ is called symmetric (or revertible) if Φ τ Φ τ = id. Denoting by φ τ (Z ) the phase flow of equation (3), i.e. the exact solution Z(τ) after one time step τ with initial condition Z() = Z. The numerical flows Φ τ obtained by numerical methods for (3) can approximate φ τ for sufficiently small step-size τ. A method has order p if it satisfies the following formula: Φ τ (Z) = φ τ (Z) + O(τ p+ ). It is well known that symmetric methods have even order. Symplectic methods have a global conservative property for Hamiltonian systems which guarantees that the energy error is bounded by a small number for sufficiently small time steps. For canonical Hamiltonian system Ż = J H(Z), J = ( ) In, (4) I n a numerical method Φ τ : Z Z is symplectic if and only if it satisfies [ Z ] [ J Z ] = J, (5) Z Z for any sufficient small step-size τ and any Hamiltonian H. It is well known that symplectic methods can preserve the structure of the Hamiltonian system (4).
symmetric and symplectic methods for gyrocenter dynamics in time-independent magnetic fields 5 Therefore it is a common way to apply symplectic methods to simulate Hamiltonian systems. But in this literature, we choose to use symplectic methods to non-canonical Hamiltonian system. For non-canonical Hamiltonian system (2), the phase flow φ τ (v) is a oneparameter group of K-symplectic transformations with the definition as follows: [ φ τ ] T [ (v) φ K(φ τ τ ] (v) (v)) = K(v). v v K-symplectic methods are usually very difficult to find for (2). According to Darboux s theorem 9,2, there exists a coordinate transformation Z = ψ(v) that transforms (2) into a canonical Hamiltonian system like (4) with new Hamiltonian H = H ψ. Many researcher were devoted to canonicalizing the non-canonical Hamiltonian system (2) (see Refs. 4-6). But it is not an easy task to acquire the corresponding coordinate transformation. And symmetric and symplectic methods had been shown to have good behavior in simulating the Ablowitz-Ladik model which is a non-canonical Hamiltonian system (see Ref. 2). So we want to apply symmetric methods and symplectic methods directly to (2) for numerical simulation. 3.. Symmetric and symplectic Runge-Kutta methods Runge-Kutta schemes 22,23 form an important class of numerical methods for integrating the ordinary differential equations. An s-stage Runge-Kutta method is given by Z = Z + τ K i = Z + τ s b i f(k i ), i= s a ij f(k j ), j= where b i and a ij are real numbers and τ is the step-size. The properties of a Runge- Kutta method, such as the symmetry, the symplecticity and its order, are determined by its coefficients. An algebraic characterization of symmetric Runge-Kutta methods was first p- resented by Stetter 4. Theorem (see Ref. 4) A Runge-Kutta method is symmetric if and only if there exists a permutation σ of {, 2,..., s} such that for i, j s, b σ(i) = b i, b σ(j) a σ(i)σ(j) = a ij. The systematic study of symplectic Runge-Kutta methods started around 988, and its algebraic characterization has been found 7,8,9. Symplectic Runge-Kutta (6)
6 B. Zhu et al. methods are widely used among symplectic methods because of their simple form and their stability. As is well know that for Hamiltonian systems, a Runge-Kutta method (6) is symplectic if b i b j b i a ij b j a ji =, i, j m. 4. Numerical simulations In this section, a second order symmetric Runge-Kutta method, a second order (canonically) symplectic Runge-Kutta method and a third order non-symmetric and non-symplectic Runge-Kutta method are applied to simulate the dynamics of gyrocenters in the dipole magnetic field and in the Tokamak magnetic field. In addition, the CPU time of the midpoint rule applied to the canonicalized system is compared with that of the first two methods. Scheme : a second order symmetric non-symplectic Runge-Kutta method 2. In this paper, this method is used to demonstrate that all the benefits in the simulations only come from symmetry. The method is displayed as follows: v n+ = v n + 2 τf(w ) + 2 τf(w 2), W = v n + 6 τf(w ) + 4 τf(w 2), (7) W 2 = v n + 4 τf(w ) + 3 τf(w 2). Scheme 2: a second-order symplectic non-symmetric Runge-Kutta method 2. This method is used to exclude the influence of symmetry and demonstrate the superiority of the symplecticity. v n+ = v n + 4 τhf(w ) + 3 4 τf(w 2), W = v n + 8 τf(w ) + 3 6 τf(w 2), (8) W 2 = v n + 3 6 τf(w ) + 3 8 τf(w 2). Scheme 3: a third-order non-symmetric and non-symplectic Runge-Kutta method 6. This method is of higher order than the above two schemes, so it is fair to make comparisons. The expression of this method is displayed here: v n+ = v n + 2 τf(w ) + 2 τf(w 2), W = v n + 3 3 6 τf(w ) 6 τf(w 2), W 2 = v n + 3 6 τf(w ) + 3 6 τf(w 2). (9)
symmetric and symplectic methods for gyrocenter dynamics in time-independent magnetic fields 7 Method symmetric Runge-Kutta symplectic Runge-Kutta Midpoint Rule CPU time (s) 32.85 3.32 8.48 Scheme 4: the midpoint rule 6. It should be noticed that this method is applied to the canonicalized system. This method is of one stage which is simpler than Schemes and 2. To compare the CPU time of this method with that of Schemes and 2, if the latter ones are less than the former one, the superiority of Schemes and 2 will be more obvious. ( ) Zn+ + Z n Z n+ = Z n + τf. () 2 4.. Dipole magnetic field In this subsection, we present the non-canonical-coordinate expression of the dipole magnetic field. We choose the vector potential to be ( ) My A() = r 3, Mx r 3,, () where r = x 2 + y 2 + z 2 and M is a constant. Via simple calculation, we have the magnetic field B(), the field strength B() and the unit magnetic field b(): ( B() = M 3xz 3yz, M r5 r 5, M 2z2 x 2 y 2 ) r 5, B() = M r r 2 + 3z 2 r 5, ( 3xz b() = r r 2 + 3z, 3yz 2 r r 2 + 3z, x 2 y 2 ) 2 2z2 r. r 2 + 3z 2 The comparison of the particle s motion in dipole magnetic field calculated by Scheme and 2 with Scheme 3 is shown in Fig.. We set the constant M to be, and µ be.. The initial condition v is chosen to be [,,,.]. It can be seen that the obtained orbits are accurate over long time for Scheme and 2, but extending outwards for Scheme 3. The numerically resulted values of the Hamiltonian H at discrete temporal points are nearly identical for Scheme and 2, but decrease without bound for Scheme 3. We have also displayed in Fig. 2 the orbit and the scaled energy ratio (H/H ) of Scheme 4 applied to the canonical system with the coordinate transformation given in 6 and the numerical result is satisfactory. With the same step-size τ and same number of steps, we have calculated the CPU time of Scheme and 2 applied to the non-canonical system and Scheme 4 applied to the canonical system. One observes from Table that the CPU time of Scheme 4 is about three times of that of the former two schemes. (2)
8 B. Zhu et al..5 Scheme.5 Scheme 2.5.5.5.5.5.4.6.8 2 2.2 2.4 2.6 2.8.5.4.6.8 2 2.2 2.4 2.6 2.8 (a) (b).5 Scheme 3 5 scheme scheme 2 scheme 3.5 5.5 (H/H )* 2 5 2.5.4.6.8 2 2.2 2.4 2.6 2.8 (c) 25 5 5 2 25 3 t/s (d) Fig.. The numerical results in dipole field. Fig. (a) is the orbit obtained by the symmetric Runge-Kutta method, Fig. (b) by the symplectic Runge-Kutta method and Fig. (c) by the standard third-order Runge-Kutta method. Fig. (d) display the evolution of the Hamiltonian H of the three schemes where H represent the initial energy. The time-step size is τ =.5 and the number of steps is N=6. 4.2. Tokamak magnetic field In this subsection, the above four methods are employed to solve the non-canonical Hamiltonian system (2) in Tokamak magnetic field with two different initial conditions which lead to the two well-known particle s orbits: the banana orbit and the transit orbit. The vector potential is chosen to be A = B r 2 2Rq e ζ ln( R ) R B e z + B R z R 2 2R e R, (3) where R = x 2 + y 2, and B, R and q are constants. One easily writes out the magnetic field B(), the field strength B() and the unit magnetic field b() as
symmetric and symplectic methods for gyrocenter dynamics in time-independent magnetic fields 9.5 Scheme 5.2..5.5 (H/H )* 4..2.3.4.5.6.5.4.6.8 2 2.2 2.4 2.6 2.8 (a).7 5 5 2 25 3 35 4 t/s (b) Fig. 2. The orbit and the scaled energy ratio (H/H ) obtained by the midpoint rule applied to the canonicalized system. The time-step size is τ =.. Method symmetric Runge-Kutta symplectic Runge-Kutta Midpoint Rule CPU time (s) (Banana) 3.5 29.83 77.75 CPU time (s) (Transit) 3.48 3.97 77.88 follows B(x) = B r qr e θ + B R R e ζ = B r 2 qr θ B R ζ, B(x) = B r qr 2 + R 2q2, b(x) = ( xz R qy R r 2 + R, yz + R qy 2q2 R r 2 + R, R R ). 2q2 r2 + R 2 q2 We apply Schemes and 2 to the original system to do numerical simulation. Meanwhile, Scheme 3 is compared with the above two schemes. In these examples, B and R are chosen to be and q to be 2. Comparison of numerical results for the banana orbit and energy evolution obtained by the above three methods are displaced in Fig. 3. The initial condition for v is [,,,.436] and that for µ is 2.25 6. The orbits by Scheme and 2 in Fig. 3 (a) and (b) are both closed and accurate over long time but in Fig. 3 (c) the orbit by Scheme 3 is extending outwards and losing the accuracy. Fig. 4 displays the comparison of the transit orbits calculated by the above three schemes with the initial conditions v = [.5,,,.87], µ = 2.448 6. The topological structures of the obtained transit orbits are preserved perfectly by Schemes and 2 but badly destroyed by Scheme 3. Fig. 3 (d) and Fig. 4 (d) are the evolution of the energy of the system obtained by the three schemes and they demonstrate that the corresponding Hamiltonian is preserved very well by Schemes and 2 but increased with time by Scheme 3. (4)
B. Zhu et al..8 Scheme.8 Scheme 2.6.6.4.4.2.2.2.2.4.4.6.6.8.2.4.6.8..8.2.4.6.8. (a) (b).8.6 Scheme 3 7 6 scheme scheme 2 scheme 3.4 5.2.2 (H/H )* 3 4 3 2.4.6.8.2.4.6.8. (c).5.5 2 2.5 3 3.5 4 4.5 5 t/s x 6 (d) Fig. 3. The numerical results of banana orbit in Tokamak magnetic field. Fig. 3 (a) is the orbit obtained by the symmetric Runge-Kutta method, Fig. 3 (b) by the symplectic Runge-Kutta method and Fig. 3 (c) by the standard third-order Runge-Kutta method. Fig. 3 (d) display the scaled energy ratio (given on a exponential scale) of the three methods where H is the initial energy. The time-step size is τ = 2 T/333. We also use Scheme 4 to simulate the banana orbit and the transit orbit in the canonicalized system and the numerical results in Fig. 5 are favorable. We have calculated the CPU time of Schemes, 2 and 4 with the same step-size and same number of steps, we find that for both orbits, the CPU times of Scheme 4 are much longer than those of Scheme and 2 (refer to Table 2). 5. Conclusion In this paper, we have applied a symmetric Runge-Kutta method and a symplectic Runge-Kutta method directly to the non-canonical system of gyrocenter dynamics. In the cases of dipole magnetic field and Tokamak magnetic field as examples, we demonstrate the overwhelming advantages of the two methods. On one hand, the symmetric Runge-Kutta scheme and the symplectic Runge-Kutta scheme have the significant superiority over the standard third-order Runge-Kutta scheme in longterm tracking ability and near energy conservation. On the other hand, the first
symmetric and symplectic methods for gyrocenter dynamics in time-independent magnetic fields.6 Scheme.6 Scheme 2.4.4.2.2.2.2.4.4.6.92.94.96.98.2.4.6.6.92.94.96.98.2.4.6 (a) (b).6.4 Scheme 3 3 2.5 scheme scheme 2 scheme 3.2 2.2 (H/H )* 2.5.5.4.6.92.94.96.98.2.4.6 (c).5.5.5 2 2.5 t/s x 6 (d) Fig. 4. The numerical results of the transit orbit in Tokamak magnetic field. Fig. 4 (a) is the orbit obtained by the symmetric Runge-Kutta method, Fig. 4 (b) by symplectic Runge-Kutta method and Fig. 4 (c) by the standard third-order Runge-Kutta method. Fig. 4 (d) display the evolution of the Hamiltonian value H. The time-step size is τ = 2 T/25. two methods are much faster than the midpoint rule applied to the canonicalized system. Therefore, we conclude that the symmetric Runge-Kutta method and the symplectic Runge-Kutta method are suitable for simulating the particles motions of gyrocenter dynamics. 6. Acknowledgements This research is supported by the ITER-China Program (Grant No. 24GB245) and by the National Natural Science Foundation of China (Grant Nos. 37357 and 5586). References. Littlejohn R. G., A guiding center Hamiltonian: A New Approach, J. Math. Phys. 2:2445-2458, 979. 2. Littlejohn R. G., Variational Principles of Guiding Center Motion, J. Plasma Phys. 29:-25, 983.
2 B. Zhu et al..8.6 Scheme 5..4.2.2.2.4 (H/H )* 4.3.4.5.6.6.8.2.4.6.8. (a).7.5.5 2 2.5 3 3.5 4 t/s x 5 (b).6.4.2 Scheme 5.2.2.4.2 (H/H )* 4.6.8.2.4.6.92.94.96.98.2.4.6 (c).4.6.8.5.5 2 2.5 3 3.5 4 t/s x 5 (d) Fig. 5. The banana orbit and the transit orbit of the midpoint rule applied to the canonical system and their corresponding scaled energy ratio (given on a exponential scale). The time-step size is τ =. 3. Qin H., Tang W. M., Lee W. W., Rewoldt G., Gyrokinetic Perpendicular Dynamics, Phys. Plasmas 6:575-588, 999. 4. Stetter H. J., Analysis of discretization methods for ordinary differential equations, Berlin-Heidelberg-New ork, Springer, 973. 5. Feng K., Formal power series and numerical algorithms for dynamical systems, in Proceedings of International Conference on Scientific Computation (Huangzhou 99, editors: T. Chan and Z. Shi), Singapore: World Scientific, pp. 28-35, 992. Also in Collected Works of Feng Kang (II), National Defence Industry Press, Beijing, pp. 93-2, 995. 6. Feng K., On Difference Schemes and Symplectic Geometry, in Proceedings of 984 Beijing Symposium on Differential Geometry and Differential Equations (edited by K. Feng), Science Press, Beijing, pp. 42-58, 985. 7. Lasagni F. M., Canonical Runge-Kutta methods, ZAMP 39: 952-953, 988. 8. Sanz-Serna J. M., Runge-Kutta Schemes for Hamiltonian Systems, BIT 28:877-883, 988. 9. Suris,. B., On the conservation of the symplectic structure in the numerical solution of Hamiltonian systems (in Russian), In: Numerical Solution of Ordinary Differential Equations (ed. S.S. Fillppov), Keldysh Institute of Applied Mathematics, UUSR Academy of Sciences, Moscow, 48-6, 988.
symmetric and symplectic methods for gyrocenter dynamics in time-independent magnetic fields 3. Channell P. J., Scovel J. C., Symplectic Integration of Hamiltonian Systems, Nonlinearity 3:23-259, 99.. Sanz-Serna J. M., Calvo M. p., Numerical Hamiltonian Problems, Chapman and Hall, London, 994. 2. K. Feng and M. Z. Qin, Symplectic Geometric Algorithms for Hamiltonian System, Springer, New ork, 29. 3. Tang., Pérez-García V. M., Vázquez L., Symplectic Methods for the Ablowitz-Ladik Model, Appl. Math. Computa. 82:7-38, 997. 4. White R., Zakharov L. E., Hamiltonian guiding center equations in toroidal magnetic configurations, Phys. Plasmas, :573-576, 23. 5. Gao H., u J., Nie J., ang J., Wang G., in S., Liu W., Wang D., Duan P., Hamiltonian Canonical Guiding Center Equations Constructed Under a Nested Magnetic Flux Coordinates System, Phys. Scr. 86:6552, 22. 6. Zhang R., Liu J., Tang., Qin H., iao J., Zhu B., Canonicalization and Symplectic Simulation of the Gyrocenter Dynamics in Time-Independent Magnetic Fields, Phys. Plasmas 2:3254, 24. 7. Feng K., Wang D., Symplectic Difference Schemes for Hamiltonian Systems in General Symplectic Struture, J. Comput. Math. 9:86-96, 99. 8. Schober C., Symplectic integrators for the Ablowitz-Ladik discrete nonlinear Schrödinger equation, Phys. Lett. A 259:4-5, 999. 9. S. Sternberg, Lectures on Differential Geometry, Prentice Hall, 964. 2. Arnold V. I., Mathematical Methods of Classical Mechanics, Springer, 978. 2. Zhang R., Huang J., Tang., Vázquez L., Revertible and Symplectic Methods for the Ablowitz-Ladik Discrete Nonlinear Schrödinger Equation, in GCMS Proceedings of the 2 Grand Challenges on Modeling and Simulation Conference, Society for Modeling & Simulation International, Vista, CA, pp. 297-36, 2. 22. Butcher J. C., Implicit Runge-Kutta Processes, Math. Comput. 8:5-64, 964. 23. Iserles A., A First Course in the Numerical Analysis of Differential Equations, Cambridge University Press, 996.