Symplectic integrator

1 Hamiltonian mechanics

1.1 Generalized Momentum

The generalized momentum pi corresponding to the generalized coordinate qi is given by:

pi=∂L∂q˙i

where L is the Lagrangian.

1.2 Hamiltonian

Hamiltonian H is given by:

H⁢(q,p,t)=∑ipi⁢q˙i⁢(q,p)−L⁢(q,q˙⁢(q,p),t)

where L⁢(q,q˙⁢(q,p),t) is the Lagrangian.

1.3 Hamilton’s Equations

q˙i =∂H∂pi
p˙i =−∂H∂qi

Or in vector notation,

𝒛=(𝒒𝒑),J=(0I−I0)
𝒛˙=J⁢∇𝒛H⁢(𝒛)

2 Poisson Bracket

{A⁢(q,p,t),B⁢(q,p,t)}=∑i(∂A∂qi⁢∂B∂pi−∂B∂qi⁢∂A∂pi)
dA⁢(q,p,t)dt={A,H}+∂A∂t

3 Symplectic Condition

Under a canonical transformation (𝒛→𝒘) :

𝒛˙ =J⁢∇𝒛H⁢(𝒛)
𝒘˙ =J⁢∇𝒘H⁢(𝒘)

The Jacobian matrix M is defined as

Mi⁢j=∂wi∂zj

Using the chain rule:

(∇𝒛H)i =∂H∂zi
∂H∂zi =∑j∂H∂wj⁢∂wj∂zi
=∑j(MT)i⁢j⁢(∇wH)j
∇𝒛H⁢(𝒛) =MT⁢∇wH⁢(𝒘)
dwidt =∑j∂wi∂zj⁢dzjdt
wi˙ =∑jMi⁢j⁢zj˙
𝒘˙ =M⁢𝒛˙
=M⁢J⁢∇𝒛H⁢(𝒛)
=M⁢J⁢MT⁢∇𝒘H⁢(𝒘)

Canonical transformation ⇔ the symplectic condition:

M⁢J⁢MT=J

4 Splitting methods for separable Hamiltonians

D^f={⋅,f}
𝒛˙={𝒛,H}=D^H⁢𝒛 (1)

By Taylor expansion:

𝒛⁢(t+Δ⁢t) =∑n=0∞1n!⁢dn𝒛⁢(t)dtn⁢(Δ⁢t)n
=∑n=0∞1n!⁢(Δ⁢t)n⁢D^Hn⁢𝒛⁢(t)
=exp⁡(Δ⁢t⁢D^H)⁢𝒛⁢(t)

Thus, the exact solution of (1) is given by:

𝒛⁢(t)=exp⁡(t⁢D^H)⁢𝒛⁢(0)

If the Hamiltonian is separable,

H⁢(𝒒,𝒑)=K⁢(𝒑)+U⁢(𝒒)

the operator splits as:

D^H ={⋅,H}={⋅,K+U}
={⋅,K}+{⋅,U}
=D^K+D^U
exp⁡(Δ⁢t⁢D^H)=exp⁡(Δ⁢t⁢(D^K+D^U))=exp⁡(Δ⁢t⁢D^K+Δ⁢t⁢D^U)

Because D^K and D^U are non-commutative operators ([D^K,D^U]≠0),

exp⁡(Δ⁢t⁢D^K+Δ⁢t⁢D^U)≠exp⁡(Δ⁢t⁢D^K)⁢exp⁡(Δ⁢t⁢D^U)

(refer to the Baker–Campbell–Hausdorff formula)

Instead, the time-evolution operator exp⁡(Δ⁢t⁢(D^K+D^U)) can be approximated by a product of operators:

exp⁡(Δ⁢t⁢(D^K+D^U))=∏i=k,⋯,1exp⁡(di⁢Δ⁢t⁢D^K)⁢exp⁡(ci⁢Δ⁢t⁢D^U)+𝒪⁢((Δ⁢t)k+1) (2)

where k∈ℕ represents the order of the integrator, and ci,di∈ℝ⁢(i=1,⋯,k) are coefficients chosen such that the residual error is of the order of (Δ⁢t)k+1

