ESS Linac Simulator vs. TraceWin Emanuele Laface Physicist Accelerator Department AD Seminarino February 19th 2013
Jul 12, 2020
ESS Linac Simulator vs. TraceWin
Emanuele LafacePhysicist
Accelerator Department
AD Seminarino
February 19th 2013
TDR 2012Power 5 MW
Peak Power 125 MWPeak Current 50 mAEnergy From 3 MeV to 2.5 GeV
Pulse Length 2.86 msDuty Cycle 4.00%Cavities 208Gradient 40 MV/mLength ~600 m
Simulated parameters for the ESS Proton Linac
1
DRIFT 156.522 11 0
Available elements:Drift
2
6666664
1 L 0 0 0 00 1 0 0 0 00 0 1 L 0 00 0 0 1 0 00 0 0 0 1 L
�2�2
0 0 0 0 0 1
3
7777775
Tracewin input
Matrix
Available elements:Quadrupole
Tracewin input
Matrix
QUAD 22.5 -12.3918 12 0 0 0 0 0
2
6666664
cos(KL) sin(KL)K 0 0 0 0
�K sin(KL) cos(KL) 0 0 0 0
0 0 cosh(KL) sinh(KL)K 0 0
0 0 K sinh(KL) cosh(KL) 0 0
0 0 0 0 1
L�2�2
0 0 0 0 0 1
3
7777775
Available elements:Bending magnet
Tracewin input
Matrix
2
666666664
cos(Kx
L) sin(K
x
L)
K
x
0 0 0
1�cos(K
x
L)
⇢K
x
2
�Kx
sin(Kx
L) cos(Kx
L) 0 0 0
sin(K
x
L)
⇢K
x
0 0 cos(Ky
L) sin(K
y
L)
K
y
0 0
0 0 �Ky
sin(Ky
L) cos(Ky
L) 0 0
� sin(K
x
L)
⇢K
x
� 1�cos(K
x
L)
⇢K
x
L
2 0 0 1 �K
x
L�
2�sin(K
x
L)
⇢
2K
x
3 +
L
�
2
⇣1� 1
⇢
2K
x
2
⌘
0 0 0 0 0 1
3
777777775
BEND -11 9375.67 0 50 1
Available elements:Edge effect
Tracewin input
Matrix
EDGE -5.5 9375.67 50 0.45 2.8 50 1
2
66666664
1 0 0 0 0 0tan(�)|⇢| 1 0 0 0 0
0 0 1 0 0 0
0 0 � tan(�� )|⇢| 1 0 0
0 0 0 0 1 00 0 0 0 0 1
3
77777775
Available elements:DTL Cell
Tracewin input
Matrix
DTL_CEL 71.2854 22.5 22.5 0.00308396 0 -70.2647 156981 -34.6474 10 0 0.0838043 0.78447 -0.36933 -0.151042
2
6666664
1 L 0 0 0 00 1 0 0 0 00 0 1 L 0 00 0 0 1 0 00 0 0 0 1 L
�2�2
0 0 0 0 0 1
3
7777775
2
6666664
1 L 0 0 0 00 1 0 0 0 00 0 1 L 0 00 0 0 1 0 00 0 0 0 1 L
�2�2
0 0 0 0 0 1
3
7777775
2
66666664
k1C 0 0 0 0 0kxy
(��)o
k2C 0 0 0 0
0 0 k1C 0 0 0
0 0 kxy
(��)o
k2C 0 0
0 0 0 0 1 0
0 0 0 0 kz
(��)o
(��)i
(��)o
3
77777775
Drift Thin Gap Drift2
6666664
cos(KL) sin(KL)K 0 0 0 0
�K sin(KL) cos(KL) 0 0 0 0
0 0 cosh(KL) sinh(KL)K 0 0
0 0 K sinh(KL) cosh(KL) 0 0
0 0 0 0 1
L�2�2
0 0 0 0 0 1
3
7777775
2
6666664
cos(KL) sin(KL)K 0 0 0 0
�K sin(KL) cos(KL) 0 0 0 0
0 0 cosh(KL) sinh(KL)K 0 0
0 0 K sinh(KL) cosh(KL) 0 0
0 0 0 0 1
L�2�2
0 0 0 0 0 1
3
7777775
Quadrupole Quadrupole
Available elements:Cavity Multi gap
Tracewin input
Matrix
2
6666664
1 L 0 0 0 00 1 0 0 0 00 0 1 L 0 00 0 0 1 0 00 0 0 0 1 L
�2�2
0 0 0 0 0 1
3
7777775
2
6666664
1 L 0 0 0 00 1 0 0 0 00 0 1 L 0 00 0 0 1 0 00 0 0 0 1 L
�2�2
0 0 0 0 0 1
3
7777775
2
66666664
k1C 0 0 0 0 0kxy
(��)o
k2C 0 0 0 0
0 0 k1C 0 0 0
0 0 kxy
(��)o
k2C 0 0
0 0 0 0 1 0
0 0 0 0 kz
(��)o
(��)i
(��)o
3
77777775
Drift Thin Gap Drift
NCELLS 1 3 0.5 5.41203e+06 -50.6001 31 0 0.493611 0.488812 12.9855 -14.5316 0.400918 0.679564 0.395851 0.334978 0.657124 0.596556 0.26422 0.661268 0.590482 0.266148
2
6666664
1 L 0 0 0 00 1 0 0 0 00 0 1 L 0 00 0 0 1 0 00 0 0 0 1 L
�2�2
0 0 0 0 0 1
3
7777775
2
6666664
1 L 0 0 0 00 1 0 0 0 00 0 1 L 0 00 0 0 1 0 00 0 0 0 1 L
�2�2
0 0 0 0 0 1
3
7777775
2
66666664
k1C 0 0 0 0 0kxy
(��)o
k2C 0 0 0 0
0 0 k1C 0 0 0
0 0 kxy
(��)o
k2C 0 0
0 0 0 0 1 0
0 0 0 0 kz
(��)o
(��)i
(��)o
3
77777775
Drift Thin Gap Drift
...
Taking into account acceleration, time transit factor, etc.
Available elements:Space Charge
U
sc
(x, y, z) =eN
4p⇡
3✏0�
2
Z 1
0
e
� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t � 1p(2�
x
2 + t)(2�y
2 + t)(2�z
2 + t)dt
F
x
=e
2N
2p⇡
3✏0�
2x
Z 1
0
e
� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t
p(2�
x
2 + t)3(2�y
2 + t)(2�z
2 + t)dt
F
y
=e
2N
2p⇡
3✏0�
2y
Z 1
0
e
� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t
p(2�
x
2 + t)(2�y
2 + t)3(2�z
2 + t)dt
F
z
=e
2N
2p⇡
3✏0�
2z
Z 1
0
e
� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t
p(2�
x
2 + t)(2�y
2 + t)(2�z
2 + t)3dt
Available elements:Space Charge
U
sc
(x, y, z) =eN
4p⇡
3✏0�
2
Z 1
0
e
� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t � 1p(2�
x
2 + t)(2�y
2 + t)(2�z
2 + t)dt
F
x
=e
2N
2p⇡
3✏0�
2x
Z 1
0
e
� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t
p(2�
x
2 + t)3(2�y
2 + t)(2�z
2 + t)dt
F
y
=e
2N
2p⇡
3✏0�
2y
Z 1
0
e
� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t
p(2�
x
2 + t)(2�y
2 + t)3(2�z
2 + t)dt
F
z
=e
2N
2p⇡
3✏0�
2z
Z 1
0
e
� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t
p(2�
x
2 + t)(2�y
2 + t)(2�z
2 + t)3dt
The three forces must be applied in the framework of the bunch, so they are not the same because z -‐> γz
Available elements:Space Charge
U
sc
(x, y, z) =eN
4p⇡
3✏0�
2
Z 1
0
e
� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t � 1p(2�
x
2 + t)(2�y
2 + t)(2�z
2 + t)dt
This integral cannot be expressed in terms of elementary functions.
Z 1
0
e� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t
p(2�
x
2 + t)3(2�y
2 + t)(2�z
2 + t)dt
Common strategies adopted to solve it:
Z 1
0
e� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t
p(2�
x
2 + t)3(2�y
2 + t)(2�z
2 + t)dt
-‐ Linear approximation and long bunch: x ! 0, y ! 0,�z
� �
x
,�
y
K.Y. Ng, “The transverse Space-Charge force in tri-gaussian distribution”, Fermilab-TM-2331-AD, 2007.
10
Common strategies adopted to solve it:
Z 1
0
e� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t
p(2�
x
2 + t)3(2�y
2 + t)(2�z
2 + t)dt
-‐ Linear approximation and long bunch: x ! 0, y ! 0,�z
� �
x
,�
y
K.Y. Ng, “The transverse Space-Charge force in tri-gaussian distribution”, Fermilab-TM-2331-AD, 2007.
-‐ Elliptical uniform bunch:
P.M. Lapostolle, “Effets de la charge d’espace dans un accelerateur lineaire a protons”, CERN AR/Int. SG/65-15, 15 Juillet 1965.
U
sc
(x, y, z) = V0 �⌧
2✏0
"x
2+ y
2
2
+ a
2 z �x
2+y
2
2
b
2 � a
2
1�
acosh(
ba )bp
b
2 � a
2
!#.
10
Common strategies adopted to solve it:
Z 1
0
e� x
2
2�x
2+t
� y
2
2�y
2+t
� z
2
2�z
2+t
p(2�
x
2 + t)3(2�y
2 + t)(2�z
2 + t)dt
-‐ Linear approximation and long bunch: x ! 0, y ! 0,�z
� �
x
,�
y
K.Y. Ng, “The transverse Space-Charge force in tri-gaussian distribution”, Fermilab-TM-2331-AD, 2007.
P.M. Lapostolle, “Effets de la charge d’espace dans un accelerateur lineaire a protons”, CERN AR/Int. SG/65-15, 15 Juillet 1965.
U
sc
(x, y, z) = V0 �⌧
2✏0
"x
2+ y
2
2
+ a
2 z �x
2+y
2
2
b
2 � a
2
1�
acosh(
ba )bp
b
2 � a
2
!#.
-‐ Numerical integration: I adopted this solution using an adaptive algorithm for the Gaussian quadrature.R. Pissens et al., “QUADPACK, A Subroutine Package for Automatic Integration”, Berlin : Springer, 1983.
P. Gonnet, “Increasing the Reliability of Adaptive Quadrature Using Explicit Interpolants”, ACM Trans. on Math. Soft. Vol. 33, Issue 3, Article 26 (2010).
11
Common strategies adopted to solve it:
-‐ Elliptical uniform bunch:
Some results
DTL to Target October 2012 Lattice
I=0, No Space Charge, Horizontal plane12
Some results
DTL to Target October 2012 Lattice
I=0, No Space Charge, Vertical plane13
Some results
DTL to Target October 2012 Lattice
I=0, No Space Charge, Longitudinal plane14
Some results
DTL to Target October 2012 Lattice
I=50 mA, Horizontal plane15
Some results
DTL to Target October 2012 Lattice
I=50 mA, Vertical plane16
Some results
DTL to Target October 2012 Lattice
I=50 mA, Longitudinal plane17
Some results
DTL to Target October 2012 Lattice
I=50 mA, 10 σ, Horizontal plane with machine aperture18
Some results
DTL to Target October 2012 Lattice
I=50 mA, 10 σ, Vertical plane with machine aperture19
Future developments
XML input and output functionality.
Matching module for the initial conditions.
Multi-‐particles version.
Better model for RF cavities: analytical `ield solver or `ield map.
User Interface.
20