Anda di halaman 1dari 34

FIR Center Report

FIR FU-99
January 2010




PHYSICAL MODELS AND COMPUTER
CODES OF THE GYRSIM (GYRotron
SIMulation) SOFTWARE PACKAGE


S. Sabchevski, T. Idehara, T. Saito,
I. Ogawa, S. Mitsudo, Y. Tatematsu,









Research Center for Development of
Far-Infrared Region
University of Fukui

Bunkyo 3-9-1, Fukui 910-8507, Japan

Tel 81 776 27 8657
Fax 81 776 27 8770
PHYSICAL MODELS AND COMPUTER

CODES OF THE GYRSIM (GYRotron SIMulation)

SOFTWARE PACKAGE


S. Sabchevski
1,2
, T. Idehara
1
, T. Saito
1
,
I. Ogawa
1
, S. Mitsudo
1
, Y. Tatematsu
1
,

1
Research Center for Development of Far Infrared Region
University of Fukui, 3-9-1 Bunkyo, 910-8507 Fukui, Japan

2
Institute of Electronics of the Bulgarian Academy of Sciences,
1784 Sofia, Bulgaria

Abstract

In this FIR FU Center Report we present the current status and the capabilities of the
GYRSIM software package (which stands for GYRotron SIMulation), that has been
developed here and is used by the researchers of Center for analysis, optimization and
computer aided design (CAD) of powerful, high-frequency gyrotrons through numerical
experiments. We depict briefly the physical models implemented in the codes and give
some working notes that are intended to facilitate the researchers in finding the necessary
information (references, test examples, prerequisites) about the main characteristics of the
available software tools for modeling and simulation of gyrotrons. Therefore the Report
is intended to be both an inventory of the available software tools and a guide for finding
more detailed information about the models and the computer codes.

Key words: GYRSIM package, physical models, modeling and simulation of gyrotrons,
computer aided design (CAD)










Physical Models and Computer Codes of the GYRSIM
(GYRotron SIMulation) Software Package


S. Sabchevski, T. Idehara
1
, T. Saito
1
,
I. Ogawa
1
, S. Mitsudo
1
, Y. Tatematsu
1
,


1. Introduction

In order to assist both the computer aided design (CAD) and the study of powerful
high-frequency gyrortons that are being developed in the Research Center for
Development of Far-Infrared Region (FIR FU Research Center) at the University of
Fukui a number of physical models were formulated and implemented in computer codes
during the recent years. These simulation tools were used successfully for analysis,
optimization and CAD of two series of devices, namely Gyrotron FU Series and Gyrotron
FU CW Series as well as for education of our students. Their computational modules are
under a continuous adaptation to the changing computational infrastructure (operating
systems, computing platforms, numerical libraries) and are undergoing numerous
modifications aiming better performance (increased execution speed, debugging, more
convenient structure of the input/output data etc.) as well as inclusion of new physical
models. A work on the development of novel computer codes and on the integration of
numerous already available stand alone programs, numerical libraries and subroutines in
a problem oriented software package is in progress now. We call this union of tools for
numerical simulation of gyrotrons GYRSIM package (which stands for GYRotron
SIMulation).
Recently, on a Seminar of the Research Center the current status of the software
package has been reviewed and discussed together with some directions for its further
development. It has been suggested to prepare a short description and inventory of the
available tools in order to facilitate their use. This motivated us to write the current short
report with a hope that it will be helpful and could be the first step toward the preparation
of a more complete documentation (user guide, reference guide and so on).
The report is organized as follows. In Sect. 2 we present the physical models and the
program implementation of a sub-package used for simulation of the beam formation in
the magnetron injection gun (MIG) and in the entire electron-optical system (EOS) of the
gyrotron tube. This material is focused mainly on the most important component of the
package, namely the GUN-MIG/CUSP suite of codes. In the Sect. 3 we give similar
information about the computer codes used for analysis and design of the resonant
structure (resonant cavity) of the gyrotron. In Sect. 4 we mention briefly some additional
software package used in the course of CAD of gyrotrons. Some conclusions and outlook
are presented in Sect. 5. A collection of illustrative examples that elucidates both the
input and the output of the codes is presented in several appendices.
The flowchart of the process of CAD is shown in Fig. 1. Usually it begins with a
specification of the desired parameters (notably the output frequency and the output
power, tunability range etc.). During this stage some set of specific requirements (for
example pulse length or CW mode of operation, stability of the output parameters,
coupling of the radiation to the output window and the transmission line, constrains to the
weight and linear dimensions, as well as constrains imposed by the available power
supplies and so on) has to be formulated as well. Very often some previously developed
tube is being selected as a prototype and initially its parameters are scaled using well
known physical relations (and usually approximate ones, e.g. based on the adiabatic
theory). This being done, the CAD starts with the so called conceptual design. During
this step one usually selects the types of the components (for example diode or triode
magnetron injection gun, conventional or coaxial resonant cavity, demountable or sealed-
off tube, radial or axial coupling of the radiation and so on).

CAD OF
THE
EOS
TARGET
PARAMETERS
CAD OF
THE
CAVITY
CONCEPTUAL
DESIGN
EXPERIMENT
CHANGE
EOS AND /
OR CAVITY
CAD OF EOS
AND/OR
CAVITY
DESIGN
OTHER
COMPONENTS
MECHANICAL DESIGN
Meet
target?
YES
NO
FABRICATION
INITIAL DESIGN
OPTIMIZED DESIGN



Fig. 1 Flow chart of the computer aided design (CAD) of a gyrotron

The conceptual design is followed by a CAD of the cavity resonator performing a
series of numerical experiments using a set of physical models and computer codes. We
describe them briefly in Sect. 3. It is clear that each cavity design is performed assuming
some parameters of the electron beam. Therefore, the next step, namely the initial design
of the electron-optical system, is an iterative process during which the main goal is to
find a configuration (MIG, magnet, beam tunnel, collector etc.), which provides such
desired beam parameters or at least parameters close to them. Both the physical models
and the computer programs used for CAD of the EOS we present briefly in Sec. 2. The
initial design is then followed by another iterative process in which the configuration and
the parameters of both the cavity and the gun or only of one of these most essential
components are changed until a satisfactory solution is obtained. Thus the optimized
design is the one which satisfied the target parameters. Based on it, a design of the
remaining components (e.g. the output window, quasi optical system) is carried out. The
final stage of the CAD is the mechanical design of the tube. It includes also a selection of
appropriate materials and technologies for manufacturing of the device.

2. Computer codes for trajectory analysis (ray tracing) of magnetron injection
guns (MIG) and electron-optical systems (EOS) generating helical and axis-
encircling electron beams

2.1 General description of the GUN-MIG/CUSP software package

The beginning of the GYRSIM package can be traced back to the development of
its first component, namely the trajectory analysis (ray tracing) code GUN-MIG [A1,A2].
It is based on a self consistent physical model which takes into account the relativistic
and space-charge effects and is formulated in a six-dimensional phase space of three
cylindrical coordinates and their corresponding momenta (velocities) but the electrostatic
field is considered axially-symmetric, i.e. the potential distribution depends only on the
radial and the longitudinal (axial) coordinates but not on the azimuthal angle. Therefore,
the physical model implemented in this code could be classified as a two and a half
dimensional (2.5D) one. It consists of a system of equations that includes: (i) Poisson
equation for the electrostatic potential with Neumann type boundary condition along the
axis of the meridional cross-section of and Dirichlet boundary conditions along the rest of
the boundary contour; (ii) normalized relativistic equations of motion in the electrostatic
field and an ambient magnetic field; (iii) a set of equations describing the extraction of
the beam current from the emitter in different regimes (see below). The computational
modules (functions, subroutines, auxiliary programs) are written in Fortran 77. An
inventory of the main components of the software package is presented in Table 1.
The boundary value problem for the electrostatic potential (Poisson equation) is solved
on a sequence of grids with increasing finesse (gradually decreasing mesh step) by
means of an iterative procedure based on the finite difference method (FDM) with a
successive over-relaxation (SOR) and automatic selection of the an optimal relaxation
parameter. The electric field (gradient of the potential) is calculated using a Lagrange
interpolation on a sub-grid of 4x4 nodes. The convergence of the solution can be
increased additionally through a gradually increasing the temperature of the emitter
during the first several iterations. Their number is specified by the user in the input file.
The code uses a magnetic field profile which is specified by a polynomial
approximation or is read from an input file. It should be noted that the package GUN-
MIG/CUSP consists in fact of two modifications. The second one, namely GUN-CUSP
was developed to study and design MIG forming axis encircling electron beams for large
orbit gyrotrons (LOG). In such systems there is always present a magnetic field reversal
which, generally speaking, could be quite abrupt (like in a magnetic cusp). In order to
treat with an increased precision the approximation of the magnetic field higher
derivatives in the paraxial approximation must be used. For their calculation a high order
polynomial approximation is performed on the axial magnetic field distribution (obtained
experimentally or calculated by another code for example POISSON/ SUPERFISH,
FEMM or by our own program COILS) using the preprocessing program MAGFI (which
is also a part of the package).
The geometry of the simulated EOS is described by the boundary contour which
is defined as a sequence of points connected by simple elements such as straight lines and
arcs of circles. This information is read from an ASCII file which contains also the rest
of the parameters of the simulation which can be divided in two groups, namely physical
parameters (e.g. the accelerating voltage, temperature of the cathode, saturation current
density of the emitter and so on), and computational parameters that characterize the
simulation (for example the accuracy of the solution of the boundary value problem;
maximum number of iterations, the initial value of the relaxation parameter, the scope of
the and form of the printed output etc.). A typical file with input data is shown in the
Appendix 1. The user can simply modify the corresponding parameters and keys
according to her/his case using as a reference the comments that explain each variable. In
more details the physical nodel is depicted below.

