next up previous
Next: Manual Pages Up: User's Guide for spiffe Previous: Introduction

Run Organization

A typical spiffe run consists of the following steps, most of which are optional. Although the steps need not be executed exactly in the order shown here, doing so will prevent the occasional error message. Each step is performed by invoking a namelist command, as indicated:

  1. Define the simulation region and the geometry of a cavity. This includes defining the grid sizes, the boundary conditions, which types of fields to include (TE or TM), and how to interpolate on the grid. This is done with the define_geometry command, which requires existence of a boundary definition file in a POISSON-like format. This file specifies not only the location of the metal surfaces in the problem, but optionally the potential of each.

  2. Optional: define the time-dependent fields and/or a method of generating fields. This is done with the load_fields, define_antenna, and/or add_on_axis_fields commands. The former allows loading fields from a previous spiffe run, whereas the latter allows generating new fields using a modulated sine-wave current source.

  3. Optional: define solenoid coils, from which static magnetic fields will be computed and imposed on the particle motion. The define_solenoid command permits defining a solenoid with a specified length, radius, symmetry, and current/field.

  4. Optional: define constant field components to be imposed on the simulation. These field components, defined with the constant_fields command, are not necessarily physical in that they may not satisfy Maxwell's equations.

  5. Optional: load a particle distribution and/or define a cathode for generation of particles. The former is not presently implemented in version 2.0 of spiffe. The define_cathode namelist permits specification of the size, current density, time profile, and other parameters of particle emission from an annulus. Starting in version 2.3, multiple cathodes may be defined.

  6. Optional: invoke and control Poisson correction. This is controlled by the poisson_correction command. It is recommended in order to increase the accuracy of the field solutions. Without it, numerical errors tend to build up that correspond to fictitious concentrations of static charge on the grid.

  7. Optional: define resistive elements in the cavity interior, which simulates the effect of walls that are less than perfectly conducting. This is done with one or more define_resistor commands. It slows the simulation tremendously, due to the reduced step size needed to obtain numerical stability.

  8. Optional: define a series of diagnostic ``screens'' for placement in the beam path. A single define_screen command can be used to produce output of beam parameters at a series of equispaced longitudinal positions.

  9. Optional: request beam snapshots at equispaced time intervals. This is done with the define_snapshots command.

  10. Optional: request field output and/or field saving. Field output is in a format convenient for plotting and analysis, in that values are interpolated onto the same grid for all field components. Field saves are intended for use by a subsequent spiffe run. These operations are set up by the define_field_output and define_field_saving commands.

  11. Optional: request sampling of the fields vs time or space coordinates. With the command
    define_field_sampling, one may set up sampling of a specific field component along a line in z or r, with output vs the distance along the line at specified times or else output of the average value along the line vs time.

  12. Optional: request reduction and translation of the simulation grid so that it moves along with the particles.

  13. Optional: request simulation of secondary emission, using the define_secondary_emission command. This won't result in generation of any secondary particles unless a cathode is defined or particles are loaded from a file.

  14. Define integration parameters and begin integration. The integrate command allows specifying the integration time step, the total time to integrate, and other conditions of integration. (Strictly speaking, it is optional, but only if you don't want to do anything.)


next up previous
Next: Manual Pages Up: User's Guide for spiffe Previous: Introduction
Robert Soliday 2015-09-02