mbtrack2.instability package¶
Submodules¶
mbtrack2.instability.instabilities module¶
General calculations about instability thresholds.
- mbtrack2.instability.instabilities.cbi_threshold(ring, I, Vrf, f, beta, Ncav=1)[source]¶
Compute the longitudinal and transverse coupled bunch instability thresolds driven by HOMs [1].
Approximate formula, does not take into account variation with Q. For better estimate use lcbi_growth_rate.
ring : Synchrotron object I : float
Total beam current in [A].
- Vrffloat
Total RF voltage in [V].
- ffloat
Frequency of the HOM in [Hz].
- betaarray-like of shape (2,)
Horizontal and vertical beta function at the HOM position in [m].
- Ncavint, optional
Number of RF cavity.
- Zlongfloat
Maximum longitudinal impedance of the HOM in [ohm].
- Zxdipfloat
Maximum horizontal dipolar impedance of the HOM in [ohm/m].
- Zydipfloat
Maximum vertical dipolar impedance of the HOM in [ohm/m].
[1] : Ruprecht, Martin, et al. “Calculation of Transverse Coupled Bunch Instabilities in Electron Storage Rings Driven By Quadrupole Higher Order Modes.” 7th Int. Particle Accelerator Conf.(IPAC’16), Busan, Korea.
- mbtrack2.instability.instabilities.lcbi_growth_rate(ring, I, M, synchrotron_tune=None, Vrf=None, fr=None, RL=None, QL=None, Z=None)[source]¶
Compute the maximum growth rate for longitudinal coupled bunch instability driven an impedance [1].
Use either a list of resonators (fr, RL, QL) or an Impedance object (Z).
ring : Synchrotron object I : float
Total beam current in [A].
- Mint
Nomber of bunches in the beam.
- synchrotron_tunefloat, optional
Synchrotron tune.
- Vrffloat, optinal
Total RF voltage in [V] used to compute synchrotron tune if not given.
- frfloat or list, optional
Frequency of the HOM in [Hz].
- RLfloat or list, optional
Loaded shunt impedance of the HOM in [Ohm].
- QLfloat or list, optional
Loaded quality factor of the HOM.
- ZImpedance, optional
Longitunial impedance to consider.
- growth_ratefloat
Maximum coupled bunch instability growth rate in [s-1].
- muint
Coupled bunch mode number corresponding to the maximum coupled bunch instability growth rate.
- growth_ratesarray
Coupled bunch instability growth rates for the different mode numbers in [s-1].
[1] : Eq. 51 p139 of Akai, Kazunori. “RF System for Electron Storage Rings.” Physics And Engineering Of High Performance Electron Storage Rings And Application Of Superconducting Technology. 2002. 118-149.
- mbtrack2.instability.instabilities.lcbi_growth_rate_mode(ring, I, M, mu, synchrotron_tune=None, Vrf=None, fr=None, RL=None, QL=None, Z=None)[source]¶
Compute the longitudinal coupled bunch instability growth rate driven by an impedance for a given coupled bunch mode mu [1].
Use either a list of resonators (fr, RL, QL) or an Impedance object (Z).
ring : Synchrotron object I : float
Total beam current in [A].
- Mint
Nomber of bunches in the beam.
- muint
Coupled bunch mode number (= 0, …, M-1).
- synchrotron_tunefloat, optional
Synchrotron tune.
- Vrffloat, optinal
Total RF voltage in [V] used to compute synchrotron tune if not given.
- frfloat or list, optional
Frequency of the resonator in [Hz].
- RLfloat or list, optional
Loaded shunt impedance of the resonator in [Ohm].
- QLfloat or list, optional
Loaded quality factor of the resonator.
- ZImpedance, optional
Longitunial impedance to consider.
- float
Coupled bunch instability growth rate for the mode mu in [s-1].
[1] : Eq. 51 p139 of Akai, Kazunori. “RF System for Electron Storage Rings.” Physics And Engineering Of High Performance Electron Storage Rings And Application Of Superconducting Technology. 2002. 118-149.
- mbtrack2.instability.instabilities.lcbi_stability_diagram(ring, I, M, modes, cavity_list, detune_range, synchrotron_tune=None, Vrf=None)[source]¶
Plot longitudinal coupled bunch instability stability diagram for a arbitrary list of CavityResonator objects around a detuning range.
Last object in the cavity_list is assumed to be the one with the variable detuning.
- ringSynchrotron object
Ring parameters.
- Ifloat
Total beam current in [A].
- Mint
Nomber of bunches in the beam.
- modeslist
Coupled bunch mode numbers to consider.
- cavity_listlist
- List of CavityResonator objects to consider, which can be:
active cavities
passive cavities
HOMs
mode dampers
- detune_rangearray
Detuning range (list of points) of the last CavityResonator object.
- synchrotron_tunefloat, optional
Synchrotron tune.
- Vrffloat, optinal
Total RF voltage in [V] used to compute synchrotron tune if not given.
- figFigure
Show the shunt impedance threshold for different coupled bunch modes.
- mbtrack2.instability.instabilities.mbi_threshold(ring, sigma, R, b)[source]¶
Compute the microbunching instability (MBI) threshold for a bunched beam considering the steady-state parallel plate model [1][2].
ring : Synchrotron object sigma : float
RMS bunch length in [s]
- Rfloat
dipole bending radius in [m]
- bfloat
vertical distance between the conducting parallel plates in [m]
- Ifloat
MBI current threshold in [A]
[1] : Y. Cai, “Theory of microwave instability and coherent synchrotron radiation in electron storage rings”, SLAC-PUB-14561 [2] : D. Zhou, “Coherent synchrotron radiation and microwave instability in electron storage rings”, PhD thesis, p112
- mbtrack2.instability.instabilities.rwmbi_growth_rate(ring, current, beff, rho_material, plane='x')[source]¶
Compute the growth rate of the transverse coupled-bunch instability induced by resistive wall impedance [1].
ring : Synchrotron object current : float
Total beam current in [A].
- befffloat
Effective radius of the vacuum chamber in [m].
- rho_materialfloat
Resistivity of the chamber’s wall material in [Ohm.m].
- planestr, optional
The plane in which the instability will be computed. Use ‘x’ for the horizontal plane, and ‘y’ for the vertical.
[1] Eq. (31) in R. Nagaoka and K. L. F. Bane, “Collective effects in a diffraction-limited storage ring”, J. Synchrotron Rad. Vol 21, 2014. pp.937-960
- mbtrack2.instability.instabilities.rwmbi_threshold(ring, beff, rho_material, plane='x')[source]¶
Compute the threshold current of the transverse coupled-bunch instability induced by resistive wall impedance [1].
ring : Synchrotron object beff : float
Effective radius of the vacuum chamber in [m].
- rho_materialfloat
Resistivity of the chamber’s wall material in [Ohm.m].
- planestr, optional
The plane in which the instability will be computed. Use ‘x’ for the horizontal plane, and ‘y’ for the vertical.
[1] Eq. (32) in R. Nagaoka and K. L. F. Bane, “Collective effects in a diffraction-limited storage ring”, J. Synchrotron Rad. Vol 21, 2014. pp.937-960
mbtrack2.instability.ions module¶
Various calculations about ion trapping and instabilities in electron storage rings.
- mbtrack2.instability.ions.fast_beam_ion(ring, Nb, nb, Lsep, sigmax, sigmay, P, T, beta, model='linear', delta_omega=0, ion='CO', dim='y')[source]¶
Compute fast beam ion instability rise time [1].
Warning ! If model=”linear”, the rise time is an assymptotic grow time (i.e. y ~ exp(sqrt(t/tau))) [1]. If model=”decoherence”, the rise time is an e-folding time (i.e. y ~ exp(t/tau)) [2]. If model=”non-linear”, the rise time is a linear growth time (i.e. y ~ t/tau) [3].
- The linear model assumes that [1]:
x,y << sigmax,sigmay
- The decoherence model assumes that [2]:
Lsep << c / (2 * pi * ion_frequency) Lsep << c / (2 * pi * betatron_frequency)
- The non-linear model assumes that [3]:
x,y >> sigmax,sigmay
ring : Synchrotron object Nb : float
Number of electron per bunch.
- nbfloat
Number of bunches.
- Lsepfloat
Bunch spacing in [m].
- sigmaxfloat
Horizontal beam size in [m].
- sigmayfloat
Vertical beam size in [m].
- Pfloat
Partial pressure of the molecular ion in [Pa].
- Tfloat
Tempertature in [K].
- betafloat
Average betatron function around the ring in [m].
- modelstr, optional
If “linear”, use [1]. If “decoherence”, use [2]. If “non-linear”, use [3].
- delta_omegafloat, optional
RMS variation of the ion oscillation angular frequnecy around the ring in [Hz].
- ionstr, optional
Ion type. The default is “CO”.
- dim“y” o “x”, optional
Dimension to consider. The default is “y”.
- taufloat
Instability rise time in [s].
[1] : T. O. Raubenheimer and F. Zimmermann, “Fast beam-ion instability. I. linear theory and simulations”, Physical Review E 52 (1995). [2] : G. V. Stupakov, T. O. Raubenheimer, and F. Zimmermann, “Fast beam-ion instability. II. effect of ion decoherence”, Physical Review E 52 (1995). [3] : Chao, A. W., & Mess, K. H. (Eds.). (2013). Handbook of accelerator physics and engineering. World scientific. 3rd Printing. p417.
- mbtrack2.instability.ions.ion_cross_section(ring, ion)[source]¶
Compute the collisional ionization cross section.
Compute the inelastic collision cross section between a molecule or an atom by a relativistic electron using the relativistic Bethe asymptotic formula [1].
Values of M02 and C02 from [2].
ring : Synchrotron object ion : str
Ion type.
- sigmafloat
Cross section in [m**2].
[1] : M. Inokuti, “Inelastic collisions of fast charged particles with atoms and molecules-the bethe theory revisited”, Reviews of modern physics 43 (1971). [2] : P. F. Tavares, “Bremsstrahlung detection of ions trapped in the EPA electron beam”, Part. Accel. 43 (1993).
- mbtrack2.instability.ions.ion_frequency(N, Lsep, sigmax, sigmay, ion='CO', dim='y', express='coupling')[source]¶
Compute the ion oscillation frequnecy.
- Nfloat
Number of electrons per bunch.
- Lsepfloat
Bunch spacing in [m].
- sigmaxfloat or array
Horizontal beam size in [m].
- sigmayfloat or array
Vertical beam size in [m].
- ionstr, optional
Ion type. The default is “CO”.
- dim“y” o “x”, optional
Dimension to consider. The default is “y”.
- expressstr, optional
Expression to use to compute the ion oscillation frequency. The default is “coupling” corresponding to Gaussian electron and ion distributions with coupling [1]. Also possible is “no_coupling” corresponding to Gaussian electron and ion distributions without coupling [2].
- ffloat or array
Ion oscillation frequencies in [Hz].
[1] : T. O. Raubenheimer and F. Zimmermann, “Fast beam-ion instability. I. linear theory and simulations”, Physical Review E 52 (1995). [2] : G. V. Stupakov, T. O. Raubenheimer, and F. Zimmermann, “Fast beam-ion instability. II. effect of ion decoherence”, Physical Review E 52 (1995).
- mbtrack2.instability.ions.plot_critical_mass(ring, bunch_charge, bunch_spacing, n_points=10000.0)[source]¶
Plot ion critical mass, using Eq. (7.70) p147 of [1]
ring : Synchrotron object bunch_charge : float
Bunch charge in [C].
- bunch_spacingfloat
Time in between two adjacent bunches in [s].
- n_pointsfloat or int, optional
Number of point used in the plot. The default is 1e4.
fig : figure
[1] : Gamelin, A. (2018). Collective effects in a transient microbunching regime and ion cloud mitigation in ThomX (Doctoral dissertation, Université Paris-Saclay).