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

Added an s-dependent IOTA lens example #467

Merged
merged 44 commits into from
Dec 1, 2023

Conversation

cemitch99
Copy link
Member

@cemitch99 cemitch99 commented Nov 15, 2023

Added a segmented IOTA lens example (Python) using 18 segments with the full s-dependence of the focusing.

The number of segments can be adjusted as a parameter.

The diagnostic output for the nonlinear invariants (H,I) needs to be updated to the corresponding values of alpha, beta, etc. This requires that Python bindings be added for these parameters.

Tasks

  • Update Testing Routines (in CMake)
  • Update IOTA Example Documentation (README.rst) - can also be a separate one instead of extending the existing one
  • Expose Python bindings for nonlinear invariants diagnostics

cemitch99 and others added 3 commits November 14, 2023 13:48
- 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.
@ax3l ax3l self-assigned this Nov 19, 2023
@ax3l ax3l added the component: tests examples, tests and benchmarks label Nov 19, 2023
Modified lattice to place nonlinear lens (nll) as the first element.
Modified initial beam moments for matching
amrex::ParticleReal const pxn = px*sqrt(m_beta)/m_cn + m_alpha*x;
amrex::ParticleReal const pyn = py*sqrt(m_beta)/m_cn + m_alpha*y;
amrex::ParticleReal const pxn = px*sqrt(m_beta)/m_cn + m_alpha*xn;
amrex::ParticleReal const pyn = py*sqrt(m_beta)/m_cn + m_alpha*yn;

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed a typo here. This only affects the diagnostics when alpha is nonzero.

pre-commit-ci bot and others added 19 commits November 29, 2023 22:51
Turn on Python run tests, without analysis.
Use dummy analysis scripts for Python testing.
Fix location of analysis file.
Relax tolerance in dummy script.
Tighten tolerance for Python tests (lens).
Tighten tolerance Python test (lattice).
Eliminate unnecessary dummy analysis scripts.
Remove unnecessary dummy analysis scripts.
Remove unnecessary dummy analysis scriipts.
Pin down slight differences in initial beam generation in app vs. Python script.
Tighten tolerance again
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 ! 👍

examples/iota_lens/README.rst Outdated Show resolved Hide resolved
examples/iota_lattice/README.rst Outdated Show resolved Hide resolved
@ax3l ax3l enabled auto-merge (squash) December 1, 2023 22:04
@ax3l ax3l merged commit 6ecc716 into ECP-WarpX:development Dec 1, 2023
14 of 15 checks passed
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.

3 participants