Potential Array File Types (Comparison)¶
Potential array files come in a number of different types (.PA#, .PA, .PA0, .PA1, etc.). This document explains what these files are and how they differ.
The primary purpose of potential arrays is to represent the potentials throughout some volume. Fields, being the negative gradient of this potential, can also be derived. Potential arrays also store electrode geometries, particularly the shapes and potentials of electrode and other surfaces which define the boundary conditions for the Laplace equation used to compute the potentials throughout the volume in the first place.
Basic Potential Arrays¶
A basic potential array, which has the file extension .PA, is the simplest type of potential array, and for simpler applications it may be the only type you need. A .PA file is a 2D or 3D rectangular grid–sometimes called a “mesh”–of points in space. Each point in the array defines
- a potential – either an electrostatic potential in Volts or scalar magnetic potential in Mags
- a flag marking the point as an electrode or non-electrode point.
Typically, when you first create a .PA file, you mark some points as electrodes and specify the potentials on those electrode points. The potentials on the non-electrodes points are initially unknown and are assumed unspecified by the user. In this condition, we say that the state of the array is unrefined, meaning that although the boundary conditions for the Laplace equation have been defined, but the potentials in the array at the non-electrode points do not yet satisfy the Laplace equation under those boundary conditions. However, by running the Refine function, SIMION computes and sets the potentials of the non-electrode points, and we then say that the state of the array is refined.
Once a .PA file is refined, you should normally not edit it. If you do edit the electrodes after refining, we say then say that the array is in an unrefined state again because non-electrode potentials remain inconsistent until we re-run the Refine function. There is one change in particular that we can make to a .PA file without re-refining it: we can proportionately scale the potentials of all points in the array by some constant. The linearity of the Laplace equation ensures that the Laplace equation is still satisfied (the array remains refined) after making this transformation.
Fast-Adjust Potential Arrays¶
A fast-adjust base solution array (.PA0 file) is like a .PA file but more flexible. A .PA0 has the same format as a .PA but except that it has some additional data (specifics are in File Format). The main advantage of .PA0 files is that you can quickly and independently (not just proportionately scale) change (i.e. “fast adjust”) the electrode potentials without going through the relatively slow process of re-refining the array.
When you “fast adjust” a .PA0 file, the potentials inside it are recalculated from a specific linear combination of the potentials in the electrode solution arrays (.PA_, .PA1, .PA2, .PA3, etc. files). There is one electrode solution array per independently adjustable electrode. The .PA1 file corresponds to electrode #1, the .PA2 file corresponds to electrode #2, etc. Finally, the .PA_ file, corresponds to electrodes that are not independently fast adjustable, and it doesn’t exist if there are no such electrodes. Electrode solution arrays have the same format as .PA files. Each of the electrode solution arrays has its represented electrode set to 10000V and the other electrodes set to 0V, and the potentials of the non-electrode points satisfy the Laplace equation (i.e. they are in a refined state). The linearity of the Laplace equation allows us to quickly determine solutions from linear combinations of individual electrode solution.
You normally don’t need to look at the “electrode solution” arrays, but it can be instructive to do so. Here is what they look like in View for a simple three-element lens:
The .PA0 file and the corresponding electrode solution arrays are not created by you. Rather, they are created by SIMION when you refine a fast adjust definition potential array (.PA# file). A .PA# has the same format a a .PA file exception that instead of storing potentials on electrode points, you normally instead store electrode index numbers (positive integers) at those points. The actual potentials that those index numbers correspond to are defined later, after refining. Here’s what the .PA# file used to generate previous three-element lens looks like in Modify:
Figure: .PA# file viewed in Modify screen.
Note that the values in the .PA# file are not actual potentials but rather indices (1, 2, 3) to potentials to be defined later during the fast adjust. The .PA0 file contains real potentials.
Unlike a .PA file that may be in an unrefined or refined state, a .PA# is always considered unrefined, and .PA0 file is always considered refined.
Once a .PA0 file is generated, the .PA# file is no longer used except if you want to edit the geometry in the .PA# file and re-refine again.
The typical process of using .PA0 files in SIMION is:
- Create the .PA# file in Modify.
- Refine the .PA# file (generates .PA0, .PA_, .PA1, .PA2, .PA3, etc. files)
- Fast Adjust the .PA0 file.
- Add the .PA0 file to your workbench and fly particles through it.
When you use a .PA0 file, SIMION automatically takes care of superimposing the fields. You don’t ever need to touch the electrode solution arrays.
The main reasons use to a .PA0 file rather than a refined .PA file are
- If electrode voltages need to be changed during a Fly’m (e.g. time dependent voltages like pulses or RF waveforms) or controlled by a user program.
- If electrode voltages need to be quickly changed (e.g. tuning voltages)
Fast-Adjust Potential Arrays with Multiple Proportional Scalable Electrodes¶
For a system containing many electrodes with different voltages, we could choose to represent it with either a .PA or .PA# file. If we use a .PA file, the electrode voltages can only be proportionately scaled but on the up-side it only requires a single array and therefore is very efficient. If we use a .PA# file, we have the added flexibility of independently adjusting all electrode voltages at the expense of generating many electrode solution arrays that potentially take a lot of time to refine and consume a lot of memory. A compromise between these two options is to augment the .PA# file with a .PA+ file. A .PA+ file, which is a regular text file not an array, causes the electrode indices in the corresponding .PA# file to be reinterpreted such that sets of electrodes are grouped (where groups might overlap) and each group is independently proportionately scalable. Each group generates only one electrode solution array. .PA+ files were added in SIMION 8.0.3. A .PA+ file is not needed if you have only one of these groups: .PA# file electrode points that are not low positive integers are automatically interpreted as belonging one such group and are written to a .PA_ electrode solution array file. For further details, see Additional Fast Proportional Scaling Solutions.
Other Uses of Potential Arrays (besides Storing Potential)¶
Generally, a potential array (.PA) represents a scalar field. That is, it represents some number that varies over a 2D or 3D space. Normally, this number is understood by SIMION to be a potential. However, as we saw with .PA# files, which are really just .PA files with a different name and interpretation, there is no hard requirement that this be the case. You could store any other scalar variable in the array (e.g. index numbers, temperature, pressure, the X component of a velocity vector, charge density, etc.) There are libraries in SIMION 8.0 SL Libraries and SIMION 8.1 Lua PA API (simion.pas) for reading and writing potential arrays, so you can use potential arrays for your own purposes. The Poisson Equation solver, for example, uses arrays to represent a charge density distribution in space. The HS1 (SIMION Example: collision_hs1) and SDS (SIMION Example: collision_sds) collisions models allow pressure, temperature, and components of the gas velocity vector to be represented as arrays–either as real SIMION potential arrays or as arrays represented as Lua tables. The field_array (SIMION Example: field_array) example represents x, y, and z components of a field vector in space.