Beruflich Dokumente
Kultur Dokumente
-UC-28
- 331
(4
Linear
Accelerator
Stanford
University
Stanford,
California
October
Prepared
number
94309
1988
under contract
Center
of Energy
DE-AC03-76SF00515
Trajectory
associated with
Program.
the program
This document
also
is an updated
version of SLAC-226, published in 1979. The program itself has had substantial
upgrading
since then, but only a few new features are of much concern to the
are internal
or accuracy.
EGUN
and magnetostatic
fields.
Starting
fields, including
options
include
Childs
Law conditions
conditions.
on cathodes of various
Either rectangular
conditions.
motion.
program or arbitrary
configurations
Magnetic
work stations,
program
program
A Poissons Equa-
of coils.
of personal
dimension
a recently
or cylindri-
etc.
The EGN87c
are included,
printer-plotters
C. Plotting
is provided.
so the
routines
for
TABLE
OF CONTENTS
~--
............................
............................
1
2
Introduction
Application
Poisson Equation
Solver
1
2
......................
Input
...................
................
Title and Potential Cards
............
POTN, Rect. or Cyl. Coordinates
Field Data
Boundary
Input
Special Boundary
...................
...........................
Grids
Boundary Diagnostics
3.3 Poissons Equation
4
Starting
Conditions
...............
..................
Solver
15
16
19
20
.....................
Conditions
9
11
......................
Magnetic
................
........................
28
28
30
32
35
..................
4.1 Universal Parameters
..........................
PERVO
.................
HOLD Emission limited
PE
............................
..........................
ERROR
......................
UNIT, UNITIN
36
36
37
..........................
LSTRH
........................
MAXRAY
STEP
...........................
............................
NS
SPC ............................
.........................
PHILIM
...................
SAVE=l,
Boundaries
39
39
39
38
38
39
40
41
42
42
..................
44
MASS ...........................
.......................
AV and AVR
..........................
BEND
........................
MAGMLT
...........................
IPBP
ZEND ...........................
VION
...........................
..................
ZDOTEQ, EBQ Mode
45
45
46
47
47
47
48
48
SAVE=2,
Trajectories
4.2
Equipotential
P1ol.s
EQUIPR
LM
49
.........................
EQLN..
..................
.........................
EQST
...........................
IZl,IZ2andIZS
4.3
...................
Plotting
50
. .........
50
50
50
.....................
Controls
51
....................
51
51
SCAL%=YES
......................
SXandSY
........................
4.4 Magnetic Fields
.....................
Magnetic
Axial
Field Input
Magnetic
MAGORD,
NMAG
Rect.
4.7
53
...................
53
Coord.
; ...........
User Specified
Prograxn
GO
61
G2
70
............
......................
Data
Generated
Laplaces
59
.....................
74
....................
Cards
Equation
76
................
58
.................
56
57
I ......
Expansions
Integrals
.............
....................
Expansions.
Elliptic
4.5
4.6
.......................
Field
Ideal Coils
Off-Axis
51
52
Cylindrical
Applications
.............
78
Beams
....
79
79
82
83
87
Trajectory
91
Analyses
........................
References
..............................
Appendix
I, Equation:; of Motion
Apperldix
II, General
Neumann
Appendix
III,
Appendix
IV, Boundary
Condensed
04
96
..................
l3ounclary
Inst.rllctions
Examples
............
...............
................
104
107
120
TABLE
OF FIGURES
1
2
...................
Simulation of a Pierce Diode
Section of mesh for solution of Poissons Equation
Example
Fortran
Program output
Plotted
A-II
A-IV
of preparation
to run a problem
~--
7
9
........
13
.............
14
output
................
.................
.......
........
....
25
72
73
104
120
--
1. INTRODUCTION
~~. - -
Program.
earlier publications
SLAC-226.l
It contains
relevant
which
to express thanks
to everyone who
to the program.
We have
all these
This edition
of the documentation
plotters
These features
are included,
and
features better
from the
In addition,
all benefited
material
Electron
The plotting
configurations.
developed version
Plotting
is provided.
provided
by Metagraphics.3
printer-
supports
most
the same for the two versions except that EGN uses free field input for boundary
and trajectory
Computer
cially
data.
implementation
files.
Prospective
is available.
In the present PC
version, the code requires around 400 kbytes of storage. It operates about 30-60
1
limited
series mainframe.
A typical
on a PC, depending
on the hardware
configuration.
2. APPLICATION
The SLAC Electron
tron trajectories
Optics
in electrostatic
fully
distribution.
Electric
by another solution
The program
and currents.
by
trajectory
are
include
accepts
the output
and magnetic
field compo-
deposition
of charge
which is in turn
calculations.
or cylindrical
and magnetic
coordinates.
beam to be calculated
in
fields.
Magnetic
fields
configuration
data from
iron.
symmetric.
order expansion
trajectories
Off-axis
of solenoids.
a magnet
field components
may be started
Alternatively,
design program,
In cylindrical
Electron
equations
is
defined by spec-
of Poissons equation
array of electric
Poissons equation
appropriate
symmetric
elec-
to calculate
conditions
The electron
followed
written
fields.
using boundary
of the boundary.
the potential
relativistic
is specifically
and magnetostatic
equations
differentiating
Program
coordinates,
can
the magnetic
are calculated
which
the
by a sixth-
--
series mainframe.
A typical
2. APPLICATION
The SLAC Electron
tron trajectories
Optics Program
in electrostatic
is specifically
and magnetostatic
fields.
of the boundary.
differentiating
distribution.
fully
the potential
relativistic
written
Electric
by
are
field compo-
deposition
of charge
calculations.
or cylindrical
equations
and magnetic
appropriate
is
defined by spec-
elec-
Poissons equation
conditions
a rectangularly
to calculate
coordinates.
beam to be calculated
in
fields.
Magnetic
fields
are read in either as axial strengths or as arrays of coils with specified coordinates
and currents.
data from
symmetric.
configuration
iron.
of solenoids.
a magnet
Alternatively,
design program,
In cylindrical
coordinates,
Electron
trajectories
may be started
can
the magnetic
are calculated
which
the
by a sixth-
1. GENERAL
3. CARDS
current
4. GENCARD
charge is computed
jectories
conditions
of paraxial
at right
coordinates)
angles to the
Childs
law for
card format.
sumption
law
is again used.
in an 80-column
in rectangular
Childs
as the cathode.
assuming
of CARDS
law as in GENERAL.
flow.
the program
array.
After
the program,
space
tra-
Poissons equation with the space charge from the first cycle. For problems meeting the paraxial
assumptions,
especially if relativistic
iteration
The Childs
averaging
equation
starting
An additional
Laplaces
and phototubes,
law calculations
the perveance
lated directly
e.g., spectrometers
adequate.
Subsequent
tern.
conditions
cycle with
are remade
the perveance
by
calcu-
of Poissons equation.
option is LAPLACE
not involving
of
--
cycles is used simply to improve the accuracy of the solution of Laplaces equation.
The LAPLACE
from LAPLACE
capacity
and Z in cylindrical
coordinates
coordinate
through
In rectangular
Magnetic
data in the
output
azimuthal
coordinates,
and to
calculated
arbitrary
the electrical
rectangular
for inputting
PHI is actually
PHI)
the third
either
coordinates.
Electron
orbits
The
are
coordinate.
2. by specifying
or
output
coordinates,
the magnetic
field is interpreted
equations.
as an axial field
made by either a sixth order expansion from the axial fields or, for the case of a
set of coils, by directly
elliptic
order expansions.
interpolation
Second or fourth
functions.
input
the
In rectangular
coordinates
the magnetic
of the coordinate
the median
directions.
Off-median-plane
in the direction
normal
in the R-direction.
Cartesian
(Remember
coordinates.)
through
to the median
in the
equations
infinitely
numbered
long conductor.
problem
is generally
ray.
depending
insures that
The self-magnetic
field
to
ray approach,
the
However,
almost by definition,
in rectangular
radius of a previous
incorrect,
of
sort routine
A built-in
on the symmetry
expansions
plane can
to second order.
calculation
of the
to the
and
Self-magnetic
direction
If
or in the R-direction,
satisfy Maxwells
plane.
If the median
coordinates
PHI
beam.
the
then
This
as solved in the
field directly,
rather
This permits
coordinates,
the self-magnetic
calculation
Law
to be used
about
A single variable
This velocity
the Childs
ZDOTEQ.
the Y = 0, (R = 0) plane.
functions
coordinates,
field of strength
zero
the self-magnetic
field
controls plotting.
If this variable,
all plotting,
then on the first and last cycles, every tenth point that would have
been plotted
is printed
cycle is plotted.
paths.
overlaid
as a function
output
showing
If there is an external
on the trajectory
of the graphic
PHI,
plots.
1 is an example
equipotential
Normally
IPHI
of Z.
plots.
magnetic
field,
A special option
position
..
.
74
There
vs. radius.
(Alpha
= arctan
plots;
dR/dZ).
plot is constructed
by creating
density
current
vs. - radius
and alpha
The current
R=O and
uniform
are
used.
A diagnostic
routine
interpret
the normalized
parameter
this as a deliberate
the boundary
the emit-
or normalized
emittance
are calcu-
to calculate
emittance.
MI is defined as a negative
fatal boundary
as well as provide
error.
all diagnostics
the boundary
product
the programs
The program
of the boundary
plot without
entire program.
number,
spending
data.
This is
time running
the
GENERAL
The program
boundary
DESCRIPTION
contains
conditions
subroutines
and calculate
The solution
the coefficients
the problem.
of the finite
The subroutine
difference equaPOISSN
is then
to Poissons equation which match those boundis found in terms of a set of points which form a
horizontal
the
and vertical
program
potential
is calculated
mesh
of the
The
coordinates,
vl + v2 + v3 + v5 - 4v4 = (R.H.)
9
(3.1)
in the form
v2v = p/c2
All equations
(3.2)
explicitly.
For problems
with
cylindrical
symmetry,
the finite
difference
equation
be-
comes
RVl
+ Rv2
-t (R-t
i/z)&
-t- (R -
i/2)6,
4Rv4
= R X (R.H.)
P-3)
to the point at
4.
A number
of references5-7
A Dirichlet
In an electrostatic
An ordinary
boundary
Neumann
axis of symmetry
at boundaries.
problem,
is that boundary
boundary
derivative
derivative
symmetric
is known.
is known.
the only
derivative
boundary.
symmetry
problem
is
are of
of a cylindrically
equation
equations
the difference
of these difference
for ordinary
from Eqs.
Neumann
boundaries
(3.4
parallel
to either axis
the potentials
which
straddle
the boundary
in cylindrical
coordinates
Neumann
+ (R - l/Z)&,
- 4RV4 = R x (R.H.)
boundary,
does not lie along a mesh line. It is always assumed that the normal
The program
difference
coefficients
has a provision
for overriding
the internally
P-5)
is zero.
boundary
2RVl,2 + (R + l/Z)&
where the subscript
Thus a vertical
II. However,
boundary.
in practical
There is a derivation
applications
difference
derivative
computed
coefficients
of these coefficients
in
it is
boundary.
boundary
Neumann
condition
and DELTAZ
= 0. A tilted
boundary
most interest
can frequently
be adequately
normal
and 45 Neumann
3.2
that
is sufficiently
approximated
of
boundaries.
PROBLEM INPUT
through
to gain an overall
Condensed
listing
instructions
for problem
input
to be up-to-date.
11
are maintained
with
the source
version of these
instructions
is printed
in Appendix
the program
boundary
input,
option
the example.
instructions
by which
certain
variables
expects them.
e.g., RLIM
= 50.
e.g., &INPUTl,
NAMELIST
which
card.
must
begin in column
The NAMELIST
default
subscripts
a string
2.
but it is usually
of numbers
preferable
separated
for running
Figure
Array
1 of any
entry.
The
need to be included.
parameters,
for the rarely used ones for which the default value is usually
to be ignored.
of
is preceded by a designator,
to
designed
their
by commas.
by
is optional.
12
listing
cathode
of the input
data.
q::q ; +;:-}
j....,....,
*,.f-&w-
:.I ..I.+}
:I.:.:l.
. .
:y.,yrl.,.
to run a problem.
13
--
Figure
4.
FORTRAN data
prepared
14
for
the problem
shown in Fig.
3.
--
Title
and Potential
_ -
Cards
Th e fi rs t card of the data set is the title card. The contents of this
(TITLE)
output
remarks
of the program.
valid with
starting
in column 2.
apply specifically
although
for array
up the program.
Actually,
card.
It is virtually
setting
to the current
or somewhat
The third
string.
It contains
for
RLIM
(ZLIM)
RLIM
is the maximum
is a positive
ZLIM
is th e maximum
is 100.
larger than necessary value of ZLIM may affect the way the plots are scaled. If an
attempt
or goes negative,
ZLIM
RLIM
by ZLIM,
is
coordinates.
features,
It can be used
coordinates
--
integral
specification
of the magnetic
field.
IAX
is aninteger
with
the default
value IAX=O.
(POTN)
POTN
Normally
potential,
can intercept
to be applied.
a trajectory,
number
to enable
If an electrode,
such as a
electrode as if it was a thin ideal grid. If the focus electrode is given the potential
number 4, or 14, 24, etc., a trajectory
the electrode.
for POTN
is 101.
symmetry.
rectangular
COORDINATES.
coordinates
assumes rectangular
symmetry
If POTN
to switch to
COORDI-
1 to POTN.
up to 15 significant
PHI IS TRANSVERSE
POT(I)
which
RECTANGULAR
NATES,
- POTN
close. Potential
POTN
For NAMELIST,
Potentials
are carried
in double precision
They
Examples
2500E-
= (string
of
separated by commas).
POT(I)
Negative
are indicated
point numbers.
po-
tentials
are permitted
but it is preferable
to avoid using-them.
Since a constant
potential
negative numbers
of the output
examined
if a symmetry
are simplified
problems
The program
is intended
to include
potentials
MI
units.
Thus potentials
However,
The
again.
structions
to potential
output.
trajectories
corresponding
the problem
(MI)
desirable.
are certainly
and running
gained by scaling.
that can be
have a symmetry
it is acceptable
is printed
However,
every tenth
point
of the
in-
deliberate
TYME
boundary
or zero.
before printing
If MI
is negative
guard against
subroutines
integer
running
out of computer
and plotting
it is interpreted
as a
boundaries.
the results.
TYME
as specified
determine
variations
environment.
language
used to
must be supplied
dummy
by non-S-tanford
subroutines
for TYME
or, alternatively,
The program
only tests
cycle time.
When time appears limited,
note that:
THERE
BER OF CYCLES.
entirely
IS NOT
ENOUGH
TYME
the program
by setting
In a PC environment,
TIME
TO DO THE
cycles, with a
SPECIFIED
exactly
NUM-
to his experience,
or disable
to drop intermediate
cycles, with the above message, but will not cause the program
to be terminated
early. However, users should be careful to allow enough time, or watch the screen
carefully
LSTPOT
together
solution
(LSTPOT
controls
(LSTPOT
parameters
boundary
of the first
and thus
is run many
(LAPLACE)
= 3).
Three additional
the solution
MAGSEG
of
subtle errors.
to print
to control
of Poissons equation;
solution.
the number
The default
18
lems without
solution
converge to a better
2. XR is the matrix
property
stead of a relaxation
XR=0.995
smaller
constant
Radius
that
is used in-
The default
value is
(it must be less than 1.0) but for some small problems,
to converge faster.
a slightly
It is not recom-
with
of convergence.
multiplier;
the default
typically
it is incremented
is defined in &INPUTS.
the accuracy
of the initial
in steps
It can be
solution
of
equation.
optics calculations
The input
methods
for magnetic
1, etc.
value is ERROR=l.O.
Field Data
Electron
that
with
The namelist
&INPUT2
signals
is called MAGSEG
from constants
fields
The parameter
magnetic
functions
of Z.
Please note that this discussion is only included here to explain the &INPUT2
namelist
magnetic
field situation
The magnetic
order expression
as an explanation
of the
4. It is grossly incomplete
contains
a meaningless
field plotted
magnetic
on the right-hand
3 shows
of the axis.
segment
being described;
seven coefficients
= CBC(n)(Z
The parameters
- Z3)n-1,
BC(n)
n = 1 to 7
is an element
of a seven member
A second option,
to -6, ZLIM+G
MAGSEG
real
to zero.
and 0, respectively.
(22 = 100,
The coefficients,
BC,
separated by commas).
of this feature.
Input
The main
conventions
program
(3.6)
Boundary
and
BZA(Z)
Zl,
thing
is for electrostatic
optics,
application
by two floating
program
point numbers.
The C program
and
for the
to
three
requires
It is still a good
problem
of the program
is the ability
in the description
for the
Neumann
is known.
of the potential
Dirichlet
boundaries
aries represent
component
boundaries
the normal
is known.
are used to represent metal surfaces.
gaps between
Neumann
bound-
the normal
of the field is zero since that is the only value that is ever known
practice.
boundary
in a typical
For electrostatic
boundaries
is a Dirichlet
example.
problems
A boundary
the boundary
a Neumann
boundary
Neumann
boundaries
details
point is defined as any mesh point less than one mesh unit from
of the problem,
boundary
the boundary.
points.
is being specified.
The points
The points
This difference,
convention,
a Neumann
the resolution
to restrict
formulation
boundaries
technique
in
boundaries
boundary
Neumann
desired although
boundary
which
on
on a Dirichlet
is inherent
in the
boundary.
number,
integer,
corresponds
data card;
to the surface numbers
denoting
described earlier.
point.
3. Z, integer,
point.
21
4. DELTAR,
floating
line at a point
intersection
is not significant.
that
if the boundary
number
potentials.
is a Neumann
number.
Otherwise
It is important
boundary
it
to realize
for a Neumann
column.
A column
has a DELTAR
the program
be a boundary
and DELTAZ
or DELTAZ
should
surfaces
boundary.
a single point
cannot
be a complete
be within
is
to avoid a situation
in which neither
Boundary
number
However,
the potential
in the problem
of which
within
above, apply.
cannot simultaneously
surfaces at different
a complete
then
= 0.
A mesh point
Note that
point
code is DELTAZ
However,
boundary,
Repeating,
If the
boundary.
Any number
on a Neumann
is customary
the
boundary,
intersects
floating
not significant.
the intersection
5. DELTAZ,
DELTAR
be a column.
point,
each
cannot
have
applies to rows.
only.
order.
row or
Adjacent
point
points must
is not within
one
--
of determining
to as fitting,
(3.7)
SLOPE
= ABS[(2Z
than unity.
Use of fitting
or on curves that
too large an angle, i.e., never more than 45. Such curves should be
a single curvature
which can be
defined by a second order equation of the type given above. It is most useful on
long straight
or slightly
curving
segments.
Three points always define a segment and if the third point is missing or goes
around a corner to another segment, the result will be chaotic.
The programmer
define
If both
of two
Neumann
Boundaries,
the program will choose the correct point for each bound-
ary segment.
This is a significant
the program.
in each direction
versions of
In the special,
but quite
corner is a Neumann
boundary
boundary,
The boundary
as an example.
boundary
or DELTAZ.
number
output
Beginners
DELTAZ.
point
this; look
The POINT
a sequential
discussion
one: Potential
column
mistake
CARD,
in detail
POTEN-
from fitting.
progresses.
number
place), DELTAR
=-0.99,
POINT,
entry of 0.0
column contains
is defined by an appropriate
Card number
R. Z, DELTAR,
The CARD
case in which
the potential
TIAL,
common,
one, (cathode),
R = 0, Z = 1, (this is
boundary
along
(-1.0 could have been used but 1.0 for the DELTA
routine).
The point R = 0, Z =
0 could also have been used but it is risky to use -0.01, for example, for DELTAZ
because the curve could try to cross the Z = 0 line before R = 1, thus resulting
a point with two values of DELTAR,
fraction.
24
in a fractional
or DELTAZ.
without
in
This would
increasing
:
.
:
:.
Figure
5.
Program output
25
section
using
I.- ..000
I.0.m
Rum
*.- ..I.l.oOm
:.zz
I...a.- :=
3.
Card number
two: POT
= 1, R = 16, Z = 1; DELTAR
= 2.6, DELTAZ
=-
0.4. Since R = 16 is more than one unit from R = 0 on card one, the automatic
fitting
routine
will be called.
The DELTAR
= 2.0 indicates
= 37, Z = 3, DELTAR
= 0.99, DELTAZ
must also be on
does not
= 1, R
and DELTAZ
so there is no ambiguity
coordinates
(3.8) rather
The
than
Eq. (3.7) because the absolute value of the slope is greater than one.
Card number
four:
POT
distinguished
No fitting
= 2.0, DELTAZ
but works
five: POT
six: POT
fitting
procedure
= 2.0, DELTAZ
to be called.
= 0.99, DELTAZ
electrode.
The next several cards define the boundary
electrode.
around
the point
Fitting
on the focus
POT
= 4, R = 62, Z = 0, DELTAR
= -0.7, DELTAZ
condition
(DELTAZ
of the Neumann
segment
(r = 61.3, z = 0.0.
R direction
Neumann
boundary.
Potential
in this example.
Neumann
This is an extra
card inserted
program
boundary.
segment.
= 0.99, DELTAZ
= 2.0.
and make R = 63
for more than one mesh unit, even though the point lies right on the
the DELTAR
= 2.0, DELTAZ
= 0.99, DELTAZ
ambiguity
which
Actually,
of an old data set; the extra card next to the corner is no longer required.
Cards number
Z T 27, DELTAR
a short column
not agree with
twenty-one
and twenty-two:
POT
= 2, R = 71 and R = 70,
Clearly
they do
the boundary.
ever repeating
conditions
segment
= 0.0, DELTAZ
must be completed
on the axis.
terminates
thus completely
the boundary
input.
number
the difference
point.
adjacent
The boundary
boundary
= 0, R = 0, Z = 2, DELTAR
immediately
a boundary
equations
below.
is to
data.
Special Boundary
Conditions
A curved
or slanted
eral Neumann
conditions
Neumann
boundary
Neumann
as described
is correctly
0. General Neumann
in Appendix
conditions
values by overwriting
= 0 and DELTAZ
such as dielectric
surfaces,
the gen-
cards containing
boundary,
calcu-
data is by a potential
will commence reading
of an existing
boundary
point,
and
(W).
R and Z are integers locating
are the real positive
coefficients
an existing boundary
point.
at (R,Z).
points
than
RLIM
this input.
Dielectric
electric
Any number
materials
surface.
may be simulated
line of dummy
by special boundary
boundary
Usually
points,
having DELTAR
a simple straight
= DELTAZ
so that the
in
Section 4.9.
Grids
The program
cluding
such arrangements
structures
of remarkable
complexity,
symmetry,
in-
the grid
It can
be shown that most of the harm done to a beam by a grid is done by the rings,
28
deflections
significant.
Two kinds of grids are of interest:
1. Ideal grids that consist of a thin electrode,
both sides are defined using ordinary
ideal
deflections,
through
to continue
boundary
interception.
a particle
definitions.
thin
of any arbitrary
fields.
hence no particle
Trajectories
until
the partial
routines
attempt
differentiation
routine
step which
the electrode.
2. The second type of grid is actually
pointed
system.
-
made up of individual
significantly
wires,
in either coordinate
definition.
particle
deflection
grid).
to occur.
Obviously
it can be necessary
grid wires,
must be
wire.
wires, which as
definition
to define
of boundary
dummy
boundary
boundary
Internally
ordinary
array with
rather
boundaries,
points,
messy looking
Boundary
boundaries;
treat
dummy
points.
boundary
The boundary
one with
points
Usually
as if they are
plots
are apt to be
grids, is to do it with
the fewest
of work.
Diagnostics
If the input
is: SPECTRAL
program
will
andDELTAZ=2.0.
especially
of points,
for dummy
any boundary,
number
fitting
the program
interior
BOUNDARY
ERROR
The spectral
of the solution
IN COLUMN
radius is a constant
of Poissons equation.
in the middle
of the listing
and 0 5 2 5 ZLIM,
calculation
fitting
of boundary
lem, 0 5 R 5 RLIM
used by the
XX
on the output
or that
of the prob-
the boundary
data have
result
program
the listing
problem
program
in trying
found.
The program
computation
However,
the
to interpret
the program
In the PC environment,
by having
will attempt
stop immediately
nature of boundary
is favored
input
plotted
error is
to the
monitor
progressed.Sometimes
is enough to show where the error is, but if not, then the program
can be called up to the terminal
this
output
file
data point.
BOUNDARY
ERROR IN COLUMN
XX
requirement
The program
listing
it indicates
the requirement
that
translates
to mean that
there must be an even number of ends for each value of Z. An end is defined by a
DELTAR
value between +l
why there are not an even number of such points for the indicated
Note that
checks which
row must have two ends also, but no such check is included.
bottom
boundary
mistakes
Each
Also obviously
and similar
column.
care to prevent
or
correct.
CHECK
BOUNDARY
The CHECK
POINTS
BOUNDARY
....
POINTS
that
correct points,
boundary
execution
points
have opposite
and DELTAZ
values.
Sometimes
The warning
operation.
all these diagnostic
the diag-
in the output
listing.
Programmers
time.
31
should check
BOUNDARY
ERROR-OR
MI NEGATIVE
errors.
The programmer
equipotential
become glaringly
to catch other
on examination
Unsuspected
of a plot.
caused by LSTPOT
errors
The optional
> 0, should
always be
configuration.
the program
input,
equation
conditions,
(actually
a matrix
one column.
for a column
side (R.H.)
consists
columns
boundary,
of a tridiagonal
at a time.
matrix
which
known
the adjacent
of Poissons equation.
Laplaces
method
carefully
checks. It
obvious
equation
the programmer
listing
two types.
Chebyshev
point
is assumed to be
is zero.
method
The relaxation
and is described by
Varga.8
Each column consists of two or more points, with upper and lower end points
being boundary
a condition,
either Neumann
32
or Dirichlet,
has
that permits
the program
column
to write
a set of n equations
of the problem
in n unknowns
which
for that
column.
of a column.
Each such column must have its proper ends. In the example problem,
two columns
When a column
nate columns
C program)
there are
Z = 14.
columns
are considered
fixed.
columns
are solved.
After
is satisfied,
columns
50 iterations,
the calculation
Alter-
(25 in the
is stopped
ERR = X.XXE
- XX.
(the counter is already set to 51) the
is ERR volts.
adjusted
ERROR.
tightened
areas of Neumann
by giving
the program
a better
present versions
of the program
The FORTRAN
program
passes each.
iterations
inclusion
Certain
is automatically
problems
starting
either by iterating
distribution.
using large
The initialization
the iteration
determined
of the
Generally
can be
in the C program,
boundaries,
may be incorrect.
and after 50
leading to the
of space charge.
is not converging
it will stop
in which
tube or structure
is simulated
33
with
little
or no voltage
on any
electrode,
message.
the injection
a significant
positive
voltage
in the POT
is very slow due to, for example, the large area of Neumann
a potential
that
bound-
finishing
POTLIST,
is printed
potential)
ground
the first
the problem.
(points
behind
The POTLIST
cycle of Poissons
equation,
(normalized
by ZLIM
a potential
for peculiarities.
effective
An error in boundary
tial plots,
distorting
the fields.
it is possible to pinpoint
suppressed by setting
LSTPOT
= 0 in &INPUTl.
34
or
map,
of
device and
with
the equipoten-
The POTLIST
is
4. STARTING
After the first calculation
ing conditions.
which
those variables
specified.
of Poissons equation,
The format
the variable
CONDITIONS
is NAMELIST
is named followed
consisting
of defining
how little
conditions
included
the following
in the program.
in
Only
need to be
equations
illustrate
implementation.
The sample problem
with
&INPUT5
SPHERE
RAD
is coded as a spherical
respectively.
UNITIN
unit.
immediately
converted
prints
function
diode conditions
conditions
radius
4.3 Plotting;
and cathode
is in MKSA
units
so that
radius
is 0.01
UNITIN
is
parameters.
4.2 Equipotential
START
as follows:
4.1 Universal;
The entry
The starting
entries follows.
All problem
inches/mesh
plot controls,
35
plotting,
Sections according
to
4.4 Magnetic
fields; input
and calculation
parameters
cathode;
parameters
controlling
parameters
for magnetic
fields,
which specifically
cathode option.
4.7 Card starting;
parameters
controlling
starting
conditions.
4.8 Laplace starting;
plications
controlling
for ap-
Boundaries;
how dielectric
materials
can be included
in the
specification.
UNIVERSAL PARAMETERS
4.1
parameter,
In the following
DEFAULT,
determined
PERVO=
PERVO
= SPHERE
constant
the entries
COMMENT
MAX
comments
discussions,
.-
4.9 Dielectric
problem
parameters
The lines
separated
by a comma,
by array limits.
X.Xx
is the initial
or START
PERVO
= 0
methods.
K in the expression
36
Perveance
is defined as the
I = M x v3i2 x lo6
-.
Here K is expressed in micropervs
1.0 device operating
so that,
for example,
a microperveance
indicates that a decimal number is the expected value. When a single X is used, it
implies that an integer is expected.
number of significant
the
hardware,
normally
controls
value.
the perveance
averaging
method
than with
that
actually
simply
= X. The
arriving
better
to be correct
value PERVO
calculated
the current
in quickly
it is frequently
a value known
The default
to start
= X
with
the
from experiment
= 0 is a code instruction
solution
and
The new
per ray.
at a stable
However,
cycle.
The averaging
which
determines
of the first
HOLD
else.
= 1
PERVO
HOLDS
FOR HOLD
PROGRAM
CYCLES
HOLD
.
37
to remain unchanged
by the averaging
particularly
very nonuniform
establish
with
by running
application
loading,
with
Then, of course,
PE is the incremental
the combined
INITIAL
ENERGY
potential
for calculating
the initial
AT CATHODE
and HOLD,
conditions.
with
and thermal
IN EV
to account for
It is normally
Law routines
energy to avoid
instabilities
ERROR
= X.X
ERROR
ERROR
multiplies
the built
MULTIPLIES
= 1.0
iterates
TEST
ERROR
determines
boundary,
= 0.1, to get
the trajectories.
On the last cycle, the error test is reduced by a factor of 10 from whatever
-
helps
is to simulate
PE = X.X
initial
cathode
cycles.
more frequent
HOLD
program
The ERR
value returned
by the program
38
problems
level
will be found in
cycle, in volts.
UNIT
UNIT
= X.XxX
UNITIN
= X.XxX
= 0.001
METERS/MESH
UNIT
(SEE UNIT)
INCHES/MESH
UNIT
is 0.001 meters/mesh
for problems
using magnetic
LSTRH
= X
is mostly
a map of deposited
= 0
IF>O, PRINTS
used as a diagnostic
converted
This option
If a value
Except
LSTRH
unit.
rules of scaling in
SPACE
for program
CHARGE
debugging.
MAP
It prints
as the POTLST
map of
potentials.
MAXRAY
MAXRAY
= XX
If MAXRAY
MAXRAY
IS NEGATIVE,
determines
be calculated.
= 27,101
THE
MAXIMUM
NUMBER
the maximum
= GENERAL
a program
the program
OF RAYS=ABS(MAXRAY)
have a limit
MAXRAY,
OF RAYS
algorithm
NUMBER
or START
that can
= SPHERE
is determined
is negative.
Within
integral
of
by
the limit
number
of
STEP
STEP
= O.XX
STEP
is the iteration
to properly
= 0.8
UNITS/STEP
MESH
The equations
of motion
magnetic
39
fields,
at the start
of the step. Since the electron can accelerate during a step, it may may actually
go slightly
farther
than STEP. The default value is about the largest that should
be used. If magnetic
a factor
of two.
of two.
Shortening
is automatically
As a rule of thumb,
equation
the program
spends roughly
time by about
equations
be required
method
is used
to take
techniques
of verifying
frequent
become glaringly
NUMBER
variable
is having trouble
converging
of program
of ERROR
NS is the number
to still
OF PROGRAM
value is usually
on the perveance.
conservation
,0 > 1.0. At
runs.
In the program,
NL
acceptable
40
The most
CYCLES
cycles to be made.
fields
if magnetic
NS = X
Experience
of angular momentum
step length.
has shown that errors due to STEP being too large, especially
are included,
Poissons
The Runge-Kutta
of motion.
for a problem.
Thus reducing
25%.
reduced by a factor
will be cycled.
afforded
by the
= LAPLACE,
SPC=X.X
SPC=O.5
SPC SIMULATES
SPC IS THE
ESTIMATED
PARAXIAL
FRACTION
EFFECT,
RADIAL
FORCE
of the ordinary
radial
distribution
of motion
calculated,
to lie in a conductor
calculated
in sequence starting
electron
gun calculation
one direction,
0.5. Further
a better
electrostatic
the external
electrostatic
simulating
choice is SPC=O.5
which
attenuates
sheet of current
on distance
In rectangular
in only
the radial
force by
Empirically,
starting
from
SPC simulates
will usually
at a satisfactory
41
it has been
involving
coordinates,
infinitely
fields usually
starting
to radial
force that
is less sensitive
USED.
CYCLE.
ON FIRST
CHARGE
APPROXIMATION
OF THE
the fraction
SPACE
solution
forgive
Since
any misuse of
problem,
problem
magnetic
to get to stabilize
fields providing
of Laplaces
PHILIM
equation
was attained.
= 0.0
AZIMUTHAL
PHILIM
= X.X
PHILIM
magnetic
field.
SAVE =l
is stopped.
PHILIM
SAVE = 0
most computer
without
-
is an electron
orbiting
coordinates
CARDS
FROM
NEXT
there is no particular
in a uniform
coordinates.
facilities,
An example
boundary
LIMIT
usually
result in a good
diately
approximation
In this case one must be sure that STEP is small enough and that an
adequate solution
until
the focusing.
incentive
or from a library
run imme-
problems
although,
to do so. Programs
of compiled
PROBLEM
subroutines
at
are
to be
the risk that a failure in the first problem will affect or knock out the sec-
ond one. However, in the case where successive problems use the same boundary
conditions,
considerable
the boundaries,
42
conditions
starts immediately
with
no control
cards.
title,
potential,
magnetic
accompanying
large potential
number
start
in the potential
out just
including
the boundary
The potentials
map proportionately.
as if a cold start
Otherwise
can be
will scale
the program
will
One example
is difficult
small
lengths of Neu-
START
in the following
problem.
in an incorrect
potential
distribution.
This procedure
is not normally
required
to improve
the solution
charge is entered.
Note that
the PC program
that
parameters
on successive iterations
solution
has input
items
of Laplaces
as the space
in &INPUT1
equation
using the
In older FORTRAN
-- trodes separated
versions of EGUN,
a better
with
= LAPLACE.
convergence
An alternative
43
that
boundary
might
method,
parallel
respond
to the z-axis
to the approach
potential
numbers.
If the corresponding
potential
starting
to an appropriate
array.
In a problem
boundaries
with
Neumann
but
like
number
the preload,
(both FORTRAN
of Neumann
After
significance,
the Neumann
change accordingly.
in preload
with
the starting
boundaries,
load. Usually
voltages,
Neumann
interpolates
the starting
potentials.
useful to employ
the
above strategy.
SAVE = 2
FROM
PREVIOUS
USE ONLY
USES FINAL
SAVE = 0
WHEN
RUN TO START
START
as the initial
and positioning
-- below.
conditions
adjustments
DATA
THIS
RUN.
= CARDS.
runs to use the final conditions
of the succeeding problem.
Necessary scaling
of a preceding
= CARDS,
is possible and is
44
followed
drift
tube, periodic
MASS
= X.X
MASS
IS THE
focusing
MASS
LIKE
OR ELECTRIC
RATIO,
although
= CARDS.
WITHOUT
INERTIA;
FLUX
LINES
LINES.
ionized tritium
for starting
that particles
Law routines
negative,
FIELD
built
MASS
to be followed.
Childs
= 0.0
VALUES
IN MOLASSES,
MASS
section, etc.
MASS TO CHARGE
USE NEGATIVE
Ion problems
negative current
masses, so that
a proton
(positive
Note that
the intrinsic
are normally
The
charge
run as if charge is
about multiple
are
would
is negative.
species with
for START
different
masses in
AV = 0
AVR = 1.0
AVR = X.X
IN PRECEDING
AV and AVR
PROGRAM
are companion
SPACE
AVERAGED
WEIGHT
OF SPACE
CYCLE
LAST
AV CYCLES
CHARGE
FOR AV.
parameters
to help improve
the different
averaging
CHARGE
stability
It should not be
from affecting
each other,
45
by aver-
it is
is essentially
calculations
of
used (since there is no cycle 8). Thus the effect of averaging is only observed for
AV-1 cycles.
AVR
AVR
determines
the weight
of the previous
cycle is weighted
the present cycle. AVR can have any value, 0 < AVR <
Experience
one might
with
averaging
anticipate.
A poorly
and resulting
averaging.
application
of averaging
problems.
strong spherical
to relativistic
difficulty
The solution
the paraxial
approximation
even with
high intensity
beams
has difficulty
to this situation
With
converging
is frequently
the
the two-
than
aberrations
with
co.
equally
above.
ZDOTEQ,
described below.
BEND
GAUSS
AXIALLY
= X.X
IN THE
BEND
= 0.0
DIRECTION
SYMMETRIC
MAGNETIC
NORMAL
PROBLEMS.
BENDING
TO THE
FIELD
intended to simulate
have tight
tolerance
magnetic
46
R-Z PLANE
MUST
FIELD
IN
FOR
BE UNIFORM.
Residual
transverse
fields, earths
rectangular
coordinate
be simulated
geometry,
including
a cylindrical
transversefield
beam in a
as described below.
MAGMLT
= X.X
MAGMLT
= 1.0
MAGMLT
multiplies
the entire
BZA(
calculated
Note that
internally.
It also multiplies
MULTIPLIES
BZA ARRAY
array if that
field generating
power supplies.
IPBP
= Kl,
IPBP=
K2,...K6
FOR POINT-BY-POINT
K, RHO,
ZETA,
PRINTOUT:
RDOT,
In special situations,
ZDOT,
especially
cycle.
TDOT,
when program
behavior
a bug is stopping
at question).
is not as expected,
the program
this way. In some cases, one might rather have other items printed
the above list.
in
than those in
example.
ZEND
CAUTION:
-
SPACE
ZEND
= X.X
IF ZEND
CHARGE
Normally
the electric
IS NOT
DISTRIBUTION
a trajectory
fields.
= 1000.0
is calculated
EXACT
END OF TRAJECTORY
THE
RIGHT-HAND
MAY
BE INCORRECT.
BOUNDARY,
THE
47
usually
go up to one-half
mesh unit
In special situations,
Setting
being accelerated
such as high-resolution
This feature
as it strikes
option
VION
ZEND to a specific
a trajectory
passes
is still
The acceleration
photo tubes,
possible,
into
but the
= X.X
USE VION
VION=-lE8
TO SIMULATE
LOWEST
SPACE
POTENTIAL
CHARGE
PERMITTED
NEUTRALIZATION.
ions in an
normally
runs with negative charges, the above cases both result in negative space charge
depression.
If it is desired to limit
depressed potential
that
is desired.
The default
disturb
ZDOTEQ=l.O
value is intended
a practical
LEVEL
problem.
TO ENTER
EBQ MODE
The EBQ mode is a new EGN feature which allows the program
in the mode in which self magnetic
charge by a factor
field is accounted
(l-ZDOT*ZDOT),
to be low
to operate
for by reducing
where ZDOT=v,/c.
of that name written
the space
give improved
ZDOTEQ
results.
at a velocity
Some explanation
finding
The primary
48
is so special, and
beams
is gun
is reduced.
If the plot
MI
better
control
parameter
first finding
times.
on the potential
card,
is at one potential,
it is usually
plots.
to find the equipotential
potential
MI,
a starting
- a line of constant
with.
The method
Users should
lines.
the appropriate
where the
PLOTS,
of the equipotential
to a value appropriate
PLOTS
FOR EQUIPOTENTIAL
The instructions
INPUT
in only
EQUIPOTENTIAL
ZDOT,
4.2
is carefully
will necessarily
to be followed,
line for V = bx
49
lines consists of
If POT
POT
(2)# 0, the
(2) where b =
V=bxPOT(3)
at the points
POT
1.0. Normally
The expectation
is that
(2) will b e used for the anode and POT (3) will be used for the grid, if any.
POT
(2), one gets the ideal contour for the grid to be electrically
EQUIPR
EQUIPR
= X.X
EQUIPR
is the radius
potentials
0 line).
program
LM = 303
LM = XXX
invisible.
FOR EQUIP.
the program
LINES
the z-axis, (R =
line the
points.
LENGTH
OF EQUIPOTENTIALS
gular coordinates,
EQUIPR
R-INTERSECT.
= 0.0
0.01 VA,
at VG =
If
EQLN = 0 to 20
EQLN
controls
the equipotential
- sharply
curving
EQLN
the iterative
= 1
NO. OF CORRECTIONS
corrections
lines.
prevent
The default
deviating
value, EQLN
= 1, is usually
adequate.
EQST = X
EQST = 2
50
is found along
UNIT
from
APPLIED
This footnote
routine
the parameters
surface.
variable
IZl
(but
may determine
that
CATHODE
is not plotted),
the accuracy
EQLN
and thus
of the starting
and EQST
are made
parameters.
IZl
= x, IZ2 = x, IZS = x
EQUIPOTENTIALS
AT THE
INDICATED
VALUES
4.3
like an equipotential
and EQST
It is primarily
EXTRA
IZl
EQLN
CATHODE
The maximum
over.
TO GENERAL
is generated
plots.
OF Z.
along which
spaced
PLOTTING
CONTROLS
SCALE
= YES
SCALE
= YES allows the axis routines to adjust both the X and Y scales to
take maximum
SCALE
advantage
Using SCALE
in problems
SX = 22
YES=DIFFERENT
MAX.
X,Y SCALES
The default
in both directions,
value constrains
thus preserving
the
51
PLOT
ratios.
LENGTH
SY=XX
SY=9
MAX
VERTICAL
adjusted
HEIGHT
program.
SX and SY
PLOT
very similar
CALCOMP
by the program
to that
plotters.
normally
A simple program
plots.
at Stanford
can be programmed
subroutines.
With
to the software
supplied
is printed
Other plotter
by making
in the program
software
to convert
the appropriate
installation
the electron
used as input
file (disk) in
at another
trajectory
program.
Conversion
commands
to local software
within
is usually
quite
simplified.
For the PC program,
program.
If the C program
routines
is to be used on something
MAGNETIC
Magnetic
the
routine.
FIELDS
fields play a vital role in steering and focusing many kinds of elec-
with
is supplied
in the program
and limitations
of the magnetic
field imple-
The following
areas
- will be discussed.
(a) axial, (b) 1d ea 1 coils, (c) vector potential
1. Magnetic
Field Input;
2. Off-axis
field expansions
in Cylindrical
52
Coordinates.
data;
3. Magnetic
Magnetic
fields in Rectangular
Field Input
In the present
inputting
Coordinates.
implementation
magnetic
of the program,
field data:
expansion.
computer
3. By reading
magnet
of
program.
in vector potential
design program
4. By specifying
as found by using
such as TRIM
of a two-dimensional
or POISSON.
position
and strength).
coordinates,
symmetry,
of Axial
Magnetic
The format
polynomial
method
was briefly
described
consist
of MAGSEG
BZ, Bl,
elliptic
including
integrals
integral
rou-
coordinates.
Field
built-in
of data including:
53
of the seven
B=BZ+B1xDZ+B2xDZ2+...+-B6xDZ6,
where DZ = Z - 23. For the sixth order expansion, the field must start six units
behind the cathode or starting
The NAMELIST
&INPUT1
MAGSEG
which deter-
and &END
cards.
Each segment consists of the data for Zl, 22 and 23 followed by the array BC in
NAMELIST
format.
data is formatted.
+ 6. It is necessary to permit
With
a straight
BZ, Bl,
(0,O). As
by
ones to zero.
coordinates,
orthogonal
normal
linear coordinate
the above format,
direction,
where PHI
In rectan-
is the
direction.
Typically,
54
magnetic
measurements
of an
axially
symmetric
permanent
then be smoothed
coefficients
magnet
by a polynomial
Alternatively,
A separate provision
this array starts
= ZLIM
with
or
method
The difficulties
+ 6. The program
If measured and/or
format
Either
i.e., if MAGSEG
inherent
needs to calculate
a good representation
program
risks in expanding
lends itself readily
+ 13) at Z
MAGSEG
NAMELIST,
is called to read
plotted
&INPUTS,
Note that
calculated
With
field components.
output,
properly
an appropriate
the
This
edited,
computer
< 0,
and
model, for
example, for a set of solenoid coils, this is the most general accurate way to put
in fields.
for a complete
treatment
of solenoid
design.
In many cases, a set of ideal point coils can be defined to generate the fields.
The data consists
position
of radius,
z-position
and strength
the RLIM
by ZLIM
of up to 101 coils.
routines,
below, the off axis expansions break down if magnetic elements lie within
of the expansion.
starting
The
described
the area
The data for ideal coils are read in as part of the &INPUT5
conditions.
55
The starting
MAGNETIC
RMAG
conditions
FIELDS
= X.X
MAGORD
or -2,
R DIRECTION
to magnetic
1: READ
= RLIM/2
MAGORD
IF MAGORD=-1
THE
METHOD
RMAG
= 2,4
pertaining
IN AXIAL
OFF-AXIS
= 6
HIGHEST
FOR RECTANGULAR
AND
THE
OFF-AXIS
FIELD
IN &INPUT2
MAG
FIELD
LISTING
ORDER
FIELD
TERM
COORDINATES,
EXPANSION
BZA IS IN
IS A FUNCTION
OF R.
IF MAGORD<
-2 FOR RECTANGULAR
Z DIRECTION
AND
RMAG
THE
EXPANSION
components
of the maximum
that
prints
fields.
MAGORD
This printout
components
order term,
that
is a useful diagnostic
can result
to
is the expected
device
if the inputs
in powers of R, that
will
have
be used to
by the quality
If MAGORD
input.
is higher
are used, then the off-axis fields may be just plain nonsense.
If MAGORD=-1
on the Z-axis,
off-axis
is the highest
off-axis
measurements
MAGORD
than warranted
OF R.
to check on unrealistic
Usually
routine
IS IN THE
discontinuities
BZA
IS ALSO A FUNCTION
to be typical
calculate
COORDINATES,
or -2,
(rectangular
coordinates
56
only),
This
in pow-
case is suitable
for
quadrupole
symmetry
If MAGORD<
-2,
in rectangular
the rectangular
coordinates
coordinate
the Z direction.
Another
ideal coils.
In rectangular
coordinates,
NMAG
as straight
wires.
NMAG
= X
NMAG
= 0,101
NO. OF IDEAL
COILS.
NELL
= 1
NELL
= 0
=l
CR(I)
= X.X
CR(I)
= RLIM
RADIUS OF COI~MESH
FOR ELLIPTIC
CZ(1) = x.x
CZ(1) = 0.0
AXIAL
CM(I)
CM(I)
CURRENT
= X.X
ONLY
THE
NELL=0
RECT.
COORD.
= 0.0
CASE
CAN
BE USED
POSITION
FOR
INTEGRALS
UNITS)
OF COIL
IN AMPERE
TURNS
STRAIGHT
WIRES
When the ideal coils are used, the fields on the axis are calculated
IN
using the
equation
B(AXIS)
= 0.27rCM(I)
array limit
- CZ(1)) + CR(I)2)3/2,
GAUSS
(4.1)
in planes perpendicular
but practical
CR(I)/((Z
be represented
57
integer value,
The
CR(I)
CZ(1)
axial position
CM(I)
ampere-turns
where I
1 to NMAG
a favorite
to the strengths
to be within
of the coils.
Some methods
from POISSON
will
way of putting
or position
of coil
RLIM,
into
by a
of a set of coils.
(not zero, or a zero divide will occur);
but may have any any positive
value.
CR
It
by ZLIM.
space RLIM
CM()
The program
by ZLIM,
calculates
NAMELIST
block.
Field Expansions
The input
to Z = ZLIM
With
the working
methods
described
-6
results for
finite differences up to the sixth difference, which is necessary for the sixth order
derivatives
.
fields.
58
Each difference
requires
one larger
value of n in Z f
The
range Z f
6 requires that the fields be specified beyond- the limits of the problem
from Z =
-6 to Z = ZLIM +6.
B, = B,(Z)
- R2(d2B/dZ2
B, = -R(dB/dZ
By specifying
MAGORD
are;ll
- d3B/dZ3.
MAGORD
R4/576)/4
(4.2)
P-3)
= 2 or MAGORD
= 4, the derivatives
how smoothed,
if the original
higher than
Generally,
measured data,
Synthesized
data from an ideal curve, if there is only one segment, can generally be expanded
to fourth
that
order.
it is virtually
measured
impossible
data or arbitrary
to be fit together,
The off-axis
without
polynomials,
running
Rectangular
Coordinate
In rectangular
paper.
especially
The central
Note, however,
order expansion
with
either
to sixth order.
with extremely
insufficient
result.
accuracy,
Expansions
coordinates,
plane, with
59
PHI
= 0, can be thought
of as the
median plane of a magnet whose pole face is normal to the z-axis, i.e., dB/dR
0.
The off-median
plane expansion
is
BPHI = Bp~1(2)
- PHI
BZ = PHI.
The alternative
expansion
dB/dZ
(4.4
* d2B/dZ2
(4.5)
plane lying
normal
to the R-Z
The fields
in this discussion
coordinate
designations.)
The second order expansion has been adequate for the applications
been made.
One example
the low energy SLAC beam from the gun to the line of the accelerator.
choice of angle makes the vertical
the vertical
beam, in rectangular
the optimum
coordinates
angle.
can be included
starting.
Integrals
for
A proper
that have
If NELL
a table of off-axis
= 1, the elliptic
fields with
integrals
60
elliptic
integral
calculations
is
Oth-
erwise, with
integral
NELL=O,
problems
Vector Potential
In &INPUTl,
next.
a beam being
as in the Russian
functions
Data
&INPUTA
For example,
The elliptic
(TO INPUT
= .TRUE.,
to be called
are:
VECTOR
POTENTIAL
DATA)
RRO=X.X
RRO=O.O
POSITION
OF FIRST
zzo=x.x
zzo=o.o
RELATIVE
TO ORIGIN
DELR=X.X
DELR=l.O
INCREMENT
IN R(CM)
FROM
POISSON
DELZ=Z.Z
DELZ=l.O
INCREMENT
IN Z(CM)
FROM
POISSON
RLMAG=XX
RLMAG=30
NUMBER
OF ROWS
ZLMAG=XX
ZLMAG=200
NUMBER
OF COLUMNS
A()....VECTOR
UNITS
POTENTIAL
DATA
OF A() IN GAUSS-CM.
ARRAY
ELEMENT
OF GUN PROB.
OF A() DATA
OF A, EXCEPT
A() IS A LINEAR
OF A()
OF A() DATA
A*R AT R=O
ARRAY
WITH
-.
COLUMNS
RLMAG
LONG.
MAX
saturated.
The output
component
61
field including
design program,
such
of such programs
is usually
A().
in the
This
array is currently
set to a maximum
to points in a rectangular
trajectories
DELR
will
increments
DELZ.
problem.
To save running
requirements
it is preferable
RLMAG
During
at RRO,
ZLMAG
the program
columns
separated
START=GENERAL
GENERAL
RC, = X.Xx
RC=O.O
zc = x.xx
ZC=2+CATHODEZ
FROM
CL=X.X
LOWER
THE
CL=RLIM
FIRST
BR and BZ.
CATHODE
END OF START
SURFACE
CATHODEZ
= Z-VALUE
BOUNDARY
MAXIMUM
DATA
LENGTH
CARD.
OF STARTING
DENS=lO.
EMISSION
BETA2=1.0
BETA2=0.0
= X.X
USE RAD
RECTANGULAR
SURFAC=X
START
SURFAC=l
FOR WIRE
COORDINATES
STARTING
GENCARD
.
62
LIMIT
SURFACE.
DENS=X.X
RAD
by
4.5
to
require.
in columns
in this option.
RADIUS
A/CM2
IN
IF BETA2
> 0.0
SURFACE
ITERATION
GENERALWITHCARDSTART
START=GENCARD'
HAVEUPTOMAXRAYCARDSWHICHSPECIFY:
1. RAYNUMBER
2. INITIAL RADIUS R
3. INITIAL
AXIAL VALUE Z
4. DISTANCEFROMCATHODEDX,CATHODEMUSTBEPOT(l)
5. EFFECTIVESPACINGBETWEENRAYS,DR.
6. PARAMETER WHICH MODIFIES CHILD LANGMUIR;ALPHAZ
NORMAL DXIS 2.0 TO 3.0 MESH UNITS.
NORMALDRISl.OBUTMAYBEVARIEDALONGTHESURFACE.
NORMALALPH2
ISl.OFORAPLAINDIODE.
FORCYLINDRICAL
COORDINATES:
ALPHZ=(ALPHA*(RADIUS
OF CURVATURE)/(STARTINGSTEP))**~
FORRECTANGULARCOORDINATES:
ALPH~=(BETA**~)*(RADIUS
OF CURVATURE)/(STARTING
In calculating
is that
- electric
starting
conditions
of a spherical
option.
using Childs
emission.
Mathematically,
STEP)
the calculation
must start
63
some finite
annular
in shape in cylindrical
coordinates.
The typical
thickness
is 2.0 to 3.0
mesh units.
The Child-Langmuir
equation
J = 2.335 x 10-6V3/2/s2,
to the concept
of perveance
(4.6)
emission current
density
leads
K in the ex-
pression
I = K x V312 x 1O-6
the implied
-.
box.
factor
having units
is expressed with
microamperes
(4-V
The starting
surface is initiated
cathode starting
routine
is to define
(RC,ZC)
with
default
point represents
the axis, 2 mesh units in front of the Z value of the first boundary
of the pill
values
a point on
point.
If the
cathode does not start on the axis, the correct value for RC must be defined.
the first boundary
64
If
The term
CATHODEZ
first boundary
the cathode
starting
point.
refers explicitly
It is frequently
a different
convenient
point,
The starting
and following
surface is calculated
by starting
3. The boundary
points
intercepted
surface, extended
line at (RC,ZC)
CL. (default;
by a line drawn
CL = RLIM)
at right
angles to the
cease to be represented
by POT(l)
by POT(l).
or POT(5).
Emission
POT(3),
usually
- parameters
the length
Equipotential
EQLN
will
Any
that
used for grids, will not stop the line because it may be so
a more tortuous
at
other potential
to determine
does not
of the problem.
follow
starting,
an equipotential
POT(5)
The
(RC,ZC),
of
starting.
starting
of the
apply to GENERAL
of the starting
as safety
surface.
valves.
Test 3 is intended
If the starting
surface has to
as described
in in the section on
Lines.
,DENS limits
the current
density to a maximum
65
value controlled
by the user.
-.
the emission
as in temperature
limited
emission.
limited
as described
in under Universal
BETA2
on subsequent
Note that
by using PERVO
and HOLD
Blodgett13
Parameters.
are included
The material
in the program
coordinates.
BETA2
equations
to calculate
that
currents
the starting
case of
is calculated
points until
iterations.
The Langmuir
The
in each ray.
of the wire,
coordinates)
is
. /?)
unit
(4.8)
cylin,drical
amperes/mesh
is treated
where
U = .h(r/RAD).
(4-g)
66
if BETA2
= 0.0.
Then the
program
a number
of equal segments.
(5 MAXRAY)
of rays is calculated
surface into
by the program
evenly along the
The program
from which
current
The number
the starting
determines
the potential
and calculates
ordinates,
or the equation
at the point
on the starting
the starting
for cylindrical
emission,
velocity
surface
and the
if in rectangular
spheres
co-
in cylindrical
coordinates:
I = 2.335 x 1O-6
p/2
p6p Amperes/radian
r+t2)
(4.10)
where
(+x2) =
(7
0.372
+ 0.7573 - ..y
(4.11)
and
= .q(rc - Z)/b].
(4.12)
of the cathode
of the annular
This equation
calculates
The program
prints
conditions,
the current
this current
the current
is printed
density
and p
conditions.
divided
radius,
by the initial
to determine
67
uniformity
surface.
Under final
p. This column
of cathode
loading.
to the simple
1/x2 dependence
radius of curvature
that
the length
the discrepancy
if the
significant.
For cases involving
cylindrical
coordinates,
the starting
to simplify
(4.1) by expanding
r,2(-a)2
Thus, it is possible
= s2(1 + 1.6x/r,
+ 2.06z2/r,2)
(4.13)
in which x has been redefined as positive for the usual case of a concave spherical
emitting
surface.
= X
SURFAC
is generated
= 1
Frequently,
STARTING
SURFACE
the starting
- the current
the starting
it will drop.
point
of the electric
for that
ray.
CYCLES
looking
field.
the initial
68
surface
The starting
The potential
determines
surface
starting
in the
SURFAC
will be regenerated.
start
difference
particle
is included,
generally
the number
between
velocity
and
the shape of
the potential
of cycles, during
on
which
controls
the number
= GENERAL
option
MAXRAY,
etc. After
successful calculation
SURFACE:
LENGTH
will appear.
If the starting
is selected,
constants:
STARTING
by the initial
Diagnostics
If the START
a special
= X.X
the program
LENGTH,
ZETA=X.X
will be printed
followed
data.
ENDS AT RHO=X.X,
conditions
will
outside
for at
of the problem,
CATHODE
STARTING
ENDS AT RHO=X.X,
is printed.
If SURFAC
SURFACE
FAILED:
LENGTH=X.X,
ZETA=X.X.
> 1 and this failure occurs on the second program
surface.
potential
Otherwise,
the program
(currently
cycle,
80%)
will terminate,
to aid in diagnosis
of the difficulty.
GENCARD
is a starting
highly nonuniform
cathodes.
of a right
emitting
cylinder
poorly by START
option
= GENERAL
introduced
to permit
response to
because of implicit
69
better
assumptions
handled
of curvature
was specifically
intended
field emission
GENCARD
devices, but
emitters.
combines
of CARDS
high current
step.
of GENERAL
with
coordinates
the basic
conditions.
In
to the cathode DX; the spacing between rays DR; and the fudge factor ALPH2.
Thus the user has defined all the parameters
limited
problem
except
initial
needed to start
CHILDA
which
calculates
the starting
by
called by
needed by GENCARD.
The parameter
rectangular
ALPH2
coordinates,
(STARTING
ALPH2
STEP/CYLINDRICAL
4.6
-.
RADIUS)
lstpower factored
out.
SPHERICAL CATHODE
SPHERE
START
= SPHERE
= X.Xx
RAD
SPHERICAL
= 2ZLIM
CATHODE
SPHERICAL
RADIUS
CATHODE
RMAX
= X.Xx
RMAX
= RLIM
ORAD
= X.Xx
ORAD
= CATHODEZ
70
CENTER
with
The effect
= 1. Anything
START
RAD
corresponds
RADIUS
OF CATHODE
CATHODEZ
IS Z VALUE
ST = 2.0
ST = X.Xx
SPHERE
ALSO
CATHODE
IF START
STARTING
WORKS
CATHODE
CENTER,
determine
Obviously
the default
etc.
is that current
RADIUS,
CATHODE
and RMAX,
values, 2 x ZLIM
and RLIM
respectively,
after printing
is calculated
START
to calculate
output
the current
Again,
operates
with
of
the same
as in START
= GENERAL
Ref. 8.
the headings the spherical
cathode routines
a message:
ITERATION
as
= SPHERE.
= SPHERE
have almost
point as defined
6.
In rectangular
Immediately
as shown in Fig.
coordinates
normal
cathode
rection
SPHERICAL
of the spherical
of the Langmuir
case, in cylindrical
input
COORDINATES
~~
RADIUS,
ORAD,
POINT
FOR CYLINDRICAL
BOUNDARY
STEP
IN RECTANGULAR
= SPHERE
ble of parameters
OF FIRST
ERV.
71
PERVEANCE
= X.X MICROP-
by the appropriate
equations as indicated
according
currents
to the method
except with
= GENERAL
Basic geometry
defining
out with
the initial
the normalized
the currents
for spherical
in Section 4.1.
conditions
reflect
this
printed
averages
and perveance.
are
cathode configurations
2309A2
72
c
I-J.
I-_
I
lI
F igure
, 50*
Plotted
output
B(Z) GAUSS
,150
,100
,200
73
,250
,300
2.
,350
,400
450
divided
by the initial
sure of uniformity
coordinates),
of cathode loading.
The special case of magnetic fields reaching the cathode, i.e., immersed
is treated by both SPHERE
program
and GENERAL
integrate
the azimuthal
starting
motion
through
input
problem
starting
conditions
4.7
obvious on examination
any
of either the
or the plots.
starting
START=CARDS
zo=x.xx
HAVE
bunching
CARD STARTING
The program
instructions
UP TO MAXRAY
TRANSVERSE
- FORMAT
CARDS
IS FREE
IN NEW
DATA
WITH
(EV),
POSITION
ANGLE
STARTING
FRAME
(1 INTEGER,
(RADIANS),
SEGMENT),
8 FLOAT
PT.)
CURRENT
TRANSVERSE
ANGLE,
(PHI).
STOP READING
IF RECTANGULAR
CARDS
IN ONE RADIAN
FIELD
CARD
OLD ORIGIN
R, z, ENERGY
(MICROAMPERES
are as follows:
START=GENERAL
zo=o.o
NO., MASS,
-.
and the
fields within
surface to
the cathode
flow
WITH
COORDINATES:
74
OF THE PROGRAM
THAN
MAXRAY
PHI IS TRANSVERSE
CURRENT
SPECIAL
POSITION
IS MICROAMPERES
TESTS
IN RATNST;
UNITS.
CROSSING
IRAT=O
3-D SPACE
CHARGE
IRAT=
IRAT=O
CROSSING
DETECTION
MAKE
RAY NUMBERS
USE BEAM
CHARGE
PAIRS
ING
EDGE
CARDS
I AND
PART
IS TO
OF A CYLINDRICAL
EDGE
ATTRIBUTES:
END
OF PART
BER,
WHICH
BEGINS
IN OTHER
NOTE
THAT
* R) WHICH
WORDS,
THIS
BY NEXT
NEXT
MAKE
I(K)
REQUIRES
OF RAY
CHARGE
CARDS
SPREAD-
DIFFERENTIATED
ALPHA
OR RADIUS,
BY
CAN BE
OF RAYS IN EACH
RAY WITH
NEGATIVE
PART.
RAY NUM-
PART.
BEAM
PER MESH
WOULD
OF
SETS
PARTS,
ANY NUMBER
CYLINDRICAL
CURRENT
BEAM
3-D SPACE
SEVERAL
CARDS.
SPACE
PRECEDE
FOR WHICH
WITH
THE
EDGE
COORD.
E. G., ENERGY
IS DEFINED
TO SIMULATE
- = 2 * I/(PI
CARDS
OF BEAM
USED SIMULTANEOUSLY
ORD. MAKE
R IN RECT.
BE SIMULATED.
SELECTED
FOR BEAM
(I=O) TO SIMULATE
RADIUS
OF BEAM
DEFINING
CHARGE
CHARGE)
NEGATIVE
SPREADING
CURRENT
SEGMENT
RAY NUMBERS:
(3-D SPACE
IF IRAT=l
DEEP
OR 3-D SPACE
IRAT=l
USE OF NEGATIVE
-.
IN MESH
SPACE CHARGE
UNIT,
HAVE
THE
= I(K)/(2*
TWICE
75
I = I/(PI
SAME
R(K)
AS MANY
IN RECT.
* R) INSTEAD
CURRENT
COOF I
DENSITY.
INSTEAD
OF I(K)/R(K).
RAYS
AS FOR CYLIN-
DRICAL
BEAM
WITH
PLY TO
OFF-AXIS PENCIL
SYMMETRY.
IN CYL.
COORD.
(RAY
< 0) AP-
~~.
START = CARDS mode uses data cards for the initial conditions rather
The
than computing
typical
the initial
applications
conditions
from a thermionic
model.
There
are:
run to restart
in a new segment of
coordinate
application
influences on a beam.
with a cylindrical
beam, including
cylin-
a table of appropriate
end of the
to
parameters:
MAXRAY
cards with
than MAXRAY
termination
the starting
will terminate
make MAXRAY
The computer
If MAXRAY
Following
the
A card with
data.
this input.
UNIT.
ray number
greater
the
Data to be entered on the ray cards consist of a ray number and the MASS,
followed by the initial
VERSE
ANGLE
and TRANSVERSE
POSITION.
76
ANGLE,
CURRENT,
The format
is 15,
TRANS-
F5,7F10.5.
1. Ray Number:
purpose
sequentially
4. Z: the initial
axial position
Th e initial
It should be obvious,
nothing
whatever
for
in mesh units.
kinetic
but sometimes
requires stating,
are important,
the initial
in mesh units.
the potential
6. ANGLE:
by the
radial position
(EV):
3. R: the initial
5. ENERGY
above.
and
0 for electrons,
the FORTRAN
described
special implications
2. MASS,
is only included
in electron volts.
that
ENERGY
has
starts.
or on
only fields
radians.
7. CURRENT:
the current
ray. In rectangular
8. TRANSVERSE
in microamperes
coordinates,
ANGLE:
plane.
9. PHI:
the initial
transverse
linear coordinate,
the azimuthal
position.
In rectangular
position
in radians.
77
symmetry,
In cylindrical
symmetry,
PHI
is a
PHI is
Program
Generated
During
the initial
Cards
by a text editor.
If it is planned
in the output
and can be
hand punched.
Typically,
problem.
to be used in a subsequent
in the complete
gun with
card starting
just
zo = x.xx
SKAL
SKAL
OLD ORIGIN
= 1.0
is plotted
- in which
a relatively
IN NEW
there is
ZO and SKAL
FRAME
example.
.
78
the second
system.
MESH
smaller
parameters
OLD MESH/NEW
is interpreted
runs, it is
zo = 0.0
= X.Xx
Between
segment of a
Usually
ZO is negative.
(in meters).
cathode
on problem
SKAL
Thus a problem
conditions
and SKAL
will have
Thermal
Effects
SUBROUTINE
THERM
TC=XXXX.X
TC = 0
THREE
ARE INCLUDED
MODELS
IF THE
KELVIN
KRAY=l
TWO
KRAY=S
KRAY=l
THREE
THREE
KRAY=l
RAY
SPLIT
WITH
2 PARTS
EACH
IN RAYS WITH
PLANE,
FIVE
RAY SPLIT
WITH
AND
infinitely
PUTS
CURRENTS
IN 1-5-8-5-1 RATIO
FOR 1 PART
FOR 8-PART
CENTER
RAYS.
RAY.
FOR START=SPHERE,
FOR START=CARDS
with
Cylindrical
in rectangular
GENERAL,
WITH
CARDS
SAVE=2.
Beams
coordinates
in the directions
RAY.
RAYS
FOR 5 PART
in-and-out
IN R-Z
TO UNDEFLECTED
Coordinates
sheet extending
1 PART
RELATIVE
NOT
IN 1-2-1 RATIO,
V(PERP)=SQRT(2KT/M),
CAN BE CALLED
Rectangular
RANDOMIZED.
RAY AND
V(PERP)=2*SQRT(2KT/M)
OR GENCARD,
SPLIT,
DOWN
NO DEFLECTION
THERM
OF CATHODE
RAY SPLIT
CURRENTS
V(PERP)=l*SQRT(2KT/M)
TC > 0
RAY SPLIT
IN UNDEFLECTED
UP AND
TEMP.
PART
FIVE
PUTS
PARAMETER
IN THIS VERSION
KRAY=2
KRAY=5
-.
IS CALLED
than
However,
of the problem.
The space
in cylindrical
symmetry
if the current
is properly
be for a cylindrical
further
expansion
beam. Further
symmetry
in the current
can compensate
for
of the beam.
reductions
density
density cylindrical
is J = I/rR2.
beam of thickness
If one wished
I and radius
to have a rectangular
density,
the total
current
I = 2RJ = 21/7rR
To define the rays in rectangular
n and make n rays, suitably
to use starting
coordinates,
length I(K)/R(K).
a current
If one wishes
symmetry
per unit
on the
created as in cylindrical
Consider
now a particle
md2R/dt2
The force on a similar particle
coordinates
of F/n.
(4.14)
(equal densities)
= eI/(27rRic,).
next to an infinite
beam of
is
(4.15)
current sheet in rectangular
is
md2Y/dt2 = eI/(2ico).
To make d2R/dt2 = d2Y/dt2 we have only to require
80
(4.16)
I = I/rR
(4.17)
(equal forces) .-
This is just one half of the result for equal densities in (4.13). Thus, if the results
from the previous run were treated as described above, except divided
then the initial
by two,
coordinates.
A special feature allows the user to designate groups of rays, as few as one
per group, to be bounded by beam edge cards which
As the beam edge cards spread apart, the current
reduced proportionately.
designated
a group is
conditions
by being inserted,
with
in pairs just
before
coordinates.
In this case,
the effect would be of an off-axis pencil beam, i.e., not an annular ring. Assuming
that the thickness of the pencil is small compared to the radial displacement,
same factor of one-half should be applied to the initial
for rectangular
currents
the
as was derived
coordinates.
IF IRAT=
1) R-Z: MAKE
FOR WHICH
INGS WILL
(R-Z AND
RAY
PHI CROSSOVERS)
NUMBERS
FINAL
NEGATIVE
CROSSOVER
BE LISTED
SHOULD
AND PLOTTED.
81
FOR
SEQUENTIAL
BE DETECTED.
NEGATIVE
RAYS
CROSS-
RAY NUMBERS
SHOULD
BE IN PAIRS.
A RAY WITH
TO FIND
R=O,ALPHA=O
CROSSOVERS
PRECEDING
WITH
Z AXIS,
RUN
AXIS
CROSSING.
2) PHI:
LEAVE
RAY
TO DETECT
LAST
A special application
this application,
The program
NUMBERS
CROSSING
sequentially
direction)
instruction
comments
detect crossovers.
in &INPUT5.
This feature
of the scintillator
is used to find
surface in image
Pairs of trajectories,
different
initial
conditions
WITH
END POINT
Laplaces
INPUT
equation
problems.
(energy and
The program
NO RAY TRACING
NUMBER
LAPRH=O
CARDS
started
EQUATION APPLICATIONS
NS = 7
LAPRH=l
For
= LAPLACE
NS = X
tential
with
RAYS
INTEGER.
START
-.
appear above.
LAPLACES
DATA
TRANSVERSE
the position
4-8
OF PHI=PI*
tubes.
FOR
POSITIVE
OF LAPLACE
USE LAPRH=l
(R,Z SPACE
CHARGE)
CYCLES
TO START
READING
FOR NON-ZERO
POINTS.
BY R > RLIM.
has many applications
Some examples
besides solving
are temperature
distributions
electrostatic
po-
and magnetic
- fields.
As a reminder,
by Laplaces
equation
one usually
Poissons equation is V24 = p. The program always solves Poissons equation but
.
82
the coordinates
(RjA),
= LAPLACE,
of the starting
namelist
new parameter
LAPRH
by R > RLIM.
In the C program,
map, or POTLIST,
Following
such points.
according
Choose it carefully,
4.9
by making
a dummy
boundaries,
boundary
point.
To do ray tracing
tions.
a second problem,
of the potentials,
boundary
no ray
without
found by LAPLACE,
boundary
problem
DIELECTRIC
it is simply
neces-
followed
starting
by
instruc-
in Section 4.1.
BOUNDARIES
of the dielectric.
boundary
83
points,
of using
DELTAR
DELTAZ
point)
method
sufficient
equations
and vertical
were derived
dielectric
curved dieletric
the fitting
(three-
as lines.
The difference
horizontal
or with
are relatively
boundaries.
These relatively
a stepwise simulation
of the dielectric
than the
results from
to the nearest
expressed as:
LEFT
= RIGHT
= R
(Vacuum)
(4.18)
UP = R + l/2
DOWN
For a horizontal
dieletric,
LEFT
= RIGHT
= R - l/2
constant
(4.19)
= q(R - l/2)
For a vertical
dielectric
become:
(Horizontal)
UP = e2(R + l/2)
DOWN
boundary,
the coefficients
84
become
-.
LEFT
= qR
UP = (~1 +
DOWN
RIGHT
EZ)(R
= ERR (Vertical)
+ l/2)/2
(4.20)
constant
For rectangular
coordinates,
1/2)s to unity.
The term
respectively
instructions
are reprinted
(4.18) and
below:
TO
POT NUMBERS.
THEN INCLUDE ANY NUMBER OF CARDS
WITH
R, Z AND FOUR
IF RECTANGULAR
COORDINATES.
DIELECTRIC
AND
BOUNDARY:
85
DOWN = El * (R - 0.5)
WHERE El OR E2 = 1.0 FOR VACUUM AND E2 IS UPPER MATERIAL.
VERTICAL DIELECTRIC BOUNDARY:
LEFT = El * R
RIGHT = E2 * R
86
5. TRAJECTORY
CALCULATIONS
- -
because of the auxiliary calculations that must be made at each mesh unit. Thus
it is generally not helpful to use any self-checking corrector solving routine.
If some unusual application requires shorter iteration steps, the results usually
show this by their internal inconsistency.
The relativisitic
ii = a(1 - p2)li2
[-&(1
- i)
+ i&r
- h2) + ii&
+ i@,
+ hi&
A = d1 - P2)12[-E#(l - A) + i&,
- cliB# + CAB,]
+ c,kB4 - ciB,]
where
87
(54
A2
+ R
(5.2)
-g
(5.3)
p2 = i2 + h2 -I- A2
and
p = v/c
(5.4
The constant a! = eX/m,c2 where e is the magnitude of the electron charge (the
- sign is in the equation), moc2 is the rest energy of the particle and X is the
constant of proportionality
coordinates.
Thus
2 = AZ,
By an arbitrary
volt.
?-=A&
a=
XA
and
et = XT
P-5)
choice, X = 5.11 x lo5 mesh units so that cx = 1.0 mesh unit per
correct if the electric fields are specified in volts per mesh unit.
Dimensionally
meters per second and B is in webers per meter2. Then cB has units of volts per
meter. To convert to program fields of volts per mesh unit, fields are multiplied
by the value UNIT in meters per mesh unit. Magnetic field input to the program
is in gauss, which is the common engineering unit, and is internally
converted to
webers/meter2.
The azimuthal magnetic field B4 comes from the current in the electron beam
and is called the self-magnetic field of the beam. The magnetic field created by
an axial current is
PO I webers/meter2.
B$ = Gr
(5.6)
approximation
After multiplying
B+
r by
Thus the
scale factor only enters for external magnetic fields. The current I in (4.19) is the
summation
from the beam due to azimuthal velocity of the beam. The magni-
tude has been shown to be less than one gauss in most practical cases and so is
neglected.
The space charge is calculated to supply the right side of Poissons equation
which is
vq7
= E = .L
60
veo
(5.7)
The velocity is only the Z-component since the space charge is being
spread between adjacent points on the same column. The one mesh unit space
between adjacent points accounts for the 1.0 in the area expression above.
In the finite difference form, (3.3) replaces (5.7), and the right hand side
becomes
RO =
36~ x lOgI
ABS(ZDOT)
(3.77 x 10-4)1(K)
x 1O-6
ABS(ZDOT)
x 3 x 10s =
89
(5.8)
--
inclination, dR/dZ, exceeds 45, the calculation is made for RDOT. The absolute
value of ZDOT is used to allow a negative ZDOT. The explicit value of R in (3.3)
is canceled by the R which would convert the current to current density, thus
avoided special problems as R + 0.
In practice, however, there are still some space charge problems near the
axis. In rectangular coordinates, if the axis is a plane of symmetry,
then any
trajectory between R = 0 and R = 1 has a mirror image between R=O and R=-1.
(A reminder again...when in rectangular coordinates, the axis still retain their
cylindrical labels.) To account for all the space charge on the axis, the calculated
charge is doubled. In cylindrical
space-charge proportionately
a very accurate solution.
the
simply making the space charge on the axis equal to that found for the first row.
90
~I_
~.
6 . T R A J E C T O R YA N A L Y S IS ._
- -
validity.
The emittance calculation also gives a value for the invariant or normalized emittance which is given by;
p2)-li2.
invariant to further acceleration. That is, of course, provided the acceleration and
transport
the quality of the beam. The momentum used to find the product ,87 is that of
the first trajectory.
At the end of each run, after the last set of trajectory
profile which
to some degree.
of the cathode and that of the beam, will exhibit some spherical aberration, in which the rays from the outer part of the beam cross over the inner
ones. The EGUN program invariably shows at least some such aberration
at the outer edge of any gun. This may be due to the way space charge is
allocated near the edge, or it may be real, or some of both.
There is one more plot available, for azimuthal
motion.
If the parameter
IPHI has been set to one of the ray numbers, a single curve will be plotted of the
azimuthal position us. Z. This is either the angle PHI, or the position PHI if in
rectangular coordinates. The plot is made for the ray designated by IPHI.
The current density profile, which was described above, should not be confused with the emission current density which can be found by examining the
values for I(K)/R
that are printed with the final conditions of each cycle. The
initial set of currents are the I(K) va 1ues that are actually used by the program,
and are the currents (microamperes) in a one radian segment of the ring of charge.
Since current does not change during transport, the final data would be the same
as the initial current, thus wasting space in the output.
bers are the initial currents divided by the initial
proportional
simulating many electron guns. That is, to make a good electron gun, meaning
one with good beam quality, strive to get the space charge limited emission as
uniform as possible. The best guns are usually uniform to within 10% across the
face of the cathode.
93
REFERENCES
1. W. B. Herrmannsfeldt,
_ -
Language, Pren-
tice Hall.
3. Metawindow
Software Cor-
Calculations, Proceedings of the 1986 Linear Accelerator Conference, Stanford Linear Accelerator Center, Stanford, CA 94305, June 1986. Ms. Colmans address is Neutral Beam Division, Brookhaven National Laboratory,
Upton, NY 11973.
5. Forsythe and Wasow, Finite Difference Methods for Partial Differential
Equations, Wiley and Sons.
6. Vladimir
the Calculation
9. D. Bruce Montgomery,Solenoid
John
Representation
of Axisymmetric
Magnetic
Fields in
2,
--
_ -
..
12. K. R. Spangenburg,FundamentalsMElectronDevices,McGraw
Hill, New
York (1957).
13. I. Langmuir and K. B. Blodgett, Phys. Rev. 22, 347 (1923).
14. G. R. Brewer, High Intesity Electron Guns, Focusing of Charged Particles,
Volume II, A. Septier, Ed., Academic Press (1967).
15. H. Busch, Ann. Physik 4,8& 974 (1926). See the above reference by Brewer
for a treatment of this subject.
16. J. A. Seeger, Proc. of IEEE, 56, 1393, (1968).
17. K. G. Steffen, High Energy Beam Optics,Interscience
Wiley and Sons, New York (1965).
18. P. M. Lapostolle, IEEE Trans l8, 1101, (1971).
95
Monographs,
John
APPENDIX
DERIVATION
OF EQUATIONS
._
- -
OF MOTION
tion
d(mv3=
dt
where e is the magnitude
-e(Jl?+vxd),
(1)
coordinates
is
(2)
Here uZ, ur and u4 are unit vectors and 2G= r$ is the azimuthal
velocity.
or peripheral
(3)
where me is the electron rest mass. Differentiating
where
u&+6
+ 4)
..
$; = u,; + ur(Y- b2/r) + u&i/r
_ -
+ ii).
(6)
From
2) = (i2 + f2 + iL2p2
we have
dv
dt
Substituting
(7)
= +ii
@I
+ ii: + q.
!.k.$=m,(l-~)~32[1
-p
+{1-~}{u,i+..(i-ir2/r)+u~(i++a)}].
Equation
C@$=m0(1-$)-32[uz{
+ 214 $i(Z
1
&+ci)+i(l-g+;)}
- -T
+ ur { $i(BI+&)
( l-
2)
yielding
+r -(l-g+!T)}
(10)
+z(1-$+$)}I.
yielding
97
-db-4
dt
= -e
Equating
vector components
+ u,(E,
+ id,
1
(11)
.
we have finally
} =-e(Ez++Bd-&B,),
mO
(l- $)m3
{(l--p+cz
2v2i2)z++~+giii
(14
mo(1-!!!)m32{$+~~+
( l-s+2v2 ia)r++y
iL2( 1 -
V2
c2 >,
(13)
2
- C2 )I
(14
and
For computer
normalized
form.
programming
Accordingly,
2 = AZ,
We differentiate
it is convenient
in a
we let
r = XR,
a=
XA and ct = XT.
(15)
. -
..
z= -c2z
A
i=&,
c2ii
1:= cl& r=x
(16)
and
212
pLCZ=i2+@ffp.
respect to T=ct/X.
(lg),
of the normalized
Making
mOc2
displacements,
the normalizing
[(l - p2 + i2)Z
X(1 - /32)3/2
(17)
Z, R and A, are
substitutions
+ iitli2
+ iAA]
p2 + Itt2)ii + M;I
k2
- &l
in Eqs.
(18)
=-- E,+ckB,p-CAB, 1,
m0c2
X(1 - p2)W
=-
e E,C
ILki
+ (1-
[
ciB++ckB,
(12),
- pz)
1,
1 (19)
and
m0c2
X(1 - /32)3/2
=-
. . ..
AZZ+AI#+(1-/?2+A2);i+
e Eg+ciB,-c$!B,
[
1.
(20)
Our goal is to get separated equations solved for the second order derivative
99
variables.
arrange them in
the form
A$+
B#
+ Cl;i = D1
(21)
determinant
equations.
Eqs. (US), (19) and (20) in the form of Eq. (21) yields
+ (1 - p2 + IP)ii
A2
= (1 - p2)F
- -f&(1
+ hii
(22)
- py
(23)
AZ2
. .
+ /i&ii
+ (1 - p2 + i2)i
= -(l
- p2)y
- --$(l
- p2)32
(24)
=(l
of the coefficients
- p2 + i2)
-p2
+ $)(I
-p2
+ ili
piA2
- ik(l
- p2 + )I
+ ik
[i&i
- Ai(1
- p2 + ,I
- p2 + i2)(1
- .&-?(l
=(l
[(I
is
- py(l-
- P2)(1-
- p2) - &$(l
p2 + 22 + $
100
+ ~2) -/$d2]
p2 + fp + $)
- py
+ AZ)
_ -
which is simply
A = (1 - /?2)2.
to let cx = eA/moc 2. The axial acceleration
It is convenient
Ag
(25)
= D1(B2C3
- C2B3)
2, is given by
which becomes
(1 - p)2
=[-a(1
- /32)3/2(Ez + ckB4
x [(l - p2 + 2)(1
- CAB,)]
- p2 + 2)
- Iw]
A2
+ [(l - pa)% - a(1 - /?2)3/2(Er - ciB4
x [hiA
+ [-(1
- iiql
- p2 + AZ)]
. .
- p2,y
x [ili2A
Simplified,
- (1 - p2 + S)iA]
- ,O)/[-(Ez
that
+ cliB#
- eiB,)(l
- p2 + Ii2 + /i2)
Ai
- &B,)]
yields
+ CAB,)]
= D&W2
- i2) + iEiE,
+ iiE,
- c&B4 + CAB,]
k, is given by
- A2C3)
(26)
which becomes
(1 - p2)2iz =[-a(1
- p2)3/2(Ez
x [Ii&i2
+ clfLBO - CAB,)]
-lii(l-p2+A2)]
k2
+ CAB,)]
(27)
cliB,)]
-kA(1-p2+i2)].
yields
ii = a(1 - /3')'/'[
ciB4
+ A") - 921
-
x [i21Li
Simplified,
_ -
..
(E, + ciB#
E, - ciB+ +
- CAB,)
ii
CAB, )(l-P2+ia+2)
&A]
A2
+R(1-p2+i2+A2)+~.
Noting
that
The azimuthal
acceleration
lbiE$
+ ciB#
A2
- CAB,] + --.
2, is given by
- AIBB) + D3(A1B2 -
A2Bl)
(28)
which becomes
..
_ -
(l-
p2)2;1 =[-cx(l-
p2 + h2)]
x [ki2d-A~(l-p2+i2)]
. .
+ [(l - pz)Jg
x [(lSimplified,
p2 + 9)(1-
p2 + I?)
- i2Ei2].
A=a(l-p)
2 1'2[( E,+chB4-ciB,)ii+(E,-eiBm+
E4+ciB,-eliB,
- !g (I_
Noting
- a(1 -
that
p2
) (l-82
+ i2 + fi2)
+i2
ciB,)&
+I?)]
A,.
2=a(l-~2)1'2[-E&-i2)+~AE,+~~E,-c~B,+cBB,]
103
-g.
(29)
APPENDIX
GENERAL
NEUMANN
the derivation
II
boundary
Since point
through
the point
4 at the intersection
Starting
- -
BOUNDARIES
._
near point
between points
4.
from
v, =
(30)
v5
we have
va- v5 = v2 - va
a2
a5
-.
a to point
(31)
5.
is taken to be unity.
Cross-multiplying,
we have
~~_
But, a2 + a5 = fi
=z&
(32)
+a2V5.
(33)
= a5V2 + a2V5.
a2
=
sin(7r:
sin (Y
1
- CX)
1
1
=
cos%cosa!+sin~sina
cos 2 - a
which becomes
a2 =
6 2sina
fit ana!
= l+tancr
(34
fi
=
ltana
l+tancr
l+tana!
1
(
(35)
sina+coscr!
a2454545
The complete
difference equation
&v4
The factors
to four,
JZtanav2+
l+tancr
l+tan
v5,
of 4 are inserted
1
l+tana!
as is needed in rectangular
coordinates.
105
(36)
v5 =4-F/4.
In cylindrical
coefficients
coordinates,
equal
this sum
That
presented-above
derivation
uses Vi
are interchanged,
generated
if both DELTAR
Neumann
boundary
applications
For CY = 45,
terms
and DELTAZ
both
are exactly
to the boundary.
l/(1
for a 45 Neumann
boundary
the terms
for a double
boundary.
In many
of this section.
Note that in application,
defined as Neumann
generated
boundary
difference coefficients
special boundary
with
coefficients
card.
106
by the method
boundary
supplied
input,
to input
by signalling
/**************************
EGNDOC***********************
EGN ELECTRONOPTICSPROGRAM:
EGN87Cl: C LANGUAGE,VERSIONI, I JUNE 1987
DESIGNEDFOR USE ON PC'S OR ANY SYSTEMSUPPORTING
C
EGUN: FORTRANVERSIONCOVERED
BY THIS MANUALALSO.
_ ..
W. B. HERRMANNSPELDT(415) 926 3342
HOMEPHONE: (415) 941 0436 BITNET MAIL: WBHAPAT SLACVM
STANFORD
LINEAR ACCELERATOR
CENTER
STANFORD
UNIVERSITY
STANFORD,CA 94305
G. A. HERRMANNSFELDT(217) 384 4014
HOMEPHONE(217) 384 4014 BITNET MAIL: HRMNSFLDT
AT 43240.HEPNET
DEPT. OF PHYSICS
UNIVERSITY OF ILLINOIS
URBANA,ILLINOIS 61801
******Fe*****************
************************
EGN87Cl FEATURESINCLUDE:
** POSTPROCESSOR
FILES CAN BE MADE. DATA IS CALLEDBY IZSAV- TERMS.
SEE POSTPROCESSOR
BELOW.
** MASSOF IONS CAN BE INDIVIDUALLY DESIGNATED
FOR EACHTRAJECTORY.
ION CHARGEIS GIVEN BY THE SIGN OF THE CURRENT.
** EBQ MODE;ALLOWSSELECTIVESWITCHINGFROMTHE USUALWAYOF
ACCOUNTING
FOR SELF-MAGNETIC
FIELDS, TO THE MODEIN WHICHSPACE
CHARGEIS REDUCEDTO ACCOUNT
FOR THE ATTRACTIVEFORCESDUE TO THE
SELF-MAGNETIC
FIELD. SEE THE DISCUSSIONFOR THE PARAMETER
ZDOTEQ
IN THE SECTIONBELOWON UNIVERSALPARAMETERS.
** EMITTANCECALCULATION
HAS BEEN CONVERTED
TO THE RMSDEFINITIONS
COMMONLY
USEDFOR NORMALIZED
AND UNNORMALIZED
EMITTANCE.
IF MIXED SPECIESARE USED, EMITTANCEWILL BE CALCULATED
ONLY
FOR THE FIRST SPECIES, I.E., CHARGEAND MASSLINE RAY(l).
WHENTHE FIRST 2ND SPECIESRAY IS ENCOUNTERED,
THE EMITTANCE
CALCULATION
WILL STOP, SO THE SPECIESSHOULDBE SORTED.
TO AVOID HAVINGTHE PROGRAM
SORTRAYSBY RADIUS, USE IRAT=I.
** THE CHILD'S LAW STARTROUTINESARE ALWAYSSINGLE SPECIES, MASS
DEFINEDBY PARAMETER
MASS, NEGATIVECHARGE(POSITIVE CURRENT).
TO MANEIT EASIER TO GENERATE
INPUT DATA FOR DIFFERENTSPECIES,
THE CARDOUT
PUNCHEDFILE, 008, HAS BOTHINITIAL AND FINAL CARDS.
PLOTSCAN BE MADEOF PHI VS. Z, FOR ONECHOSENTRAJECTORY.
PHI IS IN MILLIRADIANS IN R-Z COORDOR MESHUNITS IN RECT. COORD.
-107-
SUBROUTINES
MAIN
SUBROUTINEANALYZ(M1)
SUBROUTINETIMTST(IT,NL)
SUBROUTINECHILDA (*)
SUBROUTINEDISTNC(Rl,Zl,R2,Z2,RHO,ZETA,DIST)
SUBROUTINECHILDB
SUBROUTINEBSET(K,BOOL, * )
SUBROUTINECHILMG(BR2,RHO,ZETA,*)
SUBROUTINEPRFILE
SUBROUTINEPOTLST
SUBROUTINERHALST
SUBROUTINEPOISSN (N,*)
SUBROUTINEBOUND(POTN,MAD,*,*)
SUBROUTINECOEF(*)
SUBROUTINETRAJCT
SUBROUTINEPLOTS
SUBROUTINEEQUIP (FZ,ND)
SUBROUTINELAPLAC (*)
SUBROUTINEFRAME
SUBROUTINEDSPROC(IEQQ,EQB,RHO,ZETA,PU,*)
SUBROUTINELISTL (ss,RHO,ZETA,)
SUBROUTINECOORD(N,RHO,ZETA)
SUBROUTINEMAGFD(ZLIM,*)
SUBROUTINELISTMG
SUBROUTINEPRTIAL(RHO.ZETA,PU,*)
SUBROUTINETOUCH(I,L,RHO,ZETA,PU,EEV,RHI,ZETI, * )
SUBROUTINERZP(Z,E,B,C)
FUNCTIONROMXX(B)
SUBROUTINERATNST(IRAT)
SUBROUTINEPERVNC(MI,*)
SUBROUTINETHERM
SUBROUTINELOOPS(RHO,ZETA,HR,HZ)
SUBROUTINESCALE2 (XX,AXLEN,NPTS,XD,XL)
SUBROUTINEWRPLOT(I,L,A,B,c,D,xX,YY)
SUBROUTINEREADA
SUBROUTINECALBRZ(RHO,ZETA,BR,BZ,*)
FUNCTIONDELIEI
FUNCTIONDELIKI
**************
**********e***
..
INSTRUCTIONS **********************
SAMPLEPROBLEM:
INJECTION GUN MODEL4-1A GRID-CATHODE
REGION (WBH) MOD.I~-20-67 MI=O
&INPUT1
RLIM=72,ZLIM=40,POTN=4,POT=O.O,5OOO.O,O.O,O.O,MI=l,~GSEG=l,TYME=l5,
&END
&INPUT2
Zl=20,Z2=40,Z3=20,BC=O.O,25.0,
&END
IO
1
0.0
-0.99
I
16
I
2.0
-0.4
I
37
3
0.99
-0.1
4
38
4
2.0
-1.0
4
48
10
2.0
-0.8
4
55
14
0.99
-0.6
4
56
15
2.0
-1.0
-108-
57
2.0
-0.4
15
4
4
58
15
2.0
-0.3
2.0
4
59
15
-0.4
60
2.0
-1.0
4
15
-0.99
61
14
2.0
4
-0.2
61
13
-0.8
4
62
-0.7
2.0
4
12
-0.7
62
6
2.0
4
62
0
-0.7
0.0
4
66
0
2.0
0.0
0
0.99
2
71
0
0.0
2
71
0.99
IO
2.0
71 26
0.99
2
2.0
0.99
71 27
0.99
2
70 27
-0.2
0.99
2
2.0
2 69
26
0.8
2 49
-0.3
17
0.2
2 41
2.0
13
0.8
2 40
2.0
13
0.4
2 39
2.0
13
0.3
2 22
II
2.0
0.2
0
0.0
2
IO
0.3
0
0
8
0.0
2.0
0
0
0.0
2
2.0
888
&INPUT5
IZI-I,
IZ2=2, IZS=IO, RAD=257, RMAX=37.5, UNITIN=O.OI, SPC=O.O,
&END
ANOTHERTITLE CARDFOLLOWED
BY DATA FOR A SECONDPROBLEMCAN GO HERE
CARDNO. I CONTAINSTITLE ON ONE CARD
&INPUT1 CARDNO. 2; &INPUTI,
CARDNO. 3 CONTAINSRLIM, ZLIM, POTN, POT(l), POT(2),...
POT(POTN).MI,MAGSEG,LSTPOT. IAX, (ALL IN NAMELISTFORMAT.)
******************************************
DEFAULT.MAX
NAMELISTITEM
*************
***********
COMMENT
*******
HEIGHT OF PROBLEM
RLIM=XX
RLIM=100,100
WIDTH OF PROBLEM
ZLIM=100,300
ZLIM-XX
(SIZE LIMIT (RLIM+I)(ZLIM+2) < QMESH)
DEPRESSED
AXIS
l-AX=0
IAX-XX
SPECTRALRADIUS FOR CONVERGENCE
XR=0.995
XR=O.SXX
SEE SPECTRALRADIUS DISCUSSIONBELOW.
NUMBEROF PASSESTHOUGHPOISSN
PASS=2
PASS=X
FOR THE INITIAL SOLUTIONTO LAPLACE'S EQUATION..NOSPACECHARGE.
NUMBEROF POTENTIALS
POTN=IOI, 101
POTN=XX
POT(l)=X.X TO POT(POTN)DEFAULTTO ZERO,POTENTIALSIN VOLTS
(USE NEGATIVEPOTN TO SIGNAL RECTANGULAR
COORDINATES)
PLOT INSTRUCTION,SEE TABLE
MI=1
MI=X
IF MI IS NEGATIVE, PROGRAM
WILL ONLYPROCESSBOUNDARY
DATA.
IF PROGRAM
ONLYPROCESSES
BOUNDARIES,BECAUSEOF MI<0 OR
DUE TO A BOUNDARY
ERROR,PLOTS SHOULDSTILL BE GENERATED.
USE MI<0 FOR CHECKINGBOUNDARIES
AND CHECKINGSCALING OF
PLOTS BEFORERUNNINGENTIRE PROBLEM. PLOT SCALINGPARAMETERS
ARE NOWABLE TO BE READ IN FROMBINPUTI;
-109-
sx=x
SY=X
SCALE='YES'
SX=8
HORIZONTAL
PLOT WIDTH (INCHES)
SX=6
VERTICALPLOT HEIGHT (INCHES)
SCALE=' '
FILLS FRAME, BOTHVERT. AND HOR.
(MAKESSCALEFACTORSUNEQUAL)
NUMBEROF SEGMENTS
OF MAGNETIC
FIELD DATA TO BE-READNEXT-.
INTPA=.TRUE. INTPA=.FALSE. CALLS INPUTA TO READVECTORPOTENTIALS
LSTPOT=l ONLYPRINT FIRST POT MAP
LSTPOT=X
LSTPOT=O ONLYPRINT PRELOADPOT MAP
LSTPOT=X
LSTPOT=O PRINT NONE, =2, PRINT FINAL, =3 PRINT FIRST AND LAST
MAGSEG=X
MAGSEG=O
MAX PROBLEM
RUN TIME MIN.
TYME= 20.0
TYME= X.X
EXPECTEDPOTENTIALS
POT(I) = CATHODE
POT(2) = ANODE
POT(~) = GRID (CONTROLS
EXTRAEQUIPOTENTIALS)
POT(4) = FOR A SURFACEWHICHWILL STOPRAYS-NOTA GRID.
POT(4) ALSO STOPSEQUIPOTENTIALLINES WITHIN ONEMESHUNIT
GRID-NOTFOR FOCUSELECTRODE
POT(5) = FOR A SHADOW
QUADAPERTURE
AQUAD=X.X
AQUAD=O.O
POT(6),POT(7) FOR QUADRUPOLE
POTENTIALS
IF AQUAD.GT. 0.0 FOR QUADRANT
SYMMETRY
PRELOAD
OTHERPOT( ) VALUESAS DESIRED
TABLEFOR VALUESOF MI;(USE MI = 0 FOR NO PLOTS)
CYCLETO BE PLOTTED INIT P FINAL ALL
FINAL ONLY
WITH EQUIPOTENTIALLINES
2
3
I
5
SEPARATEEQUIPOTENTIALPLOT 4
6
NO EQUIPOTENTIALPLOTS
7
8
9
&END
***SPECTRALRADIUS AND CONVERGENCE
OF POISSON'SEQUATION***
THE EGN PROGRAM
USES A POISSONSOLVERTHAT INVERTSA
MATRIXFOR EACHSUCCESSIVECOLUMN
OF THE POTENTIALARRAY.
ALTERNATECOLUMNS
ARE SOLVEDAS A SET OF SIMULTANEOUS
EQUATIONS,ASSUMINGTHAT POTENTIALVALUESFOR POINTS IN
ADJACENTCOLUMNS
ARE CORRECT. THIS ASSUMPTION
REQUIRES
A RELAXATIONFACTOR,HERECALLEDTHE SPECTRALRADIUS,
WHICHCAN BE CALCULATED
TO FIND AN OPTIMUMVALUEFOR ANY
GIVEN GEOMETRY,
BUT WHICHHAS FOR MANYYEARSBEEN SET TO
THE VALUEXR=O.995, WHICHREPRESENTS
A REASONABLE
VALUE
FOR LARGEPROBLEMS. SINCE XR MUSTBE LESS THAN 1.0, THIS
VALUEAPPROACHES
THE MAXIMUM,AND FOR SOMEPROBLEMS
IT
IS LARGERTHAN THE OPTIMUM. FOR THE PC VERSIONOF EGUN
THE SPECTRALRADIUS HAS BEEN MADEAN INPUT VARIABLE, BUT
USERSSHOULDTREATIT WITH CARE. FOR THE TEST PROBLEM,
GIVEN ABOVE, THE BEST CONVERGENCE
WASFOUNDFOR XR=0.960,
BUT FOR OTHERMODESTSIZED PROBLEMS,TOOSMALLA VALUE
OF XR CAUSESTHE SOLUTIONTO DIVERGEAFTERREACHING
A MINIMUMVALUE.
EACH ITERATION OF POISSON'SEQUATIONRECALCULATES
EVERY
OF 3
POINT ONCE. EACHCALL TO POISSN MAKESA MINUMUM
ITERATIONSAND A MAXIMUMOF 25. THESEARE INTERNAL
CONSTANTS
THAT CAN BE CHANGED. THE MAXIMUMWAS50 FOR
THE LARGEMACHINECODE. FOR EGN87C, THE DEFAULTIS TWO
-llO-
MAGNETICFIELD METHODS
I) INPUT2 . . . POLYNOMIALSEGMENTS. . . MAGSEG=NIN &INPUT1
2) INPUT3 . . . AXIAL FIELD
. . . MAGSEG=-IIN &INPUT1
3) INPUTA . . . VECTORPOTENTIALARRAY... INTPA=.TRUE. IN &INPUT1
4) INPUT5 . . . COIL DATA...FINDS AXIAL FIELDS
5) INPUT5 . . . COIL DATA...ELLIPTIC INTEGRALS
USE (I) OR (2) FOR RECTANGULAR
SYMMETRY
____------_______-_--~~~~~~~~~~~---------~~~~~~~~~~~~--------MAGNETICFIELD DATA (READ IN MAGSEGSEGMENTS)IN NAMELISTFORMAT
THIS APPROACH
IS VIRTUALLY IMPOSSIBLETO USE IN A PHYSICALLY
REALISTIC WAYAND IS NOT RECOMMENDED
EXCEPTFOR SIMPLE
CASESSUCHAS UNIFORMFIELDS.
&INPUT2 ( FOR EACH SEGMENT)
USE &END AFTER EACH SEGMENT
USE NAMELISTFORMATFOR THREEINTEGERS, AND AN ARRAYBC
OF SEVENCOEFFICIENTSOF VALUE BZ, Bl, B2, . . . . B6
B =BZ+Bl*DZ+B2*DZ**2+...+B6**6 WHEREDZ=Z-Z3
Z TAKES THE VALUES 'Zl' TO '22' WITH ORIGIN AT '23'
FOR SIXTH ORDEREXPANSION,FIELD MUSTSTART 6 UNITS BEHIND
CATHODE,OR STARTINGPOINT, AND GO SIX UNITS PAST ZLIM.
INPUT FOR IDEAL COILS IS IN &INPUT5 SECTIONBELOW.
****
RECTANGULAR
COORDINATE
MAGNETICFIELDS ****
IN RECTANGULAR
COORDINATES
MAGNETICFIELD IS IN THE
TRANSVERSE
(PHI) DIRECTIONUNLESSMAGORD
< 0. (SEE MAGORD,BELOW)
IF MAGNETICFIELD IS IN THE PHI DIRECTION,
THEREIS NO TERMFOR SELF MAGFIELD, EVEN IF INPUT FIELD IS ZERO.
WITHOUTINPUT FIELD SELF-FIELD IS IN PHI DIRECTION. SELF-FIELD IS
CALCULATED
FROMCURRENTIN RAYS BETWEENZ-AXIS AND KTH RAY
THIS IS THE SAMEIN CYLINDRICALCOORD.
INCLUDINGHALF OF IO(K).
IF MAGORD=-IOR -2, RECTANGULAR
COORDINATE
MAGNETICFIELD IS IN
THE RADIAL (VERTICAL) DIRECTION.
IF MAGORDC-2,EG. MAGORD=-4,FIELD IS IN THE AXIAL (Z) DIRECTION
&INPUT3
POINT BY POINT INPUT OF MAGNETICFIELDS:
IF MAGSEG< 0, E.G., MAGSEG=-1,THENUSE &INPUT3 TO READARRAY
BZA=(FIELD ON THE AXIS STARTINGAT Z=-6 TO Z=ZLIM+G)
(USUALLYBZA IS THE OUTPUTOF A SEPARATECOMPUTER
CODETHAT
THE USER SUPPLIES)
&END
-lll-
.-
______________--____--------------------------------------------
&INPUTA
BOUNDARY
INPUT
~~~~~~~----~~__--------~~~~~--------~~~~~-------~-~~~~~-~--------~
BOUNDARY
INPUT (3 INTEGERS,2 FLOATINGPOINT NUMBERS)
POT. NO., R, Z, DELTA R, DELTA Z
FORMATIS FREE FIELD IN C, AND 315, 5X, 2F10.5 IN FORTRAN
TO TERMINATEINPUT, USE POT. NO. >POTN, E.G. 200.
IF 999 IS USED, SPECIAL BOUNDARIES
WILL BE READ, SEE BELOW.
--------~~__--------~~~~------~~~~~~~~~----~~~~~~~~~~~~~~~~
-------
STARTINGCONDITIONS,DEFAULTSETTINGSAND DEFINITIONS
------~~~~~_-------~~~~~~~-------~-~~~~~~~~~--------~~~~~~~~~~~~~~
&INPUT5 (INSERT HERE)
&END (INSERT AFTERSTARTINSTRUCTIONS)
INSTRUCTION
DRFAULT,MAX COMMENT
UNIVERSALPARAMETERS
AXIAL-CURRENT/(2PI)
AMPAX=O
AMPAX= x.xX
USE AMPAXTO PUT ADDITIONALCURRENTIN A CENTERCONDUCTOR.
AMPAXONLYAFFECTSSELF-MAGNETIC
FIELDS IN SUBROUTINE
TRAJCT.
USE IN CYLIND COORD.OR IN RECTANGULAR
COORD.W/O THE (2 PI).
ZEROUSES LAPLACE/%
PERVO'HOLDS' FOR HOLD
ITERATIONS
INITIAL ENERGYAT CATHODEIN EV
PE=O.I
PE = X.X
MULTIPLIES ERRORTEST
ERROR= 1.0
ERROR= X.X
METERS/ MESHUNIT
UNIT = 0.001
UNIT = x.xXx
INCHES/MESHUNIT
(SEE UNIT)
UNITIN = x.xXx
LSTRH-0 IF >I, PRINTS SPACECHARGEMAP
LSTRH=X
MAXRAY=27,101 MAXIMUMNUMBEROF RAYS
MAXRAY =X.X
IF MAXRAYIS NEGATIVE, THE NUMBEROF RAYS=ABS(MAXRAY)
MESHUNITS / STEP
STEP = 0.8
STEP = 0.xX
NUMBEROF ITERATIONS
NS = 7
NS = X
ESTIMATEDSPACECHARGE
SPC = 0.5
SPC = o.XX
SPC SIMULATESPARAXIALAPPROXIMATION
ON FIRST CYCLE.
SPC IS THE FRACTIONOF THE RADIAL FORCEUSED.
SPC=I.O FOR FULL EFFECT, SPC=OFOR NO EFFECT
AZIMUTHALLIMIT
PHILIM=O.O
PHILIM=X.X
PHILIM .NE. 0 ENDSTRAJECTORY
AT PHI .GT. PHILIM
SAVE-1 SAVESBOUNDARIES,
SAVE-O
SAVE = I
TO USE SAVE=I, OMIT BOUNDARY
CARDSFROMNEXTPROBLEM.
SAVE=2USESFINAL DATA
SAVE-O
SAVE=2
FROMPREVIOUSRUN TO STARTTHIS RUN.
PERVO= X.XX
HOLD= X
PERVO= 0
HOLD= I
-112-
USE ONLYWHENSTART='CARDS'.
SAVE=3 COMBINESSAVE-I AND SAVE=2
SAVE=3
SAVE=0
MASS= x.x
MASS= 0 (FOR ELECTRONS)
MASS> 0 FOR IONS
SEE NEWFEATUREFOR MULTIPLE SPECIESWITH DIFFERENTMASSES
IN CARDSTART SECTION.
.
IF INDIVIDUAL MASSESARE SPECIFIED, DO NOT SET MASSPARAMETER
HERE
USE THIS ONE FOR SINGLE SPECIES RUNSOR CHILD'S LAW STARTS
MASSIS THE MASSTO CHARGERATIO, 1.0 FOR PROTONS
USE MASS<0FOR RAYS WITHOUTINERTIA, LIKE THEY ARE IN MOLASSES
CAN BE USEDFOR MAGNETICFLUX LINES OR ELECTRICFIELD LINES.
AV = X
SPACECHARGEAVERAGED
LAST AV ITERATION
AVR = X.X
WEIGHTOF SPACECHARGE
AVR = 1.0
IN PRECEDINGPROGRAM
CYCLEFOR AV.
BEND = X.X
BEND-O.0 MAGNETICBENDINGFIELD
IN GAUSSIN THE DIRECTIONNORMALTO THE R-Z PLANE
FOR AXIALLY SYMMETRICPROBLEMS. FIELD MUSTBE
UNIFORM. THE EFFECTSOF SELF-MAGNETICFIELD ARE LOST
AND SPACECHARGEIS STILL AXIALLY SYMMETRICSO THAT
IF BEAM IS DEFLECTED,CHARGEDISTRIBUTION IS PROBABLY
INCORRECT.AN AXIAL FIELD MUSTBE INCLUDEDIN THE
INPUT, EVEN IF IT IS ZERO , E.G., BC=O IN INPUTP.
MAGMLT=X.X
MAGMLT=I.O
MULTIPLIES BZA ARRAY
MPLT=X
MACFIELD PLOT, SEE PLOT CONTROL
MPLT-I
AV = 0
IPBP=KI,KZ,...KG
IPBP()=O
up TO SIX RAY NUMBERS
FOR POINT
BY-POINT PRINTOUT:K,RHO,ZETA,RDOT,ZDOT,TDOT,PHI,BR,BZ,STEP,BPHI
ZEND=X.X
ZEND-1000.0 EXACTEND OF TRAJECTORY
CAUTION: IF ZEND IS NOT THE RIGHT-HANDBOUNDARY,THE SPACE
CHARGEDISTRIBUTION MAY BE INCORRECT.
VION=X.X
VION=-IE8
LOWESTPOTENTIALPERMITTED
USE VION TO SIMULATESPACECHARGENEUTRALIZATION
ZDOTEQ=O.I-1.0
ZDOTEQ-1.0
LEVEL TO ENTEREBQ MODE
EBQ MODE: A NEWEGN FEATURE, ALLOWSPROGRAM
TO OPERATEIN THE MODE
IN WHICH SELF MAGNETICFIELD IS ACCOUNTED
FOR BY REDUCINGTHE SPACE
CHARGEBY A FACTOR(I-ZDOT*ZDOT), WHEREZDOT IS VZ/C. THE CHOICEOF
THE NAMEEBQ MODECOMESFROMTHE PROGRAM
EBQ WRITTENBY ART PAUL OF
LLNL, FOR RELATIVISTIC ELECTRONBEAMS. usERs OF EGN (THIS PROGRAM)
WHOHAVE FOUNDINSTABILITIES WITH LONG, THIN, SEMI-RELATIVISTIC
BEAMSSHOULDFIND SETTING ZDOTEQAT A VELOCITY LEVEL BELOWTHAT OF
THEIR BEAM, SHOULDGIVE IMPROVEDRESULTS. SOMEEXPLANATIONOF WHY
THIS FEATUREIS SO SPECIAL, AND WHATTOOKSO LONG, MAY BE USEFUL.
THE PRIMARYPURPOSEOF THIS PROGRAM
IS GUNDESIGN, MEANINGFINDING
THE SPACECHARGELIMITED CURRENTAND OPTICS FROMA GUN. ANY CHANGE
OF SPACECHARGEFORCESMUSTPRESERVETHAT PURPOSE. THE EBQ MODE
TEST IS MADEON EVERYTIME STEP OF EVERYPARTICLE, CHECKINGTHAT THE
VELOCITY (Z-COMPONENT)
DOESNOT EXCEEDTHE LEVEL ZDOTEQ. IF IT DOES,
THEN FOR THAT TRAJECTORY,IN ONLY THAT PART WHEREZDOT .GT. ZDOTEQ,
THE SELF MAGNETICFIELD IS SET TO ZEROAND THE SPACECHARGEDEPOSITED
IS REDUCED. THIS SHOULDWORKFINE FOR THIN BEAMSIN A DRIFT TUBE,
AND IS ALSO SUPPOSED
TO WORKFOR A GUN IF ZDOTEQIS CAREFULLYUSED.
THE IDEA IS To SET ZDOTEQTO A VELOCITYAPPROPRIATETO THE DRIFT
TUBE WHERETHF,LONGITUDINALSPACECHARGEFORCEBECOMESNEGLIGIBLE
-113-
MPLT=X
MPLT=I
IF =I,
11=O,
11'2,
II =3,
START GENERAL
----------~~~~~~~------------~~~~~~~~~~----------~-~-----~--~~--~~
START= 'GENERAL'
START= 'GENERAL' GENERALCATHODE
RC = X.XX
RC = 0.0 LOWEREND OF STARTINGSURFACE
zc = x.xX
zc = 2+CATHODEZ CATHODEZIS Z VALUE OF
BOUNDARY
FROMFIRST DATA CARD.
CL = x.xX
CL = RLIM
MAXIMUMLENGTHOF STARTING
SURFACE
DENS = xX.x
DENS= 100.0
MAXIMUMEMISSION (A/CM**2)
BETA2 = 1.0
BETA2= 0.0
IF > 0.0 USES LANGMUIRBLODGETTFORMALISM
--RAD = X.X
USE RAD FOR WIRE RADIUS IN
RECTANGULAR
COORDINATES,
BETA2 > 0.0
STARTINGSURFACEITERATION
SURFAC = X
SURFAC -1
_____-------~-~~~~~~~------~~~~~~~~~~~~~~
USE POT(5) FOR NON-EMITTINGSURFACE,E.G.
HOLLOWCATHODEOR SHADOW
GRID. DO NOT USE
POT(3) OR POT(5) FOR FOCUSELECTRODE. . .
USE POT(4) TO STOPELECTRONS
ON IMPACT.
________________-___---------------------------------------------START GENCARD
__________----------~~~~~~~~~~
___________-------_-------~-~~~~~~~~
START= 'GENERAL' GENERALWITH CARDSTART
START = 'GENCARD'
HAVE up TO MAXRAYCARDSWHICHSPECIFY:
I) RAY NO.
2) MASS, 0.0 FOR ELECTRONS
3) INITIAL RADIUS R
4) INITIAL AXIAL VALUE Z
5) DISTANCEFROMCATHODEDX (CATHODEMUSTBE POT(~)).
6) EFFECTIVE SPACINGBETWEENRAYS DR.
7) PARAMETER
WHICHMODIFIES CHILD LANGMUIREQUATION,ALPH2.
NORMALDX IS 1.0 TO 2.0 MESHUNITS.
NORMALDR IS 1.0 BUT MAY BE VARIED ALONGTHE SURFACE.
NORMALALPHZ IS 1.0 FOR A PLAIN DIODE.
FOR CYLINDRICALCOORDINATES:
ALPHZ=(ALPHA*(RADIUSOF CURVATURE)/(STARTING
STEP))**2
-115-
FOR RECTANGULAR
COORDINATES:
ALPH2=(BETA**2)*(RADIUS OF CURVATURE)/(STARTING
STEP)
WHEREALPHA AND BETA ARE AS DEFINED IN THE LITERATURE,E.G.,
SPANGENBERG
FOR BETA AND BREWERIN SEPTIER, VOL II, FOR ALPHA
FORMATIS FREE FIELD; RAY NO.,MASS,R,Z,DX,DR,ALPH2
____-------~-~~~~------------~~~~~-~-------~~~~~~~~~~~~~~~~~~~~~~~
_ START SPHERE
..
_______________--_______________________-------------------------START = 'SPHERE'
START= *GENERAL' SPHERICALCATHODE
RAD = x.xX
RAD = 2*ZLIM
SPHERICALRADIUS
RMAX= X.XX
RMAX= RLIM
CATHODERADIUS
ORAD= X.xX
ORAD= CATHODEZCENTEROF CATHODE
ST = X.XX
ST = 2.0
STARTINGSTEP
--------------------------------~~~~~~~~'SPHERE' ALSO WORKSFOR CYLINDRICALCATHODEIN RECTANGULAR
COORDINATES
______---------~~___------------~~~~~~----------~~~~~~~~~~~~~~~~~~
START CARDS
______________---___---------------------------------------------START = 'CARDS'
START= 'GENERAL' CARDSTARTING
zo = x.xX
zo = 0.0
OLD ORIGIN IN NEWFRAME
SKAL = x.xX
SKAL = 1.0
OLD MESH/NEWMESH
HAVE UP TO MAXRAYDATA CARDS(I INTEGER, 8 FLOATINGPOINT)
RAY, MASS, R, Z. ENERGY(EV), ANGLE(RADIANS),CURRENT(MICROAMPERES
IN ONE RADIAN SEGMENT),TRANSVERSE
ANGLE. TRANSVERSE
POSITION(PH1)
FREE FIELD FORMATIN C REQUIRESNINE (9) ENTRIES PER TRAJECTORY.
STOP READINGWITH RAY NO. GREATERTHAN MAXRAY.
INITIAL TRANSVERSE
VELOCITY HAS THE SIGN OF THE TRANSVERSE
ANGLE
**
**
**
**
*'
2) TO SIMULATECYLINDRICALBEAMSPACECHARGEIN RECTANGULAR
COORDINATES
MAKECURRENTPER MESHUNIT, I' = I/(PI*R)
INSTEAD
OF I' = 2*I/(PI*R)
WHICHWOULDHAVE THE SAMECURRENTDENSITY.
IN OTHERWORDS,MAKEI'(K) = I(K) / (2*R(K)) INSTEAD OF I(K)/
R(K). NOTETHAT THIS REQUIRESTWICE AS MANYRAYS AS FOR
CYLINDRICALBEAMWITH SYMMETRY.BEAMEDGECARDS(RAY NO. < 0)
ALSO APPLY TO OFF-AXIS PENCIL IN CYLINDRICALCOORDINATES.(R-Z AND PHI CROSSOVERS)
B) IF IRAT=
I) R-Z: MAKERAY NUMBERS
NEGATIVEFOR SEQUENTIALRAYS FOR
WHICHFINAL CROSSOVER
SHOULDBE DETECTED.CROSSINGSWILL BE
LISTED AND PLOTTED. NEGATIVERAY NUMBERS
SHOULDBE IN PAIRS.
TO FIND CROSSOVERS
WITH Z AXIS, RUN A RAY WITH R=O,ALPHA=O
PRECEDINGTHE RAY TO TEST AXIS CROSSING.
2) PHI: LEAVE RAY NUMBERS
POSITIVE FOR TRANSVERSE
RAYS TO
DETECTLAST CROSSINGOF PHI=PI*INTEGER.
IF SAVE=2, RUN STARTSWITH FINAL RAY DATA FROMPREVIOUSRUN.
DO NOT PUT SAVE=2 ON THE FIRST RUN OF A SET.
--------------~~~~~~~~~~~~~~~~~~~--------~~~~~~~~~~~~~~~~~~~~~~~~~
THERMALEFFECTS
-----------------------------------------------------------------SUBROUTINETHERMIS CALLEDIF THE PARAMETER
TC>O.
TC=XXXX
.X
TC=O
KELVIN TEMP. OF CATHODE
THREEMODELSARE INCLUDEDIN THIS VERSION
TWORAY SPLIT, RANDOMIZED
KRAY=2
KRAY=I
KRAY=3
THREERAY SPLIT
KRAY=l
FIVE RAY SPLIT
KRAY=S
KRAY=l
TWORAY SPLIT DIVIDES CURRENTS
EQUALLYINTO 2 RAYS WITH EQUAL
ANGULARDEVIATIONSFROMTHE INITIAL DIRECTION. THE AMOUNTOF THE
DEVIATION FOLLOWSA RANDOMIZED
DISTRIBUTION BASEDON A ONEDIMENSIONALRMSDISTRIBUTION.
THREERAY SPLIT PUTS CURRENTSIN 1-2-I RATIO WITH 2 PARTS IN
UNDEFLECTED
RAY AND I PART EACH IN RAYS WITH V(PERP)=SQRT(PKT/M)
IN R-Z PLANE, UP AND DOWNRELATIVE TO UNDEFLECTED
RAY.
FIVE RAY SPLIT PUTS CURRENTSIN 1-5-8-5-1 RATIO WITH
V(PERP)=2*SQRT(2KT/M)FOR 1 PART RAYS AND V(PERP)=l*SQRT(2KT/M)
FOR 5 PART RAYS. NO DEVIATION FOR CENTER8-PART RAY.
THERMCAN BE CALLEDFOR START='SPHERE', 'GENERAL', 'CARDS',
OR 'GENCARD'. IT CANNOTBE USEDFOR START='CARDS'WITH SAVE=2.
START LAPLACE
NO RAY TRACING
START= 'GENERAL'
START = 'LAPLACE'
NUMBEROF LAPLACECYCLES
NS = 7
NS = X
LAPRH=O USE LAPRH=I TO STARTREADING
LAPRH=I
DATA CARDSWITH (R,Z, SPACECHARGE)FOR NON-ZEROPOINTS.
END CARDINPUT WITH ANY SINGLE NUMBER.
FREE FIELD FORMAT.
FOR A BEAMGOINGNORMALTO THE R-Z PLANE, SPACECHARGEIS
RO(R,Z)=-120*PI*I/AREA(MU**2)*BETA....IN
RECTANGULAR
COORD.
WHEREAREA(SQ. MESHUNITS) FOR A UNIFORMBEAMOF CURRENTI(A).
*****LAPRH IS A NEWINPUT FEATURE*****
PRINTED OUTPUTINCLUDESA TABLE OF SURFACECHARGEFOR EACH
SURFACE# (POT #). TO FIND CAPACITANCE,DIVIDE BY VOLTAGE.
-117-
________________-----------------------------------------
--------
SPECIALBOUNDARY
POINTS (INCLUDINGGENERALNEUMANN
BOUNDARIES)
---------~~~~~~~-------------~-~~~~~~------------------~~~~~~-~~~
USE 999 IN COLS. 3-5 TO END BOUNDARY
INPUT. BOUNDARY
MUSTINCLUDEALL POINTS TO BE USEDAND ALL POT NUMBERS.THEN
INCLUDEANY NUMBER
OF CARDS'WITHR,Z AND FOURDIFFERENCE
NUMBERS
FOR LEFT, RIGHT, up, AND DOWN,SEQUENTIALLY. - NUMBERS
SHOULDADD TO 4*R OR 4 IF RECTANGULAR
COORDINATES.
END WITH R>RLIM.
________________---------------------------------------------FOR GENERALNEUMANN,SEE APPENDIXII OF USER'S GUIDE
TERMSARE 4*(TAN A)/(l+ TAN A) AND 4/(1 + TAN A) WHERETAN A <l
------------~-~~~___~------------~~~~~~~~~~~~~~--~---------------HORIZONTAL
DIELECTRICBOUNDARY
LEFT=RIGHT=(EI*(R-.5)+E2*(R+.5))/2
UP = E2*(R+.5)
DOWN= El*(R-.5)
WHEREEl OR E2 = 1.0 FOR VACUUM
AND E2 IS UPPER'MATERIAL'.
__---------_______---~~~~~~~~~~~~~~~-------~~~~~~~~~~~~~~~~-~--VERTICALDIELECTRICBOUNDARY
RIGHT = E2*R
LEFT = EI*R
DOWN= (El+E2)*(R-.5)/2
UP= (El+E2)*(R+.5)/2
WHEREE2 IS RIGHT HAND 'MATERIAL'.
---------~~~~~~~~~~~~~~~~~~~~~~~~-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SUMMARY
OF FILE I FORMATFOR PLOT DATA OUTPUT
________________-------------------------------------------------WRPLOT(I,L,A,B,C,D,(X(J),J=I,L),(Y(J),J=l,L)
WHERE:
I=0 THROUGH
9
FOR 1=0,7,8 PLOT A LINE
L=NUMBER
OF DATAPOINTS TO BE PLOTTED
X. Y ARE ARRAYSOF LENGTH>= L, WITH X,Y DATA
-FORI=l, PLOT X AXIS, FOR 1=2, PLOT Y AXIS
L-NUMBEROF COMPUTER
WORDSIN TITLE
FOR IBM/360 L=(N+3)/4 IF N-NUMBER
OF CHARS
A=scALE (DATA UNITS/INCH)
B-AXIS LENGTH(INCHES)
c=x cooRD OF Y AXIS, OR Y COORDOF x (OTHERCOORDIS 0.)
D-DATAVALUETO APPEARON LOWEREND OF AXIS
FOR 133, END OF PICTURE, GET A CLEANAREAON PAPER, ETC.
A,B,C,D,X,Y=O.O
L=l;
FOR 1=4, CLOSEPLOT, THIS IS THE LAST RECORD
OF THE FILE
L=l;
A,B,C,D,X,Y=O.
FOR 1=5, PLOT POINTS (OR X'S, OR SOMESYMBOL)
SAMEAS FOR I=O (LINES)
L,A,B,C,D,X,Y
FOR I-6, SET SCALEFACTOR
A=X AXIS LENGTH
B-Y AXIS LENGTH
c=sx (FROM&INPUTSOR ~INPUT~)
,,
w
D=SY
w
PLOT AREAMUSTBE AT LEAST -0.5<X<A+0.5 -O.S<Y<B+O.S
C AND D CAN BE USEDIF NEEDED.
THE TITLE ON THE AXIS SHOULDBE UNDERTHE X AXIS,
AND TO THE LEFT OF THE Y AXIS (THE PROGRAM
CAN PLOT
MORETHANONEY AXIS ON A PLOT, SO BE CAREFUL.)
I LESS THAN0, OR GREATER
THAN8 SHOULDN'THAPPEN,BUT CHECKIT.
-118-
MAX
-119-
APPENDIX
BOUNDARY
In the following
IV
A metal boundary
EXAMPLES
._
that can
data set.
assumed to be 0.6 mesh units (mu) above the point, would have a boundary
data line
as shown:
The applicable
rule is that
at R=3,
Z=2
the boundary,
DELTAR=0.6
or DELTAZ.
120
point.
to
The distance
When this
Metal
A metal boundary
POT
DELTAR
2.0
1, n if at potential
Boundary
DELTAZ
-0.4
Inside Corner
POT
DELTAR
0.6
I
DELTAZ
-0.4
1, if at potential
#3, and if the line is assumed to be 0.4 mu left of the point and 0.6 mu above the point,
it would have a boundary
121
--
A point
of Neumann
boundary,
numbered
boundary,
If a metal boundary
marked
for a horizontal
boundary
Neumann
is a vertical
made
better.
intersects
1, if at potential
as the point
#l,
122
Metal with
POT
1
The point
defined as DELTAR=0.3
and DELTAZ=-0.1,
with
Two Intercepts
DELTAR
-0.1
0.3
and if POT=l,
DELTAZ
segment,
there would
here
be a data
line as shown.
Double Neumann
POT
Corner
DELTAR
0.0
DELTAZ
0.0
.-
If two Neumann
boundaries
intersect
as at the point
123
6, it would
have a boundary
Outside Corner
2
POT
DELTAR
-0.4
2.0
2.0
0.3
The outside corner in the figure above requires the two boundary
to be defined.
intercept
is potential
0 is not a boundary
points at 1 and 2
point...the
DELTAZ
boundary
does not
as
shown.
POT
DELTAZ
2.0
0.4
2.0
0.4
2.0
-0.6
2.0
-0.6
124
2.0
0.99
2.0
0.99
13
0.5
2.0
2.0
-0.99
2.0
-0.99
DELTAR
a mesh line, then the points under the foil are no longer boundary
bottom
The DELTAZ
at R=1.5,
DELTAZ
points.
on
If now the
of
DELTAR
DELTAZ
2.0
0.95
-0.95
2.0
2.0
-0.95
0.95
2.0
- /
An individual
125
the letter
G,
DELTAR
DELTAZ
2.0
0.4
2.0
-0.4
A grid wire can lie on a mesh line, instead of on a mesh node as in the preceding illustration.
advantage or disadvantage
to either configuration.
DELTAR
DELTAZ
is needed.
126
Either
or more
Imaginary
or virtual
boundary
Imaginary
Boundary
Points
POT
DELTAR
DELTAZ
2.0
2.0
2.0
2.0
2.0
2.0
other path by one mesh step at a time, as shown in the table. They are defined by having
DELTAR=DELTAZ=2.0,
difference
point.
equations,
and can have any value for POT. From the standpoint
virtual
boundary
points
are indistinguishable
of the
They may be used to step along to a grid wire or other separated element.
If the virtual
a dielectric,
boundary
coefficient
RIGHT
11.75
11.75
21.0
2.5
11.75
11.75
21.0
2.5
11.75
11.75
21.0
2.5
LEFT
UP
DOWN
Special Boundary
The coefficients
127
of E2=6.0.
shown correspond
to R=3 and
45 Neumann
I- ~~~~
A Neumann
boundary
and DELTAZ=O.O.
next example,
lines, boundary
Boundary
POT
DELTAR
0.0
0.0
0.0
0.0
0.0
0.0
DELTAZ
Boundary,
boundaries
as in the
boundary.
After
a Neumann
coefficients
boundary
LEFT
input.
5.856
0.0
0.0
10.144
4.391
0.0
0.0
7.609
2.928
0.0
0.0
5.072
the difference
DOWN
UP
RIGHT
and 4 R M/(l+M),
is at 30 to the horizontal.
128
for
where M=(Itan
a(/.
Parallel
POT
are Neumann
0.0
-0.99
2.0
-0.99
0.0
-0.99
0.0
2.0
0.0
0.99
2.0
0.99
0.0
0.99
0.0
2.0
0.0
2.0
DELTAR
Input
infinite
DELTAZ
plates at POT=1
Since the plates are at Z=O and 5, these surfaces are behind
surface at R=5
Plate Boundary
routines
values pointing
boundaries.
The skipped
to be invoked.
Similarly
points
the
129
to be used.
example,
marked
3 and
a skipped