Package xal.model.elem
Class IdealMagFringeQuad
java.lang.Object
xal.model.elem.ElementSeq
xal.model.elem.ElectromagnetSeq
xal.model.elem.IdealMagFringeQuad
- All Implemented Interfaces:
Iterable<IComponent>
,IElectromagnet
,IComponent
,IComposite
Represents a quadrupole magnet with thin face elements which represent fringe
field. This is a composite element constructed from three subelements - one
IdealMagQuad
sandwiched between two
IdealFringeQuadFace
elements that provides fringe field based
on; H. Matsuda and H. Wollnik, NIM 103 (1972) 117 Structure is simular to
that of IdealMagWedgeDipole2- Author:
- Hiroyuki Sako
- See Also:
-
xal.model.elem#IdealMagQuad
xal.model.elem#IdealMagFringeQuadFace
-
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
.IdealMagFringeQuad
(String strId) Create newIdealMagWedgeDipole
object and specify its instance identifier string. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the entrance fringe integral (a la H.double
Get the entrance fringe integral (a la H.double
Get the exit fringe integral (a la H.double
Get the exit fringe integral (a la D.C.double
getK1()
Return the magnetic field index of the magnet evaluated at the design orbit.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.void
initializeFrom
(LatticeElement element) Conversion method to be provided by the uservoid
setEntrFringeIntegral1
(double dblFldInt) Set the entrance fringe integral (a la H.void
setEntrFringeIntegral2
(double dblFldInt) Set the entrance fringe integral (a la H.void
setExitFringeIntegral1
(double dblFldInt) Set the exit fringe integral (a la H.void
setExitFringeIntegral2
(double dblFldInt) Set the exit fringe integral (a la H.void
setFieldPathFlag
(double dblFlag) sako use design field if fieldPathFlag = 1, and use bfield if 0void
Override the defaultsetId(String)
method forElementSeq
objects so we can set the identifier strings of each composite element.void
setK1
(double dblPathLen) Set the reference (design) orbit path-length through the magnet.void
setMagField
(double dblField) Set the magnetic field strength of the dipole electromagnet.void
setNominalKineEnergy
(double dblBendAng) Set the bending angle of the reference (design) orbit.void
setOrientation
(int enmOrient) Set the dipole magnet bending orientationvoid
setPhysicalLength
(double dblLen) Set the physical length of the bending dipole.void
setPosition
(double dblPos, double dblLen) Set the position of the magnet along the design path within the containing lattice.Methods 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, getLength, getParent, getPhiX, getPhiY, getPhiZ, getPosition, getReverseCompList, getType, globalBackIterator, globalIterator, iterator, localBackIterator, localIterator, print, propagate, propagate, remove, setAlign, setAlignX, setAlignY, setAlignZ, setComments, setCompList, setDirty, setHardwareNodeId, 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
-
IdealMagFringeQuad
public IdealMagFringeQuad()Default constructor - creates a new uninitialized instance ofIdealMagWedgeDipole
. -
IdealMagFringeQuad
Create newIdealMagWedgeDipole
object and specify its instance identifier string.- Parameters:
strId
- instance identifier string
-
-
Method Details
-
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 compsite.- See Also:
-
setPosition
public void setPosition(double dblPos, double dblLen) Set the position of the magnet along the design path within the containing lattice.
NOTE:We have a bit of a logitics 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 particlar, 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)dblLen
- physical length of this element- See Also:
-
setEntrFringeIntegral1
public void setEntrFringeIntegral1(double dblFldInt) Set the entrance fringe integral (a la H. Matsuda) which accounts for the first-order effects of the fringing field outside the quadrupole magnet.- Parameters:
dblFldInt
- fringe field integral (unitless)- See Also:
-
setEntrFringeIntegral2
public void setEntrFringeIntegral2(double dblFldInt) Set the entrance fringe integral (a la H. Matsuda) which accounts for the first-order effects of the fringing field outside the quadrupole magnet.- Parameters:
dblFldInt
- fringe field integral (unitless)- See Also:
-
setExitFringeIntegral1
public void setExitFringeIntegral1(double dblFldInt) Set the exit fringe integral (a la H. Matsuda) which accounts for the first-order effects of the fringing field outside the dipole magnet.- Parameters:
dblFldInt
- fringe field integral (unitless)- See Also:
-
IdealMagDipoleFace2#setFringeIntegral1
-
setExitFringeIntegral2
public void setExitFringeIntegral2(double dblFldInt) Set the exit fringe integral (a la H. Matsuda) which accounts for the first-order effects of the fringing field outside the dipole magnet.- Parameters:
dblFldInt
- fringe field integral (unitless)- See Also:
-
IdealMagDipoleFace2#setFringeIntegral2
-
setPhysicalLength
public void setPhysicalLength(double dblLen) Set the physical length of the bending dipole. The design path length is generally larger than this value because of the curvature.- Parameters:
dblLen
- physical length through bend in meters
-
setK1
public void setK1(double dblPathLen) Set the reference (design) orbit path-length through the magnet.- Parameters:
dblPathLen
- path length of design trajectory (meters)
-
setNominalKineEnergy
public void setNominalKineEnergy(double dblBendAng) Set the bending angle of the reference (design) orbit.- Parameters:
dblBendAng
- design trajectory bending angle (radians)
-
setFieldPathFlag
public void setFieldPathFlag(double dblFlag) sako use design field if fieldPathFlag = 1, and use bfield if 0 -
getEntrFringeIntegral1
public double getEntrFringeIntegral1()Get the entrance fringe integral (a la H. Matsuda) which accounts for the first-order effects of the fringing field outside the quadrupole magnet.- Returns:
- fringe field integral (unitless)
- See Also:
-
IdealMagFringeQuadFace#setFrindIntegral1
-
getExitFringeIntegral1
public double getExitFringeIntegral1()Get the exit fringe integral (a la H. Matsuda) which accounts for the first-order effects of the fringing field outside the quadrupole magnet.- Returns:
- fringe field integral (unitless)
- See Also:
-
IdealMagFringeQuadFace#setFrindIntegral1
-
getEntrFringeIntegral2
public double getEntrFringeIntegral2()Get the entrance fringe integral (a la H. Matsuda) which accounts for the first-order effects of the fringing field outside the quadrupole magnet.- Returns:
- fringe field integral (unitless)
- See Also:
-
IdealMagFringeQuadFace#setFrindIntegral2
-
getExitFringeIntegral2
public double getExitFringeIntegral2()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:
-
IdealMagFringeQuadFace#setFrindIntegral2
-
getK1
public double getK1()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)
-
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
-
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).
-
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
-