This package implements a simulation of an ion funnel using SIMION for the Spinlab EDM3 project. More documentation will be added.
There are two main components in this package: the dualfunnel workbench script and the funnel batch script.
Ion funnels are used to selectively focus and collect ions from viscous-flow regions and transmit them to vacuum regions.
The particular ion funnel modeled here has 102 electrodes, of which the first 101 have RF voltages applied and the 102nd electrode is DC-only. It is 102 mm long with an intake inner diameter of 26 mm and an exhaust inner diameter of 2.5 mm. The electrodes are spaced 1 mm apart center-to-center.
The potential arrays can be generated using SIMION -- opening dualfunnel.iob, which is the main workbench, should prompt to generate and refine the PAs. However, as of the present time the default instance that SIMION will generate has incorrect scale, so one needs to go to the modify menu and set the x scale to 0.1 mm/gu and the y and z scales to 0.25 mm/gu. Has has been fixed, however, the fix has broken compatibility with SIMION versions 8.1 and older (the last releases of SIMION 8.1 might work, but I can't guarantee this).
The dualfunnel script is a SIMION lua workbench user program meant to be used with the provided dualfunnel.iob workbench.
SIMION user programs take parameters through "adjustable variables", which can be set using the gui or via the command line (when in batch mode).
The following variables must be set before flying ions:
- _frequency_hz: Ion funnel frequency in Hz (warning: the time step should be much less than the RF period). Default 2 MHz.
- phase_angle_deg: the RF phase at the start of flight in degrees. Default 0deg.
- _RF_amplitude: the RF amplitude in volts (peak-to-ground). Default 500V.
- _DC_offset_1: DC offset applied to electrode 1 in volts. Default 500V.
- _DC_offset_102: DC offset applied to electrode 102 in volts. Default 347V.
- _pressure_pa: the pressure of the background gas in pascals. Default is 133.28 Pa (= 1 Torr).
The following variables can be adjusted during flights
- _temperature_k: temperature of background gas (K), default 273.0K
- _sigma_m2: collision cross section of background gass (m^2), default 2.27E-18
- _gas_mass_amu: Mass of the background gas
- _mark_collisions: should collisions be marked (0=false, 1=true), (default 0)
- pe_update_each_usec: period of PE display update (usec, default 0.05)
The funnel batch script can be used to fly ions through the funnel a
configurable number of times with varying m/z ratios. This will eventually be
used to find the ion funnel's transfer function at various parameter values.
The funnel batch script can either be run from SIMION's "run lua program" or
directly from the command line. The later option is recommended because
SIMION's run lua program button does not allow command line arguments to be
specified. To run the script from the command line, call the simion executable
with with "lua" as its first non-option argument, then put the script path and
then the arguments to the script, as in:
\\path\\to\\simion.exe lua funnel_batch.lua <args_here>
Argument list:
- mz_min: the minimum m/z ratio to simulate
- mz_max: the maximum m/z ratio to simulate
- mz_num: the number of different m/z ratios to simulate
- n_ions: the number of ions to fly for each m/z ratio