Skip to content
Snippets Groups Projects
Commit 14ac2edc authored by Alexis GAMELIN's avatar Alexis GAMELIN
Browse files

Add form factor contribution to lcbi_growth_rate_mode

parent 03787000
No related branches found
No related tags found
1 merge request!13v0.7.0
......@@ -103,10 +103,11 @@ def lcbi_growth_rate_mode(ring,
fr=None,
RL=None,
QL=None,
Z=None):
Z=None,
bunch_length=None):
"""
Compute the longitudinal coupled bunch instability growth rate driven by
an impedance for a given coupled bunch mode mu [1].
an impedance for a given coupled bunch mode mu [1-2].
Use either a list of resonators (fr, RL, QL) or an Impedance object (Z).
......@@ -131,6 +132,10 @@ def lcbi_growth_rate_mode(ring,
Loaded quality factor of the resonator.
Z : Impedance, optional
Longitunial impedance to consider.
bunch_length : float, optional
Bunch length in [s].
Used to computed the form factor for a resonator impedance if given.
Default is None.
Returns
-------
......@@ -142,9 +147,12 @@ def lcbi_growth_rate_mode(ring,
[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.
[2] : Tavares, P. F., et al. "Beam-based characterization of higher-order-mode
driven coupled-bunch instabilities in a fourth-generation storage ring."
NIM A (2022): 165945.
"""
if synchrotron_tune is None and Vrf is None:
raise ValueError("Either synchrotron_tune or Vrf is needed.")
if synchrotron_tune is None:
......@@ -188,8 +196,15 @@ def lcbi_growth_rate_mode(ring,
n1 = np.arange(1, n_max)
omega_p = ring.omega0 * (n0*M + mu + nu_s)
omega_m = ring.omega0 * (n1*M - mu - nu_s)
if bunch_length is None:
FFp = 1
FFm = 1
else:
FFp = np.exp(-(omega_p * bunch_length)**2)
FFm = np.exp(-(omega_m * bunch_length)**2)
sum_val = np.sum(omega_p * Zr(omega_p)) - np.sum(omega_m * Zr(omega_m))
sum_val = np.sum(omega_p * Zr(omega_p) * FFp) - np.sum(omega_m * Zr(omega_m) * FFm)
return factor * sum_val
......@@ -202,10 +217,11 @@ def lcbi_growth_rate(ring,
fr=None,
RL=None,
QL=None,
Z=None):
Z=None,
bunch_length=None):
"""
Compute the maximum growth rate for longitudinal coupled bunch instability
driven an impedance [1].
driven an impedance [1-2].
Use either a list of resonators (fr, RL, QL) or an Impedance object (Z).
......@@ -228,6 +244,10 @@ def lcbi_growth_rate(ring,
Loaded quality factor of the HOM.
Z : Impedance, optional
Longitunial impedance to consider.
bunch_length : float, optional
Bunch length in [s].
Used to computed the form factor for a resonator impedance if given.
Default is None.
Returns
-------
......@@ -245,6 +265,10 @@ def lcbi_growth_rate(ring,
[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.
[2] : Tavares, P. F., et al. "Beam-based characterization of higher-order-mode
driven coupled-bunch instabilities in a fourth-generation storage ring."
NIM A (2022): 165945.
"""
growth_rates = np.zeros(M)
......@@ -259,7 +283,8 @@ def lcbi_growth_rate(ring,
fr=fr,
RL=RL,
QL=QL,
Z=Z)
Z=Z,
bunch_length=bunch_length)
growth_rate = np.max(growth_rates)
mu = np.argmax(growth_rates)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment