SIMION® Industry standard charged particle optics simulation software.
Newsflash: SIMION v8.1.1.32 and v8.1.2.22-TEST posted. Recent advances: dielectrics, surface enhancement, new examples (early access: permeability, particle API, View OpenGL)

What are PA, PA#, PA0, PA1/PA2/PA3, ... files? How do they differ?

These are all potential array files. Technically, they are largely identical in file format[1] and interchangeable. For example, you can open any of these files in Modify for examination and save them with a different file extension. As described below, they differ largely in purpose.

The PA file is the most basic type of potential array. It holds a 2D or 3D grid (mesh or array) of points. Each grid point holds two things (1) a potential value (real number) and (2) a Boolean value indicating whether the point is an electrode point or non-electrode (free space) point. Electrode points define the boundary of either solid electrodes (which define a potential and splat ions that hit it) or ideal grids (which define a potential but allow 100% of ions to fly through)--this depends on topology (see Figure on p.5-4, SIMION 7.0 manual). Ideal grids, therefore, behave like something between free space and solid electrodes. The PA file also contains a header section for additional parameters: the symmetries, mirroring, and dimensions of the mesh.

Refining a PA. In creating a PA file, one typically marks certain points to be electrode points, defines the potentials on those electrode points, and leaves the potentials on the non-electrode as undefined (to be solved). The Refine function will then calculate and set the potentials on the non-electrode points by solving the Laplace equation given the electrode point potentials as the boundary condition. It is even possible to skip the Refine function and define the non-electrode potentials yourself (this is rare, but there are a few tricks that make use of it).

Flying ions in a PA. You can place a PA file into a Workbench (View function) and fly ions through the PA. Almost always, you use a PA with potentials defined on space points (e.g. by Refine) because the space potentials determine the ion flight path through space. Specifically, the negative gradient of the potential at any point equals the electric field at that point (E = - grad V), which in turn defines the force/acceleration of a charged particle at that point, according to the electrostatic component of the Lorentz force law (F = q E + qv x B).

Fast scaling a PA. There is a optimization trick if you need to proportionately adjust the potentials of all electrodes in a PA file. Just multiply the potentials of all points (both electrode and non-electrode points) by a constant of proportionality. This achieves the same effect as rerunning the Refine process (Laplace calculation) to calculate space potentials, but it is much faster.

Additional notes on PA's. There is typically no harm in refining a PA file twice. The space potentials will simply be recalculated from the electrode potentials. You should Save a PA after Refining it so that the new space potentials need not be recalculated the next time you run SIMION. You can edit a refined PA file directly (e.g. Modify), but you will need to re-Refine the PA if you change the electrodes in any way such that space potentials must be recalculated.

Summary of typical steps to make a useful PA file:

PA --[refine]--> PA --[optionally fast scale]--> PA

• Create the PA file, setting the potentials on electrode points. There are many ways to create this file (e.g. GEM, Modify, or the SL Toolkit)
• Refine the PA file. This calculates and sets the space point potentials. The Refine function will not automatically Save your file though (see Save step below).
• Optionally, fast scale the PA file in memory (usually not needed)
• Save the PA file to disk.
• Add the PA to a Workbench (View).

Note: The PA will be loaded automatically anytime you load (View) a Workbench that contains the PA file.

The PA# file and its cousins. Now, the PA file is generally all you need. You can even use the fast scaling trick above to proportionately change potentials very efficiently. However, this optimization trick will not work if you need to oscillate the potentials disproportionately (e.g. potentials on quadrupoles varying out-of-phase) or multiply by a factor of 0. This is where PA# files come in. When a PA# file is Refined, the Refine function splits the PA# file out into multiple files--PA1, PA2, PA3, etc.--one per electrode. The Refine function then independently calculates the space point potentials on each of these files. To then actually fly ions through this, we need to recombine these PA1, PA2, etc. results back into one PA. We do this via the Fast Adjust function, which, according to the Law of superposition, generates the final PA0 file by taking a certain specified linear combination of the space potentials in the PA1/PA2/etc files. The PA0 file is what you place in your Workbench and fly ions through. Quite usefully, this scaling procedure can even be done during ion flight.

Fast Adjust PA0. As mentioned, fast adjusting the PA0 file will reset the potentials on all its space points from linear combinations of the corresponding values in the PA1, PA2, etc. files. If the PA0 file doesn't exist, the Fast Adjust function will first create it in memory from the PA# file (you should later Save the PA0 file to disk).

Additional notes. The PA1, PA2, etc. files are created and saved automatically during refine. Typically, these files are handled internally, and you never touch or load them directly. Rather, you largely work with just the PA# (input) file and the PA0 (output) file. Never fly ions though a PA# file--it makes little sense.

Summary of typical steps to make a useful PA0 file:

PA# --[refine]--> PA1, PA2, PA2, ... --[fast adjust]--> PA0

• Create the PA# file. This is largely the same as PA file creation but with certain conventions.
• Refine the PA# file. This calculates and sets the space point potentials for each electrode independently--i.e. generates the PA1, PA2, etc. files.
• Fast adjust the PA# file. This creates the PA0 file in memory from a linear combination of the PA1, PA2, etc. files). The file is not saved automatically (see below Save step).
• Save the PA0 file to disk.
• Add the PA0 to a Workbench (View).

Magnetic PAs. PA and PA# files can represent either electrostatic potentials or magnetic scalar potentials (this is configured in Modify). There are some limitations when using magnetic potentials (see p. 2-10, e.g. magnetic vector potential is not supported).

PRG Programs. A SIMION PRG program is associated with exactly one PA or PA0 instance (Appendix I). Generally, SIMION automatically associates a PRG program with a PA or PA0 instance if both files exist in the same directory and have the same base name (e.g. HELLO.PRG and HELLO.PA). PRG program provides a lot of flexibility in extending or modifying the standard behavior of SIMION. For example, you can oscillate electrode potentials during ion flight, adjust or override the electrostatic and magnetic field vectors observed on ions (e.g. fields defined analytically or drag/collision effects), jump ions, and more. In fact, you may create an empty PA file (with no potentials) and rather define the electrostatic of magnetic field vectors directly and analytically in the associated PRG program.

For further details, see these sections of the SIMION 7.0 manual:

• 2 - SIMION Basics
• 5 - Defining and Editing Array Geometry
• 6 - Refining and Fast Adjusting Arrays

[1] PA0 files have a few extra bytes appended, which for most purposes can be ignored.

Any comments on this web page? (will be sent to SIS SIMION Support)