albums.robinson module
Module to compute longitudinal instabilities in a double RF system.
- class RobinsonModes(ring, cavity_list, I0, tau_boundary=None)[source]
Bases:
objectClass to compute instabilities in a double RF system mainly based on the theory and algorithm developped in [1].
The original algorithm has been adapted to work with other methods to solve the self-consistent problem (i.e. Haissinski equation) [3,4,5,6] and to give an estimate of the threshold of l=1/PTBL instability [7].
See the solve method for details.
Parameters
- ringSynchrotron object
Ring parameters.
- cavity_listlist of CavityResonator objects
- A list which contains:
a CavityResonator for the main cavity in 1st position.
a CavityResonator for the harmonic cavity in 2nd position.
- I0float
Beam current in [A].
- tau_boundaryfloat, optinal
Integration boundary in [s]. If None, 0.1 * RF period is used. The default is None.
Attributes
xi : float
Methods
- solve()
Solve for a given settings of the double RF system.
- R_factor(method)
Touschek lifetime ratio.
References
[1] : Bosch, R. A., K. J. Kleman, and J. J. Bisognano. “Robinson instabilities with a higher-harmonic cavity.” Physical Review Special Topics-Accelerators and Beams 4.7 (2001): 074401.
[2] : Bosch, R. A., and C. S. Hsue. “Suppression of longitudinal coupled-bunch instabilities by a passive higher harmonic cavity.” Proceedings of International Conference on Particle Accelerators. IEEE, 1993.
[3] : Gamelin, A., Yamamoto, N. (2021). Equilibrium bunch density distribution with multiple active and passive RF cavities. IPAC’21 (MOPAB069).
[4] : Venturini, M. (2018). Passive higher-harmonic rf cavities with general settings and multibunch instabilities in electron storage rings. Physical Review Accelerators and Beams, 21(11), 114404.
[5] : Alves, Murilo B., and Fernando H. de Sá. “Equilibrium of longitudinal bunch distributions in electron storage rings with arbitrary impedance sources and generic filling patterns.” Physical Review Accelerators and Beams 26.9 (2023): 094402.
[6] : de Sá, F., & Alves, M. (2023). pycolleff and cppcolleff: modules for impedance analysis and wake-field induced instabilities evaluation. (Version 0.1.0) [Computer software]. https://doi.org/10.5281/zenodo.7974571
[7] : He, Tianlong. “Novel perturbation method for judging the stability of the equilibrium solution in the presence of passive harmonic cavities.” Physical Review Accelerators and Beams 25.9 (2022): 094402.
- solve(passive_harmonic_cavity=True, mode_coupling=True, auto_set_MC_theta=True, optimal_tunning=True, f_HOM=0, Z_HOM=0, method='Venturini', **kwargs)[source]
Solve for a given settings of the double RF system.
Parameters
- passive_harmonic_cavitybool, optional
If True, solve for a passive harmonic cavity. If False, solve for an active harmonic cavity. The default is True.
- mode_couplingbool, optional
If True, compute Robinson instabilities taking into account dipole-quadrupole mode coupling (only dipole and quadrupole modes). If False, compute Robinson instabilities without taking into account mode coupling (modes from dipole to octupole). The default is True.
- auto_set_MC_thetabool, optional
- For passive harmonic cavity only:
-if True, set the main cavity phase to cancel the losses in the harmonic cavity. -if False, keep input main cavity phase setting.
The default is True.
- optimal_tunningbool, optional
- For passive harmonic cavity:
-if True, set main cavity tuning to optimal. -if False, keep input main cavity tuning setting.
- For active harmonic cavity:
-if True, set main and harmonic cavity tuning to optimal. -if False, keep input main and harmonic cavity tuning setting. The default is True.
- f_HOMfloat or list of float, optional
Frequencies of the HOMs to evaluate in [Hz]. The default is 0.
- Z_HOMfloat or list of float, optional
Impedances of the HOMs at f_HOM in [ohm]. The default is 0.
- method{“Bosch”,”Venturini”, “Alves”}, optional
Choose the method used to solve the self-consistent problem (i.e. Haissinski equation):
“Bosch” corresponds to an implementation of the original
algorithm in [1]. It computes only the amplitude form factor and bunch length. The result can depend heavily on tau_boundary. - “Venturini” corresponds to the method described in [3-4]. It can deal with passive and active HC. - “Alves” corresponds to the method described in [5]. It can deal with arbitrary filling pattern and broad band impedance. The pycolleff package is needed for this method [6]. Only for passive HC.
For both “Venturini” and “Alves”, the bunch profile is computed which gives both amplitude and phase form factors. The default is “Venturini”.
Kwargs for method “Bosch”
- Passive harmonic cavity:
- max_counterint
Maximum number of iteration for the computation of form factors. Default is 200.
- Active harmonic cavity:
- auto_set_for_xibool
If True, set harmonic cavity setting to achive xi value. specified as in [1]. If False, keep input main and harmonic cavity setting. Default is False.
- xifloat
Value to achive if auto_set_for_xi is True. Default is None.
Kwargs for method “Venturini”
- F_initarray-like of float of shape (2,)
Initial form factors (MC, HC) to consider for synchronous phase calculation if auto_set_MC_theta is True. Default is [1,1].
- set_MC_phase_HCpassivebool
If True, set the main cavity phase to cancel the losses in the harmonic cavity using approxmiate relation. Default is False.
Kwargs for method “Alves”
- fillingarray-like of float of shape (ring.h,)
Filling pattern of the beam. Sum must be equal to one. Default is None, corresponding to uniform filling.
- impedanceImpedance object
Additional (broad band) longitudinal impedance to consider for the Haissiski equation. Default is None.
- F_initarray-like of float of shape (2,)
Initial form factors (MC, HC) to consider for synchronous phase calculation if auto_set_MC_theta is True. Default is [1,1].
- set_MC_phase_HCpassivebool
If True, set the main cavity phase to cancel the losses in the harmonic cavity using approximate relation. Default is False.
- use_GaussLMCIbool
If True, the Gaussian LMCI method is used to compute Robinson instabilities instead of Bosch’s equations. Default is False.
- use_PTBL_Hebool
If True, the He criteria is used to compute PTBL instability instead of Gaussian LMCI method. Default is False.
- **kwargs passed to LongitudinalEquilibrium.calc_longitudinal_equilibrium:
niter
tol
beta
m
print_flag
- **kwargs passed to LongitudinalEquilibrium.calc_mode_coupling:
max_azi
max_rad
Returns
- bunch_lengthfloat or None
RMS bunch length in [s].
- zero_frequencybool or None
True if zero frequency instability is predicted.
- robinsonarray of bool of shape (4,) or None
Bool of the arrays are True if the following instability is predicted: If mode_coupling:
Coupled dipole mode
Coupled quadrupole mode
Fast mode coupling by dipole mode
Fast mode coupling by quadrupole mode
- else:
Dipole mode
Quadrupole mode
Sextupole mode
Octupole mode
- HOMbool
True if HOM instability is predicted.
- Omegaarray of float or None
- If mode_coupling:
Coupled dipole angular frequency in unit of 2*pi*[Hz]
Coupled quadrupole angular frequency in unit of 2*pi*[Hz]
- else:
Dipole angular frequency in unit of 2*pi*[Hz]
Quadrupole angular frequency in unit of 2*pi*[Hz]
Sextupole angular frequency in unit of 2*pi*[Hz]
Octupole angular frequency in unit of 2*pi*[Hz]
- PTBLbool
True if PTBL instability is predicted. None is returned if method is “Bosch”.
- convergedbool or array of bool
Return True values if calculation has converged. In details: If form factor calculation or Haissinski equation resolution fails:
return False and other results are None
- If zero_frequency is True:
return True and other instability results than zero_frequency are None
- If mode_coupling is True:
return array of bool of shape (2,) for coupled dipole and quadrupole modes.
- If mode_coupling is False:
return array of bool of shape (4,) for dipole to octupole modes.
- solve_equilibrium_only(passive_harmonic_cavity=True, auto_set_MC_theta=True, optimal_tunning=True, method='Venturini', **kwargs)[source]
- R_factor(method)[source]
Touschek lifetime ratio as defined in [1].
Parameters
- method{“Bosch”,”Venturini”, “Alves”}
Method used in self.solve.
Returns
- Rfloat
Touschek lifetime ratio for methods “Veturini” or “Alves”. 1 if method is “Bosch” or solve has not converged.
Reference
[1] : Byrd, J. M., and M. Georgsson. “Lifetime increase using passive harmonic cavities in synchrotron light sources.” Physical Review Special Topics-Accelerators and Beams 4.3 (2001): 030701.
- property xi
Ratio of the harmonic cavity ‘force’ over the main cavity one. Near Eq. (7) in [1].
- _converge_form_factors(passive_harmonic_cavity=True, auto_set_MC_theta=True, optimal_tunning=True, method='Venturini', **kwargs)[source]
- _conv_ff_venturini(passive_harmonic_cavity=True, auto_set_MC_theta=True, optimal_tunning=True, **kwargs)[source]