public class IdealMagSectorDipole2 extends ThickElectromagnet
Represents a bending magnetic dipole magnet for a beam in a sector configuration. Thus, there are no edge effects as the beam enters the magnet orthogonally.
The MAD convention for sector magnets is followed for coordinates, signs, and lengths. The formulation from D. Carey's Optics book, Transport manual, and H. Wiedemann's books are used.
NOTES: Both the dipole effects and the quadrupole (focusing) effects vary
off the design values with differing magnetic field strengths. This
situation is in contrast with the previous version of this class
where only the quadrupole effects varied, and in contract with the
class ThickDipole
where only the dipole effects varied.
IdealMagSectorDipole2
,
ThickDipole
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
s_strEntranceAngle
Tag for parameters in the XML configuration file
|
static java.lang.String |
s_strExitAngle
Tag for parameters in the XML configuration file
|
static java.lang.String |
s_strField
Tag for parameters in the XML configuration file
|
static java.lang.String |
s_strPathLength
Tag for parameters in the XML configuration file
|
static java.lang.String |
s_strQuadComponent
Tag for parameters in the XML configuration file
|
static java.lang.String |
s_strType
string type identifier for all IdealMagSectorDipole objects
|
dblField, enmOrient
ORIENT_HOR, ORIENT_NONE, ORIENT_VER
LightSpeed, Permeability, Permittivity, UnitCharge
Constructor and Description |
---|
IdealMagSectorDipole2()
Default constructor - creates a new uninitialized instance of
IdealMagSectorDipole.
|
IdealMagSectorDipole2(java.lang.String strId)
Default constructor - creates a new uninitialized instance of
IdealMagSectorDipole.
|
IdealMagSectorDipole2(java.lang.String strId,
double dblLen,
int enmOrient,
double dblFld,
double dblGap,
double dblFldInd)
Creates a new instance of IdealMagSectorDipole
|
Modifier and Type | Method and Description |
---|---|
double |
compDesignBendingRadius()
Compute and return the bending radius of the design orbit
throught the magnet.
|
double |
compDesignCurvature()
Compute and return the curvature of the design orbit through
the magnet.
|
double |
compPathLengthVariationFactor(IProbe probe)
Computes and returns the path length variation factor.
|
double |
compProbeCurvature(IProbe probe)
Compute the path curvature within the dipole for the given probe.
|
double |
compQuadrupoleConstant(IProbe probe)
Compute and return the quadrupole focusing constant for the current
dipole settings and the given probe.
|
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 |
getDesignBendingAngle()
Return the bending angle of the magnet's design trajectory.
|
double |
getDesignPathLength()
Return the path length of the design trajectory through the
magnet.
|
double |
getFieldIndex()
Return the magnetic field index of the magnet evaluated at the design
orbit.
|
boolean |
getFieldPathFlag()
Return the field path flag.
|
double |
getGapHeight()
Return the gap size between the dipole magnet poles.
|
double |
getK0()
This is the design bending curvature h = 1/R0 where
R0 is the design bending radius.
|
double |
getQuadComponent()
Returns the quadrupole field component of the bending magnet.
|
void |
print(java.io.PrintWriter os)
Dump current state and content to output stream.
|
void |
setDesignBendAngle(double dblBendAng)
Set the bending angle of the reference (design) orbit.
|
void |
setDesignPathLength(double dblPathLen)
Set the reference (design) orbit path-length through
the magnet.
|
void |
setFieldIndex(double dblFldInd)
Set the magnetic field index of the magnet evaluated at the design
orbit.
|
void |
setFieldPathFlag(boolean ba)
sako - to set field path flag.
|
void |
setGapHeight(double dblGap)
Set the gap size between the dipole magnet poles.
|
void |
setK0(double dbl)
Set the design curvature h of the bending magnet.
|
void |
setQuadComponent(double dbl)
quad K1 component defined in SAD (=normal k1 * L)
|
PhaseMap |
transferMap(IProbe probe,
double dblLen)
Compute the partial transfer map of an ideal sector magnet for the
particular probe.
|
getMagField, getOrientation, initializeFrom, setMagField, setOrientation
getLength, setLength
addCloseElements, applyAlignError, backPropagate, backPropagate, compDriftingTime, compProbeLocation, getAlignX, getAlignY, getAlignZ, getCloseElements, getHardwareNodeId, getId, getPosition, getType, getUID, propagate, propagate, setAlign, setAlignX, setAlignY, setAlignZ, setHardwareNodeId, setId, setPosition, toString
public static final java.lang.String s_strType
public static final java.lang.String s_strPathLength
public static final java.lang.String s_strField
public static final java.lang.String s_strEntranceAngle
public static final java.lang.String s_strExitAngle
public static final java.lang.String s_strQuadComponent
public IdealMagSectorDipole2()
public IdealMagSectorDipole2(java.lang.String strId)
public IdealMagSectorDipole2(java.lang.String strId, double dblLen, int enmOrient, double dblFld, double dblGap, double dblFldInd)
strId
- identifier for this IdealMagSectorDipole objectdblFld
- field gradient strength (in Tesla)dblLen
- pathLength of the dipole (in m)dblGap
- full pole gap of the dipole (in m)dblFldInd
- The dimensionless integral term for the extended fringe field focusing,
Should be = 1/6 for linear drop off, ~ 0.4 for clamped Rogowski coil,
or 0.7 for an unclamped Rogowski coil. (dimensionless)public double getK0()
public void setK0(double dbl)
dbl
- design curvature h = 1/R0 where
R0 is the design path radius.public void setFieldIndex(double dblFldInd)
dblFldInd
- field index of the magnet (unitless)public void setQuadComponent(double dbl)
public void setGapHeight(double dblGap)
dblGap
- gap size in meterspublic void setDesignPathLength(double dblPathLen)
dblPathLen
- path length of design trajectory (meters)public void setDesignBendAngle(double dblBendAng)
dblBendAng
- design trajectory bending angle (radians)public void setFieldPathFlag(boolean ba)
true
means use design path throughout.ba
- new field path flag valuepublic double getFieldIndex()
public double getQuadComponent()
public double getGapHeight()
public double getDesignPathLength()
public double getDesignBendingAngle()
public boolean getFieldPathFlag()
public double compDesignCurvature()
compDesignBendingRadius()
public double compDesignBendingRadius()
compDesignCurvature()
public double compProbeCurvature(IProbe probe)
probe
- probe object to be deflectedpublic double compQuadrupoleConstant(IProbe probe)
Compute and return the quadrupole focusing constant for the current dipole settings and the given probe. The curvature for the current magnet settings and probe state is used - making this a dynamic quantity. The field index does not change within the magnet.
NOTE:- This value may be negative if the resulting curvature is negative This condition means we are bending toward the negative x direction and does not imply defocusing.
- This value is essentially the same as the field index of the magnet - the two values differ by a constant, the curvature squared. The square-root of this value provides the betatron phase advance wave number.
where K_quad is the quadrupole focusing constant, R is the bending radius at current settings, B is the current magnet field strength , h = 1/R is the curvature at the current settings, and n0 is the field index.
probe
- we use the probe velocity to determine curvaturepublic double compPathLengthVariationFactor(IProbe probe)
Computes and returns the path length variation factor. This is the factor by with the
synchronous particle path length expands or contracts about the design path length when
considering the effects of dipole field strength other than the design value.
Denoting this quantity as w then it can be expressed
w = 1 - h/h0 ,
where h0 is the bending curvature of the design field and h is the
bending curvature of the current field strength. Thus, for a distance Δs0
along the design path, the synchronous particle actually travels a distance
Δs = wΔs0
along the actual path.
probe
- probe moving a some velocity determining the bending curvaturepublic double elapsedTime(IProbe probe, double dblLen)
elapsedTime
in interface IElement
elapsedTime
in class Element
probe
- propagating probedblLen
- length of subsection to propagate through meterspublic double energyGain(IProbe probe, double dblLen)
energyGain
in interface IElement
energyGain
in class ThickElement
dblLen
- dummy argumentprobe
- dummy argumentpublic PhaseMap transferMap(IProbe probe, double dblLen) throws ModelException
Compute the partial transfer map of an ideal sector magnet for the
particular probe. Computes transfer map for a section of magnet
h
meters in length.
The arc length dL of the probe will probably be larger than the physical step length h. This is because the path length of the design trajectory is generally larger than the physical length (otherwise no bending would occur).
transferMap
in interface IElement
transferMap
in class ThickElement
dblLen
- physical step length (meters)probe
- uses the rest and kinetic energy parameters from the probeModelException
- unknown quadrupole orientationIElement.transferMap(IProbe,double)