at.collective.beam_loading#
Functions
|
Function to add beam loading to a cavity element, the cavity element is changed to a beam loading element that combines the energy kick from both the cavity and the resonator |
|
Function to remove beam loading from a cavity element, the beam loading element is changed to a beam loading element that combines the energy kick from both the cavity and the resonator |
Classes
|
An enumeration. |
|
Class to generate a beamloading element, inherits from Element additional argument are ring, cavity, qfactor, rshunt |
|
An enumeration. |
- class BeamLoadingElement(family_name, length, voltage, frequency, ring, qfactor, rshunt, blmode=BLMode.PHASOR, cavitymode=CavityMode.ACTIVE, buffersize=0, **kwargs)[source]#
Bases:
RFCavity
,Collective
Class to generate a beamloading element, inherits from Element additional argument are ring, cavity, qfactor, rshunt
- Parameters:
- Keyword Arguments:
Nslice (int) – Number of slices per bunch. Default: 101
Nturns (int) – Number of turn for the wake field. Default: 1
ZCuts – Limits for fixed slicing, default is adaptive
NormFact (float) – Normalization factor
blmode (BLMode) – method for beam loading calculation BLMode.PHASOR (default) uses the phasor method, BLMode.WAKE uses the wake function. For high Q resonator, the phasor method should be used
cavitymode (CavityMode) – Is cavity ACTIVE (default) or PASSIVE
buffersize (int) – Size of the history buffer for vbeam, vgen, vbunch (default 0)
- Returns:
bl_elem (Element) – beam loading element
- static build_from_cav(cav, ring, qfactor, rshunt, blmode=BLMode.PHASOR, cavitymode=CavityMode.ACTIVE, buffersize=0, **kwargs)[source]#
Function to build the BeamLoadingElement from a cavity the FamName, Length, Voltage, Frequency and HarmNumber are taken from the cavity element
- Parameters:
- Keyword Arguments:
Nslice (int) – Number of slices per bunch. Default: 101
Nturns (int) – Number of turn for the wake field. Default: 1
ZCuts – Limits for fixed slicing, default is adaptive
NormFact (float) – Normalization factor
blmode (BLMode) – method for beam loading calculation BLMode.PHASOR (default) uses the phasor method, BLMode.WAKE uses the wake function. For high Q resonator, the phasor method should be used
cavitymode (CavityMode) – type of beam loaded cavity ACTIVE (default) for a cavity with active compensation, or PASSIVE to only include the beam induced voltage
buffersize (int) – Size of the history buffer for vbeam, vgen, vbunch (default 0)
- Returns:
bl_elem (Element) – beam loading element
- property Buffersize#
- property Nslice#
Number of slices per bunch
- property Nturns#
Number of turn for the wake field
- property ResFrequency#
Resonator frequency
- property TurnHistory#
Turn history of the slices center of mass
- property Vbeam#
Beam phasor (amplitude, phase)
- property Vbeam_buffer#
Stored beam induced voltage data
- property Vbunch#
Bunch phasor (amplitude, phase)
- property Vbunch_buffer#
Stored bunch induced voltage data
- property Vcav#
Cavity phasor (amplitude, phase)
- property Vgen#
Generator phasor (amplitude, phase)
- property Vgen_buffer#
Stored generator voltage data
- default_pass = {False: 'DriftPass', True: 'BeamLoadingCavityPass'}#
- add_beamloading(ring, qfactor, rshunt, cavpts=None, copy=False, **kwargs)[source]#
Function to add beam loading to a cavity element, the cavity element is changed to a beam loading element that combines the energy kick from both the cavity and the resonator
- Parameters:
- Keyword Arguments:
cavpts (Refpts) – refpts of the cavity. If None (default) apply to all cavity in the ring
Nslice (int) – Number of slices per bunch. Default: 101
Nturns (int) – Number of turn for the wake field. Default: 1
ZCuts – Limits for fixed slicing, default is adaptive
NormFact (float) – Normalization factor
blmode (BLMode) – method for beam loading calculation BLMode.PHASOR (default) uses the phasor method, BLMode.WAKE uses the wake function. For high Q resonator, the phasor method should be used
copy – If True, returns a shallow copy of ring with new beam loading elements. Otherwise, modify ring in-place
cavitymode (CavityMode) – Define PASSIVE or ACTIVE cavity
buffersize (int) – Size of the history buffer for vbeam, vgen, vbunch (default 0)
- remove_beamloading(ring, cavpts=None, copy=False)[source]#
Function to remove beam loading from a cavity element, the beam loading element is changed to a beam loading element that combines the energy kick from both the cavity and the resonator
- Parameters:
ring – Lattice object
- Keyword Arguments:
cavpts (Refpts) – refpts of the beam loading Elements. If None (default) apply to all elements
copy – If True, returns a shallow copy of ring with new cavity elements. Otherwise, modify ring in-place