Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving symplecticity of an electric bend and odd plotting issue #883

Open
vsmorozov opened this issue Mar 27, 2024 · 3 comments
Open
Assignees

Comments

@vsmorozov
Copy link
Contributor

Hello,

I was wandering if it is possible to improve the symplecticity of electric bends. In the attached lattice file, they are implemented as sbend's with b0_elec attributes. There are 80 of them in the entire lattice:
tao_pEDM.zip
The symplectic error of the whole lattice is 1.35E-3. It causes problems, for example, with closed orbit calculations with RF cavities. It does not converge unless symplectificaiton is forced with *[symplectify] = T.

The only unusual elements in the lattice are electric bends. They are the cause of the non-symplecticity. They each individually contribute a symplectic error of 6.03E-6, which is high compared to other elements.

There is also an odd plotting issue with this lattice. When run with the attached init file as "tao -init tao_pEDM.init", the plot looks fine:
image
However, if the lattice is run as "tao -lat pEDM.bmad", the default plots look odd:
image
It is probably a plotting issue because printing out the lattice functions with "show ele end" in both cases gives the same result consistent with the top figure:
Twiss at end of element:
A B Cbar C_mat
Beta (m) 2.03292453 0.37371225 | 0.00000000 0.00000000 0.00000000 0.00000000
Alpha -2.42614277 0.50702408 | 0.00000000 0.00000000 0.00000000 0.00000000
Gamma (1/m) 3.38732139 3.36374686 | Gamma_c = 1.00000000 Mode_Flip = F
Phi (rad) 66.14193641 65.32027156 X Y Z
Eta (m) -0.00005782 0.00000000 -0.00005782 0.00000000 48.94424337
Etap -0.00007808 0.00000000 -0.00007808 0.00000000 1.00000145
dEta/ds -0.00007830 0.00000000 -0.00007830 0.00000000 1.00000145
Sigma 0.00000001 0.00000000 0.00000000 0.00000000

Thanks,
Vasiliy

@DavidSagan DavidSagan self-assigned this Mar 28, 2024
@DavidSagan
Copy link
Member

@vsmorozov The plotting difference is due to one plot plotting eta.x and the other plot eta.a which are not the same if there is any coupling.

@DavidSagan
Copy link
Member

@vsmorozov I just noticed that the coupling is zero so this does not explain the problem. Am investigating further...

@eiad-hamwi
Copy link

@vsmorozov Have you tried making the plot use more points?
set plot_page n_curve_pts = 2000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants