A quadrupole implemented as a matrix, up to 3rd order. Use KQUAD for symplectic tracking.
Parallel capable? : yes
GPU capable? : yes
Backtracking capable? : yes
Parameter Name  Units  Type  Default  Description 
L  M  double  0.0  length 
K1  1∕M^{2}  double  0.0  geometric strength 
TILT  RAD  double  0.0  rotation about longitudinal axis 
PITCH  RAD  double  0.0  rotation about horizontal axis. Ignored if MALIGN_METHOD=0 
YAW  RAD  double  0.0  rotation about vertical axis. Ignored if MALIGN_METHOD=0 
DX  M  double  0.0  misalignment 
DY  M  double  0.0  misalignment 
DZ  M  double  0.0  misalignment 
FSE  double  0.0  fractional strength error 

HKICK  RAD  double  0.0  horizontal correction kick 
VKICK  RAD  double  0.0  vertical correction kick 
HCALIBRATION  double  1  calibration factor for horizontal correction kick 

VCALIBRATION  double  1  calibration factor for vertical correction kick 

HSTEERING  short  0  use for horizontal steering? 

VSTEERING  short  0  use for vertical steering? 

ORDER  short  0  matrix order 

EDGE1_EFFECTS  short  1  include entrance edge effects? 

EDGE2_EFFECTS  short  1  include exit edge effects? 

FRINGE_TYPE  STRING  fixedstrength  type of fringe: ”inset”, ”fixedstrength”, or ”integrals” 

FFRINGE  double  0.0  For nonintegrals mode, fraction of length occupied by linear fringe region. 

LEFFECTIVE  M  double  1  Effective length. Ignored if nonpositive. Cannot be used with nonzero FFRINGE. 
QUAD continued
A quadrupole implemented as a matrix, up to 3rd order. Use KQUAD for symplectic tracking.
Parameter Name  Units  Type  Default  Description 
I0P  M  double  0.0  i0+ fringe integral 
I1P  M^{2}  double  0.0  i1+ fringe integral 
I2P  M^{3}  double  0.0  i2+ fringe integral 
I3P  M^{4}  double  0.0  i3+ fringe integral 
LAMBDA2P  M^{3}  double  0.0  lambda2+ fringe integral 
I0M  M  double  0.0  i0 fringe integral 
I1M  M^{2}  double  0.0  i1 fringe integral 
I2M  M^{3}  double  0.0  i2 fringe integral 
I3M  M^{4}  double  0.0  i3 fringe integral 
LAMBDA2M  M^{3}  double  0.0  lambda2 fringe integral 
RADIAL  short  0  If nonzero, converts the quadrupole into a radiallyfocusing lens 

MALIGN_METHOD  short  0  0=original, 1=new entracecentered, 2=new bodycentered 

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

This element simulates a quadrupole using a matrix of first, second, or third order.
Length specification As of version 29.2, this element incorporates the ability to have different values for the insertion and effective lengths. This is invoked when LEFFECTIVE is positive. In this case, the L parameter is understood to be the physical insertion length. Using LEFFECTIVE is a convenient way to incorporate the fact that the effective length may differ from the physical length and even vary with excitation, without having to modify the drift spaces on either side of the quadrupole element.
Fringe effects By default, the element has hard edges and constant field within the defined length, L. However, this element supports two different methods of implementing fringe fields. Which method is used is determined by the FRINGE_TYPE parameter.
Edge integral method The most recent and preferred implementation of fringe field effects is based on edge integrals and is invoked by setting FRINGE_TYPE to “integrals”. This method is compatible with the use of LEFFECTIVE. However, it provides a firstorder matrix only.
The model is based on publications of D. Zhuo et al. [34] and J. Irwin et al. [35], as well as unpublished work of C. X. Wang (ANL). The fringe field is characterized by 10 integrals given in equations 19, 20, and 21 of [34]. However, the values input into elegant should be normalized by K_{1} or K_{1}^{2}, as appropriate.
For the exitside fringe field, let s_{1} be the center of the magnet, s_{0} be the location of the nominal end of the magnet (for a hardedge model), and let s_{2} be a point well outside the magnet. Using K_{1,he}(s) to represent the hard edge model and K_{1}(s) the actual field profile, we define the normalized difference as (s) = (K_{1}(s)  K_{1,he}(s))∕K_{1}(s_{1}). (Thus, (s) = (s)∕K_{0}, using the notation of Zhou et al.)
The integrals to be input to elegant are defined as
Normally, the effects are dominated by i_{1}^{} and i_{1}^{+}.
Trapazoidal models This method is based on a thirdorder matrix formalism and the assumption that the fringe fields depend linearly on z. Although the thirdorder matrix is computed, it is important to note that the assumed fields do not satisfy Maxwell’s equations.
To invoke this method, one specifies “inset” or “fixedstrength” for the FRINGE_TYPE parameter and then provides a nonzero value for FFRINGE. If FFRINGE is zero (the default), then the magnet is hardedged regardless of the setting of FRINGE_TYPE. If FFRINGE is positive, then the magnet has linear fringe fields of length FFRINGE*L/2 at each end. That is, the total length of fringe field from both ends combined is FFRINGE*L.
Depending on the value of FRINGE_TYPE, the fringe fields are modeled as contained within the length L (“inset” type) or extending symmetrically outside the length L (“fixedstrength” type).
For “inset” type fringe fields, the length of the “hard core” part of the quadrupole is L*(1FFRINGE). For “fixedstrength” type fringe fields, the length of the hard core is L*(1FFRINGE/2). In the latter case, the fringe gradient reaches 50% of the hard core value at the nominal boundaries of the magnet. This means that the integrated strength of the magnet does not change as the FFRINGE parameter is varied. This is not the case with “inset” type fringe fields.
Misalignments
There are three modes for implementing alignment errors. Which is used is controlled by the value of the MALIGN_METHOD parameter:
For elements with nonzero TILT, error displacements and rotations are performed in the lab frame.
QUFRINGE