ocelot.cpbd.sc

@author: Igor Zagorodnov @ Martin Dohlus Created on 27.03.2015 Revision on 01.06.2017: coordinate transform to the velocity direction 2019: Added LSC: S. Tomin and I. Zagorodnov

Module Contents

Classes

SpaceCharge

Space Charge physics process

LSC

Longitudinal Space Charge

Functions

smooth_z(Zin, mslice)

ocelot.cpbd.sc.logger
ocelot.cpbd.sc.pyfftw_flag = True
ocelot.cpbd.sc.ne_flag = True
ocelot.cpbd.sc.smooth_z(Zin, mslice)
class ocelot.cpbd.sc.SpaceCharge(step=1)

Bases: ocelot.cpbd.physics_proc.PhysProc

Space Charge physics process

Attributes:

self.step = 1 [in Navigator.unit_step] - step of the Space Charge kick applying self.nmesh_xyz = [63, 63, 63] - 3D mesh

Description:

The space charge forces are calculated by solving the Poisson equation in the bunch frame.

Then the Lorentz transformed electromagnetic field is applied as a kick in the laboratory frame. For the solution of the Poisson equation we use an integral representation of the electrostatic potential by convolution of the free-space Green’s function with the charge distribution. The convolution equation is solved with the help of the Fast Fourier Transform (FFT). The same algorithm for solution of the 3D Poisson equation is used, for example, in ASTRA

prepare(self, lat)

method is called at the moment of Physics Process addition to Navigator class.

Parameters

lat

Returns

sym_kernel(self, ijk2, hxyz)
potential(self, q, steps)
el_field(self, X, Q, gamma, nxyz)
apply(self, p_array, zstep)

the method is called on every step.

Parameters
  • p_array

  • dz

Returns

class ocelot.cpbd.sc.LSC(step=1)

Bases: ocelot.cpbd.physics_proc.PhysProc

Longitudinal Space Charge smooth_param - 0.1 smoothing parameter, resolution = np.std(p_array.tau())*smooth_param

imp_lsc(self, gamma, sigma, w, dz)

gamma - energy sigma - transverse RMS size of the beam w - omega = 2*pi*f

imp_step_lsc(self, gamma, rb, w, dz)

longitudinal space-charge impedance in case of a stepped profile bunch

gamma - energy rb - transverse radius of the beam w - omega = 2*pi*f

wake2impedance(self, s, w)

Fourier transform with exp(iwt) s - Meter w - V/C f - Hz y - Om

impedance2wake(self, f, y)

Fourier transform with exp(-iwt) f - Hz y - Om s - Meter w - V/C

wake_lsc(self, s, bunch, gamma, sigma, dz)
apply(self, p_array, dz)

wakes in V/pC

Parameters
  • p_array

  • dz

Returns