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

Add files via upload #582

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

catohxb
Copy link
Contributor

@catohxb catohxb commented Mar 17, 2023

I uploaded a few pass methods, such as quadrupole linear pass method with fringe fields, straight-geometry bends, straight symplectic integrator with exact drift and with quadrupole fringe fields, exact drift, and crab cavity pass.

@catohxb
Copy link
Contributor Author

catohxb commented Mar 17, 2023

These pass methods were used to compare with Elegant and good agreement was found. See
https://journals.aps.org/prab/abstract/10.1103/PhysRevAccelBeams.22.114601

@lfarv
Copy link
Contributor

lfarv commented Mar 18, 2023

Hello @catohxb, thanks for uploading these passmethods. I went rapidly through, and have a few questions:

  1. BndStrMPoleSymplectic4Pass is already in the main branch. It is slightly different from yours because of the introduction of the new entry point trackFunction replacing PassFunction. I'll check that it's still exactly equivalent to yours.
  2. LaDriftPass: it looks very similar to the ExactDriftPass proposed in New integrators: ExactDriftPass, ExactMultipolePass #581. To be checked also, and we'll keep one.
  3. BndMPoleSymplectic2RadQEPass: it look similar to BndMPoleSymplectic4QuantPass, with a few differences:
    • you replace the 4th order integrator with a 2nd order: any reason ?
    • the random generation of the energy loss is different, and I'm not sure that the approximation of the Poisson distribution with a Gaussian is valid. Could you have a look to BndMPoleSymplectic4QuantPass and give your comments?
    • you may have different fringe field effects, I'll come to that later
  4. QuadLinearFNPass: Could we add the fringe fields as optional in the existing QuadLinearPass ? This is what is done in StrMPoleSymplectic4Pass to avoid numerous pass methods. By the way, could you check the method "2" in StrMPoleSymplectic4Pass, described as "elegant-like fringe field effect" and using the fringeIntM0 and fringeIntP0 integrals? It would be nice to have the same inputs for both linear and symplectic passmethods.
  5. StrMPoleSymplectic4NPass: similar to ExactMultipolePass, and same question about fringe fields.
  6. CrabCavityPass: no question, nice addition!

The comparison with Elegant is very interesting and encouraging. You did a lot on fringe fields, could you check what's already in the current passmethods:

  • for straight elements there is now a FringQuadEntrance attribute (0, 1 or 2) defining the method. Are these methods correct, does any corresponds to yours, and if not, could we add yours as an additional method?
  • for curved elements, it's similar with a FringeBendEntrance attribute.

@catohxb
Copy link
Contributor Author

catohxb commented Mar 20, 2023

Hi, @lfarv , Thanks for going through the passmethods and the suggestions. Indeed many of these features are already included. It's fine to leave them out. I'll check the fringe field model.

@lfarv
Copy link
Contributor

lfarv commented Mar 21, 2023

@catohxb : Anyway, CrabCavityPass is a nice addition. I have another question about BndStrMPoleSymplectic4Pass:
how should we use the X0ref end RefDZ parameters ? Could you give some example of how to use this passmethod?
Thanks!

@catohxb
Copy link
Contributor Author

catohxb commented Mar 23, 2023

@lfarv Sorry for the late reply. Basically we need to set X0ref to the proper value such that the particle comes at this position and with the correct entrance angle will have a symmetric trajectory across the magnet (exit at X0ref and with the correct angle). Then we set RefDZ to the change of z-coordinate on the magnet.
I have a function to look for the correct X0ref value and set RefDZ. I also made an example. But I am not sure how to pass the example to you (there are 4 files).

@lfarv lfarv mentioned this pull request Apr 5, 2023
@swhite2401
Copy link
Contributor

Hello, are the magnets integrators fully covered in #581?
Should we open a separate PR for the CrabCavityPass and close this one?

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

Successfully merging this pull request may close these issues.

None yet

3 participants