TFDRIVER

Moderators: cyao, michael_borland

Post Reply
li.chao
Posts: 46
Joined: 18 Aug 2021, 08:59

TFDRIVER

Post by li.chao » 08 Apr 2024, 17:01

Dear Michael,

Recently, I am trying to learn Elegant simulation model for the bunch-by-bunch feedback with TFDRIVER element in transverse planes.

I read the source code, and there is one thing I did not get it, hopefully, you can help me clarify it.
Th codes are between line 427 and 444 in the tfeedback.cc file, which I posted in below as well.
For the single bunch case, the particle coordinate is updated according to part0[j] += kick/(1+part0[5]);
whereas for the multi-bunches case, particle coordinates are updated by
part0[ipBucket[iBucket]][j] += kick*rfFactor/(1+part0[ipBucket[iBucket]][5]);

The "rfFactor" is missing for the single bunch case, I would like to know, why?

yours sincerely Chao

*///////////////////////////////////////////////
if (!tfbd->longitudinal) {
j = tfbd->pickup->iPlane+1;
if (nBuckets==1) {
for (i=0; i<np0; i++) {
if (tfbd->frequency>0)
rfFactor = cos(PIx2*tfbd->frequency*(time0-tAve)+phase);
part0[j] += kick/(1+part0[5]);
}
} else {
if (npBucket) {
for (i=0; i<npBucket[iBucket]; i++) {
if (tfbd->frequency>0)
rfFactor = cos(PIx2*tfbd->frequency*(time0[ipBucket[iBucket]]-tAve)+phase);
part0[ipBucket[iBucket]][j] += kick*rfFactor/(1+part0[ipBucket[iBucket]][5]);
}
}
}
} else { /* longitudinal */
*///////////////////////////////////////////////

Post Reply