ADAPTIVE THREE-DIMENSIONAL RMS ENVELOPE SIMULATION in the SADAccelerator Modeling Environment*C.K. Allen#, LANL, Los Alamos, NM, USAK. Furukawa, M. Ikegami, K. Oide, KEK, Tsukuba, Ibaraki 305-0801, Japanu* Work supported by KEK under a foreign visiting scientist grant.

Abstract
The capability for three-dimensional RMS envelope simulation,
including space charge, has been implemented in the SAD (forStrategic Accelerator Design) [5] accelerator modeling environment
used at KEK. The dynamics within the model are similar to thatused by Trace3D [3] and TRANSPORT [2]. Specifically, the matrixof all second-order beam moments is propagated using a linear
beam optics model for the beamline. However, the current
simulation employs an adaptive space-charge algorithm. It
maintains the integration step size as large as possible while
enforcing a given error tolerance. We concentrate on the adaptive
nature of the RMS simulation, since this is the novel feature.

u#ckallen@lanl.gov

Simulation Results
7

Smaller steps around“corners”	

6

beta(s ) (m/rad)5
4

XAL hor
XAL ver32

Adaptive Stepping

Background - Linear Beam Optics Model

100.5

1

1.5ε(h) ≡ h3||C||62•Correlation matrix is defined τ ≡ 〈zzT〉•Entrance of each stage is at s ≡ sn so thatτn ≡ τ(sn)⎛ x⎜⎜ xx ʹ′⎜⎜ xy
τ ≡ ⎜
⎜ xy ʹ′
⎜
⎜ xz
⎜
⎜ xδ
⎝

xx ʹ′

xy

xy ʹ′xz

x ʹ′2x ʹ′yx ʹ′y ʹ′x ʹ′z

x ʹ′yy2yy ʹ′yz

x ʹ′y ʹ′yy ʹ′y ʹ′2y ʹ′z
2x ʹ′zyz

y ʹ′zzx ʹ′δyδy ʹ′δzδ•Beamline element n is represented by matrix Φn,sc including space chargexδ ⎞⎟x ʹ′δ ⎟⎟yδ ⎟⎟y ʹ′δ ⎟⎟zδ ⎟⎟δ 2 ⎟⎠

22.5

3

3.5

4s (m)XAL simulation of SNS MEBT (Demonstrates adaptive stepping)•Objective is to find largest hi such that ε(hi) ≤ ε where ε is a given error tolerance.

3025•Use step doubling

Horizontal beta(s) rad/mz ≡ (x, xʹ′, y, yʹ′, z,δ )∈0•Error residual of τ(s+h) for step size h is given by•Phase coordinates z(s) at axial position s is a point in phase space.

τ1(s+2h) ≡ S2h(τ) = τ(s+2h) + (2h)3Cτ2(s+2h) ≡ Sh(Sh(τ)) = τ(s+2h) + 2(h3C)• Let Δ(h) ≡ τ1(s+2h) - τ2(s+2h) so that for any matrix norm || ⋅ ||ε(h) = (1/6)||Δ(h)||20

Trace3DSAD

15

105

•Propagation equations for {τn} are•Assume we are given a step size hi and wish the next step hi+1 to maintain the error ε , that is,τn+1 = Φn,scτn Φn,scT0ε(hi+1) = ε04080120

160200s (m)Φ0τ1u0u

Φ1

τ2u1

Φ2

τ3

τ N-1

ΦN-1

u2

Φn(h) is the transfer matrix for element n w/out space chargeΦsc(h) is the transfer matrix for space aloneu

uN-1

Transfer matrix Φn,sc(h) for element n through length h can be written	

Letting Φ(h) ≡ Φsc(h/2)Φn(h)Φsc(h/2), defineSh(τ) ≡ Φ(h)τΦ(h)TThen if τ(s + h) is exact solution
Sh(τ) = τ(s + h) + h3C
C = τ’’’(s0) some s0 ∈ [s, s+h]from ε(hi+1)/ε(hi) = [hi/hi+1]3, we havesimulation results for SAD versus Trace3D horizontal beta
1/3

Φn,sc(h) = Φsc(h/2)Φn(h)Φsc(h/2) + O(h3)

u

τN"%
6ε'
h	 i+1 = hi $ 1$# τ (s + 2h) − τ 2 (s + 2h) '&Summary
The adaptive integration algorithm is based upon discrete transfer equations forthe correlation matrix and an adaptive step sizing formula which maintains apredetermined error tolerance. At each iteration, the algorithm keeps the step size
as large as possible while maintaining this error tolerance, however it does require
some computational overhead. We must compute three applications of Sh for asingle iteration. Yet each iterate actually propagates τ a distance 2h and,
consequently, must be compared to two applications of Sh. Thus, the adaptive
procedure requires a computational overhead of at least 150% that of a nonadaptive algorithm.
Although a fixed-step approach may then seam faster, what we loose is theguarantee of a given solution accuracy. Moreover, we also lose the guarantee ofself-consistency in the space-charge calculations. In adaptive stepping, in mostcases, we expect a significant computational advantage by taking potentiallymuch larger steps. Considering the overall advantages contrasted with the small
amount of additional code development, the adaptive stepping process appears asa clear benefit in RMS envelope simulation.

Small discrepancy in longitudinalcase. More space charge effect forTrace3D.
SAD is symplectic
Trace3 equations of motion– but still uncertain why this is so.

2000

Longitudinal beta(s) rad/m

τ01500Trace3DSAD

1000

500004080120160200s (m)simulation results for SAD versus Trace3D longitudinal beta

SAD vs Trace3D simulations are of J-PARC transport line between
181 MeV linear accelerator and 3 GeV synchrotron. Beam is H- at30 mA.
In all simulations we have chosen ε = 10-5, δh = 0.05, initial step
size h0 = 3 cm, and used the l1 matrix norm. Trace3D uses aconstant step size of h = 1 cm.