addPtclComponentKEeV.py

This analyzer creates a column which provides the particle energies (based on the magnitude of particle velocities) in eV. This column allows energetic particles to be differentiated within the simulation. One may also bin and average these quantities using the binning view in the visualize pane. This provides access to the plasma electron temperature, which in turn is important for assessing the mesh size against the Debye length.

If outputSpeciesName is not given, then the column of data is appended to the named species data set file with the names _KEeV, _KEeVx, _KEeVy, or _KEeVz depending on which component(s) are specified. If columns of these names already exist, then the script will print a message and do nothing.

Ultrarelativistic calculations of Particle Kinetic Energy in eV

If one of the KEeVx, KEeVy, or KEeVz component options is invoked, the analyzer performs a simplified calculation of the kinetic energy, in eV, assuming ultrarelativistic motion in the corresponding direction. Because of the assumptions available, these may be faster than the default KEeV option.

-s <simname>, --simulationName=<simname>

(string, required)

<simname> is the name of the simulation to be analyzed. The file extension should NOT be included in this text field.

-S <spname>, --speciesName=<spname>

(string, required)

<spname> is the name of the species to be subselected, to append the longitudinal or component energy in eV.

-A <A>, --addRemoveFlag=<A>

(string, required, default = add)

<A> one of [add, remove].

  • If add, the component specified in the component argument will be appended to the species dataset. If the specified component already exists in an H5 file, the add operation will be ignored (on that file only, every file is checked individually).
  • If remove, the last component of the species dataset will be removed, provided the last component is one of KEeV, KEeVx, KEeVy, or KEeVz. If no eV component exists in an H5 file, the remove operation will be ignored (on that file only, every file is checked individually).
-m, --magnitude

(boolean, required, default = 1)

Determines whether to output energy, KEeV: 1 for yes, 0 for no.

-x, --outputXcomponent

(boolean, required, default = 0)

Determines whether to output KEeVx: 1 for yes, 0 for no.

-y, --outputYcomponent

(boolean, required, default = 0)

Determines whether to output KEeVy: 1 for yes, 0 for no.

-z, --outputZcomponent

(boolean, required, default = 0)

Determines whether to output KEeVz: 1 for yes, 0 for no.

-o <outspname>, --outputSpeciesName=<outspname>

(string, optional)

<outspname> is the name of the species to write. Will construct filename from this species name, otherwise will use same file.

-w, --overwrite

(flag)

Whether a dataset or group should be overwritten if it already exists.

Output

This analysis script, by default, overwrites your existing species data with a file containing the additional column of energy in eV.

Alternately, if the addRemoveFlag is set to remove, it will remove the last component of the dataset if that component is one of KEeV, KEeVx, KEeVy, or KEeVz.

If you are running this analyzer from the UI, and the output dataset file already exists, then it will be overwritten each time the analyzer is run, unless you uncheck the Overwrite Existing Files box near the bottom of the Analysis Results pane.

If you are running the analyzer from the command line, the dataset will not be overwritten unless the -w, or --overwrite flag is specified on the command line.

The results of your analyzer may not be written into the output file if you have not specified the overwrite option to be True.