Combined Function dipole envelope

https://www.dacm-logiciels.fr/tracewin
Post Reply
SwedenNataliaM
Beginner
Beginner
Posts: 5
Joined: Fri 8 Dec 2023 10:47
Country:
Sweden (se)
Sweden

Combined Function dipole envelope

Post by SwedenNataliaM »

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 196 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 196 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
Attachments
lattice_combined.dat
(421 Bytes) Downloaded 10 times
ESSnuSB.ini
(43.77 KiB) Downloaded 11 times
main.cpp
(5.97 KiB) Downloaded 9 times
User avatar
FranceDidier
Administrator
Administrator
Posts: 934
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Combined Function dipole envelope

Post by FranceDidier »

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
Post Reply