In a direct approach, conditions for the coefficients are found by comparing the Taylor expansions of both sides of (2)

exp⁡(Δ⁢t⁢(D^K+D^U)) =∑n=0k1n!⁢(Δ⁢t)n⁢(D^K+D^U)n+𝒪⁢((Δ⁢t)k+1)
exp⁡(di⁢Δ⁢t⁢D^K) =∑n=0k1n!⁢din⁢(Δ⁢t)n⁢D^Kn+𝒪⁢((Δ⁢t)k+1)
exp⁡(ci⁢Δ⁢t⁢D^U) =∑n=0k1n!⁢cin⁢(Δ⁢t)n⁢D^Un+𝒪⁢((Δ⁢t)k+1)

4.1 First-Order Integrator (k=1)

exp⁡(Δ⁢t⁢(D^K+D^U)) =1+Δ⁢t⁢(D^K+D^U)+𝒪⁢((Δ⁢t)2)
exp⁡(di⁢Δ⁢t⁢D^K) =1+di⁢Δ⁢t⁢D^K+𝒪⁢((Δ⁢t)2)
exp⁡(ci⁢Δ⁢t⁢D^U) =1+ci⁢Δ⁢t⁢D^U+𝒪⁢((Δ⁢t)2)
exp⁡(d1⁢Δ⁢t⁢D^K)⁢exp⁡(c1⁢Δ⁢t⁢D^U) =1+Δ⁢t⁢(d1⁢D^K+c1⁢D^U)+𝒪⁢((Δ⁢t)2)

The solution is Lie product formula:

c1=d1=1
exp⁡(Δ⁢t⁢(D^K+D^U))=exp⁡(Δ⁢t⁢D^K)⁢exp⁡(Δ⁢t⁢D^U)+𝒪⁢((Δ⁢t)2)

This corresponds to the Symplectic Euler method.

4.2 Second-Order Integrator (k=2)

exp⁡(Δ⁢t⁢(D^K+D^U)) =1+Δ⁢t⁢(D^K+D^U)+12⁢(Δ⁢t)2⁢(D^K2+D^U⁢D^K+D^K⁢D^U+D^U2)+𝒪⁢((Δ⁢t)3)
exp⁡(di⁢Δ⁢t⁢D^K) =1+di⁢Δ⁢t⁢D^K+12⁢di2⁢(Δ⁢t)2⁢D^K2+𝒪⁢((Δ⁢t)3)
exp⁡(ci⁢Δ⁢t⁢D^U) =1+ci⁢Δ⁢t⁢D^U+12⁢ci2⁢(Δ⁢t)2⁢D^U2+𝒪⁢((Δ⁢t)3)
∏i=2,1exp⁡(di⁢Δ⁢t⁢D^K)⁢exp⁡(ci⁢Δ⁢t⁢D^U) =1+Δ⁢t⁢((d1+d2)⁢D^K+(c1+c2)⁢D^U)
+(Δ⁢t)2⁢(12⁢(d1+d2)2⁢D^K2+12⁢(c1+c2)2⁢D^U2+(d1⁢c1+d2⁢c2)⁢D^K⁢D^U+c2⁢d1⁢D^U⁢D^K)
d1+d2=1,c1+c2=1,d1⁢c1+d2⁢c2=12,d1⁢c2=12
d2=1−d1,c2=1−c1
d1⁢c1+(1−d1)⁢(1−c1)=12,d1⁢(1−c1)=12
2⁢d1⁢c1−d1−c1=−12,d1−12=d1⁢c1
d1−c1=12

Two prominent solutions emerge (Strang Splitting):

c1=12,d1=1,c2=12,d2=0
exp⁡(Δ⁢t⁢(D^K+D^U))=exp⁡(12⁢Δ⁢t⁢D^U)⁢exp⁡(Δ⁢t⁢D^K)⁢exp⁡(12⁢Δ⁢t⁢D^U)+𝒪⁢((Δ⁢t)3)

which correspons to ’kick-drift-kick’ form of leapfrog integration, and

