Particle Postprocessing

Particle postprocessing utility:

A separate executable for performing basic reduction of Vorpal particle data in parallel.

The VSim distribution includes separate executables, ptclPostproc for parallel execution and ptclPostprocser for serial execution, that can perform basic reductions of particle data. These executables process input files consisting of attributes and attribute blocks, similar to Vorpal input files. The Species block specifies a data file to reduce. Possible reductions include downselection (specified in a ParticleSelector block) and histogramming (with a ParticleHistogram block).

Particle postprocessing input parameters

runName (string)

Specifies the name of the run to postprocess. This is the beginning of the data file names, up to, and excluding, the underscore before the data set name.

The input file can also contain the following blocks:
  • Species

  • ParticleSelector

  • ParticleHistogram

When the postprocessing utility is run, the executable will read each dump of each species that appears in at least one postprocessing (ParticleSelector or ParticleHistogram) block. It will perform the requested postprocessing for each of those blocks. In parallel, the particle data will be divided evenly across the processes, and the results of the processing combined once all processes have completed their analysis. The executable will write a dump file for each postprocessing block for each dump of the associated species.

Species block

The Species block sets parameters for a particle species to postprocess. The name of the block must be set to the name of the species data set.

weightIndex (integer)

For a weighted species, the index in the data set of the particle weight (with indices starting at 0). This can be omitted for an unweighted species.

ParticleSelector block

The ParticleSelector selects particles from the data set for which a specified variable is in a given interval, and writes the selected particles to the postprocessed output file.

species (string)

The name of the species to postprocess.

element (integer)

The data element (with indices starting at 0) on which to base the selection.

interval (float vector)

A 2-element vector giving the minimum and maximum of the interval in which to select particles.

ParticleHistogram block

The ParticleHistogram bins the specified variables of the particle data into a one- or two-dimensional histogram with the given number of bins. This procedure only works with weighted species.

species (string)

The name of the species to postprocess.

axes (integer vector)

The data element(s) (with indices starting at 0) of the particle species to bin. The dimension of the histogram will be equal to the number of elements specified in the vector.

numBins (integer vector)

The number of bins in each dimension of the histogram. The length of this vector parameter must be the same as that of the axes vector.

Example postprocessing input file

# The name of the original run.  In this example, it is a 3D run.
runName = lpa

# The number of dimensions in lpa is 2, so we set a variable for the number of dimensions accordingly.
$NDIM = 2

# The species to read from, which is tagged and weighted
<Species plasmaElectrons>
  weightIndex = NDIM + 4
</Species>

# A selector for particles with relativistic longitudinal velocity
# above 3e7 m/s
<ParticleSelector uxSelector>
  species = plasmaElectrons
  element = NDIM
  interval = [3.0e7  1.0e20]
</ParticleSelector>

# A 1D histogram of relativistic longitudinal velocity
<ParticleHistogram momentum>
  species = plasmaElectrons
  axes = [NDIM]
  numBins = [100]
</ParticleHistogram>

# A 2D histogram of longitudinal phase space
<ParticleHistogram phaseSpace>
  species = plasmaElectrons
  axes = [0 NDIM]
  numBins = [300 300]
</ParticleHistogram>

Command-line options

-i

The name of the preprocessed input file.

-d

The location of the original data to reduce.