DSMC and PICMC documentation

Andreas Pflug

Michael Siemers

Thomas Melzig

Philipp Schulz

2022-04-20

4 Postprocessing

4.1 Data being generated during simulation runs

Each simulation case requires at least a geometric mesh file and a parameter file (e.g. simcase.par), where the simulation conditions, species, plasma-wall interaction etc. is contained. When the simulation is started, all resulting output data is written into a folder simcase/ which has the same name as the parameter file. The folder is automatically being created if it does not exist.

The output data generated during simulation can be divided into following categories:

Table 4.1: Output data generated during a simulation run
Type of data Resolution File Format Output frequency
Information on gaseous species Cell resolution GMSH *.pos NPLOTS times
Wall absorption and desorption Cell resolution GMSH *.pos NPLOTS times
Wall state Cell resolution GMSH *.pos NPLOTS times
Surface data averaged by mesh elements Mesh resolution GMSH *.pos and ASCII *.txt NPLOTS times
Electromagnetic field data Node resolution GMSH *.pos NPLOTS times
Collision statistics Averaged per segment ASCII *.txt NPLOTS times
Logging of surface data Integrated over physical surface ASCII *.txt NCOUNTS log entries
Logging of potentials Integrated over physical surface ASCII *.txt NCOUNTS log entries
Cell structure and domain decomposition GSMH *.pos and GMSH *.geo Upon startup
Used collision cross sections Postscript or ASCII Upon startup
Profiling data Quad resolution ASCII Upon shutdown
Checkpoint of simulation data Binary and ASCII NDUMPS times and at the end or during shutdown
Dynamic script files ASCII *.rd Upon startup

4.1.1 Information stored in picmc cell structure

Most of the data volume is given as time- and particle averaged values within the cell structure. They are provided as POS files which can be viewed and further processed within GMSH.

These data can comprise information on gaseous species as well as on particle absorption and status of walls. Additionally, some data on particle absorption can be also given in the resolution of the surface mesh.

The time-averaging feature is activated by setting TAVG=1; at top of the parameter file. By setting TAVG=0; momentary snapshots are displayed instead, however in most cases they will be quite noisy or a very large number of particles has to be simulated to get reasonable statistics. Therefore, TAVG=1; is the default setting.

The number of time averages within the whole physical simulation time interval is defined in the variable NPLOTS at top of the parameter file. The selection of output data by species is defined via lists in the upper part of the parameter file.

The following lists for cell-oriented information are available:

  • Information on gaseous species
    • NUMBER = Number of simulation particles per cell
    • DENSITY = Density of simulation particles in physical units [1/m³]
    • PRESSURE = Partial pressure in [Pa]
    • TEMPERATURE = Translational kinetic temperature in [K]
    • ENERGY = Mean particle energy in [eV]
    • VELOCITY = Mean particle velocity in [m/s]. This is a vector plot for three components vx, vy, vz.
  • Information on wall absorption and wall state
    • ABSORPTION = Particle absorption on walls in [1/m²s]
    • DESORPTION = Particle desorption from walls in [1/m²s]
    • COVERAGE = Surface coverage fraction of a wall material (between 0 and 1)
    • DEPOSITION = Deposition rate of a wall material [nm/s]
  • Information on fields
    • FIELD = Quantities concerning electromagnetic field computation

All of these data go into sub folders of the simulation data folder. This behaviour can be suppressed by setting SINGLE_PLOT_FOLDER=1; (which can be found in the bottom part of the parameter file).

The filename structure is <type>_<species>_<time>ms.pos, e.g. the Ti absorption after 50 ms will be stored in a file absorption/absorption_Ti_50.00ms.pos. These files can be opened and further processes in GMSH.

4.1.2 Collision statistics

The list COLLISION enables the plotting of collision statistics on quad resolution for every used cross section defined in the sigma.r file. By putting a species name in that list all reactions involving this species are written in a separate file including the energy threshold to identify the corresponding cross section. The weighted sum of all quads for a specific collision matches the total collision rate written in the collision.txt files present in the same folder.

4.1.3 Surface data allocated in triangular mesh elements

Additionally, with the list MESHDATA particle absorption information is given in the resolution of the surface mesh. The filename for mesh absorption data for Ti after 50 ms will be e.g. meshdata/meshdata_Ti_50.00ms.pos. These data files contain multiple plots:

  • Absorption
  • Desorption
  • Mean energy of absorbed particles
  • Mean angle of incidence \(\alpha\)
  • Mean \(\cos(\alpha)\)

The POSITION list has to be handled with care. If you put a species in there, for all particles of that species the position and energy is plotted. This plot is used normally with a low number of particles, e.g. a high NREAL or individually distributed particles with the Init_Particles block. An example would be the movement of single electrons in the electromagnetic field.

The choice, which data to plot in cell or mesh resolution is done in the 3D data extraction section in the parameter file (see section (sec:par_plots?)). A typical choice setup may look as follows.

