Class IdealMagWedgeDipole

java.lang.Object
xal.model.elem.ElementSeq
xal.model.elem.ElectromagnetSeq
xal.extension.jels.model.elem.IdealMagWedgeDipole
All Implemented Interfaces:
Iterable<IComponent>, IElectromagnet, IComponent, IComposite

public class IdealMagWedgeDipole extends ElectromagnetSeq
Represents a bending dipole magnet with arbitrary pole face angles. This is a composite element constructed from three sub-elements - one 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 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

    • IdealMagWedgeDipole

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

      public IdealMagWedgeDipole(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 composite.
      See Also:
    • setPosition

      public void setPosition(double dblPos, double dblLen)
      public void setAlignZ(double dz) { this.getFaceEntr().setAlignY(dz); this.getMagBody().setAlignY(dz); this.getFaceExit().setAlignY(dz); } / /

      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)
      dblLen - physical length of this element
      See Also:
    • 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:
    • setEntrFringeIntegral2

      public void setEntrFringeIntegral2(double dblFldInt)
    • 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:
    • setExitFringeIntegral2

      public void setExitFringeIntegral2(double dblFldInt)
    • 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
    • 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(double dblFlag)
      sako use design field if dblFlag = 1, and use bfield if 0
      Parameters:
      dblFlag -
    • 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:
    • getEntrFringeIntegral2

      public double getEntrFringeIntegral2()
    • 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:
    • getExitFringeIntegral2

      public double getExitFringeIntegral2()
    • 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.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)
    • 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