All data from LTP-PIC is saved into the Output directory which is created in the same directory as the source code.
Following completion of a run with LTP-PIC there are various Python based tools located within the PostProcessing directory which can assist you in visualising and analysing the output data.
To run these tools you must have the following packages installed on your system:
- Python3
- Numpy for Python3
- Matplotlib for Python3
- SciPy for Python3
You can execute these scripts from anywhere on your system, however all output data will be saved in the top directory of the LTP-PIC directory.
Post processing tools for LTP-PIC
Below is a list of the tools and a description of their capabilities. The various parameters which can be set within these tools are well documented within the scripts themselves and we refer the reader there for further details.
Two-Dimensional Plotting Tools
plot2d_grid_scalar.py
This tool allows you to plot 2D filled contour plots of grid based quantities or 1D plots of data averaged in the x or y directions. You are also able to plot time averages of the total data analysed by the script.
Quantities which can be plotted include:
- Species densities
- Charge density
- Surface charge on dielectric surfaces
- Electric potential
- x, y components of the electric field
- x, y, z components of the total current
- x, y, z components of the temperature
- Total temperature
- x, y, z components of the momentum flux
- x, y, z components of the kinetic energy flux
plot2d_grid_vector.py
This tool allows you to plot 2D streamlines of vector quantities overlaid on filled contour plots of their respective magnitudes. You are also able to plot time averages of the total data analysed by the script. Quantities which can be plotted include:
- The electric field vectors
- The total current vectors
plot2d_phase.py
This tool allows you to produce phase space plots of the Phase Diagnostic data. The user must specify the number of the Phase Diagnostic being used and can also choose which quantities are plotted on the X and Y axes respectively including:
- The particle positions in x and y
- The particles velocities in vx, vy and vz
plot2d_vdf.py
This tool allows you to produce velocity distribution plots of the Phase Diagnostic data. The user must specify the number of the Phase Diagnostic being used and can also choose which velocity component to flow, including:
- The particles velocities in vx, vy and vz
Three-Dimensional Plotting Tools
plot3d_grid_scalar.py
This tool allows you to plot 2D filled contour plots of grid based quantities at a given slice within the 3D volume. The user specifies the slice directin (i.e. 'x' will plot values in the y-z plane) and the given position of the slice in that coordinate. You are also able to plot time averages of the total data analysed by the script for the given slice.
Quantities which can be plotted include:
- Species densities
- Charge density Surface charge on dielectric surfaces
- Electric potential
- x, y, z components of the electric field
- x, y, z components of the total current
- x, y, z components of the temperature
- Total temperature
- x, y, z components of the momentum flux
- x, y, z components of the kinetic energy flux
plot3d_phase.py
This tool allows you to produce phase space plots of the Phase Diagnostic data. The user must specify the number of the Phase Diagnostic being used and can also choose which quantities are plotted on the X and Y axes respectively including:
- The particle positions in x, y and z
- The particles velocities in vx, vy and vz
plot3d_vdf.py
This tool allows you to produce velocity distribution plots of the Phase Diagnostic data. The user must specify the number of the Phase Diagnostic being used and can also choose which velocity component to flow, including:
- The particles velocities in vx, vy and vz
Plotting tools for all dimensions
plot_totals.py
Provided the data has been collected during the simulation, this tool plots the total number of particles, total momentum and total energy against time of the whole simulation domain.
plot_probe.py
This tool plots the probe data against time. The user must specify the probe diagnostic number.
LTP-PIC output data structure
Data from LTP-PIC is output such that at each data dump one file is created for each species (when a quantity is species dependent). These are saved into the given directory for the specified quantity in a binary format. For example, for species density the file format is like:
Output/Density/s%01d_%08d.bin
Where s%01d specifies the species number and %08d specifies the time step number.
Total simulation date (i.e. total particles, momentum or energy) as well as probe data is saved as a single *.dat, including timestamp information of each output.
Creating custom post-processing tools
If custom plotting tools are required, we recommend that users hack the available post processing Python scripts which are written to properly format these output files into a single data object for each time step.