mbtrack2.impedance.resonator module

This module defines the impedances and wake functions from the resonator model based on the WakeField class.

class Resonator(time: ndarray[tuple[int, ...], dtype[_ScalarType_co]], frequency: ndarray[tuple[int, ...], dtype[_ScalarType_co]], Rs: float, fr: float, Q: float, plane: str | list[str], atol: float = 1e-20)[source]

Bases: WakeField

Resonator model WakeField element which computes the impedance and the wake function in both longitudinal and transverse case.

! For transverse case, if Q < 2, there is a kick factor mismatch between time and frequency domain.

Parameters

timearray of float

Time points where the wake function will be evaluated in [s].

frequencyarray of float

Frequency points where the impedance will be evaluated in [Hz].

Rsfloat

Shunt impedance in [ohm] in longitudinal or [ohm/m] in transverse.

frfloat

Resonance frequency in [Hz].

Qfloat

Quality factor.

planestr or list

Plane on which the resonator is used: “long”, “x” or “y”.

atolfloat, optional

Absolute tolerance used to enforce fundamental theorem of beam loading for the exact expression of the longitudinal wake function. Default is 1e-20.

Properties

bandwidthfloat

Resonator bandwitdh in [Hz].

ring_down_lengthfloat

Resonator ring down length in [m].

References

[1] B. W. Zotter and S. A. Kheifets, “Impedances and Wakes in High-Energy Particle Ac-celerators”, Eq. (3.10) and (3.15), pp.51-53.

__init__(time: ndarray[tuple[int, ...], dtype[_ScalarType_co]], frequency: ndarray[tuple[int, ...], dtype[_ScalarType_co]], Rs: float, fr: float, Q: float, plane: str | list[str], atol: float = 1e-20)[source]
long_wake_function(t: ndarray[tuple[int, ...], dtype[_ScalarType_co]], atol: float) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]
long_impedance(f: ndarray[tuple[int, ...], dtype[_ScalarType_co]]) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]
transverse_impedance(f: ndarray[tuple[int, ...], dtype[_ScalarType_co]]) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]
transverse_wake_function(t: ndarray[tuple[int, ...], dtype[_ScalarType_co]]) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]
property bandwidth: float

Return resonator bandwitdh in [Hz].

property ring_down_length: float

Return resonator ring down length in [m].

class PureInductive(L: float, n_wake: int | float = 1000000.0, n_imp: int | float = 1000000.0, imp_freq_lim: float = 100000000000.0, nout: int | float | None = None, trim: bool = False)[source]

Bases: WakeField

Pure inductive Wakefield element which computes associated longitudinal impedance and wake function.

Parameters

Lfloat

Inductance value in [Ohm/Hz].

n_wakeint or float, optional

Number of points used in the wake function.

n_impint or float, optional

Number of points used in the impedance.

imp_freq_limfloat, optional

Maximum frequency used in the impedance.

nout, trim : see Impedance.to_wakefunction

__init__(L: float, n_wake: int | float = 1000000.0, n_imp: int | float = 1000000.0, imp_freq_lim: float = 100000000000.0, nout: int | float | None = None, trim: bool = False)[source]
long_impedance(f: ndarray[tuple[int, ...], dtype[_ScalarType_co]]) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]
class PureResistive(R: float, n_wake: int | float = 1000000.0, n_imp: int | float = 1000000.0, imp_freq_lim: float = 100000000000.0, nout: int | float | None = None, trim: bool = False)[source]

Bases: WakeField

Pure resistive Wakefield element which computes associated longitudinal impedance and wake function.

Parameters

Rfloat

Resistance value in [Ohm].

n_wakeint or float, optional

Number of points used in the wake function.

n_impint or float, optional

Number of points used in the impedance.

imp_freq_limfloat, optional

Maximum frequency used in the impedance.

nout, trim : see Impedance.to_wakefunction

__init__(R: float, n_wake: int | float = 1000000.0, n_imp: int | float = 1000000.0, imp_freq_lim: float = 100000000000.0, nout: int | float | None = None, trim: bool = False)[source]
long_impedance(f: ndarray[tuple[int, ...], dtype[_ScalarType_co]]) ndarray[tuple[int, ...], dtype[_ScalarType_co]][source]