c1=0,d1=12,c2=1,d2=12
exp⁡(Δ⁢t⁢(D^K+D^U))=exp⁡(12⁢Δ⁢t⁢D^K)⁢exp⁡(Δ⁢t⁢D^U)⁢exp⁡(12⁢Δ⁢t⁢D^K)+𝒪⁢((Δ⁢t)3)

which correspons to ’drift-kick-drift’ form of leapfrog integration.

In general, two conditions emerge from the coefficients of D^K and D^U,

∑i=1kci=1,∑i=1kdi=1

and higher order terms provide additional conditions.

However, as noted by Yoshida: “with this direct method, it is almost hopeless to obtain a much higher integrator” [1]. Instead, coefficient sets for higher-order integrators (e.g., k=4) are systematically derived using the Baker–Campbell–Hausdorff formula (see Yoshida [1]).

4.3 Action on Phase-Space Vectors

Because the Hamiltonian is separable,

q˙i=∂H∂pi=∂K∂pi
p˙i=−∂H∂qi=−∂U∂qi
D^K⁢𝒛={𝒛,K}=({𝒒,K}{𝒑,K})
{𝒒,K} =({q1,K}⋮{qn,K})
=(∑i(∂q1∂qi⁢∂K∂pi−∂K∂qi⁢∂q1∂pi)⋮∑i(∂qn∂qi⁢∂K∂pi−∂K∂qi⁢∂qn∂pi))
=(∂K∂p1⋮∂K∂pn)=(q˙1⋮q˙n)=𝒒˙
{𝒑,K} =({p1,K}⋮{pn,K})
=(∑i(∂p1∂qi⁢∂K∂pi−∂K∂qi⁢∂p1∂pi)⋮∑i(∂pn∂qi⁢∂K∂pi−∂K∂qi⁢∂pn∂pi))
=(0⋮0)=𝟎
D^K⁢𝒛={𝒛,K}=(𝒒˙𝟎) (3)
D^K2⁢𝒛={{𝒛,K},K}=({𝒒˙,K}{𝟎,K})=𝟎 (4)
D^U⁢𝒛={𝒛,U}=({𝒒,U}{𝒑,U})
{𝒒,U} =({q1,U}⋮{qn,U})
=(∑i(∂q1∂qi⁢∂U∂pi−∂U∂qi⁢∂q1∂pi)⋮∑i(∂qn∂qi⁢∂U∂pi−∂U∂qi⁢∂qn∂pi))
=(0⋮0)=𝟎
{𝒑,U} =({p1,U}⋮{pn,U})
=(∑i(∂p1∂qi⁢∂U∂pi−∂U∂qi⁢∂p1∂pi)⋮∑i(∂pn∂qi⁢∂U∂pi−∂U∂qi⁢∂pn∂pi))
=(−∂U∂q1⋮−∂U∂qn)=(p˙1⋮p˙n)=𝒑˙
D^U⁢𝒛={𝒛,U}=(𝟎𝒑˙) (5)
D^U2⁢𝒛={{𝒛,U},U}=({𝟎,U}{𝒑˙,U})=𝟎 (6)

Using a Taylor expansion, for α∈ℝ,

exp⁡(α⁢D^U)⁢𝒛 =∑n=0∞αn⁢D^Unn!⁢𝒛=(1+α⁢D^U)⁢𝒛
exp⁡(α⁢D^K)⁢𝒛 =∑n=0∞αn⁢D^Knn!⁢𝒛=(1+α⁢D^K)⁢𝒛
exp⁡(ci⁢Δ⁢t⁢D^U)⁢(𝒒𝒑) =(𝒒𝒑+ci⁢Δ⁢t⁢𝒑˙)
exp⁡(di⁢Δ⁢t⁢D^K)⁢(𝒒𝒑) =(𝒒+di⁢Δ⁢t⁢𝒒˙𝒑)

References

  • [1] H. Yoshida (1990) Construction of higher order symplectic integrators. Physics Letters A 150 (5), pp. 262–268. External Links: ISSN 0375-9601, Document, Link Cited by: §4.2.