Class IdealRfGap

All Implemented Interfaces:
IRfGap, IComponent, IElement

public class IdealRfGap extends ThinElement implements IRfGap

Represents the action of an ideal RF gap. Gap is modeled as a thin element whose accelerating action is given by the Panofsky formula.

The gap provides acceleration to the propagation probe as well as longitudinal focusing and radial defocusing. These mechanisms are implemented according to that provided by an ideal gap where the effects can be described analytically.

Since:
November 22, 2005
Author:
Christopher K. Allen
  • Field Details

  • Constructor Details

    • IdealRfGap

      public IdealRfGap(String strId, double dblETL, double dblPhase, double dblFreq)
      Creates a new instance of IdealRfGap
      Parameters:
      strId - instance identifier of element
      dblETL - field/transit time/length factor for gap (in volts )
      dblPhase - operating phase of gap (in radians )
      dblFreq - operating RF frequency of gap (in Hertz )
    • IdealRfGap

      public IdealRfGap()
      JavaBean constructor - creates a new uninitialized instance of IdealRfGap BE CAREFUL
  • Method Details

    • getETL

      public double getETL()
      Return the ETL product of the gap, where E is the longitudinal electric field, T is the transit time factor, and L is the gap length.
      Specified by:
      getETL in interface IRfGap
      Returns:
      the ETL product of the gap (in volts ).
    • getPhase

      public double getPhase()
      Return the RF phase delay of the gap with respect to the synchronous particle.
      Specified by:
      getPhase in interface IRfGap
      Returns:
      phase delay w.r.t. synchronous particle (in radians ).
    • getFrequency

      public double getFrequency()
      Get the operating frequency of the RF gap.
      Specified by:
      getFrequency in interface IRfGap
      Returns:
      frequency of RF gap (in Hertz )
    • isFirstCell

      public boolean isFirstCell()
      return whether this gap is the initial gap of a cavity
      Returns:
      The firstGap value
    • setETL

      public void setETL(double dblETL)
      Set the ETL product of the RF gap where E is the longitudinal electric field of the gap, T is the transit time factor of the gap, L is the length of the gap.

      The maximum energy gain from the gap is given by qETL where q is the charge (in coulombs) of the species particle.

      Specified by:
      setETL in interface IRfGap
      Parameters:
      dblETL - ETL product of gap (in volts ).
    • setPhase

      public void setPhase(double dblPhase)
      Set the phase delay of the RF in gap with respect to the synchronous particle. The actual energy gain from the gap is given by qETLcos(dblPhi) where dbkPhi is the phase delay.
      Specified by:
      setPhase in interface IRfGap
      Parameters:
      dblPhase - phase delay of the RF w.r.t. synchronous particle (in radians ).
    • setFrequency

      public void setFrequency(double dblFreq)
      Set the operating frequency of the RF gap.
      Specified by:
      setFrequency in interface IRfGap
      Parameters:
      dblFreq - frequency of RF gap (in Hertz )
    • setE0

      public void setE0(double e)
      Set the on accelerating field @ param E - the on axis field (V/m)
      Specified by:
      setE0 in interface IRfGap
      Parameters:
      e - The new e0 value
    • getE0

      public double getE0()
      Get the on accelerating field (V/m)
      Specified by:
      getE0 in interface IRfGap
      Returns:
      The e0 value
    • getCellLength

      public double getCellLength()
      return the cell length (m)
      Returns:
      The cellLength value
    • wavelengthRF

      public double wavelengthRF()
      Compute the wavelength of the RF.
      Returns:
      RF wavelength in meters
    • betaMidGap

      public double betaMidGap(IProbe probe)
      Compute and return the mid-gap normalized velocity for the given probe. NOTE: - Because of the state-dependent nature of the energy calculations (this needs to be fixed), this function will only work correctly if the function energyGain() is consistent.
      Parameters:
      probe - probe containing energy information
      Returns:
      average or "mid-gap" velocity in units of c
      See Also:
    • elapsedTime

      public double elapsedTime(IProbe probe)
      Returns the time taken for the probe to propagate through element.
      Specified by:
      elapsedTime in class ThinElement
      Parameters:
      probe - propagating probe
      Returns:
      value of zero
    • energyGain

      public double energyGain(IProbe probe)
      Compute the energy gain of the RF gap for a probe including the effects of calculating the phase advance.
      Specified by:
      energyGain in class ThinElement
      Parameters:
      probe - uses the particle species charge
      Returns:
      energy gain for this probe (in electron-volts )
    • transferMap

      protected PhaseMap transferMap(IProbe probe) throws ModelException
      Compute the transfer map for an ideal RF gap.
      Specified by:
      transferMap in class ThinElement
      Parameters:
      probe - compute transfer map using parameters from this probe
      Returns:
      transfer map for the probe
      Throws:
      ModelException - this should not occur
    • simpleEnergyGain

      public double simpleEnergyGain(IProbe probe)
      Compute the energy gain of the RF gap for a probe assuming a fixed default phase at the gap center.
      Parameters:
      probe - uses the particle species charge
      Returns:
      energy gain for this probe (in electron-volts )
    • compTransFocusing

      public double compTransFocusing(IProbe probe)
      Get the transverse focusing constant for a particular probe. The focusing constant is used in the construction of the transfer matrix for the RF gap. A gap provides longitudinal focusing and transverse defocusing as well as a gain in beam energy. This focusing constant describes the effect in the transverse direction, which is defocusing and, therefore, negative.

      The value represents the thin lens focusing constant for an ideal RF gap (this is the inverse of the focal length). To compute the focusing action for the lens we must include beam energy, which is changing through the gap. We use the value of beta for which the beam has received half the total energy gain.

      Parameters:
      probe - beam energy and particle charge are taken from the probe
      Returns:
      (de)focusing constant (in radians/meter )
    • compLongFocusing

      public double compLongFocusing(IProbe probe)
      Get the longitudinal focusing constant for a particular probe. The focusing constant is used in the construction of the transfer matrix for the RF gap. A gap provides longitudinal focusing and transverse defocusing as well as a gain in beam energy. This focusing constant describes the effect in the longitudinal direction, which is focusing and, therefore, positive.

      The value represents the thin lens focusing constant for an ideal RF gap (this is the inverse of the focal length). To compute the focusing action for the lens we must include beam energy, which is changing through the gap. We use the value of beta for which the beam has received half the total energy gain.

      Parameters:
      probe - beam energy and particle charge are taken from the probe
      Returns:
      (de)focusing constant (in radians/meter )
    • 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)
      Conversion method to be provided by the user
      Specified by:
      initializeFrom in interface IComponent
      Overrides:
      initializeFrom in class Element
      Parameters:
      element - the SMF node to convert
    • computeSynchronousPhaseAndEnergyGain

      public void computeSynchronousPhaseAndEnergyGain(IProbe probe)
      Description copied from interface: IRfGap
      Compute the synchronous phase and the energy gain for a cavity gap.
      Specified by:
      computeSynchronousPhaseAndEnergyGain in interface IRfGap
    • getSynchronousPhase

      public double getSynchronousPhase()
      Description copied from interface: IRfGap
      Return the synchronous phase of a cavity gap, which must be previously calculated using computeSynchronousPhase.
      Specified by:
      getSynchronousPhase in interface IRfGap
      Returns:
      synchronous phase [rad]
    • getEnergyGain

      public double getEnergyGain()
      Description copied from interface: IRfGap
      Return the energy gain of a cavity gap previously calculated.
      Specified by:
      getEnergyGain in interface IRfGap
      Returns: