A particle-in-cell simulator for spark simulations ("iskra" is the Polish word for spark).
Author bchaber
2 Stars
Updated Last
1 Year Ago
Started In
August 2019

iskra DOI

A particle-in-cell simulator for spark simulations ("iskra" is the Polish word for spark).


The code started as a loosely based version of Lubos Brieda's MATLAB code ES-PIC ( Right now it supports 1D (X) and 2D (XY) electrostatic simulations of plasma (2D simulations in cylindrical coordinate system will apear soon). Another source of inspiration also comes from Lubos Brieda ( It helped implement DSMC and MCC in iskra.


In this code we try to keep a few separate modules: for the field solver, the grid, particle-in-cell algorithm and circuit simulations.

The circuit is coupled using surface charge density on the electrode' surface. For now, only RLC circuit can be connected between one of the electrode and the ground of the system. Charges hitting electrodes can be absorbed or reflected. The absorbed charge is accumulated and can interact with the circuit elements.

Iskra tries to keep working with diagnostics (particles' positions and other parameters, field distributions, etc.) as simple as possible. The computational code makes different quantities of interest available for saving them by the user. Currently, the diagnostics data are stored according to OpenPMD standard ( in HDF5 files. They cannot be interpreted out of the box using openpmd-viewer (due to the way HDF5.jl stores strings). You have to remove .decode() here and there from openpmd-viewer Python files...


To run this code few dependencies have to be installed in Julia (version >= 1.5):

You can use the environment of the package:

$ cd iskra/
$ ls *.toml
Manifest.toml	Project.toml
$ julia --project src/iskra.jl problem/01_single_electron.jl

Alternatively, you can run it from REPL:

$ julia --project
julia> PROBLEM = "problem/01_single_electron.jl"
julia> include("src/iskra.jl")

Please, mind that the during the saving process of diagnostics data the current directory is changed, so to re-run some simulation you might want to change the directory in REPL.


This code has been partialy verified against XOOPIC from PTSG ( We have compared two-stream instability simulation and got similar results from both codes. In the near future, DSMC and MCC modules will be verified.


Expect many sharp edges of this code. If you try to modify too much you will find a bear trying to eat you. Be careful.