ocelot.cpbd.wake3D¶

Created on 17.05.2016 @author: Igor Zagorodnov Added wake table WakeTableDechirperOffAxis on 11.2019 @authors: S. Tomin and I. Zagorodnov

Module Contents¶

Classes¶

 WakeTable WakeTable(wake_file) - load and prepare wake table WakeTableDechirperOffAxis WakeTableDechirperOffAxis() - creates two wake tables for horizontal and vertical corrugated plates. Wake The wake field impact on the beam is included as series of kicks. WakeKick The wake field impact on the beam is included as series of kicks.

Functions¶

 triang_filter(x, filter_order) Der(x, y) Int1(x, y) Int1h(h, y) project_on_grid_py(Ro, I0, dI0, q_array) Simple function to project particles charge on grid s2current(s_array, q_array, n_points, filter_order, mean_vel) I = s2current(P0,q,Ns,NF)
ocelot.cpbd.wake3D._logger
ocelot.cpbd.wake3D.nb_flag = True
ocelot.cpbd.wake3D.triang_filter(x, filter_order)
ocelot.cpbd.wake3D.Der(x, y)
ocelot.cpbd.wake3D.Int1(x, y)
ocelot.cpbd.wake3D.Int1h(h, y)
ocelot.cpbd.wake3D.project_on_grid_py(Ro, I0, dI0, q_array)

Simple function to project particles charge on grid

Parameters
• Ro – grid

• I0 – grid index for each particle

• dI0 – coefficient how particle close to Ro[i+1]. Example: particle i, dI0=0.7 -> Ro[i]———dI0[i]–Ro[i+1]

• q_array – charge array in [C]

Returns

Ro

ocelot.cpbd.wake3D.project_on_grid
ocelot.cpbd.wake3D.s2current(s_array, q_array, n_points, filter_order, mean_vel)

I = s2current(P0,q,Ns,NF) :param s_array: s-vector, coordinates in longitudinal direction :param q_array: charge-vector :param n_points: number of sampling points :param filter_order: filter order :param mean_vel: mean velocity :return:

class ocelot.cpbd.wake3D.WakeTable(wake_file=None)

WakeTable(wake_file) - load and prepare wake table wake_file - path to the wake table

load_table(self, wake_file)
read_file(self, wake_file)
process_wake_table(self, wake_table)
Parameters

wake_file – file name

Returns

(T, H): T- table of wakes coefs, H - matrix of the coefs place in T

class ocelot.cpbd.wake3D.WakeTableDechirperOffAxis(b=500 * 1e-06, a=0.01, width=0.02, t=0.25 * 0.001, p=0.5 * 0.001, length=1, sigma=3e-05, orient='horz')

WakeTableDechirperOffAxis() - creates two wake tables for horizontal and vertical corrugated plates. Based on https://doi.org/10.1016/j.nima.2016.09.001 and SLAC-PUB-16881

Parameters
• b – distance from the plate in [m]

• a – half gap between plates in [m]

• width – width of the corrugated structure in [m]

• t – longitudinal gap in [m]

• p – period of corrugation in [m]

• length – length of the corrugated structure in [m]

• sigma – characteristic (rms) longitudinal beam size in [m]

• orient – “horz” or “vert” plate orientation

Returns

hor_wake_table, vert_wake_table

calculate_wake_tables(self, b, a, width, t, p, length, sigma)

Function creates two wake tables for horizontal and vertical corrugated plates

Parameters
• b – distance from the plate in [m]

• a – half gap between plates in [m]

• width – width of the corrugated structure in [m]

• t – longitudinal gap in [m]

• p – period of corrugation in [m]

• length – length of the corrugated structure in [m]

• sigma – characteristic longitudinal beam size in [m]]

• filename – save to files if filename is not None

Returns

hor_wake_table, vert_wake_table

class ocelot.cpbd.wake3D.Wake(step=1)

The wake field impact on the beam is included as series of kicks. In order to take into account the impact of the wake field on the beam the longitudinal wake function of point charge through the second order Taylor expansion is used. In general case it uses 13 one-dimensional functions to represent the longitudinal component of the wake function for arbitrary sets of the source and the wittness particles near to the reference axis.

w_sampling = 500 - defines the number of the equidistant sampling points for the one-dimensional

wake coefficients in the Taylor expansion of the 3D wake function.

filter_order = 20 - smoothing filter order wake_table = None - wake table [WakeTable()] factor = 1. - scaling coefficient TH - list from WakeTable, (T, H): T- table of wakes coefs, H - matrix of the coefs place in T

convolution(self, xu, u, xw, w)
wake_convolution(self, xb, bunch, xw, wake)
add_wake(self, I, T)

[x, W] = AddWake(I, T) :param I: wake table in V/C, W in V (R, L, Cinv, nm, W0, N0, W1, N1) :param T: wake table in V/C, W in V :return:

add_total_wake(self, X, Y, Z, q, TH, Ns, NF)
prepare(self, lat)

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

Parameters

lat

Returns

get_long_wake(self, current_profile)

method to extract a longitudinal wake from the Table for specific current profile

Parameters

current_profile – 2D array with shape (n, 2) where first column is position and second is a beam current

Returns

wake

apply(self, p_array, dz)

the method is called on every step.

Parameters
• p_array

• dz

Returns

class ocelot.cpbd.wake3D.WakeKick(factor=1)

The wake field impact on the beam is included as series of kicks. In order to take into account the impact of the wake field on the beam the longitudinal wake function of point charge through the second order Taylor expansion is used. In general case it uses 13 one-dimensional functions to represent the longitudinal component of the wake function for arbitrary sets of the source and the wittness particles near to the reference axis.

w_sampling = 500 - defines the number of the equidistant sampling points for the one-dimensional

wake coefficients in the Taylor expansion of the 3D wake function.

filter_order = 20 - smoothing filter order wake_table = None - wake table [WakeTable()] factor = 1. - scaling coefficient TH - list from WakeTable, (T, H): T- table of wakes coefs, H - matrix of the coefs place in T

apply(self, p_array, dz)

the method is called on every step.

Parameters
• p_array

• dz

Returns