mbtrack2.impedance.csr module¶
Define coherent synchrotron radiation (CSR) wakefields in various models.
- class FreeSpaceCSR(time: ndarray[tuple[int, ...], dtype[_ScalarType_co]], frequency: ndarray[tuple[int, ...], dtype[_ScalarType_co]], length: float, radius: float, ring: Synchrotron)[source]¶
Bases:
WakeFieldFree space steady-state coherent synchrotron radiation Wakefield element, based on [1-3].
- Notes:
Impedance is computed using Eq. (A10) of [2].
The WakeField model stores Zlong and Wcsr.
The Wcsr component (type ‘csr’) holds the antiderivative
of the wake function rather than the wake function itself, because the direct wake diverges at tau=0 making numerical convolution inaccurate. - WakePotential class uses the antiderivative convolved with the derivative of the bunch profile instead. - The direct wake function is available via LongitudinalWakeFunction for analysis but is not added to the model.
Parameters¶
- timearray of float
Time points where the wake function antiderivative is evaluated in [s]. Must span the bunch extent for tracking.
- frequencyarray of float
Frequency points where the impedance will be evaluated in [Hz].
- lengthfloat
Length of the impedance element to consider in [m].
- radiusfloat
Dipole radius of curvature in [m].
- ringSynchrotron
Ring object, used to access the Lorentz factor gamma.
References¶
[1] : Faltens, A., & Laslett, L. J. (1973). Longitudinal coupling impedance of a stationary electron ring in a cylindrical geometry. part. Accel., 4, 151-157. [2] : Agoh, T., and K. Yokoya. “Calculation of coherent synchrotron radiation using mesh.” Physical Review Special Topics-Accelerators and Beams 7.5 (2004): 054403. [3] : J. B. Murphy, S. Krinsky, and R. L. Gluckstern, Longitudinal wakefield for an electron moving on a circular orbit, Particle Accelerators 57, 9 (1997).
- __init__(time: ndarray[tuple[int, ...], dtype[_ScalarType_co]], frequency: ndarray[tuple[int, ...], dtype[_ScalarType_co]], length: float, radius: float, ring: Synchrotron)[source]¶
- LongitudinalImpedance(frequency: ndarray[tuple[int, ...], dtype[_ScalarType_co]]) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]¶
Compute the free space steady-state CSR impedance. Based on Eq. (A10) of [1].
This formula is valid only if omega << (3 * gamma^3 * c) / (2 * R).
Parameters¶
- frequencyfloat array
Frequency in [Hz].
Returns¶
- Zlcomplex array
Longitudinal impedance in [ohm].
References¶
[1] : Agoh, T., and K. Yokoya. “Calculation of coherent synchrotron radiation using mesh.” Physical Review Special Topics-Accelerators and Beams 7.5 (2004): 054403.
- LongitudinalWakeFunction(time: ndarray[tuple[int, ...], dtype[_ScalarType_co]]) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]¶
Compute the free-space CSR wake function following Eq. (13) of [1].
For analysis only. Not added to the WakeField model because the wake diverges at tau=0. Use the Wcsr antiderivative component for tracking (see LongitudinalWakeAntiderivative).
Parameters¶
- timefloat array
Time in [s].
Returns¶
- Wlfloat array
Longitudinal wake function in [V/C].
References¶
[1] : E. L. Saldin, E. A. Schneidmiller, and M. V. Yurkov, On the coherent radiation of an electron bunch moving in an arc of a circle, Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment 398, 373 (1997). [2] : J. Qiang, C. Mitchell, and R. D. Ryne, A fast high-order method to calculate wakefields in an electron beam, Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment 682, 49 (2012).
- LongitudinalWakeAntiderivative(time: ndarray[tuple[int, ...], dtype[_ScalarType_co]], points_around_zero: int = 100000) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]¶
Compute the antiderivative of the free space CSR wakefunction. We follow Eq. (3.13) of [1]. The antiderivative should be used to calculate the part of the convolution integral around 0.
Parameters¶
- timefloat array
Time in [s].
Returns¶
- Wl_intfloat array
Antiderivative of the longitudinal wake function per unit length in [V/C/m].
References¶
[1] : J. B. Murphy, S. Krinsky, and R. L. Gluckstern, Longitudinal wakefield for an electron moving on a circular orbit, Particle Accelerators 57, 9 (1997).
- class ParallelPlatesCSR(time: ndarray[tuple[int, ...], dtype[_ScalarType_co]], frequency: ndarray[tuple[int, ...], dtype[_ScalarType_co]], length: float, radius: float, distance: float, ring: Synchrotron, k_max: int = 100)[source]¶
Bases:
WakeFieldPerfectly conducting parallel plates steady-state coherent synchrotron radiation Wakefield element, based on [1,2].
- The WakeField model stores three components:
Zlong (full impedance, free space + shielding, Eq. A1 of [1])
Wlong (shielding correction only, Murphy et al. [2] Eqs. 5.21-5.22)
- Wcsr (free-space CSR antiderivative from an internally constructed
FreeSpaceCSR instance).
Together Wlong and Wcsr give the full time-domain wake, consistent with Zlong. WakePotential class handles both components automatically.
Parameters¶
- timearray of float
Time points spanning the bunch extent in [s]. The analytical wake components are stored internally on the corresponding convolution lag grid.
- frequencyarray of float
Frequency points where the impedance will be evaluated in [Hz].
- lengthfloat
Length of the impedance element to consider in [m].
- radiusfloat
Dipole radius of curvature in [m].
- distancefloat
Full-gap vertical distance between the parallel plates in [m].
- ringSynchrotron
Ring object, used to access the Lorentz factor gamma.
- k_maxint, optional
Number of terms in the image-charge sum for the wake function. The default is 100.
Attributes¶
- thresholdfloat
Shielding threshold in the parallel plates model in [Hz].
References¶
[1] : Agoh, T., and K. Yokoya. “Calculation of coherent synchrotron radiation using mesh.” Physical Review Special Topics-Accelerators and Beams 7.5 (2004): 054403. [2] : J. B. Murphy, S. Krinsky, and R. L. Gluckstern, Longitudinal wakefield for an electron moving on a circular orbit, Particle Accelerators 57, 9 (1997).
- __init__(time: ndarray[tuple[int, ...], dtype[_ScalarType_co]], frequency: ndarray[tuple[int, ...], dtype[_ScalarType_co]], length: float, radius: float, distance: float, ring: Synchrotron, k_max: int = 100)[source]¶
- property threshold: float¶
Shielding threshold in the parallel plates model in [Hz].
- LongitudinalImpedance(frequency: ndarray[tuple[int, ...], dtype[_ScalarType_co]], tol: float = 1e-05) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]¶
Compute the CSR impedance using the perfectly conducting parallel plates steady-state model. The impedance includes both the free space contribution and the shielding effect from the plates.
Impedance is computed using Eq. (A1) of [1].
Parameters¶
- frequencyfloat array
Frequency in [Hz].
- tolfloat, optinal
Desired maximum final error on sum_func.
Returns¶
- Zlcomplex array
Longitudinal impedance in [ohm].
References¶
[1] : Agoh, T., and K. Yokoya. “Calculation of coherent synchrotron radiation using mesh.” Physical Review Special Topics-Accelerators and Beams 7.5 (2004): 054403.
- sum_func(p: int, k: float) complex[source]¶
Utility function for LongitudinalImpedance.
Parameters¶
p : int k : float
Returns¶
sum_value : mpc
- _G2(s: ndarray[tuple[int, ...], dtype[_ScalarType_co]], k_max: int = 100) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]¶
Normalised Green’s function for the parallel plates CSR wakefunction. Implements Eq. (5.22b) of [1].
Parameters¶
- sfloat array
Longitudinal distance in [m].
Returns¶
- G2float array
Green’s function.
References¶
[1] : J. B. Murphy, S. Krinsky, and R. L. Gluckstern, Longitudinal wakefield for an electron moving on a circular orbit, Particle Accelerators 57, 9 (1997).
- LongitudinalWakeFunction(time: ndarray[tuple[int, ...], dtype[_ScalarType_co]], k_max: int = 100) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]¶
Compute the parallel-plates shielding correction to the CSR wake function following Eqs. (5.21-5.22) of [1].
Computes only the shielding correction; the free-space term is not included. In the WakeField model the free-space contribution is provided automatically by the Wcsr component.
Parameters¶
- timefloat array
Time in [s].
- k_maxint, optional
Number of terms in the G2 sum. The default is 100.
Returns¶
- Wlfloat array
Longitudinal wake function (shielding correction only) in [V/C].
References¶
[1] : J. B. Murphy, S. Krinsky, and R. L. Gluckstern, Longitudinal wakefield for an electron moving on a circular orbit, Particle Accelerators 57, 9 (1997).