7.33 insert_sceffects
- type: setup command.
- function: set up for transverse space charge calculation by inserting special elements into the
lattice.
- sequence: must precede run_setup.
- Notes:
- This command is intended only for simulation of space-charge kicks in rings.
- If multiple commands are given, the calculation settings from the last command are used
for all insertion points.
- Command syntax, including use of equations and subcommands, is discussed in 7.2.
&insert_sceffects
STRING name = NULL;
STRING type = NULL;
STRING exclude = NULL;
long disable = 0;
long clear = 0;
STRING element_prefix = "MYSC";
long skip = 0;
long vertical = 0;
long horizontal = 0;
long nonlinear = 0;
long uniform_distribution = 0;
long verbosity = 0;
double averaging_factor = 1;
double slice_duration = 0.0;
long slice_threshold = 100;
long slice_interpolation = 0;
&end
- name — Possibily wild-card containing string specifying the name of the elements after which
to insert the space charge kick element.
- type — Possibily wild-card containing string specifying the type of the elements after which
to insert the space charge kick element.
- exclude — Possibily wild-card containing string specifying the name of elements to be
excluded from the insertion of the space charge kick element.
- disable — If nonzero, the command is ignored.
- clear — If nonzero, all prior space charge insertions are deleted.
- element_prefix — Name under which the space charge kick will appear in the beamline.
- skip — If nonzero, the given number of insertion locations are skipped. If zero, only one
space charge kick is inserted at the end of beamline.
- vertical, horizontal, longitudinal — If non-zero, then space charge is included in the
plane in question. Longituidinal is not, in fact, supported at present; the LSCDRIFT element
can be used for this.
- nonlinear — If zero, use linear approximation, otherwise not. See details below.
- uniform_distribution — Used for bi-Gaussian distributed beam (coasting beam), i.e., beam
that is uniform in z but gaussian in x and y.
- verbosity — Larger non-zero values request greater amounts of detail in printouts.
- averaging_factor — For nonlinear space charge mode only, this parameter allows applying an
infinite-impulse-response (IIR) filter to the turn-by-turn beam size data in order to
reduce the effects of noise. A value of 1 means that only data from the present turn is
used, while values approaching 0 will tend to use the initial beam sizes only. In more
detail, the effective rms beam size
used in the calculation of the kicks for the ith turn
is
 | (6) |
where σi is the actual rms beam size. N.B.: strictly speaking, simulations performed with f≠1 are
invalid, as the effect of strong space charge could be understated. However, judicious use of this
parameter may allow valid simulations with fewer particles. The user should vary the parameter to
ensure that results are insenstive to the value.
- slice_duration — The length, in seconds, of slices into which to divide the beam for
computations. Space charge kicks are computed slice-by-slice assuming each slice is independent and
has a uniform longitudinal distribution.
- slice_threshold — The minimum number of particles in a slice, below which slice-based
computations of the centroids and beam sizes will replaced with whole-beam values. If this value is
too small, numerical instabilities may be encountered.
- slice_interpolation — If non-zero, the charge, centroid, and beam size values used to compute
the kicks are interpolated linearly within each slice.
Important notes:
- By default skip=0, which results in only one SCMULT element at the end of the beamline,
regardless of whether values are given for the name or type fields.
- This element is not designed for space charge calculations in guns or linacs. It is only intended
for simulating space charge in rings.
- This command can not work with concatenation-based matrix tracking.
- Some users use matched_to_cell in the bunched_beam command. This will erase SCMULT
assignments along the beamline. In this case, issue another twiss_output command just
before tracking.
This element simulates transverse space charge (SC) kicks using K.Y. Ng’s formula [24].
The linear SC force is given by:
 | (7) |
where Ksc =
, L is the integrating length, σx,y,z are rms beam size.
The non-linear SC force is given by:
 | (8) |
where w(z) is the complex error function
 | (9) |
These expressions appear to diverge when σx = σy. In fact, this is not true, because the expressions inside
the square brackets will provide zero too at σx = σy to cancel the poles outside. In our code, we calculate
this equation at 1.01σx and 0.99σx, and average the total effects.