Hi all,
I'm trying to benchmark the pyORBIT3 gap model against that of TraceWin for the ESS SCL cavities. In the process, I've found a behaviour in TraceWin that we do not fully understand.
The image below shows the energy gain of particles at a transverse offset (x) compared to that of the particle on axis, as a function of the phase set for the field map, so W(x)-W(x=0 mm) as function of phi. While all other properties, for example angular kick (see tracewin_transverse_xpr.png), show a periodicity with phase, the energy gain seems to depend on something more like the square of cos(phi). The difference is overall very small but seems systematic.
What could lead to such a behaviour? Wangler, (7.36), but also the Tracewin documentation (under "RF accelerating cavities"), seems to rather suggest a dependence on cos(phi) in first order.
The plot is obtained using the attached project:
- Distribution contains a randomly chosen Gaussian distribution + the first ten particles at x = 0 cm .. 10 mm, with all else 0 / nominal.
- Run the project changing the phase parameter of the FIELD_MAP. I'm running from the command line with tracemac64 ("Ele[1][3]=${i}"), but get the same results when running from the GUI.
- Take the first 10 particles from the output distribution and plot the difference of the energy of the particle at 10 mm minus that of the particle at 0 mm, as function of phase.
I'm running Tracewin 2.24.1.1 on an M2 Mac.
Thanks,
Daniel
Dependence of energy gain in 1d fieldmap
Dependence of energy gain in 1d fieldmap
- Attachments
-
- tracewin_transverse_xpr.png (68.96 KiB) Viewed 133 times
-
- Archive.zip
- (413.61 KiB) Downloaded 9 times
Re: Dependence of energy gain in 1d fieldmap
Dear Dnoll,
It's a really complex question and the differences you're looking at are so small compared to the energy of the beam.
What I can tell you is that from the 1D field map the derivative is calculated and then using maxwell (first order) are estimated Ez(r,z), Er(r,z) & Eq(r,z). Then for each particle the usual transport equations are applied in a field map (see chapter "Particle motion in electromagnetic field" of the manual).
Another thing, I've tried to see the behaviour of an NCELLS element which is based on thin gap aproximation (similar to Wangler proposal) and I've observed even greater effects.
Regards,
Didier
It's a really complex question and the differences you're looking at are so small compared to the energy of the beam.
What I can tell you is that from the 1D field map the derivative is calculated and then using maxwell (first order) are estimated Ez(r,z), Er(r,z) & Eq(r,z). Then for each particle the usual transport equations are applied in a field map (see chapter "Particle motion in electromagnetic field" of the manual).
Another thing, I've tried to see the behaviour of an NCELLS element which is based on thin gap aproximation (similar to Wangler proposal) and I've observed even greater effects.
Regards,
Didier
Re: Dependence of energy gain in 1d fieldmap
Dear Didier,
thank you for the quick reply. You are absolutely correct: the differences are absolutely tiny. I also include a comparison to a transport through the 3d field map below; this time only for the particle at 10 mm. Seeing as PyORBIT3 and Tracewin using the 3d field map largely agree, I'm still somewhat curious as to what feature of the 1d model causes the difference - both in magnitude and in different periodicity. Could there be something wrong in how I apply the 1d field map?
Best regards,
Daniel
thank you for the quick reply. You are absolutely correct: the differences are absolutely tiny. I also include a comparison to a transport through the 3d field map below; this time only for the particle at 10 mm. Seeing as PyORBIT3 and Tracewin using the 3d field map largely agree, I'm still somewhat curious as to what feature of the 1d model causes the difference - both in magnitude and in different periodicity. Could there be something wrong in how I apply the 1d field map?
Best regards,
Daniel
- Attachments
-
- tracewin_1d_3d_pyorbit3.png (32.15 KiB) Viewed 113 times
Re: Dependence of energy gain in 1d fieldmap
Dear Daniel,
No, I don't see problem with your ways to use 1D field map.
That said, I don't understand your last plot. There's no logical link with your first one. It's no longer the same kV values.
For example using your example @ 100° I found 0.12 kV between 0 mm & 10 mm
Regards,
Didier
No, I don't see problem with your ways to use 1D field map.
That said, I don't understand your last plot. There's no logical link with your first one. It's no longer the same kV values.
For example using your example @ 100° I found 0.12 kV between 0 mm & 10 mm
Regards,
Didier