Splitting linac

Moderators: cyao, michael_borland

Post Reply
Max
Posts: 50
Joined: 31 Jul 2008, 12:16

Splitting linac

Post by Max » 27 Feb 2011, 12:56

Hi Michael and collaborators,
I have run a trajectory through a linac (about 3 m long, S-band) using RFCA with the matrix method.
I have also run RFCA by the kicks method and by manually splitting the linac in several parts
(I was curious to look at the trajectory inside the linac). I have tried several kicks and splits
until the solution converges.
The last two give the same results for the trajectory, which, however, is
markedly different (like a factor of 3-4 in final angle and position) from the one derived with the matrix method (kick =1).
Which should I believe ?
Thanks, Max

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Splitting linac

Post by michael_borland » 27 Feb 2011, 13:57

Max,

These should not disagree so much. When you split the linac, be sure to set a common value for PHASE_REFERENCE. Otherwise, sections will be individually phased, which could cause disagreements.

--Michael

Max
Posts: 50
Joined: 31 Jul 2008, 12:16

Re: Splitting linac

Post by Max » 28 Feb 2011, 06:06

Hi Michael,
Yes, I believe I have the same phase reference. I use:
ACCT0_L00.01:rfca,l=3.16635,freq=2997924000,phase=90,volt=47.5e6,change_p0=1,end1_focus=1,end2_focus=1,n_kicks=30
(or no n_kicks).
I should have mentioned that the energy is 5 MeV. Could this be an effect of the arrival time at the split/kicks cavities ?
Although I checked that the final energy and arrival time they are the same with the matrix and kicks method.
I have also run RFCW with kicks and it gives the same result as the splits (but, again, different from the matrix method).
The final trajectories (one particle,two linacs in series, each about 3 m long, with a short drift in between), for a horizontal initial displacement of +2 mm are:

Matrix method: x=-4.55 mm, xp=-0.42 mm
Kicks/split methods(50 segments): x=-1.28 mm, xp=-0.21 mm

I thank you for your help. Best regards,
Max

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Splitting linac

Post by michael_borland » 28 Feb 2011, 09:39

Max,

For a 5 MeV beam, the phase reference could be the issue, so please try changing your RFCA definitions to add PHASE_REFERENCE=<n>, where <n> is an integer that is unique for each set of RFCA's belonging to the same physical accelerating structure. This will ensure that phasing is consistent across all structures. If you don't assign phase references, then elegant phases each RFCA separately to exactly the specified phase, which is not what you want when the RFCA's are part of the same physical structure. (If v is not exactly c, you can't actually have the same phase in that case. Using PHASE_REFERENCE assignments allows accounting for that.)

--Michael

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

Re: Splitting linac

Post by simone.dimitri » 07 Mar 2011, 05:05

Dear Michael and collaborators,
with reference to the email exchange we had recently, I would like to point out our conclusions
and to receive confirmation from you of our understanding.

Object of the study.
During our study of the RF edge focusing in a linac, we
compared the result of a very simple analytical model
based on symplectic matrices, describing the edge focusing
and the adiabatic damping in an accelerating structure,
with the elegant particle tracking result. Thank to
Michael's indications, we finally obtained a
self-consistent understanding of the the elegant
computation that we report in the following.

Our final understanding:
1) the elegant output file .twi contains the *lattice*
Twiss parameters computed by always taking into account,
in the correct manner, the RF edge focusing.
2) the elegant output files regarding particle tracking,
such as the .sig and the .out file, can be used to extract
the *beam* Twiss parameters. If the beam is initially
matched to the lattice, the beam Twiss parameters coincide
with the correct computation of the lattice Twiss
parameters only if using the option N_KICKS=0 for each
accelerating structure.
3) The default option for N_KICKS in the current version
of elegant is N_KICKS=1, that is a bug in the sense it is
not correct for particle tracking and it gives wrong
result in terms of beam Twiss parameters.
4) A long accelerating structure can be divided in
multiple segments "by hand" in a line or with the "split"
command, for example. Also in this case, we always have to use N_KICKS=0 for
correct tracking result.

--> Please Michael, confirm this summary.


There are some good rules given by Michael that we report here in the following.
Michael's email on March 1:
There were some problems with your lattice files, but also a bug. I'm attaching a set of files that illustrate a method that should work.
In the lattice files, you should:
1. Assign same PHASE_REFERENCE value to all RFCA's that are part of the same physical structure.
2. Split long RFCA's into units that have length deltaZ=c/f=0.1m. If you don't do this, the beam isn't accelerated by each cavity, because k*deltaZ is not an integer.
Also, there appears to be a bug in handling the end focusing flags for N_KICKS!=0. However, it is fine to just set END1_FOCUS=1 and END2_FOCUS=1 on all RFCA's, because the interior focus kicks cancel when the gradient is the same in all segments. I did this in the attached files, and everything seems to agree now.
Sorry about the confusion. I'll try to fix the bug for the next release. Let me know if this doesn't clear up the problem.


Conclusions.
We conclude with the following observations.
A. elegant result as for the slice optics (beam Twiss
parameters) and the lattice optics really coincide when
N_KICKS=0.
B. elegant tracking result almost coincides with the
analytical model I found in literature as for the edge
focusing only when N_KICKs=0.
C. splitting an accelerating structure coincides, to any
practical purpose, with the entire structure model when
N_KICKS=0 and the correct PHASE_REFERENCE set up is
adopted.


Thank you in advance and for the support given to date.
Simone Di Mitri and Max Cornacchia

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Splitting linac

Post by michael_borland » 07 Mar 2011, 09:28

Max,

Thanks for posting the summary.

A few corrections:

* N_KICKS=1 is fine if the beam energy is high, say 50 MeV or more. At 5 MeV as in your tests, it is not good. Increasing N_KICKS will resolve the discrepancies.

* If a long structure is split, N_KICKS=1 is fine as long as END1_FOCUS=1 and END2_FOCUS=1. The reason is a bug in the handling of those flags. It turns out setting them both is ok, because the "interior" kicks cancel each other.

I'll post something to the bugs forum. I'll also probably change the default to N_KICKS=0 since this is more accurate in most cases. The usefulness of N_KICKS is that one can apply wake and LSC kicks at many points through a long structure.

--Michael

Post Reply