Class IdealMagSectorDipole2
- All Implemented Interfaces:
IElectromagnet
,IComponent
,IElement
Represents a bending magnetic dipole magnet for a beam in a sector configuration. Thus, there are no edge effects as the beam enters the magnet orthogonally.
The MAD convention for sector magnets is followed for coordinates, signs, and lengths. The formulation from D. Carey's Optics book, Transport manual, and H. Wiedemann's books are used.
NOTES:
Both the dipole effects and the quadrupole (focusing) effects vary off the
design values with differing magnetic field strengths. This situation is in
contrast with the previous version of this class where only the quadrupole
effects varied, and in contract with the class ThickDipole
where
only the dipole effects varied.
References
[1] D.C. Carey, The Optics of Charged Particle Beams (Harwood, 1987)
[2] H. Wiedemann, Particle Accelerator Physics I, 2nd Ed. (Springer, 1999)
- Author:
- John D. Galambos, Jeff Holmes, Christopher K. Allen
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Tag for parameters in the XML configuration filestatic final String
Tag for parameters in the XML configuration filestatic final String
Tag for parameters in the XML configuration filestatic final String
all thick elements have length - CKAstatic final String
Tag for parameters in the XML configuration filestatic final String
string type identifier for all IdealMagSectorDipole objectsFields inherited from class xal.model.elem.ThickElectromagnet
dblField, enmOrient
Fields inherited from class xal.model.elem.Element
dblNodeLen, dblNodePos
Fields inherited from interface xal.model.elem.sync.IElectromagnet
ORIENT_HOR, ORIENT_NONE, ORIENT_VER
Fields inherited from interface xal.model.IElement
LIGHT_SPEED, PERMEABILITY, PERMITTIVITY, UNIT_CHARGE
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor - creates a new uninitialized instance of IdealMagSectorDipole.IdealMagSectorDipole2
(String strId) Default constructor - creates a new uninitialized instance of IdealMagSectorDipole.IdealMagSectorDipole2
(String strId, double dblLen, int enmOrient, double dblFld, double dblGap, double dblFldInd) Creates a new instance of IdealMagSectorDipole -
Method Summary
Modifier and TypeMethodDescriptiondouble
Compute and return the bending radius of the design orbit throughout the magnet.double
Compute and return the curvature of the design orbit through the magnet.double
Computes and returns the path length variation factor.double
compProbeCurvature
(IProbe probe) Compute the path curvature within the dipole for the given probe.double
compQuadrupoleConstant
(IProbe probe) Compute and return the quadrupole focusing constant for the current dipole settings and the given probe.double
elapsedTime
(IProbe probe, double dblLen) Returns the time taken for the probe to drift through part of the element.double
energyGain
(IProbe probe, double dblLen) Return the energy gain imparted to a particular probe.double
Return the bending angle of the magnet's design trajectory.double
Return the path length of the design trajectory through the magnet.double
Return the magnetic field index of the magnet evaluated at the design orbit.boolean
Return the field path flag.double
Return the gap size between the dipole magnet poles.double
getK0()
This is the design bending curvature h = 1/R0 where R0 is the design bending radius.double
Returns the quadrupole field component of the bending magnet.void
print
(PrintWriter os) Dump current state and content to output stream.void
setDesignBendAngle
(double dblBendAng) Set the bending angle of the reference (design) orbit.void
setDesignPathLength
(double dblPathLen) Set the reference (design) orbit path-length through the magnet.void
setFieldIndex
(double dblFldInd) Set the magnetic field index of the magnet evaluated at the design orbit.void
setFieldPathFlag
(boolean ba) sako - to set field path flag.void
setGapHeight
(double dblGap) Set the gap size between the dipole magnet poles.void
setK0
(double dbl) Set the design curvature h of the bending magnet.void
setQuadComponent
(double dbl) quad K1 component defined in SAD (=normal k1 * L)transferMap
(IProbe probe, double dblLen) Compute the partial transfer map of an ideal sector magnet for the particular probe.Methods inherited from class xal.model.elem.ThickElectromagnet
getMagField, getOrientation, initializeFrom, setMagField, setOrientation
Methods inherited from class xal.model.elem.ThickElement
applyErrors, getLength, isFirstSubslice, isLastSubslice, longitudinalPhaseAdvance, setLength
Methods inherited from class xal.model.elem.Element
addCloseElements, backPropagate, backPropagate, compDriftingTime, compProbeLocation, getAlignX, getAlignY, getAlignZ, getCloseElements, getHardwareNodeId, getId, getLatticePosition, getNodeLen, getNodePos, getParent, getPhiX, getPhiY, getPhiZ, getPosition, getType, getUID, propagate, propagate, setAlign, setAlignX, setAlignY, setAlignZ, setHardwareNodeId, setId, setParent, setPhiX, setPhiY, setPhiZ, setPosition, toString
-
Field Details
-
TYPE
string type identifier for all IdealMagSectorDipole objects- See Also:
-
PATH_LENGTH
all thick elements have length - CKA- See Also:
-
FIELD
Tag for parameters in the XML configuration file- See Also:
-
ENTRANCE_ANGLE
Tag for parameters in the XML configuration file- See Also:
-
EXIT_ANGLE
Tag for parameters in the XML configuration file- See Also:
-
QUAD_COMPONENT
Tag for parameters in the XML configuration file- See Also:
-
-
Constructor Details
-
IdealMagSectorDipole2
public IdealMagSectorDipole2()Default constructor - creates a new uninitialized instance of IdealMagSectorDipole. This is the constructor called in automatic lattice generation. Thus, all element properties are set following construction. -
IdealMagSectorDipole2
Default constructor - creates a new uninitialized instance of IdealMagSectorDipole. This is the constructor called in automatic lattice generation. Thus, all element properties are set following construction. -
IdealMagSectorDipole2
public IdealMagSectorDipole2(String strId, double dblLen, int enmOrient, double dblFld, double dblGap, double dblFldInd) Creates a new instance of IdealMagSectorDipole- Parameters:
strId
- identifier for this IdealMagSectorDipole objectdblFld
- field gradient strength (in Tesla)dblLen
- pathLength of the dipole (in m)dblGap
- full pole gap of the dipole (in m)dblFldInd
- The dimensionless integral term for the extended fringe field focusing, Should be = 1/6 for linear drop off, ~ 0.4 for clamped Rogowski coil, or 0.7 for an unclamped Rogowski coil. (dimensionless)
-
-
Method Details
-
getK0
public double getK0()This is the design bending curvature h = 1/R0 where R0 is the design bending radius.- Returns:
- the design curvature of the bending magnet
- Since:
- Apr 19, 2011
-
setK0
public void setK0(double dbl) Set the design curvature h of the bending magnet.- Parameters:
dbl
- design curvature h = 1/R0 where R0 is the design path radius.- Since:
- Apr 19, 2011
-
setFieldIndex
public void setFieldIndex(double dblFldInd) Set the magnetic field index of the magnet evaluated at the design orbit. The field index is defined as n := -(R0/B0)(dB/dR) where R0 is the radius of the design orbit, B0 is the field at the design orbit (@see IdealMagSectorDipole#getField), and dB/dR is the derivative of the field with respect to the path deflection - evaluated at the design radius R0.- Parameters:
dblFldInd
- field index of the magnet (unitless)
-
setQuadComponent
public void setQuadComponent(double dbl) quad K1 component defined in SAD (=normal k1 * L) -
setGapHeight
public void setGapHeight(double dblGap) Set the gap size between the dipole magnet poles.- Parameters:
dblGap
- gap size in meters
-
setDesignPathLength
public void setDesignPathLength(double dblPathLen) Set the reference (design) orbit path-length through the magnet.- Parameters:
dblPathLen
- path length of design trajectory (meters)
-
setDesignBendAngle
public void setDesignBendAngle(double dblBendAng) Set the bending angle of the reference (design) orbit.- Parameters:
dblBendAng
- design trajectory bending angle (radians)
-
setFieldPathFlag
public void setFieldPathFlag(boolean ba) sako - to set field path flag.true
means use design path throughout.- Parameters:
ba
- new field path flag value
-
getFieldIndex
public double getFieldIndex()Return the magnetic field index of the magnet evaluated at the design orbit. The field index is defined as
n := -(R0/B0)(dB/dR)
where R0 is the radius of the design orbit, B0 is the field at the design orbit (see IdealMagSectorDipole#getField), and dB/dR is the derivative of the field with respect to the path deflection - evaluated at the design radius R0.- Returns:
- field index of the magnet at the design orbit (unitless)
-
getQuadComponent
public double getQuadComponent()Returns the quadrupole field component of the bending magnet.- Returns:
- quadrupole field component of this magnet
-
getGapHeight
public double getGapHeight()Return the gap size between the dipole magnet poles.- Returns:
- gap size in meters
-
getDesignPathLength
public double getDesignPathLength()Return the path length of the design trajectory through the magnet.- Returns:
- design trajectory path length (in meters)
-
getDesignBendingAngle
public double getDesignBendingAngle()Return the bending angle of the magnet's design trajectory.- Returns:
- design trajectory bending angle (in radians)
-
getFieldPathFlag
public boolean getFieldPathFlag()Return the field path flag.- Returns:
- field path flag = 1 (use design field) or 0 (use bField parameter)
-
compDesignCurvature
public double compDesignCurvature()Compute and return the curvature of the design orbit through the magnet. Note that this value is the inverse of the design curvature radius R0.- Returns:
- the design curvature 1/R0 (in 1/meters)
- See Also:
-
compDesignBendingRadius
public double compDesignBendingRadius()Compute and return the bending radius of the design orbit throughout the magnet. Note that this value is the inverse of design curvature h0.- Returns:
- the design bending radius R0 (in meters)
- See Also:
-
compProbeCurvature
Compute the path curvature within the dipole for the given probe. The path curvature is 1/R where R is the bending radius of the dipole (radius of curvature). Note that for zero fields the radius of curvature is infinite while the path curvature is zero.- Parameters:
probe
- probe object to be deflected- Returns:
- dipole path curvature for given probe (in 1/meters)
-
compQuadrupoleConstant
Compute and return the quadrupole focusing constant for the current dipole settings and the given probe. The curvature for the current magnet settings and probe state is used - making this a dynamic quantity. The field index does not change within the magnet.
NOTE:- This value may be negative if the resulting curvature is negative This condition means we are bending toward the negative x direction and does not imply defocusing.
- This value is essentially the same as the field index of the magnet - the two values differ by a constant, the curvature squared. The square-root of this value provides the betatron phase advance wave number.
K_quad := (1/R)(1/B)(dB/dR)
= - h^2 * n0
where K_quad is the quadrupole focusing constant, R is the bending radius at current settings, B is the current magnet field strength , h = 1/R is the curvature at the current settings, and n0 is the field index.
- Parameters:
probe
- we use the probe velocity to determine curvature- Returns:
- quadrupole focusing constant (in 1/meters^2)
-
compPathLengthVariationFactor
Computes and returns the path length variation factor. This is the factor by with the synchronous particle path length expands or contracts about the design path length when considering the effects of dipole field strength other than the design value. Denoting this quantity as w then it can be expressed
w = 1 - h/h0 ,
where h0 is the bending curvature of the design field and h is the bending curvature of the current field strength. Thus, for a distance Δs0 along the design path, the synchronous particle actually travels a distance
Δs = wΔs0
along the actual path.- Parameters:
probe
- probe moving a some velocity determining the bending curvature- Returns:
- the path length variation factor w
- Since:
- Nov 27, 2013
-
elapsedTime
Returns the time taken for the probe to drift through part of the element.- Specified by:
elapsedTime
in interfaceIElement
- Specified by:
elapsedTime
in classThickElement
- Parameters:
probe
- propagating probedblLen
- length of subsection to propagate through meters- Returns:
- the elapsed time through sectionUnits: seconds
-
energyGain
Return the energy gain imparted to a particular probe. For an ideal quadrupole magnet this value is always zero.- Specified by:
energyGain
in interfaceIElement
- Specified by:
energyGain
in classThickElement
- Parameters:
dblLen
- dummy argumentprobe
- dummy argument- Returns:
- returns a zero value
-
transferMap
Compute the partial transfer map of an ideal sector magnet for the particular probe. Computes transfer map for a section of magnet
NOTEh
meters in length.The arc length dL of the probe will probably be larger than the physical step length h. This is because the path length of the design trajectory is generally larger than the physical length (otherwise no bending would occur).
- Specified by:
transferMap
in interfaceIElement
- Specified by:
transferMap
in classThickElement
- Parameters:
dblLen
- physical step length (meters)probe
- uses the rest and kinetic energy parameters from the probe- Returns:
- transfer map of ideal sector magnet for particular probe
- Throws:
ModelException
- unknown quadrupole orientation- See Also:
-
print
Dump current state and content to output stream.
-