Page 1 of 1

pass same cavity twice

Posted: 10 Dec 2012, 16:21
by yuehao
Hi, All

I have question in passing the beam twice through same cavity. When I calculated the twiss parameter, is the length of the lattice between first and second pass of same cavity taken into account. Do I have to define two cavity and manually assign the phase of the second cavity (for the second pass) according to the pass length in between.

Thanks,
Yue

Re: pass same cavity twice

Posted: 10 Dec 2012, 16:31
by michael_borland
Yue,

The answer depends on how your lattice is put together. If you have, for example,

Code: Select all

RF1: rfca,PHASE=45,...
BeamLine: line=(RF1,<otherElements>)
and you track through this several times (using &run_control n_passes greater than 1), then the phase of RF1 is 45 degrees for the first pass, but after that it depends on how long the beam takes to get to the cavity on each pass. I.e., it is a physical simulation of a single rf cavity.

If, on the other hand, you have

Code: Select all

RF1: rfca,PHASE=45,...
BeamLine: line=(RF1,<otherElements>,RF1,<moreElements>)
then the two instances of RF1 are considered as driven independently at the requested phase. If you want them to be driven by the same generator, you can use

Code: Select all

RF1: rfca,PHASE=45,PHASE_REFERENCE=1,...
BeamLine: line=(RF1,<otherElements>,RF1,<moreElements>)
which tells elegant that all instances of the cavity have a common phase reference (assigned a numerical identifier of "1" in this example). In this case, only the first instance of RF1 will be phase to 45 degrees. The others will be phased to the same reference, i.e., phase=phase0+omega*(t-t0), where t0 is the arrival time at the first instance of RF1, phase0=45 deg, and t is the arrival time at a subsequent cavity.

Hope this explains it.

--Michael

Re: pass same cavity twice

Posted: 10 Dec 2012, 16:45
by yuehao
HI, Michael

Thank you for the prompt explanation. That answers all my question.

Best,
Yue

Re: pass same cavity twice

Posted: 26 Mar 2015, 15:01
by yuehao
Hi, Michael

I have a further question of linking two cavities with different frequency.

If I have two cavity with same frequency f1 or wavelength lambda:
RF1: RFCA, phase=90, phase_reference=1,f=f1, L=L1...
RF2: RFCA, phase=90-360/lambda*length, f=f1, phase_reference=1, L=L1...
and it works fine in lattice (both cavity is on crest)
line1:line=(RF1, some_lattice_with_length_(length-L1), RF2)

However if RF2 is a 5th harmonic of RF1 with different length L2,
RF2: RFCA, phase=90-5*360/lambda*length, f=5*f1, phase_reference=1, L=L2...
when particle pass RF2, the phase is not 90 anymore.

Could you explain how phase is calculated in the RF cavity when the cavity has finite length?

Thanks a lot.

Yue