Skip to content

Apochromatic focusing example #487

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

Merged
merged 18 commits into from
Dec 21, 2023

Conversation

cemitch99
Copy link
Member

@cemitch99 cemitch99 commented Dec 19, 2023

Added example input files for the drift-quad apochromatic focusing lattice shown in Fig. 4a of:

C. A. Lindstrom and E. Adli, Phys. Rev. Accel. Beams 19, 071002 (2016),
https://doi.org/10.1103/PhysRevAccelBeams.19.071002

  • Add draft of C++ input file and Python script
  • Update initial transverse beam moments based on email communication
  • Add analysis script (eg, check matching and emittance growth)
  • Add test to examples/CMakeLists
  • Add documentation

cemitch99 and others added 3 commits December 18, 2023 13:18
- Modified the initial beam size in the IOTA lens benchmark example.
- Added 2 benchmarks of 3D space charge for initial testing.
- Add documentation for 2 benchmarks with space charge.
- Add a benchmark example with space charge and periodic s-dependent focusing.
- Added an s-dependent example using a Kurth beam without space charge.
- Modified tolerance for IOTA lens benchmark example.
  Reduced tolerance to account for smaller initial beam size and
  improved preservation of invariants of motion.
- Modified tolerances of space charge examples to allow CI tests to
  pass when space charge is not active.

- Modified tolerance for space charge examples.
  These should fail unless space charge is turned on.
Selected numerical values for amr.n_cell, lattice.nslice, and geometry.prob_relative.
@cemitch99 cemitch99 requested a review from ax3l December 19, 2023 02:27
@ax3l ax3l added the component: tests examples, tests and benchmarks label Dec 19, 2023
@ax3l ax3l self-assigned this Dec 19, 2023
@cemitch99
Copy link
Member Author

cemitch99 commented Dec 19, 2023

Emittance growth observed in ImpactX: 0.5%
Emittance growth quoted in Lindstrom et al: 0.96%

Note that Lindstrom (and ELEGANT) both use the non-canonical variables (x',y') while ImpactX always uses the canonical variables (px/p0,py/p0). For small relative energy spread, these are essentially equivalent. When energy spread becomes large, this difference becomes important. This may be the source of the difference: investigating this now.

I modified the analysis script to use (x',y') as momentum variables for computing the emittance, and this effect is far too small to account for this difference (~0.02%).

Solution: The original ImpactX input used a 6D waterbag distribution, while Lindstrom et al assumes a Gaussian distribution in energy. Changing to a 6D gaussian distribution and using the (x',y') variables above yields an emittance growth of 0.94%.

Change to a Gaussian distribution.
Change to a gaussian distribution.
@ax3l
Copy link
Member

ax3l commented Dec 20, 2023

Nice! Great reconstruction of events 🕵️ 😄

cemitch99 and others added 7 commits December 21, 2023 11:48
Correct CMakeLists specification.
Correct misspelling.
Update Python to 10^5 particles
Python distribution type should be Gaussian.
Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, looks great!

I think we could add a plot script for this as well, we can do this as a follow-up PR.

@ax3l ax3l enabled auto-merge (squash) December 21, 2023 22:49
@ax3l ax3l merged commit 1dcc6be into BLAST-ImpactX:development Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tests examples, tests and benchmarks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants