MAD-X icon indicating copy to clipboard operation
MAD-X copied to clipboard

Loss of higher orders in twiss by kill fringe

Open HelmutCERN opened this issue 4 years ago • 4 comments

Bend slicing transfers the fringe fields to DIPEDGE elements at entry and exit. In case of thick slices, the twiss results should ideally remain unchanged. As can be seen with the example attached, this only true to first order, for zero orbit. With initial offsets, like x=0.1, y=0.1 the twiss results change after the slicing, even for a simple bend without any fringe and non-zero tensor terms like T332 disappear. The original values can be restored by removing kill_ent_fringe=true,kill_exi_fringe=true from the sliced sequence, or by removing the if (.not.kill_ent_fringe) then if (.not.kill_exi_fringe) then in tmbend in twiss.f90 and always calling tmcat1 even in case of no (trivial) fringe. For non-trivial fringe fields (nonzero e1,fint), SUBROUTINE tmdpdg should be modified to calculate fringe fields with higher orders as done by call tmfrng in tmbend

bend.madx.txt sliced_kill_removed.seq.txt

HelmutCERN avatar Oct 16 '20 16:10 HelmutCERN