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

Thick tracking in field-free dipole not consistent with tracking in drift #842

Closed
chernals opened this issue Oct 26, 2019 · 2 comments
Closed

Comments

@chernals
Copy link
Contributor

chernals commented Oct 26, 2019

When tracking through a dipole with zero field (ie. ANGLE=0 and K1=0, K1S=0, etc.) the results are not the same as for a tracking through a regular drift.

This is due to the fact that the pure DRIFT uses the solution the full Hamiltonian (total momentum, including the square root); ttdrf in trrun.f90.

But, the bends use the truncated Hamiltonian (both using ttcfd in trrun.f90).

A correct implementation should detect that a generic combined function dipole (ttcfd) degenerates to a drift and switch to ttdrf. This is already done in ttquad when this happens in a quadrupole.

@chernals chernals changed the title Thick tracking in field-free dipole or quadrupole not consistent with tracking in drift Thick tracking in field-free dipole not consistent with tracking in drift Oct 26, 2019
@tpersson
Copy link
Contributor

I added a check for the 0 strength dipole in a similar way as for the quadrupole. This is in PR #846

@chernals
Copy link
Contributor Author

Awesome, thanks.

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

2 participants