gov.sns.xal.model.elem
Class ThickDipole

java.lang.Object
  |
  +--gov.sns.xal.model.elem.Element
        |
        +--gov.sns.xal.model.elem.ThickElement
              |
              +--gov.sns.xal.model.elem.ThickDipole
All Implemented Interfaces:
IComponent, IElectromagnet, IElement

public class ThickDipole
extends ThickElement
implements IElectromagnet

Represents a thick magnetic dipole magnet for a beam transport/accelerator system. NOTE: - !!! Bending is assumed to be horizontal for now !!!! It has 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, and add charge of the probe to get the right bend radius.


Field Summary
static java.lang.String s_strEntranceAngle
           
static java.lang.String s_strExitAngle
           
static java.lang.String s_strField
           
static java.lang.String s_strPathLength
          Parameters for XAL MODEL LATTICE dtd
static java.lang.String s_strQuadComponent
           
static java.lang.String s_strType
          string type identifier for all ThickDipole objects
 
Fields inherited from interface gov.sns.xal.model.elem.IElectromagnet
ORIENT_HOR, ORIENT_NONE, ORIENT_VER
 
Fields inherited from interface gov.sns.xal.model.IElement
LightSpeed, Permeability, Permittivity, UnitCharge
 
Constructor Summary
ThickDipole()
          JavaBean constructor - creates a new unitialized instance of ThickDipole * This is the constructor called in automatic lattice generation.
ThickDipole(java.lang.String strId, double fld, double len, double entAng, double exitAng, double gap, double fInt)
          Creates a new instance of ThickDipole
 
Method Summary
 double elapsedTime(IProbe probe, double dblLen)
          Returns the time taken for the probe to drift through part of the element.
 double energyGain(IProbe probe, double dblLen)
          Return the energy gain imparted to a particular probe.
 double getEntranceAngle()
          Gets the entrance angle of the beam into the dipole.
 double getExitAngle()
          Gets the exit angle of the beam into the dipole.
 double getKQuad()
          Gets the quad.
 double getMagField()
          Get the magnetic field strength of the electromagnet
 int getOrientation()
          Return the orientation enumeration code.
 void initializeFrom(IModelDataSource source)
          Initializes this element from the supplied source.
 void print(java.io.PrintWriter os)
          Dump current state and content to output stream.
 void setEntranceAngle(double dblAng)
          Sets the entrance angle of the beam into the dipole.
 void setExitAngle(double dblAng)
          Sets the entrance angle of the beam into the dipole.
 void setFieldIntegral(double fint)
          set the fring field integral factor
 void setGapHeight(double gap)
          set the gap height
 void setKQuad(double k)
          Sets the quad.
 void setMagField(double dblField)
          Set the magnetic field strength of the electromagnet.
 void setOrientation(int enmOrient)
          Set the magnet orientation
 PhaseMap transferMap(IProbe probe, double dL)
          Compute the partial transfer map of an ideal quadrupole for the particular probe.
 
Methods inherited from class gov.sns.xal.model.elem.ThickElement
getLength, setLength
 
Methods inherited from class gov.sns.xal.model.elem.Element
compDriftingTime, getId, getType, getUID, propagate, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_strType

public static final java.lang.String s_strType
string type identifier for all ThickDipole objects

See Also:
Constant Field Values

s_strPathLength

public static final java.lang.String s_strPathLength
Parameters for XAL MODEL LATTICE dtd

See Also:
Constant Field Values

s_strField

public static final java.lang.String s_strField
See Also:
Constant Field Values

s_strEntranceAngle

public static final java.lang.String s_strEntranceAngle
See Also:
Constant Field Values

s_strExitAngle

public static final java.lang.String s_strExitAngle
See Also:
Constant Field Values

s_strQuadComponent

public static final java.lang.String s_strQuadComponent
See Also:
Constant Field Values
Constructor Detail

ThickDipole

public ThickDipole(java.lang.String strId,
                   double fld,
                   double len,
                   double entAng,
                   double exitAng,
                   double gap,
                   double fInt)
Creates a new instance of ThickDipole

Parameters:
strId - identifier for this ThickDipole object
fld - field gradient strength (in Tesla)
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 focsing, Should be = 1/6 for linear drop off, ~ 0.4 for clamped Rogowski coil, or 0.7 for an unclamped Rogowski coil. (dimensionless)

ThickDipole

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

Method Detail

initializeFrom

public void initializeFrom(IModelDataSource source)
                    throws ModelException
Initializes this element from the supplied source.

Specified by:
initializeFrom in interface IElement
Overrides:
initializeFrom in class Element
Parameters:
source - the data source for initialization
Throws:
ModelException - if error initializing
java.lang.IllegalArgumentException - if the supplied data source is not a ThickDipoleDataSource

setEntranceAngle

public void setEntranceAngle(double dblAng)
Sets the entrance angle of the beam into the dipole.

Parameters:
dblAng - entrance angle in radians

getEntranceAngle

public double getEntranceAngle()
Gets the entrance angle of the beam into the dipole.


setExitAngle

public void setExitAngle(double dblAng)
Sets the entrance angle of the beam into the dipole.

Parameters:
dblAng - exit angle in radians

getExitAngle

public double getExitAngle()
Gets the exit angle of the beam into the dipole.


setKQuad

public void setKQuad(double k)
Sets the quad. field index term

Parameters:
k - = 1/B-rho) * d B_y/dx

getKQuad

public double getKQuad()
Gets the quad. field index term = 1/B-rho * d B_y/dx


getOrientation

public int getOrientation()
Return the orientation enumeration code.

Specified by:
getOrientation in interface IElectromagnet
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 electromagnet

Specified by:
getMagField in interface IElectromagnet
Returns:
magnetic field (in Tesla).

setOrientation

public void setOrientation(int enmOrient)
Set the magnet orientation

Specified by:
setOrientation in interface IElectromagnet
Parameters:
enmOrient - magnet orientation enumeration code
See Also:
getOrientation()

setMagField

public void setMagField(double dblField)
Set the magnetic field strength of the electromagnet.

Specified by:
setMagField in interface IElectromagnet
Parameters:
dblField - magnetic field (in Tesla).

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 Element
Parameters:
probe - propagating probe
dblLen - length of subsection to propagate through meters
Returns:
the elapsed time through sectionUnits: seconds

energyGain

public double energyGain(IProbe probe,
                         double dblLen)
Return the energy gain imparted to a particular probe. For an ideal quadrupole 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)
set the fring 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)
set the gap height

Parameters:
gap - = full gap height (m)

transferMap

public PhaseMap transferMap(IProbe probe,
                            double dL)
                     throws ModelException
Compute the partial transfer map of an ideal quadrupole for the particular probe. Computes transfer map for a section of quadrupole dblLen meters in length.

Specified by:
transferMap in interface IElement
Specified by:
transferMap in class ThickElement
Parameters:
dL - compute transfer matrix for section of this path length
probe - uses the rest and kinetic energy parameters from the probe
Returns:
transfer map of ideal quadrupole for particular probe
Throws:
ModelException - unknown quadrupole orientation

print

public void print(java.io.PrintWriter os)
Dump current state and content to output stream.

Overrides:
print in class Element
Parameters:
os - output stream object