Home
Info
News
Bug-Report
About Genesis
Program
Download
Installation
Manual
Input Parameters
Input Files
Getting Started
Support
3rd Party Programs
Input File Library
Gallery
Contact
Other Links

About GENESIS 1.3

GENESIS 1.3 is a time-dependent three-dimensional FEL code. It is focused to simulate single-pass free-electron lasers, both FEL amplifier and SASE FEL, although the flexible input can be used to easily extend the capacity of GENESIS 1.3 to cover FEL oscillators or multistage set-ups.

GENESIS 1.3 bears its origin in the steady-state 2D code TDA3D, although they have nothing in common except for some naming convention. GENESIS 1.3 has all the features of TDA3D and is intendent as a replacement, in particular that there is no more support for TDA3D. For an easier transition GENESIS 1.3 adopted most of the input and output format of TDA3D. TDA3D input file will most likely not work.

The code was written by Sven Reiche as a part of the Ph.D. thesis at DESY, Germany, and then further extended at UCLA and DESY.

The Particle Equations

Macro particles represent the electron beam in all dimension of the 6D phase space. For convenience the longitudinal position is replaced by the ponderomotive phase of the particle and the transverse momenta are normalized to mc. The equations of motion are

eq1

where betaz is the electron velocity in z, normalized to the speed of light, k is the radiation wave number, ku is the undulator wave number, fc the coupling factor, ar and au are the scalar, normalized amplitudes of the radiation and undulator field, Psi is the phase of the radiation field, Ez is the electrostatic field, bx and by are the normalized dipole strengths in x and y, qx and qy are the quadrupole field strengths in x and y and s is the solenoid field strength.

The differential equations for energy and phase are solved by a 4th order Runge-Kutta solver, where the field amplitude of the discretized radiation field and electrostatic field is interpolated to the particle position.

Distinct to the main undulator field au, the quadrupole and dipole fields combines many field sources such as the natural focusing of the undulator, strong focusing quadrupoles, undulator field errors and corrector magnets (steering magnets). Per integration step their strength is fixed and the differential equations for the transverse motion is solved analytically. Because these equations depend on the particle energy, a higher precision requires to split the pushing of the transverse variables into two half-steps. While the first step relies on the energy value of the previous iteration, the second uses the updated values of the Runge-Kutta solver for this iteration.

The Field Equations

Electro-static and electro-magnetic fields are discretized within GENESIS 1.3. The radiation field is described in the paraxial approximation, where the field is separated into a dominant, fast oscillating term and an amplitude, which slowly varies in magnitude and phase. The partial differential equation

eq2

is of parabolic type where u = -iarexp[iPsi] is the complex representation of the radiation field. Note that there is no explicit dependence on t in the differential equation. Time-dependence effects are discussed below. The transverse profile of the field is discretized on a Cartesian grid with uniform spacing. The Alternating Direction Implicit (ADI) solver guarantees an unconditional stable, fast and memory-efficient method to advance the radiation field one integration step.

Only the longitudinal component of the electro-static field is taken into account within GENESIS 1.3, because it acts as a repulsive force during the formation of the micro bunching. On the scope of a single radiation wavelength the field can be assumed to be periodic in the ponderomotive phase of the electrons. In the Fourier series expansion of the longitudinal field the partial different equation of the l coefficient is

eq3

where the resonant energy is defined as eq4. With a radial grid centered to the electron beam centroid position and the azimuthal decomposition of the Fourier coefficients Ez,l the matrix representation of the partial differential equation is reduced to a tridiagonal matrix, where a fast and memory-efficient solver is applied to. Long-term electro-static fields (e.g. wake fields) must be calculated externally. They can be imported into GENESIS 1.3 and applied to equations of motion for the macro particles.

Time-Dependent Effects

GENESIS 1.3 supports two modes of calculations: steady-state and time-dependent simulations. Steady-state simulations are base on the assumption of an infinite long electron bunch and radiation field with no longitudinal variation of any parameter. The partial derivative with respect to the time drops out of the field equations resulting in the parabolic equation shown above. The longitudinal description can be reduced to a single wavelength (bucket) with periodic boundary condition in the ponderomotive phase of the macro particles.

Time-dependent simulations would require to keep the entire radiation field and electron bunch at whole in memory, which easily exceeds the capability of todays best single processor machines. For a solution, which is not bounded to memory constraints, GENESIS 1.3 discretizes the radiation field and electron beam in t, referring to them as slices. Because information on the local electron distribution is carried by the radiation field only in the forward direction (slippage) time-dependent simulations rolls over the electron bunch starting from the back. Advancing the radiation field is split into two parts: solving the steady-state field equation and copying the field to the next slice. Using the method only a single slice of an electron beam and the radiation field over the total slippage length, which can be significantly shorter than the bunch length, needs to be kept in memory. Although the spacing of the slices can freely be chosen with GENESIS 1.3, some conditions have to be fulfilled for a valid time-dependent simulation.

The propagation of the radiation field has to be done frequently to avoid collective instabilities of the steady-state field solver per integration step within a single slice. The characteristic parameter of the FEL interaction is

eq5

where sigmab is the electron beam radius, Ip is the peak current and IA = 17 kA. The resulting limitation for the integration step size, being much smaller than the gain length, is

eq6

Similar arguments are valid for the separation Deltat of the slices, which is related to the integration step size by the inequity eq7. The constraint for the t-discretization is therefore

eq8

On the other hand each slice has a thickness of one radiation wavelength lambda. The time discretization must be eq9 to avoid overlapping slices. Conflicts might arise if rho approaches unity. Anyhow in this case the entire FEL model, on which GENESIS 1.3 is based, is not valid anymore and other simulation tools need to be used to solve this problem.

Very often the time-window DeltaT, which is spawn by all slices, covers only a subsection of the electron beam. Because GENESIS 1.3 does not know anything about the field, which slips through the back of the time-window, it suppresses the output over the first slippage length. To obtain valid output the time window must be at least as long as the slippage length DeltaTs, yielding the constraint

eq10

where Lu is the length of the undulator. In practice the time-window should be significantly larger than the limit given above to allow a frequency analysis of the radiation. The typical width of the FEL spectrum is rho. To resolve the spectrum the time-window must fulfill the more stringent constraint

eq11

Once GENESIS 1.3 has allocated enough memory to hold the radiation field over one slippage length there is no computational limitation imposed on the maximum size of the time-window.

Pre- and Postprocessors

One of GENESIS 1.3 key feature is the extensive support of additional input files as well the import of modified or process output files of GENESIS 1.3. The generation or processing of these files can be done in the simplest case by hand or by external programs. Although the GENESIS 1.3 website offers several programs for pre- and post-processing they do not officially belong to the GENESIS 1.3 distribution. Experience shows that these programs are mostly customized and specifically bound to a given project or experiment. With the description of the GENESIS 1.3 input and output files in this manual and the 3rd party programs it should be fairly easy to write programs which fulfills the individual needs of the user.

GENESIS 1.3 does not support the graphical preparation of the output data due to two reasons. First, subroutines and function would rely on graphic libraries, which makes it more difficult to write a platform independent source code. At least for the FORTRAN version, using the original file format, it is the idea to have a code independent on any library. In addition several graphic packages needs to be supported. Otherwise it would force the user to use a graphic package, which does not necessary agree with his choice.

Second, time-dependent simulations generate typically more data than useful to be plotted. It should be possible for the user to filter out the data, he needs. In addition some data have to be prepared (e.g. Fourier transformation, averaging, binning for histogram plots) for further information on the simulated FEL process. To help the GENESIS 1.3 offers several programs, which can be the base for the users individual postprocessor.