Accuracy of exact drift implementation

Moderators: cyao, michael_borland

Post Reply
nkuklev
Posts: 8
Joined: 13 Aug 2019, 09:08
Location: University of Chicago

Accuracy of exact drift implementation

Post by nkuklev » 04 Sep 2020, 15:10

Hi Michael,

I was playing around with adding new elements, and noticed that drift tracking results from MAD-X and elegant are different. I initially thought both codes had exact drifts.

However, in csbend.c:

Code: Select all

void exactDrift(double **part, long np, double length)
{
  long i;
  double *coord;
  for (i=0; i<np; i++) {
    coord = part[i];
    coord[0] += coord[1]*length;
    coord[2] += coord[3]*length;
    coord[4] += length*sqrt(1+sqr(coord[1])+sqr(coord[3]));
  }
}
This seems to be a rough approximation of the exact solution (2.35, 4.2 of https://cds.cern.ch/record/1642385/file ... 13-248.pdf).
  • Am I correct in interpreting this approximation as beta~1 + expansion in x'/y', suitable for larger rings?
  • Could 'true exact' mode be added? It would be useful for small rings, and benchmarking with other codes. I can give it a shot, but elegant coordinates still scare me hehe.
  • Regardless, can documentation be clarified to indicate these approximations?

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

Re: Accuracy of exact drift implementation

Post by michael_borland » 07 Sep 2020, 14:42

I'm pretty sure this is indeed an exact result. The definition of x' is x' = px/pz = vx/vz = dx/dz. Hence, if the drift space has length L, the change in x is just x'*L.

Perhaps you are thining that xp and yp are momenta, which they aren't.

--Michael

Post Reply