Class IdealEDipole

All Implemented Interfaces:
IElectrostatic, IComponent, IElement

public class IdealEDipole extends ThickElectrostatic
Represents a thick electric dipole magnet for a beam transport/accelerator system. NOTE: - !!! Bending is assumed to be horizontal for now !!!! There are provisions for a general wedge magnet, with arbitrary entrance/exit angles. The MAD convention for sector magnets is followed for coordinates, signs, and lengths. The formulation from D. Carey's Optics book + Transport manual are used. TODO - Add "tilt" angle of the dipole.
Author:
jdg, Carla Benatti
  • Field Details

  • Constructor Details

    • IdealEDipole

      public IdealEDipole(String strId, double dblVoltage, double len, double entAng, double exitAng, double gap, double fInt)
      Creates a new instance of IdealEDipole.
      Parameters:
      strId - identifier for this IdealEDipole object
      dblVoltage - voltage applied to pole tip (in kV)
      len - pathLength of the dipole (in m)
      entAng - entrance angle of the dipole (in rad)
      exitAng - exit angle of the dipole (in rad)
      gap - full pole gap of the dipole (in m)
      fInt - The dimensionless integral term for the extended fringe field focusing (dimensionless). Should be: = 1/6 for linear drop off, =~0.4 for clamped Rogowski coil, = 0.7 for an unclamped Rogowski coil, or = 0.45 for square edge - non saturating magnet.
    • IdealEDipole

      public IdealEDipole()
      JavaBean constructor - creates a new uninitialized instance of ThickDipole. This is the constructor called in automatic lattice generation. Thus, all element properties are set following construction. BE CAREFUL
  • Method Details

    • setEntranceAngle

      public void setEntranceAngle(double dblAng)
      Sets the dipole entrance angle.
      Parameters:
      dblAng - entrance angle in radians
    • getEntranceAngle

      public double getEntranceAngle()
      Returns the dipole entrance angle.
    • setExitAngle

      public void setExitAngle(double dblAng)
      Sets the dipole exit angle.
      Parameters:
      dblAng - exit angle in radians
    • getExitAngle

      public double getExitAngle()
      Returns the dipole exit angle.
    • setKQuad

      public void setKQuad(double k)
      Sets the quadrupole field index.
      Parameters:
      k - = 1/B-rho * d B_y/dx
    • getKQuad

      public double getKQuad()
      Returns the quadrupole field index.
      Returns:
      k1 = 1/B-rho * d B_y/dx
    • getFieldIntegral

      public double getFieldIntegral()
      convenient method to return fringe field integral
      Returns:
      fringe field integral
    • setDesignBendAngle

      public void setDesignBendAngle(double dblAng)
      Sets the reference bend angle (rad).
    • getDesignBendAngle

      public double getDesignBendAngle()
      Returns the reference bend angle (rad).
    • setOrientation

      public void setOrientation(int enmOrient)
      Sets the magnet orientation.
      Specified by:
      setOrientation in interface IElectrostatic
      Overrides:
      setOrientation in class ThickElectrostatic
      Parameters:
      enmOrient - magnet orientation enumeration code
      See Also:
    • setDipoleInd

      public void setDipoleInd(int ind)
      Set dipole indicator so the transfer map can handle edge effect correctly.
      Parameters:
      ind - 0 = first half of a dipole, 1 = second half and 2 = no split
    • getOrientation

      public int getOrientation()
      Returns the magnet orientation.
      Specified by:
      getOrientation in interface IElectrostatic
      Overrides:
      getOrientation in class ThickElectrostatic
      Returns:
      ORIENT_HOR - dipole has steering action in x (horizontal) plane ORIENT_VER - dipole has steering action in y (vertical) plane ORIENT_NONE - error
    • setVoltage

      public void setVoltage(double voltage)
      Sets the magnetic field strength.
      Parameters:
      voltage - pole tip voltage (in kV).
    • getVoltage

      public double getVoltage()
      Returns the applied voltage.
      Returns:
      voltage at the pole tips (in kV).
    • elapsedTime

      public double elapsedTime(IProbe probe, double dblLen)
      Returns the time taken for the probe to drift through part of the element.
      Specified by:
      elapsedTime in interface IElement
      Specified by:
      elapsedTime in class ThickElement
      Parameters:
      probe - propagating probe
      dblLen - subsection propagation length meters
      Returns:
      elapsed propagation timeUnits: seconds
    • energyGain

      public double energyGain(IProbe probe, double dblLen)
      Returns the energy gain imparted to a particular probe. For an ideal dipole magnet this value is always zero.
      Specified by:
      energyGain in interface IElement
      Specified by:
      energyGain in class ThickElement
      Parameters:
      dblLen - dummy argument
      probe - dummy argument
      Returns:
      returns a zero value
    • setFieldIntegral

      public void setFieldIntegral(double fint)
      Sets the fringe field integral factor.
      Parameters:
      fint - the field integral a la MAD = 1/6 for linear drop off = 0.4 for clamped Rogowski coil = 0.7 for unclamped Rogowski coil = 0.45 for square edge - non saturating magnet
    • setGapHeight

      public void setGapHeight(double gap)
      Sets the gap height
      Parameters:
      gap - = full gap height (m)
    • transferMap

      public PhaseMap transferMap(IProbe probe, double dL) throws ModelException
      Computes the partial transfer map of an ideal dipole for the particular probe. Computes transfer map for a section. of dipole dblLen meters in length.
      Specified by:
      transferMap in interface IElement
      Specified by:
      transferMap in class ThickElement
      Parameters:
      probe - uses the rest and kinetic energy parameters from the probe.
      dL - compute transfer matrix for section of this path length.
      Returns:
      transfer map of ideal dipole for particular probe.
      Throws:
      ModelException - unknown quadrupole orientation.
      See Also:
    • print

      public void print(PrintWriter os)
      Dump current state and content to output stream.
      Overrides:
      print in class Element
      Parameters:
      os - output stream object
    • initializeFrom

      public void initializeFrom(LatticeElement element)
      Description copied from class: ThickElectrostatic
      Conversion method to be provided by the user
      Specified by:
      initializeFrom in interface IComponent
      Overrides:
      initializeFrom in class ThickElectrostatic
      Parameters:
      element - the SMF node to convert
    • setPathLength

      public void setPathLength(double dblPathLen)
    • getPathLength

      public double getPathLength()