Class AcceleratingRfGap
- Since:
- Oct 1, 2015
- Author:
- Christopher K. Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumeration specifying the upstream location or downstream locations for the RF accelerating gap.static class
ClassNoConvergenceException
. -
Constructor Summary
ConstructorsConstructorDescriptionAcceleratingRfGap
(double f, double v0, AxialFieldSpectrum spcRfFld) Initializing constructor for AcceleratingRfGap. -
Method Summary
Modifier and TypeMethodDescriptioncomputeGapGains
(AcceleratingRfGap.LOC locHam, double q, double eR, EnergyVector vecInit) Computes and returns the phase jump Δφ and energy gain ΔW imparted to a particle with the the given particle charge Q and rest energy Er for the given gap region.double
computeNormWaveNumber
(double w, double eR) Compute and return the normalized wave number K.computePreGapGains
(double eR, EnergyVector vecInit) Deprecated.double
Returns the maximum allowable error, the distance between iterates of (Δφ,ΔW), before the current iterate is considered a valid solution.Returns the spectrum of the gap's axial electric field.int
Returns the maximum number of allowable iterations during the iterative search for RF gap gain parameters Δφ and ΔW.double
Returns the total (integrated) potential gain of the RF field across the accelerating gap.double
Returns the time-harmonic frequency of gap accelerating field.double
Get the free space wave number k0 of the gap accelerating fields.void
setErrorTolerance
(double dblErrTol) Sets the acceptable error tolerance when iterating for consistent gain parameters ΔW and Δφ.void
setMaxIterations
(int cntIterMax) Set the maximum number of allowable iterations during a search for the consistent gain parameters Δφ and ΔW.void
setRfFieldPotential
(double v0) Resets the total potential gain across the accelerating gap.
-
Constructor Details
-
AcceleratingRfGap
Initializing constructor for AcceleratingRfGap. All parameters needed for defining the RF accelerating gap are provided.- Parameters:
f
- time-harmonic frequency of the accelerating field (Hz)v0
- total potential drop across gap axial field (Volts)spcRfFld
- spectrum of the RF field along design axis- Since:
- Oct 1, 2015, Christopher K. Allen
-
-
Method Details
-
setMaxIterations
public void setMaxIterations(int cntIterMax) Set the maximum number of allowable iterations during a search for the consistent gain parameters Δφ and ΔW. The default value for this quantity is given by the constant
.CNT_MAX_ITER
- Parameters:
cntIterMax
- new value for maximum iteration count in gain computations- Since:
- Oct 13, 2015, Christopher K. Allen
-
setErrorTolerance
public void setErrorTolerance(double dblErrTol) Sets the acceptable error tolerance when iterating for consistent gain parameters ΔW and Δφ. The default value for this quantity is given by the constant
.DBL_ERR_TOL
- Parameters:
dblErrTol
- new value for the error tolerance in gain computations- Since:
- Oct 9, 2015, Christopher K. Allen
-
setRfFieldPotential
public void setRfFieldPotential(double v0) Resets the total potential gain across the accelerating gap.- Parameters:
v0
- the integral ∫Ez(z) dz (in Volts)- Since:
- Oct 16, 2015, Christopher K. Allen
-
getMaxIterations
public int getMaxIterations()Returns the maximum number of allowable iterations during the iterative search for RF gap gain parameters Δφ and ΔW.- Returns:
- maximum iteration count in (Δφ,ΔW) phase jump, energy gain computations
- Since:
- Oct 13, 2015, Christopher K. Allen
- See Also:
-
AcceleratingRfGap#setMaxIterations()
-
getErrorTolerance
public double getErrorTolerance()Returns the maximum allowable error, the distance between iterates of (Δφ,ΔW), before the current iterate is considered a valid solution. Once the L2 distance between the current iterate of phase jump Δφ and energy gain ΔW and the previous iterate is less than this value, then the iteration stops with a valid solution.- Returns:
- maximum distance between solution iterations for valid solution
- Since:
- Oct 13, 2015, Christopher K. Allen
-
getRfFrequency
public double getRfFrequency()Returns the time-harmonic frequency of gap accelerating field.- Returns:
- the RF frequency of the electric field (Hz)
- Since:
- Sep 28, 2015 by Christopher K. Allen
-
getRfWaveNumber
public double getRfWaveNumber()Get the free space wave number k0 of the gap accelerating fields. This quantity has the formula
k0 = 2π/λ
where λ = c/f is the wave length of the RF in free space.- Returns:
- free space wave number k0 of gap RF
- Since:
- Oct 1, 2015, Christopher K. Allen
-
getRfFieldPotential
public double getRfFieldPotential()Returns the total (integrated) potential gain of the RF field across the accelerating gap. This is the value given by
V0 ≜ ∫Ez(0,z)dz ,
where the integral is taken over the entire real line z ∈ (-∞,+∞). This value represents the total available accelerating RF energy and an upper limit for energy gain.- Returns:
- the total potential V0 across the accelerating gap (in Volts)
- Since:
- Oct 2, 2015, Christopher K. Allen
-
getFieldSpectrum
Returns the spectrum of the gap's axial electric field.- Returns:
- spectrum object describing the electric field along the gap axis
- Since:
- Oct 9, 2015, Christopher K. Allen
-
computeGapGains
public EnergyVector computeGapGains(AcceleratingRfGap.LOC locHam, double q, double eR, EnergyVector vecInit) throws AcceleratingRfGap.NoConvergenceException Computes and returns the phase jump Δφ and energy gain ΔW imparted to a particle with the the given particle charge Q and rest energy Er for the given gap region. The particle enters this region with initial gap phase φ0 and initial kinetic energy Wi. The returned values represent the effects of the first have of this gap upon the so described particle. This method uses an iterative technique to compute the results in order to maintain a self-consistent set of expressions. That is, the modeling expressions are a set of transcendental equations which must be solved self-consistently. Thus, we are relegated to iterative methods.
The provided phase φ0 is assumed to be the phase of the particle at the center of the gap, if it were coasting through the gap with kinetic energy Wi for the pre-gap computation, and after the pre-gap phase jump Δφ- for the post-gap computation. The phase value returned by this method, either Δφ- or Δφ+ for the pre-gap or post-gap calculation, respectively, is
Δφ- = +φ0 - φ0- ,
Δφ+ = -φ0 + φ0+ ,
where φ0- is the thin-lens model gap center intercept of the incoming coasting particle, φ0+ is the thin-lens model gap center intercept of the outgoing coasting particle, and φ0 is the actual particle phase at the gap center. The total phase jump at the gap center Δφ is the sum of these two phase jumps,
Δφ = Δφ- + Δφ+ = φ0+ - φ0- ,
The returned energy gain, either ΔW- for the pre-gap location or ΔW+ for the post-gap location, is the energy gained by the particle in those respective locations. The total energy gained by a particle through the gap is the sum of these energies
ΔW = ΔW- + ΔW+ .- Parameters:
locHam
- location of longitudinal gain calculations, with respect to gap centerq
- charge of the incoming particles in terms of fundamental charge q (unitless)eR
- rest energy of the incoming particles (electron-Volts)vecInit
- initial phase and energy pair (φ0,Wi) into specified gap region (radians, electron-Volts)- Returns:
- the corrective phase jump and energy gain pair (Δφ,ΔW) after impulse at specified location, pre- or post-gap (radians, electron-Volts)
- Throws:
AcceleratingRfGap.NoConvergenceException
- the iterative search for (Δφ,ΔW) failed to converge- Since:
- Oct 15, 2015, Christopher K. Allen
-
computePreGapGains
@Deprecated public EnergyVector computePreGapGains(double eR, EnergyVector vecInit) throws AcceleratingRfGap.NoConvergenceException Deprecated.Computes and returns the phase jump Δφ and energy gain ΔW imparted to a particle with the the given rest energy Er, gap phase φ0-, and initial kinetic energy Wi. The returned values represent the effects of the first have of this gap upon the so described particle. This method uses an iterative technique to compute the results in order to maintain a self-consistent set of expressions. That is, the modeling expressions are a set of transcendental equations which must be solved self-consistently. Thus, we are relegated to iterative methods.
The provided phase φ0- is assumed to be the phase of the particle at the center of the gap if it were coasting through the gap with kinetic energy Wi. The actual phase at the gap center φ0 will be
φ0 = φ0- + Δφ ,
where Δφ is the phase jump returned by this method.The returned energy gain ΔW is that for the particle at the gap center. That is, the effects of the gap on the particle include an energy gain of ΔW up to the gap center. The total kinetic energy W0 at gap center is then
W0 = Wi + ΔW.- Parameters:
eR
- rest energy of the incoming particles (electron-Volts)vecInit
- gap phase and initial energy pair (φ0-,Wi) (radians, electron-Volts)- Returns:
- the corrective phase jump and energy gain pair (Δφ,ΔW) at gap center (radians, electron-Volts)
- Throws:
AcceleratingRfGap.NoConvergenceException
- the iterative search for (Δφ,ΔW) failed to converge- Since:
- Oct 15, 2015, Christopher K. Allen
-
computeNormWaveNumber
public double computeNormWaveNumber(double w, double eR) Compute and return the normalized wave number K. This quantity appears as a constant in the phase jump expressions. The value of K is defined by the formula
K ≜ (1/β3γ3) (qV0/mc2)k0
where β is the normalized particle velocity, γ is the relativistic factor; V0 is the total (integrated) RF field potential across the gap, mc2/q is the rest mass in electron-Volts, and k0 ≜ 2π/λ is the free-space wave number of the accelerating RF field with wavelength λ.The quantity K can be interpreted as the particle wave number in energy space rather that momentum space.
- Parameters:
w
- particle kinetic energy W (electron-Volts)eR
- particle rest mass mc2/q (electron-Volts)- Returns:
- normalized wave number K (in radians/meter)
- Since:
- Oct 1, 2015, Christopher K. Allen
-