Parallel capable? : yes

Parameter Name | Units | Type | Default | Description |

INPUTFILE | STRING | NULL | name of file giving Green function | |

TCOLUMN | STRING | NULL | column in INPUTFILE containing time data | |

WXCOLUMN | STRING | NULL | column in INPUTFILE containing longitudinal Green function | |

WYCOLUMN | STRING | NULL | column in INPUTFILE containing horizontal Green function | |

WZCOLUMN | STRING | NULL | column in INPUTFILE containing vertical Green function | |

FACTOR | double | 1 | factor to multiply wakes by | |

XFACTOR | double | 1 | factor by which to multiply longitudinal | |

YFACTOR | double | 1 | factor by which to multiply horizontal | |

ZFACTOR | double | 1 | factor by which to multiply vertical | |

TURNS_TO_KEEP | long | 128 | number of turns of data to retain | |

RAMP_PASSES | long | `0` |
Number of passes over which to linearly ramp up the wake to full strength. | |

GROUP | string | NULL | Optionally used to assign an element to a group, with a user-defined name. Group names will appear in the parameter output file in the column ElementGroup |

This element provides serial and parallel modeling of long range, multi-bunch, multi-pass, non-resonant wakes.
Resonant wakes can be modeled using the `*RFMODE`

elements, while short-range wakes are modeled with
`WAKE`

, `TRWAKE`

, `ZLONGIT`

, `ZTRANSVERSE`

, and `RFCW`

.

For the `LRWAKE`

element, the beam is assumed to be bunched and wakes are computed bunch-to-bunch.
The long-range wake is assumed to be constant within any single bunch.

To use this element, the beam has to be prepared in a special way so that `elegant` can recognize which
particles belong to which bunches.
See Section 6 for details.
Given a properly prepared beam, the algorithm works as follows.

- Each processor uses arrays to record
- How many particles are in each of bunches,
- The sum of the arrival times at the LRWAKE element for the particles in each bunch, and
- The sum of x and y at the LRWAKE element for the particles in each bunch.

- These arrays are summed across all the processors and used to compute the moments , , and for each bunch, as well as the charge in each bunch.
- Arrays of length from prior turns are kept in a buffer
- Buffer for turns to is copied to slots through , thus overwriting the data for the oldest turn.
- The data for latest turn is copied into slot 1.

- For each bunch, sums are performed over all prior bunches/turns to compute the voltage. For the
longitudinal wake, we have

(26)

(27)

To use LRWAKE, the user provides the wakes (functions of t) in an SDDS file. These wakes may extend over an arbitrary number of turns, with the user declaring how many turns to actually use as part of the element definition. However, they should be zero within the region occupied by a single bunch, to avoid double-counting with the true short-range wake. (Note that the above sums include the self-wake.) Similarly, the short-range should be zero for times comparable to the bunch spacing.