Beam Dynamics Codes:
Availability, Sophistication,
Limitations …
ESS Bilbao Initiative Workshop
March 16-18, 2009
Bilbao, Spain
P.N. Ostroumov and B. Mustapha
Argonne National Laboratory
J.-P. Carneiro
Fermi National Accelerator Laboratory
Outline
Beam Dynamics Codes: History and Evolution
General Comments: Codes Availability, Sophistication, Limitations
Comparing Codes to Measurements: An example
Our Side of the Story: Comparing TRACK to few other Codes
Summary & Recommendations to the Users
Presentation of TRACK, If interested
- General Presentation
- Sample TRACK Applications
- Recent & Future Developments
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 2
Beam Dynamics Codes: History
(From R. Ryne’s Talk at HB-2008 Workshop)
CODES, CAPABILITIES & METHODOLOGIES FOR BEAM
DYNAMICS SIMULATION IN ACCELERATORS
IMPACT-Z
PARMELA WARP IMPACT-T
PARMTEQ ML/I
PARMILA SIMPSONS IMPACT Synergia
2D space charge
OPAL
rms eqns 3D space charge ORBIT
GCPIC
TRACK
DA Freq maps
Symp Integ Dynamion
Normal Forms DESRFQ
Integrated Maps BeamPath
COSY-INF BeamBeam3D
MXYZPTLK MAD-X/PTC
MaryLie
…
Dragt-Finn
MAD
Transport Partial list only; Many codes not shown
1980 1990 2000
1970
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 3
Beam Dynamics Codes: Evolution
(From R. Ryne’s Talk at HB-2008 Workshop)
CODES, CAPABILITIES & METHODOLOGIES FOR BEAM
DYNAMICS SIMULATION IN ACCELERATORS
IMPACT-Z
PARMELA WARP IMPACT-T
3D COLLECTIVE
PARMTEQ ML/I
SELF-CONSISTENT
PARMILA
1D, 2D COLLECTIVESIMPSONS IMPACT MULTI-PHYSICS
Synergia
Parallelization begins
2D space charge
OPAL
rms eqns 3D space charge ORBIT
GCPIC
TRACK
DA Freq maps
Symp Integ Dynamion
Normal Forms DESRFQ
Integrated Maps BeamPath
COSY-INF BeamBeam3D
SINGLEMXYZPTLK
MAD-X/PTC
PARTICLE
MaryLie
…
Dragt-FinnOPTICS
MAD
Transport Partial list only; Many codes not shown
1980 1990 2000
1970
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 4
General Comments:
Codes Availability, Sophistication, Limitations
Availability: Many useful beam dynamics codes exist for the
simulation of proton and heavy ion linacs …
- The variety is good but comes also with redundancy …
- A lot of effort is put on benchmarking different codes …
Sophistication: A lot of them are pretty sophisticated
- 3D External and Space Charge Fields.
- Parallel Codes: Simulation of the actual number of particles in a
beam bunch 1E9, 1E12 particles.
- Detailed machine error simulations and corrections
Limitations: Still far from reproducing experimental data or
to be used to support real-time machine operations.
- Some effort is starting at SNS, J-PARC, GSI, …
- At Argonne, TRACK is being developed in this direction ...
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 5
Example of Code-Code and Code-Experiment Benchmarking:
(From L. Groening (GSI), Talk at HB-2008 Workshop)
Schematic set-up of the experiments Comparison: 3 Codes vs experiments
Initial Distribution: Measured in front of DTL
Reconstructed and Input to Simulations
Horizontal Vertical
Horizontal phase space plots at the DTL exit.
Left: σo =35◦; centre: σo =60◦; right: σo =90◦.
The 6D Distribution is parameterized to
The scale is ± 24 mm (horizontal axis)
reproduce the measured 2D projections on
± 24 mrad (vertical axis)
phase space planes
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 6
Our Experience: TRACK versus few other Codes
IMPACT
TRACK TRACEWIN
PARMILA
ASTRA
Ions &
Ions & Ions
Ions
Electrons &
electrons
electrons -
-
(H-)
Multi-beam Multi-beam Single beam
Single beam
Single beam
Support any Most elem. Most elem.
Most elem. No
Less elem.
element No RFQ Calls toutatis
RFQ
No RFQ
1D,2D,3D 1D, 2D,3D 3D fields
Hard-edge
1D, (3D)
fields fields -
2D fields
fields
3D Poisson 3D Poisson 2-3D Poisson
2D Poisson
3D Poisson
Fast Fast Fast
Fast
2-3x slower
Serial/Parallel Serial/Parallel Serial/-
Serial only
Serial only
Errors + Errors + Errors only Errors +
Errors only
Corrections corrections corrections
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 7
FNAL Proton Driver Beam Dynamics: TRACK vs ASTRA
FNAL-PD Linac: RFQ to Linac end
Beam: 0 mA H-
In: W ~ 2.5 MeV, Out: W ~ 8 GeV
ASTRA: Solid curves
TRACK: Dotted curves
Good agreement overall.
FNAL-PD Linac: RFQ to Linac end
Beam: 45 mA H-
In: W ~ 2.5 MeV, Out: W ~ 8 GeV
ASTRA: Solid curves
TRACK: Dotted curves
Good agreement overall.
Reference: “Benchmarking of Simulation Codes TRACK and ASTRA for the FNAL High-
Intensity Proton Source”, J.-P. Carneiro, LINAC-06.
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 9
SNS RFQ Beam Dynamics: TRACK vs PARMTEQ
PARMTEQ
TRACK
SNS-RFQ: 32 mA H-, 1M particles simulated
Emittance: N-RMS Parmteq TRACK
ε-x (mm-mrad) 0.213 0.204
ε-y (mm-mrad) 0.211 0.203
ε-z (deg-keV) 99.63 105.86
References:
“End-to-end Simulation of the SNS Linac using TRACK”, B. Mustapha et al, LINAC-08.
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 10
SNS Linac Beam Dynamics: TRACK vs PARMILA
-3 -3
Δφ-ΔW plane
x 10 x 10
X-X’ plane Y-Y’ plane
SNS linac: 0.2 0.2
ΔWrms (keV/u) Δφrms (deg) Wc (MeV/u)
Xc (cm)
Yc (cm)
DTL section 50
0 0
-0.2 -0.2 0
30
Xrms (cm)
Yrms (cm)
20
0.2 0.2
Beam: 38 mA H- 10
0 0 0
1 1
Xmax (cm)
Ymax (cm)
In W ~ 2.5 MeV 50
0.5 0.5
0
Out W ~ 87 MeV 5
0.125 0.125
4*εx,rms
4*εy,rms
4*εz,rms
4
0.1 0.1
In f = 402.5 MHz 0.075 0.075 3
Out f = 402.5 MHz 2 2
40
εx,100%
εy,100%
εz,100%
1 1
20
0 0 0
PARMILA: Black 5
10 10
αx
αy
TRACK : Blue
αz
0 0 0
-10 -10
-5
0.4 0.4
100
βx
βy
βz
Some differences: 0.2 0.2
0 0 0
- Fringe field in PMQ 0 20 40 0 20 40 0 20 40
Z-distance (m) Z-distance (m) Z-distance (m)
- SC calculations
PARMILA
TRACK
References:
“First TRACK Simulations of the SNS Linac”, B. Mustapha et al, LINAC-06.
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 11
SPIRAL-2 Linac Beam Dynamics: TRACK vs TRACEWIN
End-to-end beam
dynamics for a
0.5 mA A/q=6 ion
beam along the
SPIRAL-2 linac
from the ion
source to end
of the linac.
The results were
not superposed.
But a good
agreement
between TRACK
and TRACEWIN
was observed.
References:
“Preliminary Conceptual Design of a Heavy-Ion Injector for SPIRAL-2 Linac at GANIL”,
Argonne Report to GANIL, unpublished.
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 12
Summary and Recommendations to the Users
Summary:
Many useful beam dynamics codes exist for the simulation of
proton and heavy ion linacs …
With different levels of sophistication …
But they are still far from reproducing experimental data or
to be used to operate an accelerator …
Recommendations to the Users:
For consistency: Use 2-3 codes at least
Start with TRACE-3D or a similar envelope code
PARMILA & PARMTEQ are good to use because it comes
with very good documentation
Final design with error simulations should be done with more
advanced codes such as TRACK, IMPACT, TraceWin
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 13
The Beam Dynamics Code: TRACK
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov
The Beam Dynamics Code: TRACK
TRACK Main Features
A wide range of E-M elements with 3D fields
End-to-end simulations from source to target
Simultaneous tracking of Multiple charge states ion beams
Interaction of heavy ion beams with strippers
Automatic transverse and longitudinal beam tuning
Error simulations for all elements: Static and dynamic errors
Realistic correction procedure: Transverse and Longitudinal
Simulations with large number of particles for large number of seeds
Beam loss analysis with exact location of particle loss
Recent Updates
Possibility of fitting experimental data: beam profiles, …
H- Stripping: Black body, Residual gas and Lorentz stripping
The design and simulation of electron linacs – Genetic optimization
Parallel version is fully developed with good scaling up to 32K processors
Possibility of simulating the actual number of particles in a bunch
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 15
TRACK: Extensive List of Supported Elements
Any type of RF resonator (3D fields)
Static ion optics devices (3D fields)
Radio-Frequency Quadrupoles (RFQ)
Drift Tube Linacs (DTL)
Coupled Cavity Linacs (CCL)
Solenoids with fringe fields (model and 3D fields)
Bending magnets with fringe fields (model and 3D fields)
Electrostatic and magnetic multipoles
Multi- Harmonic Bunchers (MHB)
Axial Symmetric electrostatic lenses
Entrance and exit of HV decks
Accelerating tubes with DC voltage
Transverse beam steering elements
Stripping foils or films for heavy-ion beams
Horizontal and vertical jaw slits
TRACK was heavily used in the design and simulations of the RIA/FRIB
and FNAL-PD linacs and recently in the simulation of the SNS linac.
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 16
TRACK Application: End-to-end Simulation of the SNS Linac
RFQ Simulations Linac simulations from MEBT to HEBT
Envelopes: rms, max Emittances: 4*rms
Envelopes: rms, max Emittances: 4*rms
Phase space plots Phase space plots
LINAC-08
Next steps
Transmission is consistent within ±1%
- Error and beam loss simulations
- Compare with experimental data
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 19
TRACK Application: Design and Simulations of an electron linac
Layout of a linac for a future X-Ray FEL Oscillator 10
Bunch compressor-II
RMS energy spread (MeV)
1
Bunch compressor-I
Energy spread
0.1
Velocity Buncher
12 3 4 5 67 8 9 10 11 12 13
0.01
Energy Filter
1- RF cavity with thermionic cathode, 100 MHz, 1 MV; 2- chicane and
Monochromator
slits; 3- as an energy filter; 4- quadrupole triplet; 5- focusing solenoid; 0.001
6- monochromator of the beam energy, f=600 MHz; 7- buncher, f=300 0 20 40 60 80 100 120
MHz; 8- booster linac section, f=400 MHz; 9- RF cosine-chopper to form Distance (m)
rep. rate 1 MHz to 100 MHz; 10- bunch compressor – I; 11- SC linac 1000
Energy Filter
section, 460 MeV, f=1300 MHz; 12- bunch compressor – II;
Bunch RMS width (psec)
Velocity Buncher
13- initial section of the SC linac, f=1300 MHz. 100
Bunch compressor-I
Beam Simulations Bunch width
10
Bunch compressor-II
1
0.1
0 20 40 60 80 100 120
Distance (m)
0.16
0.14
0.12
Emittance ( m)
Ex
0.1
Ey
Emittance
0.08
0.06
0.04
2 deg 0.02
2% 0
0 2 4 6 8 10 12
See Paper in LINAC-08 Distance (m)
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 20
TRACK Application: Realistic Corrective Steering in HINS Linac
1
Virtual monitors and correctors are used 0.5
Xctr (cm)
Beam centers and angles
0
-0.5
before and after corrections
Mon Mon
Corr Corr Corr Corr Corr Corr -1
0 5 10 15 20 25 30 35
Z distance (m)
10
X’ctr (mrad)
Correctors field strengths
5
0
-5
160
-10
Mon Mon
Corr Corr Corr Corr 0 5 10 15 20 25 30 35
140
Z distance (m)
1
120
0.5
Yctr (cm)
Occurrence
0 100
-0.5
80
-1
Mon
0 5 10 15 20 25 30 35
Corr
Corr
60
Z distance (m)
10
Y’ctr (mrad)
40
5
0 20
-5
-10 0
-1250-1000-750 -500 -250 0 250 500 750 1000 1250
0 5 10 15 20 25 30 35
B*L (G*cm)
Z distance (m)
The number and locations of monitors and
Sensitivity to monitors errors: 10, 30 and 100 μ
correctors are varied until a reasonable
correction scheme is obtained. 1 1 1
0.5
Xctr (cm) 0.5
Xctr (cm)
0.5
Xctr (cm)
0 0 0
-0.5 -0.5 -0.5
-1 -1 -1
0 5 10 15 20 25 30 35 0 5 10 15 20 25 30 35 0 5 10 15 20 25 30 35
Design: the procedure was used to Z distance (m) Z distance (m) Z distance (m)
10 10 10
X’ctr (mrad)
X’ctr (mrad)
X’ctr (mrad)
optimize the number, location of
5 5 5
0 0 0
-5 -5 -5
monitors and correctors as well as -10 -10 -10
0 5 10 15 20 25 30 35 0 5 10 15 20 25 30 35 0 5 10 15 20 25 30 35
Z distance (m) Z distance (m) Z distance (m)
the correctors strengths.
1 1 1
0.5
Yctr (cm)
0.5 0.5
Yctr (cm)
Yctr (cm)
0 0 0
Operations: could be implemented -0.5 -0.5 -0.5
-1 -1 -1
0 5 10 15 20 25 30 35 0 5 10 15 20 25 30 35 0 5 10 15 20 25 30 35
Z distance (m)
using real beam position monitors
Z distance (m) Z distance (m)
10 10 10
Y’ctr (mrad)
Y’ctr (mrad)
Y’ctr (mrad)
5 5 5
and beam steerers. 0 0 0
-5 -5 -5
-10 -10 -10
0 5 10 15 20 25 30 35 0 5 10 15 20 25 30 35 0 5 10 15 20 25 30 35
Z distance (m) Z distance (m) Z distance (m)
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 21
TRACK Application: Operations of a Multi-Q Injector at ANL
Measured beam profiles at the end
TRACK fit of measured profiles to extract
of LEBT: left: horizontal, right: vertical.
the initial beam parameters at the source.
0.8
0.2
1200
1800
20+
20+
0.18
1600 0.7
21+
21+
1000
1400
0.16
20+&21+
20+&21+ 0.6
800
1200
0.14
1000
a.u.
a.u
600 0.5
0.12
800
a.u.
400
a.u.
600
0.4
0.1
400
200
0.08
200 0.3
0
0
0.06
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
-4 -3 -2 -1 0 1 2 3
0.2
Y (cm)
X (cm)
0.04
0.1
0.02
TRACK fit to find the quads setting to 0
0
-3 -2 -1 0 1 2 3
-6 -4 -2 0 2 4 6
recombine the two charge state Bi-209 Y (cm)
X (cm)
beams at the end of the LEBT. Pepper-Pot images: Bi-209 beams
left: 20+&21+
right: 20+: blue, 21+:red.
Such a perfect recombination was not
possible without a realistic simulation.
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 22
TRACK Application: Automatic Transverse Tuning in RIA Linac
Original Manual Tune Automatic Transverse Tune
Purpose: Tune the linac for a given beam and
produce smooth transverse beam dynamics. 0.25
0.25
Xrms (cm)
Xrms (cm)
0.2
0.2
0.15
0.15
0.1
0.1
0.05
0.05
Method: Minimize the fluctuations in the RMS 0.25
0.25
Yrms (cm)
Yrms (cm)
beam sizes along the considered section. 0.2
0.2
0.15
0.15
0.1
0.1
0.05
0.05
0 5 10 15 20 25 30 35 40 45 50
0 5 10 15 20 25 30 35 40 45 50
( X rms − X rms ) 2 (Yrms − Yrms ) 2
i 0 i 0
+ ∑i + ∑i
Z-distance (m)
Z-distance (m)
F=X +Y
0 0
Fit Function: εX ε Y2
2
rms rms
rms rms
X- and Y-rms beam sizes before and after applying
0 0
where X and Y are the RMS beam the automatic transverse tuning procedure.
rms rms
sizes at the entrance of the section or after the The beam is a two-charge state uranium beam
first focusing period, the sum index i runs over in the first section of the RIA/FRIB driver linac.
the focusing periods in a given section and ε Xrms
and ε Yrms are the allowed errors on the RMS
A similar procedure was developed to produce
beam sizes.
smooth longitudinal envelopes by fitting the RF
cavities field amplitudes and phases.
Fit Parameters: Field strengths in focusing
elements
Developed and used for design
optimization this procedure could very
This method is general and should produce
well be applied to a real machine using
good results for both periodic or non
beam profile measurements to reduce
periodic accelerating structures.
beam mismatch.
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 23
TRACK Application: Longitudinal Fine Tuning before a Stripper
8 8
6 6
Purpose: Tune a linac section to minimize the 4 4
2 2
Δφ (deg)
Δφ (deg)
logitudinal emittance of a multiple charge state 0 0
-2 -2
beam right before stripping. -4 -4
-6 -6
-8 -8
0 20 40 60 80 100 120 0 20 40 60 80 100 120
Distance (m) Distance (m)
100 100
Method: Match the longitudinal beam centers 75 75
50 50
ΔW (keV/u)
ΔW (keV/u)
and Twiss parameters of the different charge 25 25
0 0
-25 -25
state beams: -50 -50
-75 -75
Wq 0 → W 0; ΔWqi → 0; Δφqi → 0; αqi → 0; βqi → min
-100 -100
0 20 40 60 80 100 120 0 20 40 60 80 100 120
Distance (m) Distance (m)
Black: Ref. 74+ of U-238
Fit Function:
Δφqi αqi Colors: 72+,73+,75+ and 76+
(Wq 0 − W 0) ΔWqi
2 2 2 2
+ ∑qi + ∑qi + ∑qi + ∑qi βqi
F= 300 300
2 2 2
ε ε ε εα
2
Δφ
Δw
w
200 200
where W 0 is the desired beam energy and ε W 100 100
is the corresponding error.
ΔW (keV/u)
ΔW (keV/u)
ε ΔW , ε Δφ , ε α are the allowed errors on the relative
0 0
energy, phase and α shifts of the individual -100 -100
charge state beams from the central beam. -200 -200
-300 -300
-10 -8 -6 -4 -2 0 2 4 6 8 10 -10 -8 -6 -4 -2 0 2 4 6 8 10
Δφ (deg) Δφ (deg)
Fit Parameters: RF cavities field amplitudes 10 2
10 2
and phases.
Lost power (W/m)
Lost power (W/m)
10
10
1
1
-1
-1
Measuring the energy and phase of
10
10
-2
-2
10
10
individual charge states, we should be 0 100 200 300 400 500
0 100 200 300 400 500
Distance (m)
Distance (m)
able to match their beam centers, … Reduced beam loss in the high-energy section
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 24
P-TRACK Application: One to One RFQ Simulation ~ 1 B particles
Simulated the actual number of particles in 45 mA proton beam at 325 MHz
accelerated in a RFQ from 50 keV to 2.5 MeV 865 M particles on 32768 procs.
Benefits of simulating a large number of particles: actual number if possible
- Suppress noise from the PIC method: enough particles/cell
- More detailed simulation: better characterization of the beam halo
3D beam: 100M
Phase space plots
for 865 M protons
after 30 cells in the
RFQ.
(Δt, ΔW’)
(y, y’)
(x, x’)
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 25
P-TRACK Application: Large Scale Error Simulations 10M/Seed
Simulated machine errors with 10M particles per seed FNAL-PD linac:
- ~ 2000 elements, 1.7 Km long
- misalignment errors and (1%,1 deg) RF errors
- includes H- stripping: Black body, residual gas and Lorentz stripping.
Benefits of simulating a large number of particles/seed:
- Study beam loss to the lowest possible level.
Beam loss
Envelopes RMS emittances
Lost fraction: 9 E-4
Peak loss: 0.9 W/m
With H- stripping, the fraction
lost increased by almost one
order of magnitude Linac &
Transfer line should be cooled
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 26
Future Developments: Parallel Optimization Tools
So far, the developed optimization tools were used only with the serial version
of TRACK Very time consuming.
Large scale parallel computing is necessary for timely optimizations …
The fully parallel version of TRACK is now ready
Next: Test the existing tools with the Parallel version of TRACK
First: Try parallel tracking and serial optimization.
Second: Investigate the use of parallel optimization algorithms developed at
the Mathematics and Computer Science division of Argonne (TAO: Toolkit for
Advanced Optimization, PETSc).
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 27
More Developments Towards a Model Driven Accelerator
More tools are needed to fit the experimental data using a beam dynamics
code.
Develop interfaces between the beam diagnostic devices and the beam
dynamics code Calibrate and analyze the data to input to the code.
Numerical experiments could be used to test the tools before implementation
to the real machine Produce detector like data from the code.
Larger scale realization: ATLAS at ANL, may be SNS Linac …
Large scale parallel computing will be needed to support real time operations
of the machine.
ESS-Bilbao Workshop Beam Dynamics Codes … P. Ostroumov 28
Beam Dynamics Codes: Availability, Sophistication, more
Beam Dynamics Codes: Availability, Sophistication, Limitations. P.N. Ostroumov and B. Mustapha Argonne National Laboratory, J.-P. Carneiro Fermi National Accelerator Laboratory less
0 comments
Post a comment