LongitudinalDynamics#
Longitudinal beam dynamics
Functions
bunch length due to the potential well effect |
|
Computes the RF acceptance with linear formula |
|
bunch length due to the potential well effect |
|
Computes RF acceptance of the ring |
|
SETCAVITYPHASE Set the TimeLag attribute of RF cavities |
|
ATSECAVITY Set the parameters of RF cavities |
|
turns Cavities ON |
|
momentum compaction factor |
|
Computes synchrotron tune from RF parameters |
|
phase = (U0MeV,VrfMV) |
- BunchLength()#
- bunch length due to the potential well effectthe output is the zerocurrent bunch length x bunch lengtheningbl = BunchLength (Ib,Zn,Vrf,U0,E0,h,alpha,sigdelta,circ)Ib is the bunch current [A] (it may be a vector for multiple values)Zn is the longitudinal broadband impedance [Ohms]Vrf is the RF voltage [V] (it may be a vector for multiple values)U0 is the energy loss around the ring [eV]E0 is the beam energy [eV]h is the harmonic numberalpha is the momentum compaction factorsigmadelta is the energy spreadcirc is the ring circumferencesee also: atBunchLength
- RFacc(vrf, u0, e0, h, alpha)#
- Computes the RF acceptance with linear formuladelta_max_rf = RFacc(vrf,u0,e0,h,alpha)This function computes the RF acceptanceVrf is the RF voltage in VU0 is the energy loss per turn in eVE0 is the energy of the beam in eVh is the harmonic numberalpha is the momentum compaction factorSee also
atRFacc()
- atBunchLength(ring, ib, zn)#
- bunch length due to the potential well effectthe output is the zerocurrent bunch length x bunch lengtheningbl = atBunchLength(ring,ib,zn)Ib is the bunch current [A] (it may be a vector for multiple values)Zn is the longitudinal broadband impedance [Ohms]ring is the at ring without radiationBL is the bunch length in metressee also: BunchLength
- atRFacc(ring)#
- Computes RF acceptance of the ringdelta_max_rf = atRFacc(ring)The functions computes the RF acceptance of the ringring is tha at lattice without radiationdelta_max_rf is the RF acceptanceSee also
RFacc()
- atSetCavityPhase()#
- SETCAVITYPHASE Set the TimeLag attribute of RF cavitiesNEWRING=SETCAVITYPHASE(RING)Adjust the TimeLag attribute of RF cavities based on frequency,voltage and energy loss per turn, so that the synchronous phase is zero.An error occurs if all cavities do not have the same frequency.NEWRING=SETCAVITYPHASE(…,’refpts’,CAVPTS)CAVPTS is the location of RF cavities. This allows to ignore harmoniccavities.WARNING: This function modifies the time reference,this should be avoidedNEWRING=SETCAVITYPHASE(…,’method’,METHOD)Choose the method for computing the energy loss per turnMETHOD: ‘integral’: (default) The losses are obtained fromLosses = Cgamma / 2pi * EGeV^4 * I2Takes into account bending magnets and wigglers.‘tracking’: The losses are obtained by tracking without cavities.Needs radiation ON, takes into account all radiating elements.
- atsetcavity(ring, ..., 'frequency', frequency, ...)#
- ATSECAVITY Set the parameters of RF cavitiesatsetcavity may be used in two modes:Upgrade mode===================================================By default, atsetcavity will act on the “main” cavities: they are defined by thecavpts ring property, or if absent by cavities at the lowest frequency.newring=atsetcavity(ring,…,’frequency’,frequency,…)Set the cavity frequency [Hz]. FREQUENCY is a scalar or an array aslong as the list of selected cavitiesnewring=atsetcavity(ring,…,’frequency’,’nominal’,…)Set the cavity frequency to the nominal value according tocircumference and harmonic numbernewring=atsetcavity(ring,…,’frequency’,’nominal’,’dp’,dp)Set the cavity frequency to the nominal value for the specified dpnewring=atsetcavity(ring,…,’frequency’,’nominal’,’dct’,dct)Set the cavity frequency to the nominal value for the specified dctnewring=atsetcavity(ring,…,’frequency’,’nominal’,’df’,df)Set the cavity frequency to the nominal value + dfnewring=atsetcavity(ring,…,’voltage’,voltage,…)Set the total voltage (all cells) [V]. VOLTAGE will be distributed over thecells: CELL_VOLTAGE = VOLTAGE / PERIODICITY.Then if CELL_VOLTAGE is a scalar, it will be equally shared among theselected cavities. Otherwise it is an array as long as the list ofselected cavities.newring=atsetcavity(ring,…,’harmnumber’,h,…)Set the harmonic number. H is a scalar or an array aslong as the list of selected cavitiesnewring=atsetcavity(ring,…,’timelag’,timelag,…)Set the time lag [m], . TIMELAG is a scalar or an array aslong as the list of selected cavitiesnewring=atsetcavity(ring,…,’cavpts’,cavpts)CAVPTS is the location of the selected RF cavities. The default is to act on the“main” cavities: they are defined by the cavpts ring property, or if absent bycavities at the lowest frequency.NOTES1. In this mode, the radiation state of the lattice is not modified.Compatibility mode===================================================newring = atsetcavity(ring,rfv,radflag,harm_number)RING Ring structureRFV RF voltage (full ring) [V]RADFLAG 0/1: activate/desactivate radiation (atradon/atradoff)HARMNUMBER Harmonic number (full ring)NOTES1. This mode is deprecated and should be replaced byring=atsetcavity(ring,’frequency’,’nominal’,’harmnumber’,harm_number, ‘voltage’,rfv)RING=atSetCavityPhase(RING) (optional)RING=atenable_6d(RING) (optional)2. All the N cavities will have a voltage RFV/N3. sets the synchronous phase of the cavity assuming radiation is turnedon radflag says whether or not we want radiation on, which affectssynchronous phase.
- cavityon(energy)#
- turns Cavities ONcavityon looks for elements that have field Frequencyand sets PassMethod for them to RFCavityPasscavityon(energy)In addition sets the E0 field of the global variable GLOBVALto energy - design energy [eV]If GLOBVAL does not exist cavityon creates itSee also
cavityoff()
,radiationon()
,radiationoff()
,setcavity()
- mcf(ring)#
- momentum compaction factormcf(ring) calculates momentum compaction factor of RINGmcf(ring,dpp) computes the momentum compaction for off-momentum DPPIMPORTANT!!!mcf gives a wrong result with 6-d rings. The RING should be set to 4d.See also
atdisable_6d()
,check_6d()
- nus()#
- Computes synchrotron tune from RF parametersnus = nus (VrfMV, alpha, U0MeV, E0MeV, h)this function return the synchrotron tuneinput:VrfMV is the RF voltage in MValpha is the momentum compaction factorU0MeV is the energy lost per turn in MeVE0MeV is the beam energy in MeVh is the harmonic number
- phis()#
- phase = (U0MeV,VrfMV)this function returns the synchronous phase in radiansinput:U0MeV is energy loss per turn in MeVVrfMV is the RF voltage in MV