This analyzer script generates particle number density fields based on the particles data files. It works in 1D, 2D, and 3D Cartesian, as well as 2D RZ cylindrical.
The script can optionally perform a spatial average on the resulting data set. The spatial average is weighted and computed over an NxN square kernel. The size of the kernel and number of iterations are specified in the analyzer input. For example, if we set avgNxN to 5, the kernel would be weighted like this:
1 2 4 2 1 2 4 8 4 2 4 8 16 8 4 2 4 8 4 2 1 2 4 2 1
Setting iterateAvg to 2 will perform the averaging twice, for a smoother result.
Spatial averaging can become very slow for kernels much larger than 3, especially if the number of iterations is 2 or more, or if the dimensionality is 3.
-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 for which particle number density is to be calculated.
-N
<avg>
,
--avgNxN
=<avg>
(int, optional, default = 1)
<avg> determines the size of the averaging kernel. Type an odd integer for N, and kernel will be N long in 1D, NxN in 2D, or NxNxN in 3D. Defaults to 1 if no averaging is desired.
-i
<I>
,
--iterateAvg
=<I>
(int, optional, default = 1)
If avgNxN > 1, <I> is the number of iterations of the spatial averaging function. Ignored if avgNxN = 1.
-m
<min>
,
--minDumpNum
=<min>
(int, optional)
<min> is the minimum dump number to process.
-M
<max>
,
--maxDumpNum
=<max>
(int, optional)
<max> is the maximum dump number to process.
-w
,
--overwrite
(flag)
Whether a dataset or group should be overwritten if it already exists.
This analyzer script outputs particle number density data as fields. These density fields can help to analyze the particle distribution results in the simulation domain. The files written will have the .vsh5 file extension and will show up under Scalar Data on the Visualization pane as speciesNameDensity.
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.