Table 1
GUN-MIG/CUSP software package

Module/Code Functionality Implementation
GUN-MIG Main program Fortran 77
GUN-CUSP Main program Fortran 77
GUN-LIB Library of functions and
subroutines
Fortran 77
COILS Calculates the magnetic
field produced by a set of
coils
Fortran 77
MAGFI, SCALLING Preprocessing and
polynomial approximation
of the magnetic field
Fortran 77; requires the
package DPOLFT
GUN-VIEW
CUSP-VIEW
Post-processing programs
for visualization of the
results
Fortran 77; Lahey F77-
EM/32 graphic library or its
replacement, e.g. PGPLOT
EGUN A legacy code for reference
and benchmarking
Fortran 77 (various
modifications)


2.2 Main equations of the physical model implemented in the GUN-
MIG /CUSP package

As already mentioned, the physical model is formulated in a cylindrical
coordinate system ( R Z , , u ), where the electron trajectories can be found integrating the
relativistic equation of motion:

d mv
dt
e E v B
( )
( )




= + , (1)
Z k R j R i v
Z R

+ + = u
u
. (2)
Here m and e are the mass and charge of an electron,

E and

B are the electric and


magnetic fields. The velocity vector v

is represented by its components along the unit


vectors

i
R
,

j
u
and

k
Z
. In a component form (1) can be written as [1,2]

( )

(

)

/
R
m
f
e
c
R RE R E ZE R = + +

+
1
1
0
2 1 2
2
2
| u u
u R R Z
(3)

( )

(

)

/
u | u u
u
u u
= + +

1
1
2
0
2 1 2
2
m R
f
e
c
R RE R E ZE
R
R
R Z
, (4)

( )

(

)
/
Z
m
f
e
c
Z RE R E ZE = + +

1
1
0
2 1 2
2
| u
u Z R Z


