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 twiss injection source #5426

Open
wants to merge 18 commits into
base: development
Choose a base branch
from
Open

Conversation

bnara
Copy link
Contributor

@bnara bnara commented Oct 29, 2024

Add twiss injection source. Our need for this was to inject a beam with independent control of phase-space in all three Cartesian directions, in order to match an asymmetric beam into a plasma ramp. This gives a flexible Twiss parameterization, including transverse focusing and longitudinal compression and chirp. Furthermore, arbitrary orientation and location of beams is supported. Online documentation parameters.rst updated.

Implementation details: twiss-implementation.pdf

phase-space.mp4

Three independent focal distances:

Arbitrary positioning and orientation of beams, including rotation about longitudinal axes:

@RemiLehe RemiLehe self-assigned this Nov 5, 2024
@@ -261,6 +304,113 @@
#endif
}

void PlasmaInjector::setupTwiss (amrex::ParmParse const& pp_species)

Check warning

Code scanning / CodeQL

Poorly documented large function Warning

Poorly documented function: fewer than 2% comments for a function of 106 lines.
@bnara
Copy link
Contributor Author

bnara commented Nov 6, 2024

Illustration of different cutting methods available in twiss

During beam initialization, either "planar" or "ellipsoidal" cuts can be made in 6D phase-space. The user provides six parameters, corresponding to the three Cartesian coordinates and momenta. The parameters are given in units of their respective focal rms standard deviations. Specifying the numerical constant inf effectively disables cutting along the corresponding axis. An ellipsoidal cut and a planar cut can be simultaneously used.

The gaussian_beam source provides planar cuts along 3 coordinate directions. To make the same cut in twiss, use:

beam.twiss.planar_cut = 1 1 1 inf inf inf

planar-cut.mp4

To make an ellipsoidal cut in all six coordinates and momenta at one standard deviation, use:

beam.twiss.ellipsoidal_cut = 1 1 1 1 1 1

ellipsoidal-cut.mp4

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.

2 participants