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 space-charge effects in Cheetah #137

Open
RemiLehe opened this issue Mar 27, 2024 · 3 comments
Open

Add space-charge effects in Cheetah #137

RemiLehe opened this issue Mar 27, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@RemiLehe
Copy link
Collaborator

RemiLehe commented Mar 27, 2024

It would be valuable to add space-charge effects in Cheetah.

This could be done by adding space-charge to existing elements by using the standard technique of sub-stepping through an element (used in other accelerator codes). For instance, a drift without space-charge

Drift(length=L)

would be replaced (here with 3 substeps) by

Segment(
    elements=[
        Drift(length=L/6),
       SpaceChargeKick(length=L/3),
       Drift(length=L/3),
       SpaceChargeKick(length=L/3),
       Drift(length=L/3),
       SpaceChargeKick(length=L/3),
       Drift(length=L/6)
  ]
)

One could use the integrated Green function method for SpaceChargeKick, described here:
https://journals.aps.org/prab/abstract/10.1103/PhysRevSTAB.9.044204

This could then be benchmarked with examples from https://inspirehep.net/literature/1690374, as well as the example from the section "Free Expansion of a Cold Uniform Bunch" in https://inspirehep.net/files/178e98af93e0aaf3838a175835781aa0

@jank324 jank324 added the enhancement New feature or request label Mar 27, 2024
@ax3l
Copy link

ax3l commented May 17, 2024

Small comment: I'll take a look at #142 🚀. Just for the above, technically, the space-charge kick is modeled like a thin element (always length=0) - but we do not see it as an element itself.

@RemiLehe
Copy link
Collaborator Author

RemiLehe commented May 22, 2024

Yes, we are aware that the space charge kick does not add length to the element (see for instance this comment). In SpaceChargeKick(length=L/3), length is the equivalent of slice_ds in ImpactX.

As suggested by @jank324, the above length argument should probably be renamed (e.g. effec_length), maybe as part of a follow-up PR to #142 .

@ax3l
Copy link

ax3l commented May 22, 2024

Yes. One aspect I forgot to mention and related to your link, it's not fully equivalent to our ds in ImpactX because we do not model space charge kicks conceptionally as elements. I stead, we slice elements (slice_ds=ds/N) and add collective effects between slices. For that reason, our space charge kick is not even a subclass of our thin elements (where we define ds=0), because it is not an element (in our concept).

As I said, just a comment. There are many ways to express this. Maybe we could make collective effects thin elements as well in ImpactX :)

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

No branches or pull requests

3 participants