, (5)
where
f eE e R B ZB
R R Z
= + (

) u
u
,
f eE e ZB RB
u u
= + (

)
R Z
,
f eE e RB R B
Z Z R
= + (

)
u
u
, and
| u
2 2 2 2 2
= + + [

(

)

] / R R Z c
.
The axial and the radial components of the electric field (
E
Z
z
=
co
c
,
E
R
R
=
co
c
,
0 =
u
E ) are calculated from the electrostatic potential distribution ) , ( Z R o , which obeys
the Poissons equation

1
2
2
0
R R
R
R Z
c
c
co
c
c o
c
p
c
|
\

|
.
|
+ =
, (6)
as well as the Dirichlet (
i
o o = on a segment
i
I of the boundary
i
I = I ) and Neumann
( 0 / = c c z o along Z at R=0) boundary conditions as mentioned above. Here p is the
space charge density and c
0
is the permittivity of vacuum. The electric field (

E ) in an
arbitrary point at the current particle position is calculated as a gradient of the
electrostatic potential on the computational grid using the following Lagrange
interpolation and 4x4 nodes sub-mesh [3]

o o ( , ) R Z a b
j
i
i
j ji
=
= =

1
4
1
4
,
E a
db
dR
R i
j
j i
ji
=
= =

1
4
1
4
o
,
E b
da
dZ
Z j
i
j i
ji
=
= =

1
4
1
4
o
. (7)
Here
a Z Z Z Z Z
i i k
k k i
k
k k i
( ) ( ) ( )
, ,
=


= =

= =
I I
1
4
1
1
4
,
b R R R R R
j j k
k k j
k
k k
( ) ( ) ( )
, ,
=


= =

= =
I I
1
4
1
1
4
(8)
The off-axis components of the magnetic field are computed from the following
paraxial expansions [4]
B R Z B
R d B
dZ
R d B
dZ
R d B
dZ
Z
( , ) = +
|
\

|
.
|
2 2
2
2 4
4
4 6
6
4 16 576
, (9)

|
|
.
|

\
|
+ =
5
5 4
3
3 2
192 8 2
) , (
dZ
B d R
dZ
B d R
dZ
B d R
Z R B
R
, (10)
where ) , 0 ( Z B B = is the axial magnetic field. In the current version of the code the self-
magnetic field of the beam current is neglected.
The space-charge distribution is computed using a combination of the particle-in-
cell method (PICM) with the area-weighted algorithm (AWA) for allocation of the
charges to the mesh [5]. The cells are defined by the same mesh which is used for the
solution of the boundary-value problem. The electron beam is represented by a finite
number of N rays, each carrying a fraction I
i
of the total beam current I I
b i
i
N
=
=

1
. For
each time step At inside a given cell, the charge Q I t
d i
= .A , is deposited to the four
adjacent vortices of the cell (mesh nodes) according to the relation
Q
H
H
H
H
Q
n
R Z
d
=
|
\

|
.
|

|
\

|
.
|
1 1 , (11)
where H
R
and H
Z
are the distances along R and Z axes between the corresponding n-th
node and the position of the particle in the middle of the ray region considered. The
space-charge density in the node with radial coordinate R
n
is then given by
p
t
n
n
n
Q
H R
=
2
2
. (12)
Allocating p
n
and summing up the contribution of all rays the charge density in each
node is obtained.
For calculation of the current extracted from the emitter the region in the vicinity of
the cathode is divided into a number of small virtual diodes in which the current is
governed by the potential distribution and the initial velocities of the thermoelectrons. It
is assumed that in each virtual diode the Langmuirs theory holds. This approach is
grounded on the fact that the thermal velocities of the electrons in the beam are
determined by the temperature of the emitter and usually correspond to energies less than
1 eV. As a result, the space-charge density in the vicinity of the cathode is high and
significantly affects the potential distribution. Moreover, usually a space-charge cloud
forms which produces a potential minimum in the proximity of the emitter. A fraction of
the emitted electrons does not have sufficient energy to surmount the potential barrier and
returns back to the cathode. It is important to note that in reality various cathode regions
can function under different operating conditions. For instance, if there is no potential
minimum in front of a particular cathode area all emitted electrons will be extracted by
the accelerating field and will take part in the beam formation. This regime is called the
saturation or temperature limited mode of operation and is the most frequently used in the
MIG for gyrotrons. At the same time, other cathode regions in front of which emitted
electrons are facing a retarding electric field will work in the space charge limited mode.
In the former case the current density is given by

sat
J J = , (13)
while in the latter
) / exp(
B min sat
T k e J J u = , (14)
where
sat
J is the temperature limited current density (also called saturated current
density) calculated from the RichardsonDushman equation and
min
u is the potential
minimum.
In order to take into account both the initial thermal velocities of the electrons
leaving the cathode and the variations of the potential near the emitter, the cathode
surface is divided into a number of small annular regions. The extracted current density
in each annular region is calculated by considering it as a small planar diode and by
applying the Langmuirs theory. Langmuires solution for planar diode relates the
dimensionless potential
) (
min
B
u u =
T k
e
n (15)
and the dimensionless distance
) (
min
z z = ; c , (16)
where
min
z is the distance between the potential minimum and the emitting surface,
2 / 1 4 / 3
J cT

= ; , and c is a constant. The dependence between n and c is available in


tabular form as well as in the form of approximations [ ) (
1
c n F = and ) (
2
n c F = ], adapted
to represent the tabular data with the required accuracy.
In the calculations there are three known quantities for each elementary diode:
cathode temperature, anode potential
a
u and anode-to-cathode distance
a
d . In order to
obtain the extracted current density
a
J , an iterative procedure is used to solve the
transcendental equation
0 ) (
a a
= u u J , (17)
taking advantage of the following relations:
) ln(
a
B
min
J
J
e
T k
= u , (18)
T k e
B min c
/ u = n , (19)
), (
c 2 c
n c F = (20)

a c a
d ; c c + = , (21)
) )( / ( ) (
c a B a
n n = u e T k J . (22)
Using the technique described above, the current density as well as the location
and depth of the potential minimum for each cathode region is calculated. The entire area
of the boundary-value problem is divided in two partially overlapping regions. The first
one spans between the cathode and the anodes of the elementary diodes. The second
region begins at the potential minimum and spreads to the end of the area. Thus, the
potential minimum is used as a boundary condition for the solution of Poissons equation
in the second region in order to obtain a self consistent solution.


2.3 Notes regarding the current status of the GUN-MIG/CUSP package and
its usage

The code calculates the electron trajectories and the main beam quality
parameters like the pitch factor (velocity ratio), velocity spread, beam radius and outputs
their average values and statistical estimates. If the electron orbits are traced till a cross-
section which is before the resonant cavity it is possible to extrapolate beam parameters
for the interaction region. The calculations in this case are performed on the basis of the
adiabatic theory.
The results of the simulation can be visualized on a sequence of frames (screens)
by post-processing program GUN_VIEW (CUSP_VIEW). It was developed using the
graphical library of the Lahey F77-EM/32 Fortran compiler which was operational under
DOS but is not available to us under the novel operating systems. It is possible however
to modify the source code and replace the above mentioned graphic library with pgplot
[6], which is portable to various platforms. Another, easy way around this problem is to
use the data files produced by the code and visualize them using any preferred plotting
program (for example gnuplot [7]).
Regrettably, as it is frequently the case with the research codes (in contrast to
their commercial cousins), the software package described above is not well documented.
Therefore, the user is referred to the papers in which it has been described [A1-A6] as
well as to papers where some results of its usage have been published [B1-B9]. The latter
group of articles provides good examples demonstrating the capabilities of the codes and
the scope of the output data. An illustrative example which characterizes the output of
simulations is presented in the Appendix 4.
It should be mentioned also that the package described above exists in many
slightly different versions that are a result of numerous modifications made in order to
experiment with alternative algorithms, various forms of input/output or simply to adapt
the code to someones preferences. This means that the user should be careful for
distinguishing between different editions. One way to avoid confusion is to keep different
variants in different directories (with short notes about the status, origin of the code and
changes made) but always together with appropriate test examples that can be easily
reproduced after recompilation (build) of the library.
And, finally, there are several similar programs (mainly open source and/or public
domain) but also some closed source (available only in a binary form) programs that are
available to us and can be used as a reference, for benchmarking and comparison as well
as for education. Among them is the famous EGUN electron optics and gun design code
[1]. One should be warned however that this code also exists (available in source code) in
many different versions and it is the users responsibility to be aware of the differences
between them.

3. Computer codes for simulation of the interaction of the electron beam with
the high-frequency electromagnetic field in the resonant cavity

The main codes of GYRSIM software package that are being used for simulation
of the resonant cavity are: (i) a set of cold cavity codes (CCC) that are based basically on
one and the same physical model but differ in their implementation; (ii) a single mode
time independent code (CS-SMTI); (iii) multimode time dependent code (CS-MMTD),
and, (iv) a library of auxiliary programs, functions and subroutines). An inventory of
these modules is presented in Table.2

3.1 Collection of cold cavity codes (CCC) included in GYRSIM. Physical
model and program implementation.

As already mentioned, the GYRSIM software package includes several codes that
represent different implementation of one and the same so called cold cavity model in
Table 2
Inventory of the cavity codes and modules of GYRSIM package

Module/Code Functionality Implementation

CCC_FG (aka CAV)
Calculates the cold cavity
field (amplitude and phase
along the axis), frequency
and Q factor
Fortran 77;
Fox-Goodwin method for
Integration of the
Helmholtz equation

CCC_EB (aka GYROS)
Calculates the cold cavity
field, frequency and Q
factor. The output is used to
integrate the equations of
motion in other codes.
Fortran 77; Standard
Vlasov model. Wave
equation integrated by
Numerovs method.
Requires MINUIT package
for finding the eigen-
frequency.

CCC_CAV
Calculates the field,
frequency, Q factor and
energy balance tracing
electrons in the cold cavity
field
Fortran 77. The
implementation is similar to
GYROS but without
MINUIT

CS-SMTI
Calculates the efficiency
of the interaction
Fortran 77. Implements a
modified Fliflets model

CS-MMTD
Simulates mode interaction
in an oversized cavity
Fortran 77 and Fortran 90
for SX-8 available. The F77
version visualizes electron
bunching using pgplot
graphic library.

EIGEN, BMOD, IS, QFAC
Calculation/search/scan of
resonances and
corresponding magnetic
fields, starting currents
calculation, Q- factors etc.
Fortran 77. A collection of
small programs
(calculators) for simple
estimates of the cyclotron
frequency, resonant
frequency, magnetic field
etc.

BESSLIB
Subroutines for calculation
of various Bessel functions
Fortran 77. Well tested
implementations from
various repositories of
numerical libraries with
some minor modifications

Vlassovs formulation [8] (see Table 2). According to this model (aka slightly irregular
waveguide model or a model of a slightly irregular string) the transverse structure of
the electromagnetic field remains the same along the cavity axis and only its amplitude
f changes according to the equation [8]

(23)
) ( ) ( , 0 ) , (
2 2 2 2
2
2
z
c
h f z h
dz
f d
s s s s
s
;
e
e = = +
Here e and
s
h are the circular frequency and the longitudinal wave-number, respectively,
c is the speed of light in vacuum and s an index that designates a given TE
mn
mode. The
transverse wave-number
) (z R
x
mn
s
= ; (where
mn
x is the eigenvalue of the mode TE
mn
, and
) (z R is the radius of the cavity) changes slightly so that the following condition is
fulfilled


. (24)


The wave equation is supplemented by the following boundary conditions
(25)



Here the
1
z and
2
z correspond to the entrance and the exit of the cavity. It is
important to note that the above mentioned boundary value problem has a discrete
spectrum of complex frequenciese . They can be found in an iterative procedure
integrating (23) for different initial guesses and searching for values that satisfy the
boundary condition (25). Such approach is realized in the codes GYROS and
CCC_CAV. The iterative procedure in GYROS is performed as an optimization
problem carried out using the package MINUIT, while in CCC_CAV a fastest
gradient method is used.
Another approach is realized in CCC_FG (CAV) code. It is based on the
following considerations. The waveguide is cut-off (
2
s
h <0) in the regions I and III
(see the Fig. 2) so the microwave energy is kept (contained) in the cavity (region II).




Fig. 2. Schematics of a cavity treated as a slightly irregular waveguide.


Since the cavity is open-ended, however some fraction of the energy escapes along
the output waveguide (region IV).
2
s
s
h
dz
dh
<<
0 ; 0
2 1
=

+ =


= = z z
s s
s
z z
s s
s
f ih
dz
df
f ih
dz
df
In the regions I and IV provided we are away from points where 0 =
s
h , the WKB
solution (after G. Wentzel, H.A. Kramers, and L. Brillouin) is an appropriate
approximation of the problem under consideration. The general WKB solution has the
form [8]

=
hdz i hdz i
e
h
B
e
h
A
f . (26)
At the electron gun end of region I, the waveguide is well and truly cut-off. The wave is
evanescent there and its amplitude decreases exponentially towards the electron gun,
since here

=
hdz i
e h A f ) / ( , (27)
assuming 0 } Im{ < h . At the output end of the region IV the solution gives an out-going
wave which is travelling in the positive direction of the z axis,

=
hdz i
e h B f ) / ( , (28)
assuming 0 } Re{ > h .
The method implemented in the CCC_FG code was realized by Dr. G. F. Brand.
It solves the equation (23) numerically using the following algorithm: (i) Initially a value
of the complex frequency is chosen and the computation begins at a point in region IV;
(ii) f is given an initial value of 1 and from the equation (28) dz df / has an initial value
of ih , i.e. the boundary condition there is satisfied; (iii) then the program steps in the
left direction (towards the gun end) computing f and dz df / on each step using the Fox-
Goodman algorithm; (iv) At the electron gun end, the stepping halts and the final values
of f and dz df / are tested to see if the second boundary condition, namely
ihf dz df = / is satisfied. If the agreement is not sufficiently good, a new value of the
complex frequency is selected and the whole process is repeated iteratively till a
satisfactory solution is found. This being done the program prints the obtained resonance
frequency, diffractive Q factor of the resonator, field amplitude and phase along the axis
of the cavity.

3.2 Single mode time-independent cavity simulation code (CS-SMTI)
Physical model and program implementation

The physical model realized in CS-SMTI code is one proposed by Fliflet et al.
[9]. In accordance with this model the electron beam is represented as an ensemble of
particles and their trajectories are traced in an ambient magnetic field z B B

0 0
= and
high-frequency electric field u
u

E r E E
r
+ = of a TE
mn
mode in a cylindrical coordinate
system with unit vectors r

, u

and z

. The field components are given by


) exp( ) ( ) ( ) , , , ( t i z F z t z r E
mn r mn r
e v u V =

; (29)
) exp( ) ( ) ( ) , , , ( t i z F z t z r E
mn mn
e v u
u u
V =

, (30)
where the membrane function ) exp( ) ( u v im r k J C
mn m mn mn
= is a solution of the
corresponding wave equation for a cylindrical waveguide. Here ) (x J
m
is the m-th order
Bessel function of the first kind and the transverse wave number
cav mn mn
R k / ; = is
determined by the boundary condition 0 ) ( = '
mn m
J ; on the cavity wall of radius
cav
R . The
normalization coefficient is given by
1 2 2
)] ( ) ( [

=
mn m mn mn
J m C ; ; t . The axial
dependence of the field intensity is described by the complex profile function
)] ( exp[ ) ( ) ( z i z F z F
mn
u = with amplitude ) (z F and phase ) (z u . As usually, harmonic
time dependence with an angular frequency e of all field components is assumed. It is
presumed also that the rotation of the TE
mn
modes is in the same direction as the gyro
motion of the electrons (co rotation). To the co-rotation corresponds a minus sign in the
exponent, which depends on the azimuthal angle. The individual electron orbits are
described by the relativistic equation of motion
) (
0 0
B
p
E e
dt
p d
m + =

, (31)
where v p

= is the normalized momentum expressed by the velocity of the electron
v

and the relativistic factor


2 / 1 2 2
) / 1 ( c p + = . Here
0
m is the rest mass of an electron,
and c is the speed of light. In a slow-time-scale formulation Eq. (31) is reduced to the
following two equations for the normalized transverse momentum
t
p and the slow time
scale variable A [9]
( ) ( ) ) cos( ) ( ) ( , ,
) (
+ A =

s z F p R s B R s A
dt
dp
t L mn gc mn
t
; (32)
( ) ( )

e
o
t L mn gc mn
t
s
s p R s B R s A
p dt
d O
+ + A =
A
+
) sin( ) ( , ,
1
) (
, (33)
where s is the harmonic number,
gc
R is the radius of the guiding center of the electron
orbit,
0
/ O =
t L
p R is the Larmor radius,
0 0 0
/ m eB = O is the cyclotron frequency and,
) ( ) , (
gc mn s m mn mn gc mn
R k J C k R s A

= , ( ) ( ) ( ) | | ) ( ) (
2
,
1 1
0
) (
t L mn s t L mn s L mm
p R k J p R k J
m
e
R s B
+

= .
In the framework of the weakly irregular waveguide theory the Maxwells curl
equations yield the following equation for the field profile function

-
=
|
|
.
|

\
|
+ dS J E i F k
c dz
F d
mn mn
mn

.
0
2
2
2
2
2
e u
e
, (34)
where
0
u is the vacuum permeability, J

is the high frequency beam current density


obtained by summing the contributions of all particles and the integration is performed
over the cavity cross-section. For a thin annular beam, the transverse current density is
given by

t
z
b
v
v
I
J

= , (35)
where
b
I is the total current,
t
v and
z
v being the transverse and the axial velocity,
respectively. Using the same technique as in the derivation of Eqs (32)-(33) the right-
hand side of Eq. (34) takes the form [9]
( )
0
2
0 0
1
2
2
2
) exp(
2
1
, A A
|
|
.
|

\
|
O
= +


d is
p k
J R s A I i F k
dz
F d
t mn
s gc mn b mn z
mn
t
o
t
ue , (36)
where
z t
v v / = o is the orbital-to-axial velocity ratio (pitch factor). Here the longitudinal
wave number
2 / 1 2 2 2 2
)] ( / / [ z R c k
mn z
; e = depends on the axial coordinate through the
cavity radius ) (z R . If the cavity radius changes slowly along the axis we can consider a
weakly irregular waveguide as one where the fields at any z have one and the same
transverse structure and differ only in their amplitude through the function ). (z F
mn

Although we have already discussed this topic in the previous section (See Sect.
3.1) it will be repeated here again because it is essential for the physical model of the CS-
SMTI code.
Indeed, the gyrotron interaction cavities are typically cylindrical, with tapers of
various sizes and lengths on either end to aid in mode selection and to improve the
efficiency of interaction. Such cavities are capable of supporting a large number of
modes, but gyrotrons are typically operated near cutoff (
z mn
k k >> ). Therefore, at the gun
end the waveguide is well and truly cut-off. The wave there is evanescent and its
amplitude becomes smaller the closer it goes towards the electron gun. On the contrary,
at the output end there is an outgoing wave traveling in the z direction. This situation is
described by the following so-called radiation boundary conditions
0 ) (
) (
= z F ik
dz
z dF
mn z
mn
, (37)
where the minus sign corresponds to the entrance (
in
z z = ) and plus to the exit (
out
z z = )
end of the cavity (please recall that the boundary conditions here are identical with (25)
in Sect. 2.1).
Calculation of the efficiency involves an average over the electrons in the
beam. The electronic efficiency (efficiency of the interaction between beam electrons and
the field) is given by

1
0
0


n
i
el
, (38)
where
0
and
i
are initial and final values for the electron respectively and the average
is taken over the ensemble of particles representing the beam.
The physical model outlined above is implemented in a computer code CS-TISM.
The source code, written in FORTRAN, is well structured and allows to be extended
easily by addition of new computational modules. The input dada include the parameters
of the electron beam (current, accelerating voltage, average values of the velocity ratio
and beam ripple as well as their relative standard deviations), the configuration of the
cavity, the intensity of the constant magnetic field and a set of parameters (steps of
integration, number of particles, criteria for self-consistent solution etc.) that are related
to the numerical routines. An example of the input file of the code is shown in the
Appendix 2.

3.3 Multimode time-dependent cavity simulation code CS-MMTD Physical
model and program implementation

In the CS-MMTD code a well-known and widely used multimode physical model
is realized (see, e.g. [10,11]). It consists of a system of equations that describe self-
consistently both the dynamics of the electrons and the excitation of the resonant cavity.
Representing the high-frequency field as a superposition of modes labeled by the index s
the equation of electron motion takes the form
( ) | |
-

|
.
|

\
|
+ = + A

s
s s s s
n
n i f F p i p p i
d
dp
s
) ( exp ) ( 1
0
1
2
0 .
.
, (39)
where )] ( exp[ ) / (
0 0
0 0 = i p p p
t t
is the normalized orbital momentum,
0
0 is the
initial value of the slowly varying phase t
a
e u 0 = , u is the azimuthal coordinate of
the electron in the frame of the guiding center,
a
e is the frequency over which averaging
is performed,
s
n is the harmonic number of the s -th mode with longitudinal
profile ) (.
s
f and the normalized axial coordinate . is given by
z
c
a
e
|
|
t .
0 ||
2
0
= . (40)
Here c v /
0 0
= | and c v /
0 || 0 ||
= | are the transverse and the axial velocities normalized
to the speed of light in vacuumc , respectively. The normalized frequency mismatch A
that characterizes the difference between the initial cyclotron frequency
0 c
e and the
fundamental frequency
a
e (which is close to
0 c
e ) is computed from the relation
) 1 (
2
0
2
0 a
c
e
e
|
= A

. (41)

The normalized mode amplitudes
s
F and phases
s
+ obey the system [10,11]

|
|
.
|

\
|
u + =
'
2
s
s
s
s
s
Q
n
F
d
dF
t
;
' '
'
s s
a
s s
n
d
d
u + =
+
e
e
t
, (42)
where t
a
e t = is the dimensionless time,
' ' '
s s s
ie e e + = ,
s s s
Q 2 /
' ' '
e e = ,
s
Q is the
quality factor of the resonant cavity for the s -th mode . The complex value
' ' '
s s s
iu + u = u which characterizes interaction between the electron beam and s -th
mode, is given by
o 0 . 0 .
t t
t t .
d d d n i f p
F
I
i
out
s
s s s
n
s
s
s

|
|
.
|

\
|
+ = u
- -
2
0
0
2
0 0
0
)] ( exp[ ) ( ) (
2
1
2
1
, (43)
Where o is the azimuthal coordinate (angle) of the guiding centers of the electrons and
s
I is the dimensionless current [10,11]. Therefore the averaging is performed over
0
0 and
o . It should be noticed that Eq. (43) is obtained for a thin hollow electron beam in which
both the velocity spread and the spread of the radii of the cyclotron orbits can be
neglected. The dimensionless current is defined as follows
1
0
2
2 2 2
2
2
1
0 0 ||
) 2 ( 2
0 3
) ( ) )( ( 2
! 2
10 47 . 0

|
|
.
|

\
|
|
|
.
|

\
|
=

. . v v

t
|
|
.
d f m J
R
J
n
n
I I
end
s s s s
s s
s s s s m
s
n m
s
n
n
s
n
s
, (44)
Where I is the beam current in amperes,
0
is the Lorentz relativistic factor, R is the
radius of the electron beam,
s
m is the azimuthal index and
s
is the wavelength of the s -
th mode with an eigenvalue
s
v (defined for a TE
mn
mode as the n-th root of the equation
0 ) (
'
= v
m
J , where
'
m
J is the derivative of the Bessel function, i.e. v v d dJ v J
m m
/ ) ( ) (
'
= ).
The code CS-MM exists in two versions, namely for PC (Fortran 77) and SX-5
computer (Fortran90). This code has been used successfully to study mode interactions in
gyrotrons developed at FIR FU Research center.
An example of a file with input data for simulations by CS-MMTD code is
presented in Appendix 3. A general description of the code can be found in [C2,C3],
while examples of its use are presented in [D5,D7]. Recently the novel version of the
code CS-MMTD for SX-8 supercomputer has been used to study the interaction between
modes in the first tube (FU CW I) of the Gyrotron FU CW Series. Alongside with the
single mode operation several multi-mode phenomena observed experimentally have
been simulated [D7].


4. Additional programs and numerical libraries

In the preceding sections of this Report we described briefly the basic components
of the GYRSIM package. Alongside with its codes we use a number of stand-alone
programs and numerical libraries for: (i) debugging and optimization of the
computational modules; (ii) development of novel modules; (iii) preparing the input data
for the simulations; (iv) post-processing and visualization of the results of the simulations
and so on. Here we mention only some of them.
Although the simulation package for modeling of the EOS contains its own codes
for calculation of the magnetic field produced by a system of solenoids, we also use for
this purpose the POISSON/SUPERFIS [12] and FEMM [13].
POISSON/SUPERFIS is a collection of programs for calculating static magnetic
and electric fields and radio-frequency electromagnetic fields in either 2-D Cartesian
coordinates or axially symmetric cylindrical coordinates. The programs generate a
triangular mesh fitted to the boundaries of different materials in the problem geometry.
Plotting programs and other postprocessor codes present the results in various forms. We
are using this package for checking our calculations of the magnetic field as well as for
preparing the file containing the magnetic field distribution for the trajectory analysis
code EGUN. We have also some experience using POISSON/SUPERFISH for
calculation of the microwave field and eigen-frequencies of multi-vane peniotron
cavities.
FEMM is a suite of programs for solving lowfrequency electromagnetic problems
on two-dimensional planar and axisymmetric domains. The program currently addresses
linear and nonlinear magnetostatic problems, linear and nonlinear time harmonic
magnetic problems, linear electrostatic problems as well as and steady-state heat flow
problems. We use this package in the same manner as POISSON/SUPERFISH.
Results of the numerical simulation carried out using the codes of GYRSIM are
outputted and stored in ASCII files. There structure is self-explanatory and is suitable for
post-processing and visualization of a number of graphical systems or plotting programs.
Our choice is usually gnuplot [13], gmsh [14], grace [15], and SciLab [16] as the most
suitable and adequate for the data we obtain in the simulations.
SciLab Scilab is a scientific software package for numerical computations
providing a powerful open computing environment for engineering and scientific
applications. We are using it not only for visualization but also for performing
calculations that are not (yet) implemented in GIRSIM package. For example, recently
SciLab was used in order to write a small toolbox which then was applied to the CAD of
an open resonator of Fabry-Perot type for measurements of the energy levels of
positronium.
As it has already been mentioned, some of the simulation tools of the GYRSIM
package have its own visualization tools (e.g. the post-processors GUN-VIEW and
CUSP-VIEW), which make use of the Laheys graphical fortran library and/or on pgplot
[6].
Among the numerical libraries we will mention only the most frequently used
ones, notably GSL (Gnu Scientific Library) [17], port [18] as well as the Netlib
Repository of Mathematical Software [19].


5. Conclusions and outlook

In this Report the current status of the GYRSIM software package developed in the
FIR FU Research Center has been presented. It should be mentioned however that it is
under continuous development and improvement. Some of the recent changes were just
adaptations to the ever changing computational infrastructure (e.g. new operating
systems, novel versions of the used compilers and numerical libraries as well as new
hardware) while the other modifications were focused on the debugging and optimization
of the program realization. Performing these changes the main focus is always on the
portability and extensibility of the codes that are being developed. Most of them are
operational on different workstations and in different environments: DOS, Windows,
Cygwin [20], and Ubuntu Linux [21]. Recently, we have gained some positive experience
from the modern tools for virtualization (like VirtualBox [22]) which give an opportunity
to take advantage of a simultaneous access to several operating systems.
It should be mentioned that some of the simulations are very computing intensive
and require significant resources (CPU time, memory). This motivated us to adapt some
of the codes for execution on the most powerful supercomputer, which is available to us,
namely the SX-8 at the National Institute for Fusion Science. We intend to continue this
work further as well as to consider parallelization of the codes.
A constant driving force for the further improvement of the package is our desire
to use more adequate physical models and to take into accounts more physical factors and
phenomena in the simulations. Since many of them are inherently three dimensional we
consider development of 3D modules. Such codes will also require a parallel
implementation of the basic algorithms. A work in this direction has already been started
and currently we are studying and testing various available 3D solvers based on fast and
efficient numerical algorithms.
Finally, we would like to mention again that the GYRSIM package can be used
for CAD of two of the most essential systems of the gyrotron, namely the EOS and the
resonant cavity. The performance of the device however depends on the synergy of all
the systems that form the tube (including the output window, collector etc.) and also the
quasi-optical transmission line which delivers the radiation to the region in the space
where it is used. Without going into details we will only stress that for many applications
an internal mode converter is a must. In order to respond to such demands we intend to
start a development of novel tools for simulation of the quasi-optical system of the
gyrotron and their integration in the GYRSIM package.


Acknowledgements
This work was partly supported by a Special Fund for Education and Research
from the Ministry of Education, Culture, Sports, Science and Technology (MEXT) and
Project Allocation Fund of the University of Fukui and was carried out in the framework
of the collaboration and Agreement for Scientific Exchange between the Institute of
Electronics of the Bulgarian Academy of Sciences (IE-BAS) and the Research Center for
Development of the Far-Infrared Region (FIR FU) at the University of Fukui.
Part of the numerical calculations were made on SX-8 computer at the Computer
Center of the National Institute for Fusion Science (NIFS), Japan. The cooperation of the
NIFS is greatly acknowledged.

REFERENCES

General references

1. Herrmannsfeldt W B 1979 Electron Trajectory Program SLAC-226, last version
SLAC-331 (1998), Stanford University
2. Bleivas I.M. On the mathematical formulation of the self-consistent problem in
electron (ion) optics.- In: Problems of physical electronics, Ed. by N.D.
Deviatkov (Nauka, Moscow) 1982,p p. 85-98 (in Russian).
3. Ximen J. Aberration theory in electron and ion optics.- In: Advances in
Electronics and Electron Physics, Ed. by P.W.Hawkes (Academic Press) Suppl.
17, (1986).
4. Hawkes P.W., Kasper E. Principles of Electron Optics, Vol.1 Basic
Geometrical Optics, Academic Press (1989).
5. M.A.J. van der Stam, Space-charge in electron guns (Modelling and
simulation), D2-report, Delft University of Technology, The Netherlands
(1991) pp. 43-47.
6. PGPLOT - Fortran or C-callable Graphics Subroutine Library
(http://www.astro.caltech.edu/~tjp/pgplot/)
7. Gnuplot - command-line driven graphing utility (http://www.gnuplot.info/)
8. S.N. Vlasov, G.M. Zhisllin, I.M. Orlova, M.I. Petelin, G.G. Rogacheva,
Irregular Waveguides as Open Resonators, Izv. VUZ, Radiofizika, Vol. 12, N 8
(1969) 1236-1244 (in Russian)
9. Fliflet A.W., Read M.E., Chu K.R., Seeley R. Int. J. Electronics, 53 (1982)
505-521.
10. Nusinovich G.S. Mode interaction in gyrotrons, Int. J. Electronics 51 (1981)
457-474.
11. Dumbrajs O. Review of the theory of mode competition in gyrotrons.-In:
Gyrotron oscillators, Ed by C.J. Edgcombe (Taylor&Francis, London, 1993)
82-125.
12. POISSON/SUPERFISH
(http://laacg1.lanl.gov/laacg/services/serv_codes.phtml#ps)
13. FEMMFinite Element Method Magnetics
(http://www.femm.info/wiki/HomePage)
14. Gmsh A 3D finite element grid generator with a build-in CAD engine and
post-processor (http://www.geuz.org/gmsh/)
15. Grace - WYSIWYG 2D plotting tool (http://plasma-gate.weizmann.ac.il/Grace)
16. (http://www.scilab.org/)
17. GSL- The GNU Scientific Library (http://www.gnu.org/software/gsl/ )
18. PORT (http://www.netlib.org/port/)
19. Netlib Repository of Mathematical Software (http://www.netlib.org)
20. Cygwin (http://www.cygwin.com/)
21. Ununtu Linux (http://www.ubuntu.com/)
22. VirtualBox (http://www.virtualbox.org/)

References related to the GYRSIM package

In order to facilitate the search for the corresponding references we divide them in
several groups (e.g. references to papers on ray-tracing codes, cavity codes, additional
programs etc.). Since some of the papers however contain a description of more than
one code or topic they will appear in several groups of references.

A. References to papers on the ray tracing codes of GYRSIM package

A1. Sabchevski S., Mladenov G., Idehara T. Modeling and Simulation of Magnetron
Injection Guns for Gyrotrons.- Proc. Of Int. Conf. Electronika98 (10-15 Oct. 1998,
Botevgrad) 1998, 23-28.
A2. Sabchevski S., Mladenov G., Idehara T. Modeling and Simulation of Magnetron
Injection Guns for Submillimeter Wave Gyrotrons.- Intern. Journal of Infrared and
Millimeter Waves, Vol. 20, N 6 (1999) 1019-1035.
A3. Sabchevski S., Idehara T., Glyavin M., Mitsudo S., Ogawa I., Ohashi K., Kobayashi
H. Design of a Large Orbit Gyrotron with a Permanent Magnet System.- Vacuum, Vol.
62, N2-3, 2001, (Special issue: The Sixth International Conference on Electron Beam
Technologies EBT-2000) pp. 133-142.
A4. Sabchevski S., Idehara T., Glyavin M., Ogawa I., Mitsudo S. Modelling and
simulation of gyrotrons. Vacuum, Vol. 77, N 4 (2005) pp. 519-525.
A5. Sabchevski S. Modeling and Simulation of Gyrotrons (invited talk). Collections of
Viewgraphs of the 2
nd
International Workshop on Far Infrared Technologies (September
12-13, 2002 Fukui University, Fukui, Japan) pp. 72-120.
A6. Sabchevski S. Modeling and Simulation of Gyrotrons (invited talk). Proc. Of the
2
nd
International Workshop on Far Infrared Technologies (September 12-13, 2002
Fukui University, Fukui, Japan) pp. 43-58.
A7. S. Sabchevski, T. Idehara, T. Saito, I. Ogawa, S. Mitsudo, Y. Tatematsu, La Agusu,
Numerical Investigations of the Gyrotron FU and Gyrotron FU CW Series Proc. Mini-
symposium on Infrared Science and Technology-Satellite Meeting of ISMASM2008
(May 30, 2008, Osaka Sangyo University) pp. 31-36 (Invited talk).

B. References to papers in which results obtained by the ray tracing codes of
GYRSIM package are used

B1. Sabchevski S., Idehara T., Ogawa I., Glyavin M., Mitsudo S., Ohashi K., Kobayasi
H. Computer Simulation of Axis-Encircling Beams Generated by an Electron Gun with a
Permanent Magnet System.- Intern. Journal of Infrared and Millimeter Waves, Vol. 21, N
8 (2000) 1191-1209.
B2. Sabchevski S., Idehara T., Glyavin M., Mitsudo S., Ogawa I., Ohashi K., Kobayashi
H. Design of a Large Orbit Gyrotron with a Permanent Magnet System.- Vacuum, Vol.
62, N2-3, 2001, (Special issue: The Sixth International Conference on Electron Beam
Technologies EBT-2000) pp. 133-142.
B3. Zapevalov V., Idehara T., Sabchevski S., Ohashi K., Manuilov V., Glyavin M.,
Kornishin S., Kuftin A., Lygin V., Malygin O., Moiseev M., Pavelev A., Tzalolikhin V.,
Zavolski N., Kobayashi H., Yokoyama T., Ogawa I., Mitsudo S., Kanemaki T., Iwata Y.
and Hoshizuki H. Design of a Large Orbit Gyrotron with a Permanent Magnet System.-
Int. Journal of Infrared and Millimeter Waves, Vol. 24, N 3 (2003) pp. 253-260.
B4. Idehara T. Ogawa I. Mitsudo S. Iwata Y. Watanabe S. Itakura Y. Ohashi
K. Kobayashi H. Yokoyama T. Zapevalov V. E. Glyavin M. Y. Kuftin A. N.
Malygin O. V. Sabchevski S. P. A High Harmonic Gyrotron With an Axis-Encircling
Electron Beam and a Permanent Magnet.- IEEE Trans. Plasma Sci., Vol. 32, N 3, pp.
903-909 (2004).
B5. Sabchevski S., Idehara T., Glyavin M., Ogawa I., Mitsudo S. Modelling and
simulation of gyrotrons. Vacuum, Vol. 77, N 4 (2005) pp. 519-525.
B6. Sabchevski, S.; Idehara, T. ; Mitsudo, S. ; Fujiwara, T. Conceptual Design Study of a
Novel Gyrotron for NMR/DNP Spectroscopy.- Intern. J. Infrared and Millimeter Waves,
Vol. 26, N 24 (2005) pp. 1241-1264
B7. Sabchevski S., Idehara T., Ogawa I., Glyavin M., Mitsudo S., Ohashi K. Computer
Simulation of Axis-Encircling Beams Generated by Electron Gun with Permanent
Magnet System.- Proc. Of 13th Internat. Conf. On High-Power Particle Beams (25-30
June 2000, Nagaoka, Japan) Vol.1, p. 889-892.
B8. Idehara T., Sabchevski S., Glyavin M., Mitsudo S., Ogawa I., Ohashi K. Design of
Weakly Relativistic Large Orbit Gyrotron with Permanent Magnet System.- Proc. Of
13th Internat. Conf. On High-Power Particle Beams (25-30 June 2000, Nagaoka, Japan)
Vol. 1, pp. 1008-1011.
B9. Zapevalov V., Idehara T., Sabchevski S., Ohashi K., Manuilov V., Glyavin M.,
Kornishin S., Kuftin A., Lygin V., Malygin O., Moiseev M., Pavelev A., Tsalolikhin V.,
Zavolski N., Kobayashi H., Yokoyama T., Ogawa I., Mitsudo S., Kanemaki T., Iwata Y.,
Hoshizuki H. Simulation and Design of High Harmonic Gyrotron with a Permanent
Magnet System. In: Proceedings of the Intern. Workshop on Strong Microwaves in
Plasmas (N. Novgorod, 1-9 Aug 2002) Ed. By A.G.Litvak, Vol. 1 (2003) pp. 129-134.

C. References to papers on the cavity codes of GYRSIM package

C1. Sabchevski S., Idehara T., Ogawa I., Glyavin M., Ohashi K. Simulation of a High Harmonic
Gyrotron with Axis-Encircling Electron Beam and Permanent Magnet. Int. Journal of Infrared
and Millimeter Waves, Vol. 23, N 5 (2002) pp. 675-692.
C2. Sabchevski S., Idehara T., Glyavin M., Ogawa I., Mitsudo S. Modelling and
simulation of gyrotrons. Vacuum, Vol. 77, N 4 (2005) pp. 519-525.
C3. Sabchevski S. Modeling and Simulation of Gyrotrons (invited talk). Collections of
Viewgraphs of the 2
nd
International Workshop on Far Infrared Technologies (September
12-13, 2002 Fukui University, Fukui, Japan) pp. 72-120.

C4. Sabchevski S. Modeling and Simulation of Gyrotrons (invited talk). Proc. Of the
2
nd
International Workshop on Far Infrared Technologies (September 12-13, 2002
Fukui University, Fukui, Japan) pp. 43-58.
C5. S. Sabchevski, T. Idehara, T. Saito, I. Ogawa, S. Mitsudo, Y. Tatematsu, La Agusu,
Numerical Investigations of the Gyrotron FU and Gyrotron FU CW Series Proc. Mini-
symposium on Infrared Science and Technology-Satellite Meeting of ISMASM2008
(May 30, 2008, Osaka Sangyo University) pp. 31-36 (Invited talk).

D. References to papers on the use of the cavity codes of GYRSIM package

D1. Glyavin M., Sabchevski S., Idehara T., Ogawa I., Mitsudo S., Ohashi K., Kobayashi
H. Numerical Analysis of a Weakly Relativistic Large Orbit Gyrotron with Permanent
Magnet System.- Intern. Journal of Infrared and Millimeter Waves, Vol. 21, N 8 (2000)
1211-1221.

D2. Sabchevski S., Idehara T., Ogawa I., Glyavin M., Ohashi K. Simulation of a High
Harmonic Gyrotron with Axis-Encircling Electron Beam and Permanent Magnet. Int.
Journal of Infrared and Millimeter Waves, Vol. 23, N 5 (2002) pp. 675-692.

D3. Zapevalov V., Idehara T., Sabchevski S., Ohashi K., Manuilov V., Glyavin M.,
Kornishin S., Kuftin A., Lygin V., Malygin O., Moiseev M., Pavelev A., Tzalolikhin V.,
Zavolski N., Kobayashi H., Yokoyama T., Ogawa I., Mitsudo S., Kanemaki T., Iwata Y.
and Hoshizuki H. Design of a Large Orbit Gyrotron with a Permanent Magnet System.-
Int. Journal of Infrared and Millimeter Waves, Vol. 24, N 3 (2003) pp. 253-260.

D4. Idehara T. Ogawa I. Mitsudo S. Iwata Y. Watanabe S. Itakura Y. Ohashi
K. Kobayashi H. Yokoyama T. Zapevalov V. E. Glyavin M. Y. Kuftin A. N.
Malygin O. V. Sabchevski S. P. A High Harmonic Gyrotron With an Axis-Encircling
Electron Beam and a Permanent Magnet.- IEEE Trans. Plasma Sci., Vol. 32, N 3, pp.
903-909 (2004).

D5. Sabchevski S., Idehara T., Glyavin M., Ogawa I., Mitsudo S. Modelling and
simulation of gyrotrons. Vacuum, Vol. 77, N 4 (2005) pp. 519-525.

D6. Sabchevski, S.; Idehara, T. ; Mitsudo, S. ; Fujiwara, T. Conceptual Design Study of a
Novel Gyrotron for NMR/DNP Spectroscopy.- Intern. J. Infrared and Millimeter Waves,
Vol. 26, N 24 (2005) pp. 1241-1264.
D7. Sabchevski S., Saito T., Idehara T., Nakano T., Tatematsu Y. Simulation of Mode
Interaction in the Gyrotron FU CW I.- Int. Journal of Infrared and Millimeter Waves
Vol. 28 (2007) pp. 1079-1093.
DOI 10.1007/s10762-007-9294-9; ISSN0195-9271 (Print) 1572-9559 (Online))












6. Appendixes


Apendix 1

An example of an ASCII input file for GUN-MIG/CUSP

DESCRIPTION OF THE INPUT DATA (Please keep these comments in each input file before the
actual NAMELIST)
LG - number of points along the boundary contour
H - step of the mesh
T - temperature of the cathode
PTN - saturation current density of the emitter
EPS - criterium for the solution of the boundary
value problem
EPSS - criterium for the solution of the self-consistent
problem
KEY(1) =T presence of curved electrodes
KEY(2) =T computation ot the loses of current (not used in GUN-MIG)
KEY(3) =T variation of the potential of one of the electrodes
If KEY(3)=T: NVARU - number of the variations
NU1,NU2- number of the first and the last points
DELU - change of the potential (+ or -)
KEY(4) =T variation of the geometry of one of the electrodes
If KEY(4)=T: NVARG - number of the variations
NG1,NG2- number of the first and the last points
DELZ - shift of the coordinates along Z axis
(+ or -)
DELR - shift of the coordinates along R axis
(+ or -)
KEY(5) =T presence of cutting diaphragms (not used in GUN-MIG)
KEY(6) =T partition of an axis-adjacent region
If KEY(6)=T: RMAX - radius of the region
KEY(7) =T limited emitting earia of the cathode
KEY(8) =T analysis in the equipotential space (not used in GUN-MIG)
KEY(9) =T (not used in GUN-MIG)
KEY(10)=T increase cathode temperature gradually

OUTPUT OF:
IOUT(1) = T potential distribution (in a table)
If zooming windows are used LSEL is the number of the
windows;
ZN(I),ZK(I) beginning/ending Z coordinates of I-th
window
RN(I),RK(I) beginning/endinq R coordinates of I-th
window
IDSZ(I),IDSR(I)-multiplicity factor for augmentation of the
step in Z and R directions.
If these parameters are not specified the output includes
the full array.
IOUT(2) = T current density distribution
IOUT(3) = T beam envelope (not used in GUN-MIG)
IOUT(4) = T cathode current density distribution (not used in GUN-MIG)
IOUT(5) = T current density distribution in the crossover (not in GUN-
MIG)
IOUT(6) = T current density distribution in selected cross-sections
(not yet implemented )
IOUT(7) = T output of the cut-off potential of the system (not used in
MIG)
IOUT(8) = T output of information about the iterative process
IOUT(9) = T plot of the geometry of the system
IOUT(10)= T solution of self-consistent problem

GEOM: consists of axial coorditate Z, radial coordinate R and potential
U of all LG boundary point along the boundary contour. Potential of
the cathode must be zero.
KRIV: consists of the codes of the boundary segment (1-line; 2-arc of
circle)
PRMT: consists of the cardinal elements of the boundary segments

THE ACTUAL NAMELIST STARTS HERE

&GUN
KEY = t F F F F F F F F F
LG = 20
EPS = 1e-05
H = 0.020
T = 1350.0
PTN = 1.1284084
EPSS = 0.01
IOUT = t F F F F F F t F t
GEOM = 3.00000 0.00000 0.00
3.00000 0.12000 0.00
2.92000 0.20000 0.00
2.16500 0.20000 0.00
1.62500 0.36500 0.00
1.30000 0.46500 0.00
1.12000 0.58731 0.00
0.83000 0.68000 0.00
0.00000 0.68000 0.00
0.00000 1.36000 15000.00
1.16000 1.36000 15000.00
1.45000 1.03000 15000.00
2.10000 0.71000 15000.00
3.05000 0.71000 15000.00
3.37000 1.03000 15000.00
3.37000 1.36000 15000.00
8.00000 1.36000 40000.00
8.50000 0.86000 40000.00
12.00000 0.86000 40000.00
12.00000 0.00000 40000.00
KRIV = 1 2 1 1 1 1
2 1 1 1 1 1
1 2 1 1 2 1
1
PRMTR = 0.00000e+00 8.00000e-02 0.00000e+00 0.00000e+00
0.00000e+00 0.00000e+00 5.00000e-01 0.00000e+00
0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00
0.00000e+00 3.20000e-01 0.00000e+00 0.00000e+00
5.00000e-01 0.00000e+00 0.00000e+00
ZE1=1.625 RE1=0.365 ZE2=1.3 RE2=0.465 NEM=40 NRAY=20 IORB=10 TSH=1.0e-07
NMF=2106 NDEG=100 MAGFI=c7123co2.DAT
/
ZE1,RE1 and ZE2,RE2 coordinates of the points that specify the
emitting ring
NEM number of emitting anular regions
NRAY number of rays used for trajectory plot
IORB number of the selected ray plotted in X-Y plane
TSH - step of integration
CBZZ: coefficiens in the polinomial expansion of the magnetic field
Bz=B0+B1*Z+B2*(Z**2)+B3*(Z**3)+B4*(Z**4)+B5*(Z**5)+B6*(Z**6)
_



Appendix 2

Example input file for the code CS-SMTI

&CAVMODEB
M=4, N=1, NS=4, RCAV=2.3074, UAC=37.0, BCU=1.1, B0=1.06,
WL1=0.01, WL2=0.05, WL3=0.05, R1=0.002, RN=0.005,NF=400,
NPHY=36, ALFA0=1.6, ALFASP=0.0, NALFA=10,
AVRIPL=7.0, RIPLSP=0.0, NRIPL=10, DELT=0.01,
EPS=0.005, MAXNBIT=100, FMISI=0.0000, STFM=0.0001, NMIS=90
/
M,N - mode indeces
NS - harmonic number
RCAV - cavity radius
B0 - magnetic field in the cavity [T]
UAC - accelerating loltage [kV]
ALFA - velocity ratio
ALFASP - relative standard deviation of velocity ratio [%]
NALFA - number of initial values of velocity ratio
AVRIPL - average beam ripple [%]
RIPLSP - relative standard deviation of the ripple
NRIPL - number of initial values of the ripple
WL1 - length of the first cavity section
WL2 - lenght of the central (active) cavity section
WL3 - length of the output cavity section
ZN - initial coordinate of the cavity
NF - number of points in the longitudinal field prfile
NPHY - number of initial condiions for azimuthal angle
NRAY - No of orbit for the output (NRAY.LE.NPHY)
DELT - Time step measured in cyclotron peropds (DT=DELT*Tc)
MAXNBIT- maximum number of iterations
EPS - criteria for self-consistent solution
FMIS - frequency mismatch (W-Wc)/Wc
NMIS - number of values for the frequency mismatch
_




Appendix 3

An example of a file with input data for the CS-MMTD code

&MULTIMOD
NM=2,
MM(1)=2, NN(1)=3, MM(2)=2, NN(2)=6,
NS(1)=1, NS(2)=2, MOI=1,
AS0(1)=0.001,AS0(2)=0.001,
QSDIF(1)=6307.0, QSDIF(2)=33743.0,
RCAV=2.425, CAVL=14.5, UAC=40.0, BCU=1.20,
ALFA=1.5, NP=200, DEL=0.68, RBE=1.25,
H=0.20, TS=300.0, TLIM=1800000.,NAA=16, ICH=1, ITYP=2, STPA=-0.04
/
NM - number of modes considered
MM(I) - azimuthal index of I-th mode (I=1,..NM)
NN(I) - radial index of I-th mode (I=1,..NM)
NS(I) - harmonic number of I-th mode (I=1,..NM)
AS(I) - initial ampltude of I-th mode
QSDIF(I) - diffractive Q-factor for I-th mode
MOI - number of mode which frequency is used for averaging
RCAV - cavity radius
CAVL - cavity length
UAC - accelerating loltage [kV]
BCU - beam current [A]
ALFA - velocity ratio
NP - number of particles
DEL - frequency mismatch
RBE - beam radius
H - axial step
TS - time step
NAA - number of azimuthal angles for averaging over phases
of the modes
ICH - number of the variations of the parameter (BCU or DEL)
ITYP - ITYP=1 - beam current is varied
ITYP=2 - frequency mismatch is varied
STPA - step (+ or -) for change of the parameter
_















Appendix 4

Visualization of the result of trajectory analysis of MIG performed using the ray
tracing codes of the GYRSIM package illustrative examples


























0.0 2.0 4.0 6.0 8.0 10.0 12.0
Z (cm)
0.0
0.5
1.0
1.5
R


(
c
m
)
U
a
= -15 kV U
b
= 0
U
c
=-40 kV
GUN-MIG: GEOMETRY OF THE GUN AND ELECTRON TRAJECTORIES
I
b
= 1.0 A , B
1
=0.222 T
-0.6 -0.3 0.0 0.3 0.6
X (cm)
-0.6
-0.3
0.0
0.3
0.6
Y


(
c
m
)


Projection of the central orbit of the beam
(shown in the left figure) on the X-Y plane
and the azimuthal angle vs longitudinal
coordinate Z


0 2 4 6 8 10 12
Z (cm)
0.0
0.5
1.0
1.5
2.0
O

(
r
a
d
)

Emitting ring of
the cathode
Appendix 5

Visualization of the result of trajectory analysis of MIG for LOG performed using
the ray tracing codes of the GYRSIM package illustrative examples



0.0 2.0 4.0 6.0 8.0 10.0 12.0
Z (cm)
0.0
0.5
1.0
1.5
2.0
R


(
c
m
)
U
a U
w
U
c
GUN-MIG/CUSP: GEOMETRY OF THE GUN, AXIAL MAGNETIC FIELD AND ELECTRON TRAJECTORIES
U
a
= 0, U
c
= U
w
= -36 kV , I
b
= 1.0 A , J
s
= 5.0 A /cm
2,
-0.2
0.0
0.2
0.4
0.6
0.8
1.0
1.2
B
z

(
T
)


Configuration of the gun, profile of the magnetic field produced by the permanent
magnet and electron trajectories of the beam





Projection of the central orbit on the X-Y plane (left) and its isometric view (right).

0 2 4 6 8 10 12 14 16 18 20 22
Z (cm)
0.0
0.5
1.0
1.5
2.0
R


(
c
m
)
-0.4
0.0
0.4
0.8
1.2
B

(
T
)
GUN-MIG/CUSP (Ver. 6.00) RAY TRACING OF THE ELECTRON BEAM FORMATION
ANODE
CAVITY
Electron trajectories
Axial magnetic field
U
a
=0, U
c
=U
w
=-37 kV , I
b
=1 A
(MAGNETIC FIELD PRODUCED BY PM AND ADITIONAL COILS)
U
a
U
w
U
c


Configuration of the EOS, magnetic field profile and electron trajectories.

























30 32 34 36 38 40
Accelerating voltage (kV)
1.2
1.6
2.0
2.4
V
e
l
o
c
i
t
y

r
a
t
i
o
AVERAGE VELOCITY RATIO IN THE CAVITY REGION
(simulation performed using the measured magnetic field)

30 32 34 36 38 40
Accelerating voltage (kV)
0
2
4
6
8
S
p
r
e
a
d


(
%
)

Spread of velocity ratio and axial velocity
in the cavity region for the measured magnetic
field of the PM circuit
Spread of velocity ratio
Spread of axial velocity

30 32 34 36 38 40
Accelerating voltage (kV)
5
10
15
20
25
R
i
p
p
l
e



(
%
)
AVERAGE BEAM RIPPLE IN THE CAVITY REGION
(simulation performed using the measured magnetic field)

Appendix 6



Typical illustrative results obtained using the CCC_EB code





















Appendix 7

Typical illustrative results obtained using CS-SMTI code
0 2 4 6 8 10 12
Z (cm)
0.0
0.2
0.4
0.6
0.8
R


(
c
m
)
0.0
0.2
0.4
0.6
0.8
1.0
N
o
r
m
a
l
i
z
e
d

f
i
e
l
d

p
r
o
f
i
l
e



Configuration of the resonant cavity and field profile obtained for:
a
U =37 kV,
b
I =1.5
A, o =1.6,
r
A =8 %,
0
B =1.06 T, o =0.54 %,
cav
R =2.307 mm (LOG operating at
4
TE
401

mode)

Convergence of the iterative process to a self-consistent solution

Appendix 8

Typical illustrative results obtained using the CS-MMTD code





















Temporal evolution of mode excitation and bunching of the electrons in the case of single
mode operation at second harmonic




















Mode competition between TE
23
and TE
26
.

0 100000 200000 300000 400000 500000 600000
DIMENSIONLESS TIME
0.0
0.5
1.0
1.5
2.0
O
U
T
P
U
T

P
O
W
E
R


(
k
W
)
A
B
C
D
E
F
A
B
C
D
E
F
EXCITED MODE:
2
TE
26
U
b
= 40 kV ; I
b
= 0.6 A
R
b
= 1.25 mm ; ALFA=1.5
R
cav
= 2.425 mm ; L
cav
= 14.5 mm
B = 7.337 T (DELTA=0.625)
0 200000 400000 600000 800000 1000000 1200000 1400000
DIMENSIONLESS TIME
0.0
0.5
1.0
1.5
2.0
O
U
T
P
U
T

P
O
W
E
R


(
k
W
)
U
b
= 40 kV ; I
b
= 0.6 A
R
b
= 1.25 mm ; ALFA=1.5
R
cav
= 2.425 mm ; L
cav
= 14.5 mm
B = 7.356 T (DELTA=0.575)
2
TE
26

1
TE
23




















Mode cooperation (TE
26
mode facilitates the excitation of the TE
23
mode).


Competition between the modes TE
22,8
and TE
3,16
in the Gyrotron FU CW I, which ends
up with suppression of the design mode by the competing mode which oscillates at the
frequency of 298.8 GHz.
0 150000 300000 450000 600000
DIMENSIONLESS TIME
0.0
2.5
5.0
7.5
10.0
12.5
15.0
O
U
T
P
U
T

P
O
W
E
R


(
k
W
)
U
b
= 40 kV ; I
b
= 0.7 A
R
b
= 1.25 mm ; ALFA=1.5
R
cav
= 2.425 mm ; L
cav
= 14.5 mm
B = 7.365 T (DELTA=0.55)
2
TE
26

1
TE
23