Package xal.model.elem
Class IdealEDipole
java.lang.Object
xal.model.elem.Element
xal.model.elem.ThickElement
xal.model.elem.ThickElectrostatic
xal.model.elem.IdealEDipole
- All Implemented Interfaces:
IElectrostatic
,IComponent
,IElement
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
all thick elements have length - CKA.static final String
Parameters for XAL MODEL LATTICE dtdstatic final String
static final String
string type identifier for all ThickDipole objectsFields inherited from class xal.model.elem.ThickElectrostatic
dblField
Fields inherited from class xal.model.elem.Element
dblNodeLen, dblNodePos
Fields inherited from interface xal.model.elem.sync.IElectrostatic
ORIENT_HOR, ORIENT_NONE, ORIENT_VER
Fields inherited from interface xal.model.IElement
LIGHT_SPEED, PERMEABILITY, PERMITTIVITY, UNIT_CHARGE
-
Constructor Summary
ConstructorsConstructorDescriptionJavaBean constructor - creates a new uninitialized instance of ThickDipole.IdealEDipole
(String strId, double dblVoltage, double len, double entAng, double exitAng, double gap, double fInt) Creates a new instance of IdealEDipole. -
Method Summary
Modifier and TypeMethodDescriptiondouble
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) Returns the energy gain imparted to a particular probe.double
Returns the reference bend angle (rad).double
Returns the dipole entrance angle.double
Returns the dipole exit angle.double
convenient method to return fringe field integraldouble
getKQuad()
Returns the quadrupole field index.int
Returns the magnet orientation.double
double
Returns the applied voltage.void
initializeFrom
(LatticeElement element) Conversion method to be provided by the uservoid
print
(PrintWriter os) Dump current state and content to output stream.void
setDesignBendAngle
(double dblAng) Sets the reference bend angle (rad).void
setDipoleInd
(int ind) Set dipole indicator so the transfer map can handle edge effect correctly.void
setEntranceAngle
(double dblAng) Sets the dipole entrance angle.void
setExitAngle
(double dblAng) Sets the dipole exit angle.void
setFieldIntegral
(double fint) Sets the fringe field integral factor.void
setGapHeight
(double gap) Sets the gap heightvoid
setKQuad
(double k) Sets the quadrupole field index.void
setOrientation
(int enmOrient) Sets the magnet orientation.void
setPathLength
(double dblPathLen) void
setVoltage
(double voltage) Sets the magnetic field strength.transferMap
(IProbe probe, double dL) Computes the partial transfer map of an ideal dipole for the particular probe.Methods inherited from class xal.model.elem.ThickElectrostatic
getMagField, setMagField
Methods inherited from class xal.model.elem.ThickElement
applyErrors, getLength, isFirstSubslice, isLastSubslice, longitudinalPhaseAdvance, setLength
Methods inherited from class xal.model.elem.Element
addCloseElements, backPropagate, backPropagate, compDriftingTime, compProbeLocation, getAlignX, getAlignY, getAlignZ, getCloseElements, getHardwareNodeId, getId, getLatticePosition, getNodeLen, getNodePos, getParent, getPhiX, getPhiY, getPhiZ, getPosition, getType, getUID, propagate, propagate, setAlign, setAlignX, setAlignY, setAlignZ, setHardwareNodeId, setId, setParent, setPhiX, setPhiY, setPhiZ, setPosition, toString
-
Field Details
-
TYPE
string type identifier for all ThickDipole objects- See Also:
-
PATH_LENGTH
Parameters for XAL MODEL LATTICE dtd- See Also:
-
PARAM_VOLTAGE
all thick elements have length - CKA.- See Also:
-
ENTRANCE_ANGLE
- See Also:
-
EXIT_ANGLE
- See Also:
-
QUAD_COMPONENT
- See Also:
-
-
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 objectdblVoltage
- 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 interfaceIElectrostatic
- Overrides:
setOrientation
in classThickElectrostatic
- 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 interfaceIElectrostatic
- Overrides:
getOrientation
in classThickElectrostatic
- 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
Returns the time taken for the probe to drift through part of the element.- Specified by:
elapsedTime
in interfaceIElement
- Specified by:
elapsedTime
in classThickElement
- Parameters:
probe
- propagating probedblLen
- subsection propagation length meters- Returns:
- elapsed propagation timeUnits: seconds
-
energyGain
Returns the energy gain imparted to a particular probe. For an ideal dipole magnet this value is always zero.- Specified by:
energyGain
in interfaceIElement
- Specified by:
energyGain
in classThickElement
- Parameters:
dblLen
- dummy argumentprobe
- 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
Computes the partial transfer map of an ideal dipole for the particular probe. Computes transfer map for a section. of dipoledblLen
meters in length.- Specified by:
transferMap
in interfaceIElement
- Specified by:
transferMap
in classThickElement
- 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
Dump current state and content to output stream. -
initializeFrom
Description copied from class:ThickElectrostatic
Conversion method to be provided by the user- Specified by:
initializeFrom
in interfaceIComponent
- Overrides:
initializeFrom
in classThickElectrostatic
- Parameters:
element
- the SMF node to convert
-
setPathLength
public void setPathLength(double dblPathLen) -
getPathLength
public double getPathLength()
-