Class ThickMatrix

All Implemented Interfaces:
IComponent, IElement

public class ThickMatrix extends ThickElement

User element representing a general beamline element. Arbitrary beamline elements are specified by providing the transfer matrix generator, elapsed time, and energy gain a priori. Note that for this element the transfer matrix, elapsed time, and energy gain are independent of any probe objects. Note also that the generator for the transfer matrix is specified, NOT the actual transfer matrix. Thus, this class should be used carefully.

This element is derived from the ThickElement base so that space charge kicks may be applied throughout the element.

Denoting the generator matrix as A, then the transfer matrix M(s) for a section of length s is given by

    M(s) = esA

where eA is the matrix exponential.

NOTE:

Currently the class implements the matrix exponential only to second order. Therefore

    M(s) = I + sA + ½s2A2 ( + O(s3) )

Author:
Christopher K. Allen
  • Field Details

  • Constructor Details

    • ThickMatrix

      public ThickMatrix(String strId, double dblLen, PhaseMatrix matPhiSub, double dblDelW)
      Creates a new instance of ThickMatrix
      Parameters:
      strId - identifier of this ThickMatrix object
      dblLen - length of the element (in meters)
      matPhiSub - 7x7 transfer matrix for a subelement
      dblDelW - energy gain imparted of this element (in electron-volts)
    • ThickMatrix

      public ThickMatrix(String strId, double dblLen, PhaseMatrix matPhiSub)
      Creates a new instance of ThickMatrix. Energy gain for each subelement is initialized to zero.
      Parameters:
      strId - identifier of this ThickMatrix object
      dblLen - length of the element (in meters)
      matPhiSub - 7x7 transfer matrix for a subelement
    • ThickMatrix

      public ThickMatrix(String strId, double dblLen)
      Creates a new instance of ThickMatrix. The sub-element energy gain is initialized to zero. The sub-element transfer matrix is initialized to the 7x7 identity.
      Parameters:
      strId - identifier of this ThickMatrix object
      dblLen - length of the element (in meters)
    • ThickMatrix

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

    • setElapsedTime

      public void setElapsedTime(double dblDelT)
      Set the total elapsed time for all probes to propagate the entire element.
      Parameters:
      dblDelT - elapsed time through element in seconds
    • setEnergyGain

      public void setEnergyGain(double dblDelW)
      Set the total energy gain imparted to any probe propagating through entire element.
      Parameters:
      dblDelW - energy gain imparted to all probes (in electron-volts)
    • setTransferMapGenerator

      public void setTransferMapGenerator(PhaseMatrix matGen)
      Set the transfer map generator A for the element. The transfer map M(s) over a distance s is then given by M(s) = Exp(s*A) where Exp() is the matrix exponential function. Thus, the map M generated by A is also a matrix.
      Parameters:
      matGen - transfer matrix generator (probe independent)
    • elapsedTime

      public double elapsedTime(IProbe probe, double dblLen)
      Returns the time taken for any probe to drift through part of the element. The value dT(dblLen) returned by this method is given by dT(dblLen) = dblLen/getLength() * dblDelT where dblDelT is the value given to #setElapsedTime.
      Specified by:
      elapsedTime in interface IElement
      Specified by:
      elapsedTime in class ThickElement
      Parameters:
      probe - dummy argument
      dblLen - length of subsection to propagate through meters
      Returns:
      the elapsed time through sectionUnits: seconds
    • energyGain

      public double energyGain(IProbe probe, double dblLen)
      Returns the energy gain imparted to any probe when going through part of the element. The value dW(dblLen) returned by this method is given by DW(dblLen) = dblLen/getLength() * dblDelW where dblDelW is the value given to #setEnergyGain.
      Specified by:
      energyGain in interface IElement
      Specified by:
      energyGain in class ThickElement
      Parameters:
      dblLen - dummy argument
      probe - dummy argument
      Returns:
      energy gain for each subelement (in electron-volts)
    • transferMap

      public PhaseMap transferMap(IProbe probe, double dblLen) throws ModelException
      Returns the transfer map produced by the generator matrix over the distance dblLen. NOTE: Currently the transfer map returned is accurate only to order two. That is the matrix exponential function is approximated by its first three terms.
      Specified by:
      transferMap in interface IElement
      Specified by:
      transferMap in class ThickElement
      Parameters:
      dblLen - propagation length in meters
      probe - dummy argument
      Returns:
      computed transfer map
      Throws:
      ModelException - this should not occur
      See Also: