by David J. Manura, (c) Scientific Instrument Services, Inc. 2004
Introduction
This article answers the following questions:
- How do I use the demo version of SIMION 7.0?
- Could you provide an overview of using SIMION's capabilities?
This article is written in the form of a tutorial. Unlike the printed manual, this article is not intended to to provide a full explanation; rather, this article aims to give the reader a quick general idea of what SIMION is about. If you'd rather learn about theory, see Chapter 2: SIMION Basics of the printed manual.
Installing the Demo
For a hands-on introduction to SIMION, you may install the SIMION 7.0 demo software and follow along in this tutorial. Alternately, you may wish to just read along, and you won't miss too much since ample screenshots are provided.
The demo version behaves very close to the full version of SIMION except that certain important functions are disabled (refining potential arrays and reflying ions). In practice this means that you can view the prebuilt examples and even create your own projects, but you can't simulate your own projects (which is likely what you eventually want to do). The demo version also does not come with the full printed manual, which explains much of what you need to know to effectively use SIMION.
Installation steps:
- To install the demo, download the following file (sim7demo.exe) to a temporary location on your hard disk.
- Run this sim7demo.exe program. Unless another location is specified, this will extract the SIMION program files into a directory c:\_sim7demo on your hard disk. (To later uninstall the demo, just delete this directory).
Startup
Now that the demo is installed, lets start up the demo program.
When the welcome dialog box appears, click "Return" to close it.
The Main Menu
On startup, the above Main Menu is displayed from which you can reach all SIMION functionality.
The typical steps one goes through when creating a SIMION simulation is as follows:
- Create one or more potential arrays via the "New", "Modify" and "Save" functions. In SIMION, a "potential array" is a 2D or 3D matrix of points that defines your electrode geometries and potentials within a volume of space. It is like a bitmap image for potentials rather than for light intensities.
- Given the potentials on the electrodes in each potential array, calculate the potentials on space points on each potential array with the "Refine" function. (This applies the Laplace equation.)
- Optionally, make final adjustments of the potentials on each electrode with the "Fast" function. This function can be performed even after "Refine," and even during the simulation, due to the Law of Superposition. This saves computation time.
- Use the "View" function to create a workspace, place one or more instances of refined potential arrays on workspace, and fly ions.
In this demo version, the "Refine" function and the ion flight ability is disabled. All examples distributed with the demo come pre-refined and pre-flown so that you can at least see what the output looks like.
One initial point of guidence is worth stressing. If you a question on any button or graphical control in SIMION, hover your mouse button over it and press F1. This will display on-line help.
Einzel example
Now, lets look at our first example, the Einzel lens. All the initial steps of creating the potential arrays, refining the arrays, and setting up the workbench have been done for you, so all you need to do is load it up and view it.
To do so, click the "View" button to load an existing SIMION Ion Optics Workbench ("IOB") file. "IOB file?" you say. In SIMION, each project is stored in its own directory and consists of multiple files. The "IOB" file is the file that links all these files together.
This is SIMION's GUI file manager from which you can select the Einzel workbench file (Einzel.iob). Hover your mouse cursor over the "Einzel.iob" button and press both the left and right mouse buttons simultaneously.
NOTE: By default this demo maps a virtual drive "N:" to your SIMION program directory ("c:\_sim7demo"), and the drive "N:" is initially opened. If for some reason the drive mapping failed, you would have had to navigate to the "c:\_sim7demo" directory and before selecting "Einzel.iob").
When loading the IOB file, you may be presented with a number of questions on how the file should be loaded. Since we're just starting out with SIMION, is sufficient to blindly click "Yes" or "Return" for all of these.
The above shows what Einzel lens simulation results looks like loaded. It doesn't currently look like much, but the this is an X-Y cross sectional view of a three-electrode cylindrical lens with ion paths (blue) shown flying axial through it.
To see this better, click the "3D Iso" button. This shows a 3D "isometric" view of the system.
This looks slightly better. Let's increase the display quality by right-clicking five times on the yellow box below the "3D Iso" button. This increases the display quality from 3 to 8. (Left clicking lowers this value.)
It's a little small. Let's zoom in. Make a "box selection" around the area to zoom in on by holding the left mouse button on one corner of your zoom area, dragging the mouse to the second corner of your zoom area, and releasing your left mouse button as such:
To zoom in on this selection box, now press your right mouse button.
What we might like to know now is what the potentials are on each of the three rings. To do, so we need to press the "PE View" tab. This is currently grayed out because you must first select the "XY", "ZY", or "XY" orientation. So, let's press the "XY" button and then press "PE View". Below is the result (after again performing the "zoom" procedure mentioned above to make things bigger).
This demonstrates one of the main design goals of SIMION. SIMION aims to develop intuition and promote understanding. This potential energy map shows that the middle electrode has a higher electrostatic potential than the two outer electrodes. The "saddle"-like potential surface indicates why incomming electrons (upper-right) on parallel trajectories are pushed toward a focal point after flying through the lens. The PE view makes electrons appear to behave like balls rolling up and down a hill (a very familiar concept).
But what are the exact potentials on each electrode? To find out, click the "PA" tab and then click "Fadj" (fast adjust).
The voltages on the three electrodes are displayed and point to their respective electrodes on a cross-sectional view. This screen even allows you to adjust the voltages on these electrodes. For example, in first box (labeled "1"), hover your mouse to the left of the first zero digit and press the "5" key. The GUI may take some time getting used to (and the printed manual comes with a whole appendix on it), but it does offer some conveniences. For example, you can nudge a number up or down by respectively pressing the right or left mouse button on a digit.
Then press "Fast Adjust PA" to activate this.
Notice that the first electrode in the potential energy map has moved higher as expected. In the non-demo version you would typically now press the "Fly'm" button to instantly refly the ions under this new potential energy condition to see how this affect the ion paths. However, this button is grayed-out in the demo version.
More Viewing
Another useful feature in SIMION is to be able to see inside a geometry. First, let's get back to the 3D isomeric view (press the "WB View" tab, press "3D Iso", and then zoom in on an area):
We might like to see what the ions are doing behind the front surface. SIMION makes it easy to remove a part of the surface for display. First, we need to select parts of the surface to peal-off. Press the "YZ" button to display a Z-Y cross-sectional view. Then make a box selection as shown around the part you want to keep (lower-right surfaces):
Now press the "+Z3D" button to zoom in and discard all surfaces outside of this area of the cross-section. To view the result, press the "3D Iso" button (and then perform a normal zoom to make things bigger).
We can now easily see the ion flight path within the cylindrical rings.
Contours
Now let's draw some contour maps of the electrostatic field. First, press the "WB View" tab and then "XY" to get back to the normal X-Y cross-sectional view. Also zoom in. This gives us a nice view to draw contours on:
Now press the "Contur" tab, and in the green box to the right of "Auto" press the right mouse button until it displays "10" for 10 contour lines. Then press "Auto" to automatically draw contours.
All points on a contour line have the same potential. You can observe this by hovering your mouse over multiple points, in which case the corresponding X-Y positions, potential, and potential gradient are displayed on the top green bar.
Instead of potential contours, you might instead want to display contours on the gradient (derivative-like) of potential. Do so, press "Reset", "Yes", and "Potential" (this causes the button text to change to "Gradients"). Then click on a point on the graphic to calculate the contour at and press "Use". Do this multiple times for each contour line you desire.
Defining ion flights
So how are the initial ion positions and trajectories defined? We saw a series of ions entering the lens at parallel trajectories. How was this defined? To see, press the "Normal" tab and then press "Def". This shows initial ion trajectory definitions:
In this example, there are two groups of ions, only the first of which is displayed above ("Trajectory Group 1( 2)"). This first group contains six ions starting at position (x,y,z)=(-99.9990,0,0) and each incremented in series by 1 grid unit in the y direction. All have an azimuth angle and elevation angle of 0 degrees and an initial kinetic energy of 2E+2 eV. This is a fairly straightforward example.
Instead of defining ions in groups as above, you can also define each ion individually with the "Define Ions Individually" tab. This is useful, for example, if the initial trajectories for many ions do not follow a a linear series or if the ion trajectories are defined in some external ASCII text file.
Another useful feature here consists of the the "Record" and "Define" buttons. When "Record" is enabled, various statistics are recorded (to the screen or to an external text file) when ions are flying. You'd often use this when you care more than just having pretty pictures but want to know, for example, the exact positions and energies of ions at various points in time. To see the types of data you can record, press the "Define" button.
Just as a few examples, the "What Data Elements to Record" shows that you can record the kinetic energy, velocities, accelerations, observed fields, and mass/charge of each of your ions during flight. The "When to Record These Data Elements" allows you to specify when the above stats are recorded. You might want to record these statistics only when an ion is created, an ion dies ("splats" against an electrode), or crosses a certain X, Y, or Z plane. This data is recorded in a format you specify (the "Delimited" format is useful if you wish to export data to Excel). Since the demo version doesn't allow you to refly ions, these options can't be tested much. If you want to know what something does, though, just press the F1 key when hovering over any button.
Flying ions as dots
Instead of viewing ion trajectories as static lines, you can view then as moving dots. To do so, let's first get back to the X-Y cross-sectional view by pressing the "WB View" tab and then "XY". Now press the "Dots" button. As seen, ions will display moving though the lens. This is example is somewhat boring, but think of what could be shown in an ion trap.
Summary of the "View" Function
Let's summarize everything so far by describing what the main parts of the "View" function do. The "Normal" tab displays various options for customizing how ion paths are calculated and displayed. The "PAs" and "WrkBnch" tabs (which we haven't yet used much) control how potential array instances are positioned in your work area. This is useful in more complicated examples consisting of multiple potential arrays that need to be positioned relative to each other (e.g. a source, a magnet, and a detector). (Yes, SIMION can simulate combined electrostatic and magnetic fields, something that this example does not demonstrate.) The "Contour" tab draws field contours. The "WB View" tab displays geometric views of your system, while the "PE View" tab display potential energy views of your system. The "Fly'm" button (grayed out in the demo) reflies ions.
The Modify function
We've looked fairly extensively at how the "View" function is used to view the results of a SIMION simulation. The question we now turn to is how to define electrode geometries with the "Modify" function. This is a large subject in its own right (Chapter 5 and Appendix J of the printed manual discuss this in detail). Here however, we'll look at how the Einzel lens geometry was defined and then look at a slightly more complicated example just to provide the reader a general idea of how electrode geometries are defined in SIMION.
Lets first exist out of the "View" function in the Einzel lens example. Press the "Quit" button and then press "Yes".
We're now back into the Main Menu. The Einzel example is still loaded, however, and notice that "Einzel.pa0" displays the right side of the screen.
"Einzel.pa0" is the name of your refined potential array. It contains the potentials of each electrode point and (because it's refined) the potentials of the non-electrode points solved via the Laplace equation (via the "Refine" function). Notice also that "Einzel.pa0" is selected. To modify the selected potential array, click the "Modify" button. (Sidenote: If you were really going to modify this geometry, you would have loaded the unrefined "Einzel.pa#" file so that your changes would be preserved after subsequently refining, but we'll ignore this point for now.)
Notice that this shows a 2-D grid. Black points are electrodes. White points are non-electrodes. By hovering the mouse over an electrode, the voltage on that point will display.
Notice also that "Cylind" is selected. This indicates that your electrode geometry is generated by rotating the displayed bitmap pattern according to cylindrical symmetry around the x axis. This forms the three-concentric cylinders you saw before in the "View" function. The example could have instead defined the geometry as a full 3-D array of pixels with no symmetry. However, when subsequently refining your potential array, it is computationally simpler (and more precise) to take advantage of the symmetry in your system.
The various buttons on the left allow you to draw lines, hyperbolas, boxes, and circles. These shapes can be 3D or 2D. 2D shapes can be rotated to generate 3D volumes of rotation via the "RotCpy" button.
In case of 3D geometries, you can view various cross-sections using the XY, ZY, and ZY buttons or view a 3D isometric view with the XYZ button. When in a 2D cross-sectional view, you can scroll through each corss-sectional layer by scrolling value in the blue "Z=" box near the upper left of the screen using your right and left mouse buttons.
Geometry files
As mentioned above, one way to draw geometries is to use the GUI editor features in the Modify function. The second major way of creating geometries, and the one often used for more complex examples due to its greater flexibility, is what SIMION calls "geometry files." Let's look at one example created from a geometry file:
This potential array consists of three parts. On the left, there is a plate with a hole in the center. In the middle is a dynode consisting of three sides of a box. On the right is a detector. Although hidden in this view, the detector consists of two concentric solid cylinders stacked together. The front cylinder (near the plate and which forms the detective surface) has a cone shape cut out of it. The back cylinder is held at ground potential.
Here is the geometry file that fully generates the above geometry. This geometry file is based on an example distributed with SIMION but modified slightly for clarity.
; DETECT.GEM -- SIMION Geometry for creating a simple detector
; with dynode as fast adjust potential array.
; define array sizes
pa_define(101,71,71,planar,non_mirror)
; center in 3d array 10 back in x
locate(10,35,35)
{
; create entrance plane electrode (0V)
e(0)
{
fill{
; create plane
within{centered_box(0,0,2,70)}
; cut hole in entrance plane
notin{locate(,,,,-90){circle(0,0,5)}}
}
}
; create dynode electrode (#1)
e(1)
{
locate(5,-8) ;offset location for dynode
{ ;+5 in x and -8 in y
fill{
; create bottom plate of dynode
within{box3d(0,0,-10,40,1,10)}
; create back plate of dynode
within{box3d(0,0,-10,40,10,-9)}
; create front plate of dynode
within{box3d(0,0,9,40,10,10)}
}
}
}
; create detector electrode (#2)
e(2)
{
locate(20) ; shift detector aiming location +20 in x
{
locate(,,,,,30) ; elevate 30 degrees (revolve detector)
{
locate(20) ; shift detector +20 from point of rotation
{
; create front half of detector as a cylinder minus cone
; (by rotating a quadrilateral)
rotate_fill()
{
; create rectangle
within{box(0,0,15,10)}
; cut off one edge
notin{polyline(0,0 12,0 0,8)}
}
; create back half of detector as a cylinder (0V)
e(0)
{
; by rotating a box
rotate_fill()
{
within{box(16,0,35,10)}
}
}
}
}
}
}
}
This may look like a lot, but but consider: The way geometry files are structured largely reflects the steps one might take to machine the part. How might you machine the above part?
- To create the entrance electrode, first create a plate. Then cut a hole in the plate.
- To create the dynode, obtain three plates and place these together at 90 degree angles.
- To create the detector, create the two halves. The front half if constructed by drawing a rectangle, chopping an edge off of the rectangle to form a trapezoid, and then generating the volume of revolution from that trapezoid. The back half is constructed by generating the volume of revolution of a simple rectangle.
The rest is in the details of the exact positioning and dimensions.
Let's examine what the main parts of the geometry file mean. Geometry files are organized hierarchically, with sections encloses in pairs of braces { }. (If you've ever used a programming language like C, then this is the same concept). Comment lines begin with a semicolon (;) and are ignored. The e(0), e(1), and e(2) define the three main electrodes with their electrode number or voltage inside the parenthesis. The stuff inside the braces under each of these respectively defines how each of these electrodes is constructed. Primitives like "box3d", "box", and "polyline" actually draw something. These are enclosed within "within" or "notin" statements to respectively either add material within the enclosed volume shape or to subtract (cut) that material. The various "locate" statements define positional frames of reference (angles and positions relative to where you add or cut out material) and can be stacked on top of each other.
Additional examples
Now that you've taken a tour through SIMION, you may want to check out some additional examples. Additional pre-run examples are bundled with the SIMION demo under various subdirectories of SIMION.
To explore an example, the basic steps are
- Return to the SIMION Main Menu.
- Select "Remove All Arrays from RAM" to remove any current example from memory.
- Click "View" to load the workbench (IOB) file of one of the examples.
- Select one of the example directories (e.g. "BUNCHER", "DRAG", "MAGNET", ...) and then hover your mouse over one of the contained IOB files (e.g. BUNCHER.IOB) and press both mouse buttons simultaneously. Answer "Yes" or "Return" to any questions that might come up.
- Explore!
If you prefer not to use the fully hands-on approach, screenshots and descriptions of a number of the demos that comes with SIMION are given here: Screenshots.
User Programming
Before we go, one powerful feature of SIMION that deserves mentioning is user programs. User programs allow you to add custom logic to the SIMION simulation. For example, you can oscillate the voltages on electrodes (as in a quadrupole or ion trap), apply viscosity effects to ions (as in the "DRAG" example), respond to events, perform custom calculations, or initialize ion trajectories according to custom logic. A number of the SIMION examples utiltize user programs (PRG files) attached to potential arrays. Since PRG code is fairly low-level, SIS also offers a SIMION add-on package called the SL Compiler and Toolkit that allows you to write user programs in an easier to use high-level language.
Additional examples
The following additional examples can be tested in the demo version of SIMION. Many of these are now packaged with the demo given in the above download.
-
Buncher
An example of having user programs model an ion buncher. The problem is to slow a packet of ions so that they converge in time. The trick is to have them decelerate in a linear field and then (when they are in the middle of it) chop the field to zero. Thus the leading ions will be going slower than the trailing ions and they will bunch together at some point down stream. -
Drag
These files provide a simple example of applying STOKES' LAW VISCOSITY to ion motions via a accel_adjust user program. A simple three element fast adjust lens is provided for demonstration. -
Magnet
These files provide examples of modeling magnetic effects:mag90.iob------Demonstrates z focusing effects of offset beam entry
magnet1.iob------Demonstrates combined electrostatic and magnetic focusing effects on ions of opposite charge.
-
Random
These files provide an example of having user programs create random ions. A simple initialize program segment is used to randomize the energy and directions of all ions flown. -
RF demo
These files provide simple examples of RF devices with various user programming approaches:fac.iob------simulates a SIMION 4.0 .FAC program with an efield_adjust seg
area.iob------simulates a SIMION 4.0 .AR? program with an efield_adjust seg
elect.iob------simulates a SIMION 4.0 .ELE program with a fast_adjust seg
These should serve as simple examples of how things work and some of your options.
-
SIMS
These files provide an example of multiple pas being used to simulate a series of optics. In this case two electrostatic mirrors are used to focus ions from a sims target into a device like a quad. The function of these mirrors is to provide chromatic correction of the wide range of ion energies so that a reasonable focus can be obtained. -
Trap
These files provide an example of having user programs model an ion trap. There are three demos - each with its own user program file and fly files. See screenshots.group.prg-----user program to demonstrate motions of groups of ions in the trap - ions form patterns and shells due to charge repulsion and gas cooling (simulated by Stoke's law)
inject.prg-----user program to demonstrate injection of ions external to the trap and the effects of collision gas (simulated by mean free path collisional cooling)
tickle.prg-----user program to demonstrate ejection of ions using resonant end cap voltage techniques. Includes the effects of collision gas (simulated by mean free path collisional cooling)
-
Tune
These files provide an example of having user programs tune a lens. It serves as a moderately complex control problem and should be studied for tricks of the trade. See screenshots. - ICR cell (7 MB) These files provide an relatively complete example of having user programs model an ICR Cell. This demo creates 20 random ions to the left of the icr cell. These ions enter the cell and are decelerated by a buncher type field. When they are around the middle of the trap the RF sweep starts (ions turn red). After The rf sweep finished the ions turn green and the encaps are set to trap the ions. The PE Surface Views of the Z =0 plane can be used to view the various voltage forcing functions (PE surfaces are updated). See screenshots
Further reading
For further information on SIMION, see the Documentation and References section of the SIMION web site.
How did you like this article? Let us know:
