TWIMSSim
Simulates the trajectories of charged particles in a Traveling Wave Ion Mobility Spectrometry (TWIMS) Device, including background gas interaction, ion chemistry and space charge. A Traveling Wave IMS consists of a gas filled RF-only ion guide onto which a repeating waveform pattern is applied, resulting in a sequence of continuously propagating potential waves. Ions within the device can either be swept along by the wave, which is referred to as surfing, or they can be overtaken by the wave in so-called roll-over events. Ions are separated along the drift path due to their different electrical mobilities and their drift times can be measured to acquire a Mobility Spectrum.
The electrode geometry and potentials are defined through SIMION potential arrays. The potential wave is created by the combination of a waveform profile and a set of phase shifts which are applied to the electrode stack in a repeating pattern. This repeating potential pattern is then rapidly switched across the electrodes, leading to traveling potential waves. Ions start uniformly distributed in a configurable start zone. The interaction between background gas and the ions can be described with different collision models. Electric ion-ion interaction (space charge) can be modeled with a parallelized version of a Barnes-Hut tree.
The modeled ions are chemically reactive. The temperature dependent reactions of the individual chemical species are simulated with RS. The reactions are defined in an RS configuration file. To simulate chemically inert ions, an RS configuration without reactions between the species has to be defined.
Simulation configuration description
sim_time_stepsintegerNumber of simulation time steps
dt_sfloatTime step length in seconds
concentrations_write_intervalintegerInterval, in time steps, between the writes of the species concentration .
trajectory_write_intervalintegerInterval, in time steps, between writes to the trajectory result file.
trajectory_write_velocitiesbooleanif
true: Particle velocities are written to the auxiliary data in the trajectory result file.space_charge_factorfloatMultiplication factor for particle-particle interaction (space charge).
reaction_configurationfile pathPath to a RS configuration file, defining the chemical reaction system for the simulation. This file path is interpreted relatively to the simulation run configuration file.
n_particlesvector of integersNumber of particles of the
discretechemical substances defined in the reaction configuration. The order in this vector is the same as the order ofdiscretesubstances defined in the reaction configuration.Example: If the
[SUBSTANCES]block in the reaction configuration is[SUBSTANCES] Cl_1 discrete 19 1 3.57e-4 4.00000000e-10 Cl_2 discrete 37 1 2.76e-4 5.17391304e-10 Cl_3 discrete 55 1 2.35e-4 6.07659574e-10
the
n_ionsvector[100, 50, 10]will initalize the simulation with 100 particles ofCl_1, 50 ofCl_2and 10 ofCl_3.start_box_dimensions_mmVector of floatsx-, y-, and z-dimensions (in mm) of the ion start zone.
start_box_position_mmVector of floatsx-, y-, and z-coordinates (in mm) of the corner of the ion start zone.
simulation_domain_boundariesVector of vector of floatsDefines the outer boundaries of the simulation domain around the coordinate system origin, where ions are terminated. Is defined as vector of three two component vectors, defining the minimum and maximum in the spatial dimensions:
[[x low, x high], [y low, y high], [z low, z high]]
wave_amplitude_VfloatMaximum amplitude (in V) of the traveling wave.
wave_frequency_HzfloatFrequency (in Hz) with which the sampled waveform profile is cycled on the traveling wave segments, proportional to the wave velocity.
phase_shiftVector of floatsPhase shift values applied to the traveling wave fragments. Values are applied in the order they are listed, i.e. the first listed value is applied to segment one, the second to segment 2, and so on. The number of given phase shift values must be identical to the number of wave potential arrays.
waveformfile pathPath to a waveform .csv file containing the sampled waveform profile that is to be applied to the electrodes.
confining_RF_amplitude_VfloatPeak-to-peak amplitude (in V) of the confining voltage meant to reduce radial ion drift.
confining_RF_frequency_HzfloatFrequency (in Hz) of the confining voltage.
background_temperature_KfloatIsotropic temperature of the background gas in K.
Potential Array Configuration
The electrode geometry and potentials of the TWIMS electrode stack are defined through SIMION potential arrays. As TWIMS utilizes two different voltage patterns applied to the ring electrodes, the transient wave pattern and a confining RF-voltage, two sets of potential arrays are required.
The Traveling Wave pattern can be created across a variable number of electrodes that is defined by the number of potential arrays given, i.e. if 8 potential array files are given it is assumed that a single wave pattern encompasses 8 ring electrodes. The confining field is meant to prevent radial ion drift and is created by applying opposing phases of a RF-voltage to two adjacent electrodes, thus two potential arrays are required for the RF-field.
potential_array_scalefloatGeometric scaling factor for the potential arrays specified in
potential_arrays.wave_potential_arraysVector of file pathsPaths to the SIMION potential array files defining the electrode geometry of the stack and the potentials of the transient wave. Typically, SIMION potential arrays generated with the fast adjust option are used for potential definition.
The potential arrays have to have the same geometric extend and are assumed to be normalized. The total potential at a location is calculated by a linear combination of the individual potentials.
The file paths are relative to the simulation run configuration file.
RF_potential_arraysVector of file pathsPaths to the SIMION potential array files defining the electrode geometry of the stack and the potentials of the confining field. These potential arrays have to have the same geometry and electrode placement as the wave potential arrays.
Collision models and background gas interaction
The simulation has different modes to model the interactions between ions and the background gas which are suitable for different background gas pressure ranges.
The collision model mode is controlled by the collision_model parameter:
collision_modelkeyword [SDS,HS,MD,none]Sets the used collision / background gas interaction model:
SDS: Statistical Diffusion Simulation modelHS: Hard Sphere modelMD: Molecular Dynamics modelnone: No background gas interaction (mostly for testing purposes)
background_partial_pressures_PaVector of floatsPartial pressures of the individual components of the background gas mixture in Pascal. Note that with SDS background gas interaction model, only one background gas component is allowed.
collision_gas_masses_amuVector of floatsMolecular masses of the particles of the background gas mixture components in amu. Note that with SDS background gas interaction model, only one background gas component is allowed.
collision_gas_diameters_angstromVector of floatsEffective collision diameters of the particles of the background gas components in Angström. Note that with SDS background gas interaction model, only one background gas component is allowed.