School of modern astrophysics-2014

Relativistic particle-in-cell simulations

M. Dieckmann (Linköping University)

Lecture plan

Lecture 1. Motivation
- The plasma approximation and the equations, which are solved by PIC simulations.
- Which plasmas can we model with PIC codes and what are the simulation limits?
- What code do I use, from where can I get it, and how can I run it?

Lecture 2. Field equations (a)
The finite difference approximation for the electromagnetic fields.
Reading in simulation data from the Epoch code using Matlab or Octave.

Lecture 3. Field equations (b)
Properties of the field equations, numerical wave dispersion.
Simulation of waves in a vacuum with the Epoch code and the analysis of the field data.

Lecture 4. The particle equations (a)
Phase space representation of the plasma, the particle update scheme and particle shape functions.

Lecture 5. The particle equations (b)
Defining the plasma parameters for the simulation and introducing computational particles into the simulation.
Analysis of particle data computed by Epoch.

Lecture 6. Data analysis
Overview over data analysis strategies for field and particle data. Getting the right units on the plots.

Lecture 7. Beam instabilities
The two-stream instability, the Weibel instability and the filamentation instability.

Lecture 8. Electrostatic shocks
How do we set up an unmagnetized shock in the simulation and what are its basic properties? How can we identify it in the simulation data?

Lecture 9. Perpendicular shocks
How do we set up a perpendicular shock in the simulation and how do we analyse its data? (DIY simulation)

Lecture 10. Numerical instabilities
Self-heating instability, numerical Cherenkov radiation and the sideband instability.


  • Exercise 1
Unpacking, compiling and running the code. Work through the examples Run01-Run08.
Reproduce the figures in the lecture notes that correspond to these runs.
Assessment: Show me your figures during the lab session. One for each run.

  • Exercise 2
Do the exercises in the lab on plasma instabilities: Two-stream, filamentation and Whistler instability.
Assessment: Send me by email the completed input.deck files. Send me the plots stated in the lecture notes.

  • Exercise 3
Implement the input.deck file for the electrostatic shock simulation.
Assessment: Send me by email the completed input.deck file. Send me also the requested plot.

The email should only contain the Figure(s), the input.deck and your full name.

Lab guidelines
Source data for simulations