# ===================================================== #
# 3D data extraction                                    #
# Examples: NUMBER = ["Ar", "e"]; FIELD = ["PHI", "E"]; #
# ===================================================== #
NUMBER      = [];
DENSITY     = [];
PRESSURE    = ["Ar", "O2", "Ti"];
TEMPERATURE = [];
ENERGY      = [];
VELOCITY    = ["Ar", "O2", "Ti"];
COLLISION   = [];
ABSORPTION  = ["Ti"]; 
DESORPTION  = ["Ti"]; 
MESHDATA    = ["Ti"];
# POSITION plots can get very large, so handle with care!
POSITION    = [];
# "PHI" = electric potential, "PHI_MEAN" = time averaged electric potential, 
# "E" = electric field
# "JICP" = source current density, "EICP" = current induced electric field, 
# "BICP" = current induced magnetic field
FIELD       = [];

# For COVERAGE and DEPOSITION fill in required surface materials:
COVERAGE    = ["TiO2"];
DEPOSITION  = ["Ti_metal", "TiO2"];

With these settings, the pressure and velocity are plotted for three species, Ar, O2 and Ti, respectively. For Ti, additionally the absorption plot in cell resolution and absorption data in mesh resolution are generated. Finally, for wall materials TiO2 and Ti_metal the deposition rate is plotted together with the surface coverage fraction for TiO2.

4.1.4 Magnetic / electric field etc. on node structure

According to the "leap frog" algorithm used for the PIC-MC computation, the electric and magnetic field / potentials are computed per nodes rather than per cell. A cell "node" is one of the corner points of the cell, i.e. a rectangular cell has 8 nodes. The nodes are shared with the neighboring cells.

The file format is GMSH POS. However the node oriented data have one element more in each direction. This may cause issues in postprocessing together with cell oriented data. For an example, in the RIG-VM postprocessing routines (section (sec:ppp_rvm?)), cell oriented and node oriented data shall be processed in separate postprocessing objects.

The choice of electric / magnetic field and potential output can be done within the list FIELD in the parameter file. Possible choices are

  • Capacitively coupled plasma (CCP)
    • "PHI" - Electric potential (momentary snapshot)
    • "PHI_MEAN" - Electric potential, time averaged over the last time averaging period
    • "E" - Electric field as gradient of PHI (momentary snapshot)
  • Inductively coupled plasma (ICP)
    • "JC" - Primary current, i.e. coil surface current density
    • "JE" - Secondary current, i.e. electron current (convection current) in plasma
    • "EC" - Primary current induced electric field
    • "EE" - Secondary current induced electric field
    • "BC" - Magnetic field as curl of EC
    • "BE" - Magnetic field as curl of EE

In the following example, the time averaged electric potential and the electric field are plotted:

FIELD = ["PHI_MEAN", "E"];

4.1.5 Time dependent logging of averaged surface data

4.1.5.1 Particle balance at surfaces

During simulation, particles are absorbed and desorbed from surfaces and/or flowing through transparent membranes. In order to better track the current state of the simulation run, these processes are time averaged over physical surfaces and put into ASCII logfiles. The following log files are automatically created during simulation:

  • absorption_log.txt - Particle absorption on surfaces
  • desorption_log.txt - Particle desorption from surfaces
  • transmission_log.txt - Particle flow through transparent membranes
  • pressure_log.txt - Kinetic pressure due to particle impingement on surfaces

By default, 100 log entries are created per simulation run. This number can be modified with the global variable NCOUNTS in the parameter file, e.g.

NCOUNTS = 1000;

Each of the log files has the physical time in the first column. The other columns contain particle fluxes / pressures according to the headlines given in the file. The choice of columns is performed automatically according to the absorption / desorption mechanisms defined within the wall reactions.

Depending on if the particles are charged/neutral, absorption, desorption and transmission are given in [A] / [sccm]. Both units are proportional to the total number of particles per second:

  • \(1\textrm{ sccm} = 4.47796\times 10^{17}\textrm{ particles/s}\)
  • \(1\textrm{ A} = 1/q = 6.2415\times 10^{18}\textrm{ particles/s} = 13.9382\textrm{ sccm}\)

For the kinetic pressure \(p_{kin}\), the average momentum transfer on surfaces by particle collision is accumulated:

\[ p_{kin} = \frac{1}{A \delta t}\sum_{i} 2 m_i v_{\perp i} \](4.1)

The variables are

  • \(A\) = Total surface area of physical surface
  • \(\delta t\) = Sampling time interval
  • \(m_i\) = mass of ith particle
  • \(v_{\perp i}\) = normal velocity of ith particle

This only works correctly, if the whole area \(A\) of the physical surface is in contact with the gas volume. If there is additional area which is not in contact with the gas, the pressure number in the log file is normalized with respect to the whole area and will therefore be lower than the actual pressure in the gas volume.

For transparent membranes pressure logging currently is omitted because the contribution of the net flow through a membrane has to be handled separately, which is not yet working properly.

4.1.5.2 Potentials of conductive electrodes

