Class IdealMagWedgeDipole2
- All Implemented Interfaces:
Iterable<IComponent>
,IElectromagnet
,IComponent
,IComposite
IdealMagSectorDipole
sandwiched between two
IdealDipoleFace
elements that provided the thin lens dynamics of
the tilted pole faces.
NOTE: A rectangle dipole can be specified by setting equal exit and entrance
pole face angles.- Author:
- Christopher K. Allen
- See Also:
-
xal.model.elem#IdealMagSectorDipole
xal.model.elem#IdealMagDipoleFace
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
storage to reserve for child componentsstatic final String
string type identifier for all IdealMagSectorDipole objectsFields inherited from class xal.model.elem.ElementSeq
SIZE_DEF_RESERVE
Fields inherited from interface xal.model.elem.sync.IElectromagnet
ORIENT_HOR, ORIENT_NONE, ORIENT_VER
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor - creates a new uninitialized instance ofIdealMagWedgeDipole
.IdealMagWedgeDipole2
(String strId) Create newIdealMagWedgeDipole
object and specify its instance identifier string. -
Method Summary
Modifier and TypeMethodDescriptiondouble
compProbeCurvature
(IProbe probe) Compute the path curvature within the dipole for the given 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
Get the entrance fringe integral (a la D.C.double
Get the entrance pole face angle with respect to the design trajectorydouble
Get the exit fringe integral (a la D.C.double
Get the exit pole face angle with respect to the design trajectorydouble
Return the magnetic field index of the magnet evaluated at the design orbit.double
Return the gap size between the dipole magnet poles.double
getK0()
Returns the magnet strength I think.double
Override the method in base classElementSeq
to return an independent property for this element.double
Get the magnetic field strength of the dipole electromagnetint
Return the orientation enumeration code specifying the bending plane.double
Return the physical length of the bending dipole.double
This method overrides theElementSeq
base class implementation to return an independent property for this element.void
initializeFrom
(LatticeElement element) Conversion method to be provided by the uservoid
setAlignZ
(double dz) Set the longitudinal misalignmentvoid
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
setEntrFringeIntegral
(double dblFldInt) Set the entrance fringe integral (a la D.C.void
setEntrPoleAngle
(double dblAngPole) Set the entrance pole face angle with respect to the design trajectoryvoid
setExitFringeIntegral
(double dblFldInt) Set the exit fringe integral (a la D.C.void
setExitPoleAngle
(double dblAngPole) Set the exit pole face angle with respect to the design trajectoryvoid
setFieldIndex
(double dblFldInd) Set the magnetic field index of the magnet evaluated at the design orbit.void
setFieldPathFlag
(boolean bolFlag) sako use design field if fieldPathFlag = 1, and use bfield if 0void
setGapSize
(double dblGap) Set the gap size between the dipole magnet poles.void
setHardwareNodeId
(String strSmfId) Overrides the defaultsetHardwareNodeId(String)
method for theElementSeq
base class so we can set the hardware node IDs for the composite elements.void
Override the defaultsetId(String)
method forElementSeq
objects so we can set the identifier strings of each composite element.void
setK0
(double k0) Set the dipole strength of the magnet - I think.void
setMagField
(double dblField) Set the magnetic field strength of the dipole electromagnet.void
setOrientation
(int enmOrient) Set the dipole magnet bending orientationvoid
setPhysicalLength
(double dblLen) Set the physical length of the bending dipole magnet itself.void
setPosition
(double dblPos) Set the position of the magnet along the design path within the containing lattice.void
setQuadComponent
(double dblFldInd) for SAD elements, K1 variable (=normal k1*L) in SADMethods inherited from class xal.model.elem.ElementSeq
addChild, backPropagate, backPropagate, childIterator, compDependParams, concatenateEquals, getAlignX, getAlignY, getAlignZ, getAllElements, getChild, getChildCount, getComments, getElementList, getForwardCompList, getHardwareNodeId, getId, getLatticePosition, getLeafCount, getParent, getPhiX, getPhiY, getPhiZ, getReverseCompList, getType, globalBackIterator, globalIterator, iterator, localBackIterator, localIterator, print, propagate, propagate, remove, setAlign, setAlignX, setAlignY, setComments, setCompList, setDirty, setParent, setPhiX, setPhiY, setPhiZ, toString, toStringLegacy
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
TYPE
string type identifier for all IdealMagSectorDipole objects- See Also:
-
SIZE_RESERVE
public static final int SIZE_RESERVEstorage to reserve for child components- See Also:
-
-
Constructor Details
-
IdealMagWedgeDipole2
public IdealMagWedgeDipole2()Default constructor - creates a new uninitialized instance ofIdealMagWedgeDipole
. -
IdealMagWedgeDipole2
Create newIdealMagWedgeDipole
object and specify its instance identifier string.- Parameters:
strId
- instance identifier string
-
-
Method Details
-
setHardwareNodeId
Overrides the defaultsetHardwareNodeId(String)
method for theElementSeq
base class so we can set the hardware node IDs for the composite elements.- Overrides:
setHardwareNodeId
in classElementSeq
- Parameters:
strSmfId
- identifier for the modeled hardware node (SMF object)- Since:
- Sep 5, 2014
- See Also:
-
setAlignZ
public void setAlignZ(double dz) Description copied from class:ElementSeq
Set the longitudinal misalignment- Overrides:
setAlignZ
in classElementSeq
- Parameters:
dz
- misalignment (in m)
-
setPosition
public void setPosition(double dblPos) Set the position of the magnet along the design path within the containing lattice.
NOTE:We have a bit of a logistics problem here because this is a composite element. So when setting the position of this element we want to set the positions of all the internal elements, in particular, the pole faces. Thus, we need the physical length of the magnet to do this. Either we require the length to be provided when invoked this method, or this method must be invoked after setting the physical length. I opted for the former.
The physical length of this element is not set when invoking this method. That must be done separately with a call to
setPhysicalLength(double)
.- Parameters:
dblPos
- lattice position of element center (meters)- See Also:
-
setPhysicalLength
public void setPhysicalLength(double dblLen) Set the physical length of the bending dipole magnet itself. The design path length is generally larger than this value because of the curvature.- Parameters:
dblLen
- physical length through bend 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)
-
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 dblFldInd) for SAD elements, K1 variable (=normal k1*L) in SAD- Parameters:
dblFldInd
- the field index for the quadrupole
-
setGapSize
public void setGapSize(double dblGap) Set the gap size between the dipole magnet poles.- Parameters:
dblGap
- gap size in meters
-
setEntrPoleAngle
public void setEntrPoleAngle(double dblAngPole) Set the entrance pole face angle with respect to the design trajectory- Parameters:
dblAngPole
- pole face angle in radians
-
setExitPoleAngle
public void setExitPoleAngle(double dblAngPole) Set the exit pole face angle with respect to the design trajectory- Parameters:
dblAngPole
- pole face angle in radians
-
setEntrFringeIntegral
public void setEntrFringeIntegral(double dblFldInt) Set the entrance fringe integral (a la D.C. Carey) which accounts for the first-order effects of the fringing field outside the dipole magnet.- Parameters:
dblFldInt
- fringe field integral (unitless)- See Also:
-
setExitFringeIntegral
public void setExitFringeIntegral(double dblFldInt) Set the exit fringe integral (a la D.C. Carey) which accounts for the first-order effects of the fringing field outside the dipole magnet.- Parameters:
dblFldInt
- fringe field integral (unitless)- See Also:
-
setFieldPathFlag
public void setFieldPathFlag(boolean bolFlag) sako use design field if fieldPathFlag = 1, and use bfield if 0 -
setK0
public void setK0(double k0) Set the dipole strength of the magnet - I think. I didn't write this method.- Parameters:
k0
- magnet strength ?- Since:
- Apr 19, 2011
-
getK0
public double getK0()Returns the magnet strength I think. I didn't write this method so I am guessing (I better name or some documentation would have helped).- Returns:
- magnet strengh ?
- Since:
- Apr 19, 2011
-
getGapHeight
public double getGapHeight()Return the gap size between the dipole magnet poles.- Returns:
- gap size in meters
-
getEntrPoleAngle
public double getEntrPoleAngle()Get the entrance pole face angle with respect to the design trajectory- Returns:
- pole face angle in radians
-
getExitPoleAngle
public double getExitPoleAngle()Get the exit pole face angle with respect to the design trajectory- Returns:
- pole face angle in radians
-
getEntrFringeIntegral
public double getEntrFringeIntegral()Get the entrance fringe integral (a la D.C. Carey) which accounts for the first-order effects of the fringing field outside the dipole magnet.- Returns:
- fringe field integral (unitless)
- See Also:
-
getExitFringeIntegral
public double getExitFringeIntegral()Get the exit fringe integral (a la D.C. Carey) which accounts for the first-order effects of the fringing field outside the dipole magnet.- Returns:
- fringe field integral (unitless)
- See Also:
-
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 (seeIdealMagSectorDipole2.getFieldIndex()
), 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)
-
getPhysicalLength
public double getPhysicalLength()Return the physical length of the bending dipole. The design path length is generally larger than this value because of the curvature.- Returns:
- physical length through bend 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)
-
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)
-
setId
Override the defaultsetId(String)
method forElementSeq
objects so we can set the identifier strings of each composite element.- Overrides:
setId
in classElementSeq
- Parameters:
strId
- identifier string of this composite.- See Also:
-
getPosition
public double getPosition()This method overrides theElementSeq
base class implementation to return an independent property for this element. This property is set upon initialization since, although this element is a sequence, it represents a single hardware node. Thus, the position is a hardware property, and not a dynamic property of the sequence.- Specified by:
getPosition
in interfaceIComponent
- Overrides:
getPosition
in classElementSeq
- Returns:
- center position of this element within the immediate parent container (meters)
- Since:
- Dec 3, 2015, Christopher K. Allen
- See Also:
-
getLength
public double getLength()Override the method in base classElementSeq
to return an independent property for this element. Since this class represents a single hardware node it has a length that does not change.- Specified by:
getLength
in interfaceIComponent
- Overrides:
getLength
in classElementSeq
- Returns:
- total length of the sequence (in meters)
- Since:
- Dec 3, 2015, Christopher K. Allen
- See Also:
-
initializeFrom
Conversion method to be provided by the user- Specified by:
initializeFrom
in interfaceIComponent
- Overrides:
initializeFrom
in classElectromagnetSeq
- Parameters:
element
- the SMF node to convert
-
getOrientation
public int getOrientation()Return the orientation enumeration code specifying the bending plane.- Returns:
- ORIENT_HOR - dipole has steering action in x (horizontal) plane ORIENT_VER - dipole has steering action in y (vertical) plane ORIENT_NONE - error
-
getMagField
public double getMagField()Get the magnetic field strength of the dipole electromagnet- Returns:
- magnetic field (in Tesla).
-
setOrientation
public void setOrientation(int enmOrient) Set the dipole magnet bending orientation- Parameters:
enmOrient
- magnet orientation enumeration code- See Also:
-
setMagField
public void setMagField(double dblField) Set the magnetic field strength of the dipole electromagnet.- Parameters:
dblField
- magnetic field (in Tesla).
-