Class IdealMagFringeQuad

All Implemented Interfaces:
Iterable<IComponent>, IElectromagnet, IComponent, IComposite

public class IdealMagFringeQuad extends ElectromagnetSeq
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 Details

    • TYPE

      public static final String TYPE
      string type identifier for all IdealMagSectorDipole objects
      See Also:
    • SIZE_RESERVE

      public static final int SIZE_RESERVE
      storage to reserve for child components
      See Also:
  • Constructor Details

    • IdealMagFringeQuad

      public IdealMagFringeQuad()
      Default constructor - creates a new uninitialized instance of IdealMagWedgeDipole.
    • IdealMagFringeQuad

      public IdealMagFringeQuad(String strId)
      Create new IdealMagWedgeDipole object and specify its instance identifier string.
      Parameters:
      strId - instance identifier string
  • Method Details

    • setId

      public void setId(String strId)
      Override the default setId(String) method for ElementSeq objects so we can set the identifier strings of each composite element.
      Overrides:
      setId in class ElementSeq
      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

      public void initializeFrom(LatticeElement element)
      Conversion method to be provided by the user
      Specified by:
      initializeFrom in interface IComponent
      Overrides:
      initializeFrom in class ElectromagnetSeq
      Parameters:
      element - the SMF node to convert