The electric potentials for conductive electrodes are being logged into a TXT file potentials_log.txt as a function of time. The time resolution is the same as for the particle-balance related log files such as absorption_log.txt etc. and can be controlled via the NOUNTS parameter. There are the following cases of electrodes:

Table 4.2: Logging data for electrodes with differenty types of electric boundary conditions.
Electrode type What is logged
Dielectric insulating electrodes Since the electric potential on dielectrics is not unique, such surfaces are ignored.
Electrodes with fixed voltage The time-dependent evaluation of the vf parameter is logged.
Single floating electrodes The floating potential is logged.
Double floating electrodes with relative bias The absolute potentials of both electrodes are logged.
RF electrode with self bias Only the self bias is logged.

4.1.6 Visualization of cell structure and domain decomposition

Especially for complex geometries with non trivial domain decomposition, a visualization of cell volumes, cell surfaces and the domain decomposition can be helpful for debugging purposes.

Therefore the following files are regularly created upon each start of a simulation case:

  • domain_decomposition.pos - Visualization of the volume segment structure. In GMSH this can be best viewed when merged together with the MSH file of the geometric model. An example for a domain decomposition plot is given in section (sec:dsmc_example_2?)..
  • cell_volume.pos - Effective cell volume per cell. Cells within solid walls should have zero volume. Cells within the free gas volume should have a volume according to their dimension (length, width, height, \(Vol = L\times W\times H\)). Cells partially intersecting with a solid wall should have a smaller volume depending on the intersection fraction.
  • cell_surfaces.pos - Effective surface of intersecting walls. This should be only non-zero for cells, which are partially intersecting with a wall. For walls which are located exactly between two cells, at least one of both cells should show the effective wall surface.

If e.g. the cell_volumes.pos plot shows non-zero volume, where a solid wall is expected, this gives a hint about possible mistakes in the geometric model such as a missing or doubly selected single surface.

4.1.7 Information on used cross sections

At the beginning of each simulation run, the collision cross sections between the selected species are computed and sent to the PICMC worker tasks as tabulated data. Additionally, a postscript file cs.ps is generated, where each cross section curve is plotted into a graph.

There is the additional option to generate the used cross sections also as ASCII *.txt files. To do so, the following flag has to be set in the parameter file (see section (sec:par_species_cross_sections?)).

SIGMA_DEBUG = 1;

The postscript files can be opened in Linux using the tool gv or okular (KDE desktop environment). Under Windows, ghostscript and gsview are required to open that file.

A selection of cross section sources is given in the section cross sections.

4.1.8 Information on computational load / profiling data

The file profile.txt contains information about the computational load of each quad and can be used for load balancing, i.e. the optimized ditribution of the quads on the available CPUs. The load balancing is done automatically during restart, if the number of quads is higher than the number of requested CPUs. The load itself is measured at the end or during shutdown of each simulation and the number of timecycles used for this measurement can be set with the NTESTCYCLES value in the parameter file.

Additionally to the overall load used for the automatic load balancing, the individual loads for different stages during simulation are measured, this includes: - the collision of particles, - the movement of particles, - the transfer of particles to neighbour quads and - the calculation of the electric field.

This information can for example be used for fine-tuning of the quad arrangement. If the particle transfer takes a significant amount of time then reducing the overall number of quads might be benificial. To get a better insight into the computational load not only by staring at the raw numbers, a small script visualize_load is provided. It is called from the directory where the parameter file is located and has the folder name of the simulation case as only parameter. The result is the file load_visualization.pos which can be viewed with GMSH.

4.1.9 Information required for continuation of a simulation run

If a simulation run is finished or shut down via the touch shutdown command, the following data is created for restart and continuation of the simulation case later:

  • checkpoint/particles_<species>.bin - Coordinates and velocities of all simulation particles
  • checkpoint/averages_<species>.bin - Averaged data (density, mean velocity, mean square velocity) in cell resolution.
  • checkpoint/material_<wall_species>.bin - Averaged data on surface coverage and deposition rate on walls.
  • last_shutdown.def - ASCII file containing the last iteration step number, the last time step, the last voltage amplitudes in case of a plasma simulation as well as the maximum energy encountered for each species. The latter is relevant for optimizing the performance of the collision routine.
  • profile.txt - ASCII file containing the information on the CPU load of each rectangular segment of the simulation volume. Upon restart this information is used for optimizing the load balance of the total CPU load amongst the individual processes. This file can be deleted if the load balancing step shall be omitted.

4.1.10 Dynamic script files

Upon start of a simulation case, a few dynamic script files with file ending *.rd are generated. The contain the following information:

  • boundingbox.rd - The names and detailed information of each volume segment actually used in the simulation run.
  • surfaces.rd - Information on the interconnection and boundary conditions of each volume segment.
  • species.rd - Molecular mass, charge and statistical weighting factor of each gaseous species actually being used in the simulation run.
  • load_balance.rd - Assignment of each volume segment to a CPU process.