Usage

Build executable

  1. Navigate to source/ directory.

  2. Source (execute in the current shell):

    # OpenPMD install directory
    export LD_LIBRARY_PATH=$HOME/openpmd/lib:$LD_LIBRARY_PATH
    export PKG_CONFIG_PATH=$HOME/openpmd/lib/pkgconfig:$PKG_CONFIG_PATH
    # change path to your python MAJOR.MINOR version
    export PYTHONPATH=$HOME/openpmd/lib/python3.13/site-packages:$PYTHONPATH
    
    # HYPRE install directory
    export LD_LIBRARY_PATH="$HOME/hypre/install/lib:${LD_LIBRARY_PATH}"
    
    make clean # optional
    make
    

Create HEXAPIC input file

  1. Navigate to picmi directory.

  2. Modify create_input_file.py according to your simulation needs.

  3. Run:

    python create_input_file.py`
    
    to create input_file.inp.

Run the simulation

  1. Copy the previously created input file into the directory where you want to run the simulation, e.g. test/.

  2. Run the HEXAPIC executable:

    mpiexec --bind-to core -n 4 source/HEXAPIC test/input_file.inp -steps Nsteps
    
    NOTE: If -steps Nsteps is not provided, the simulation will run for 100 steps.

Visualise code output

  1. Install required Python modules: numpy, scipy, pyqtgraph, pyside6, opengl

  2. Run:

    python vis/vis3D-class.py test/input_file.inp.bp4
    
    This will bring up the GUI:

  3. Click on the fields to the left to switch between the physical quantities to visualise.

    GUI field description:

    • n​x : Particle density of specie x in m−3
    • T​x: Temperature of specie x in eV
    • v​x: Velocity of specie x in m/s
    • V : Space potential in V