About the DMS Monte Carlo Simulator

Description of DMS

In gas the speed of ions in electric field can be estimated with following formula:

vion=k*E
where v is a speed by ion, k is mobility and E is electric field. In low field k is constant but if field strength is increased, k depends on the field strengh. This can be expressed as

vion=k(1+α(E/N))*E
where α(E/N) represents field depencency called α-function and E/N is relation between field and number density expressed in Townsends. α-function can be approximated as

α(E/N)=α2(E/N)24(E/N)4

DMS filter and detector plates

DMS aka Differential Mobility Sensor consists filter and detector. The filter is built from two electrodes separated with a narrow gap. Gas flows between the electrodes and carries ions thorough the filter area. The filter is followed by detector plates which collect ions that survive in the filter.

DMS waveform

To use electrodes as a filter an asymmetric waveform is added between the DMS electrodes. The asymmetric waveform has high and low field sections. During the high field the ions move fast with field depending mobility and during low part with constant k. Ions oscillate between the plates and if the movement is asymmetric, the ions enter to electrons and neutralize. However, if another DC field created by Ucv is applied some ions with zero net oscillation can survive and will be carried via filter and can be measured as a signal IDMS:
IDMS=f(Ucv)

DMS waveform

Monte Carlo simulator

DMS Monte Carlo simulator simulates the movement of ions in DMS filter with physics based formula including a random movement caused by diffusion. The movement of ions is simulated with following formulas:

Zn+1=Zn+EnK(En)Δt+(ldiff,n)z

yn+1=yn+vg(zn)Δt+(ldiff,n)y

tn+1=tn+Δt

En=E(tn)

where z and y are position coordinates of an ion in dms filter, E is a electric field, K(E) is a field dependent mobility, Δt is duration of time step, vg is velocity of the gas, (ldiff,n)z and (ldiff,n)y are components of diffusive displacement.
The movement of ion is simulated until z coordinate exceeds cell height or is less than zero or y coordinate is longer than cell width.

Realization of the MC simulator

Simulator is written with javascript. Simulator uses web worker-technique and actual MC simulator runs in background not hooking the user interface when running. The graphs have been built with chart.js.

Simulator works with the following kind of logic:

ion : {z,y,alive:true|false}
ionCount : {ucv,survived}
for each Ucv
ranomize z positions for ions, set y=0
while any ion alive
E = function(t,Usv waveform,geometry)
K = function(E,alfaparameters) z(n+1)=z(n)+K*E*delta_t+random_diffusion_length
if 0 < z(n+1) < cell height then
v_gas = function(z(n),cell dimensions)
y(n+1)=y(n)+v_gas*delta_t
if y(n+1) < cell_length
t=t+delta_t
else
ion.alive=false
ionCount.survived++
else
ion.alive=false
end
end
return ionCount

Waveform

Waveform is defined by duty cycle, frequency and Usv. The waveform is generated to have zero integral. The waveform is updated if any parameter is changed.

Simulation time, Time step Δt and other things

Simulation time depends on how long ions survive in the DMS channel. Simulation time gets longer if ions survive well. Flow, geometry, field and mobility parameters have impact to survivability and thus to simulation time.
Time step Δt should be around 0.1% of pulse period for sensible results. Too short Δt may produce inaccurate results. However, short Δt means long simulation time. ΔUCV has impact to simulation time too.

Saving results

Simulation results are saved in JSON format to the file provided in "Result file" input field.

Saving and reading DMS parameters

DMS parameters are saved in JSON format to the file provided in "Parameter file" input field. The values of data can be edited with text editor. However, the structure must not be changed.

Known issues, comments and ideas

  • So far simulator has been tested with Chrome, Firefox, Chrome (mobile) and Edge, IE, and iPad seems not to work
  • Number of ions must be high enough (>500) for sensible results
  • Parameters are stored to cookie but not yet read from
  • Needed: Dropdown menus for some parameters (k0 & alfas, waveforms)
  • Needed: Report Ucv0 and FWHM after simulation
  • This is almost a first version. Bugs are possible, fixes will follow some day.