Page 1 of 1

Combined Function dipole envelope

Posted: Thu 8 Aug 2024 15:15
by NataliaM
Hi all,

I am design transfer line for ESS and decided to try combined function dipoles and for that I created a new element and per instructions in the manual.
After quite some debugging I managed to get the transverse part of the code to agree pretty well with a quad (given the dipole is weak etc.). I am having a bit of trouble understanding the longitudinal envelopes though.

This is the envelope for the element I created
CombinedFuncDipole.png
CombinedFuncDipole.png (70.65 KiB) Viewed 200 times
and this is what I get when I add a regular dipole instead ( I checked and I get the same result for adipose in the form of a multipole FM)
TracewinDipole.png
TracewinDipole.png (91.23 KiB) Viewed 200 times
The effect on the Z coordinate is a lot stronger (which could well be some sign mistake in my element) but the kick at the end of the dipole I really cannot understand. I added the lattice and the code for my element in this post as well in case someone wants to take a look.

Best,
Natalia

Re: Combined Function dipole envelope

Posted: Fri 9 Aug 2024 15:12
by Didier
Dear natalia,

Whether using envelope or tracking, we have exactly the same behaviour at the dipole exit. However, the 2 methods are totally different, one is based on usual transfer matrix of the dipole, the other uses a geometric approach with no approximation. So I don't really know how to explain this kick, but I don't think it's wrong if you look at it quickly.
Otherwise, regarding your own development, the main.cpp file, it doesn't seem to work on my end.

Regards,

Didier