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#IdealMagSectorDipolexal.model.elem#IdealMagDipoleFace
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstorage to reserve for child componentsstatic final Stringstring type identifier for all IdealMagSectorDipole objectsFields inherited from class xal.model.elem.ElementSeq
SIZE_DEF_RESERVEFields 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 newIdealMagWedgeDipoleobject and specify its instance identifier string. -
Method Summary
Modifier and TypeMethodDescriptiondoublecompProbeCurvature(IProbe probe) Compute the path curvature within the dipole for the given probe.doubleReturn the bending angle of the magnet's design trajectory.doubleReturn the path length of the design trajectory through the magnet.doubleGet the entrance fringe integral (a la D.C.doubleGet the entrance pole face angle with respect to the design trajectorydoubleGet the exit fringe integral (a la D.C.doubleGet the exit pole face angle with respect to the design trajectorydoubleReturn the magnetic field index of the magnet evaluated at the design orbit.doubleReturn the gap size between the dipole magnet poles.doublegetK0()Returns the magnet strength I think.doubleOverride the method in base classElementSeqto return an independent property for this element.doubleGet the magnetic field strength of the dipole electromagnetintReturn the orientation enumeration code specifying the bending plane.doubleReturn the physical length of the bending dipole.doubleThis method overrides theElementSeqbase class implementation to return an independent property for this element.voidinitializeFrom(LatticeElement element) Conversion method to be provided by the uservoidsetAlignZ(double dz) Set the longitudinal misalignmentvoidsetDesignBendAngle(double dblBendAng) Set the bending angle of the reference (design) orbit.voidsetDesignPathLength(double dblPathLen) Set the reference (design) orbit path-length through the magnet.voidsetEntrFringeIntegral(double dblFldInt) Set the entrance fringe integral (a la D.C.voidsetEntrPoleAngle(double dblAngPole) Set the entrance pole face angle with respect to the design trajectoryvoidsetExitFringeIntegral(double dblFldInt) Set the exit fringe integral (a la D.C.voidsetExitPoleAngle(double dblAngPole) Set the exit pole face angle with respect to the design trajectoryvoidsetFieldIndex(double dblFldInd) Set the magnetic field index of the magnet evaluated at the design orbit.voidsetFieldPathFlag(boolean bolFlag) sako use design field if fieldPathFlag = 1, and use bfield if 0voidsetGapSize(double dblGap) Set the gap size between the dipole magnet poles.voidsetHardwareNodeId(String strSmfId) Overrides the defaultsetHardwareNodeId(String)method for theElementSeqbase class so we can set the hardware node IDs for the composite elements.voidOverride the defaultsetId(String)method forElementSeqobjects so we can set the identifier strings of each composite element.voidsetK0(double k0) Set the dipole strength of the magnet - I think.voidsetMagField(double dblField) Set the magnetic field strength of the dipole electromagnet.voidsetOrientation(int enmOrient) Set the dipole magnet bending orientationvoidsetPhysicalLength(double dblLen) Set the physical length of the bending dipole magnet itself.voidsetPosition(double dblPos) Set the position of the magnet along the design path within the containing lattice.voidsetQuadComponent(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, toStringLegacyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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 newIdealMagWedgeDipoleobject and specify its instance identifier string.- Parameters:
strId- instance identifier string
-
-
Method Details
-
setHardwareNodeId
Overrides the defaultsetHardwareNodeId(String)method for theElementSeqbase class so we can set the hardware node IDs for the composite elements.- Overrides:
setHardwareNodeIdin 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:ElementSeqSet the longitudinal misalignment- Overrides:
setAlignZin 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 forElementSeqobjects so we can set the identifier strings of each composite element.- Overrides:
setIdin classElementSeq- Parameters:
strId- identifier string of this composite.- See Also:
-
getPosition
public double getPosition()This method overrides theElementSeqbase 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:
getPositionin interfaceIComponent- Overrides:
getPositionin 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 classElementSeqto 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:
getLengthin interfaceIComponent- Overrides:
getLengthin 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:
initializeFromin interfaceIComponent- Overrides:
initializeFromin 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).
-