bmad-sim / bmad-ecosystem

Bmad simulation ecosystem for simulating high energy storage rings.
https://www.classe.cornell.edu/bmad/
6 stars 13 forks source link

traveling_wave lcavity discontinuous optics when absolute_time_tracking=t and num_steps > 1 #992

Open MichaelEhrlichman opened 1 month ago

MichaelEhrlichman commented 1 month ago

MWE on lnx201 at /home/ehrlichm/for_dcs/93

Confirmed on both devel and current.

Run the test case with: tao -lat test.lat

When both num_steps > 1 and bmad_com[absolute_time_tracking]=t, there is a strange discontinuity at the end of the lcavities.

DavidSagan commented 1 week ago

The basic problem is that computing the RF phase for a particle in the interior of the cavity is off for particles with v/c not near 1.

Thought: Implement spline interpolation for computing the phase with the spline knots computed at auto scale time.