Examples#
The examples/ directory of the repository contains runnable scripts and input files.
Each page below shows the script, explains the physics it sets up and shows the result
as produced by the documentation build scripts under docs/scripts/.
script |
what it shows |
run time on a laptop CPU |
|---|---|---|
|
two counter-streaming beams, the default configuration |
seconds |
|
damping of a Langmuir wave in a warm plasma |
seconds |
|
plasma oscillations at the plasma frequency |
seconds |
|
four populations, a weak beam on a Maxwellian, explicit or implicit |
tens of seconds |
|
magnetic field generation from a temperature anisotropy |
tens of seconds |
|
gradient of a diagnostic with respect to the drift speed, against finite differences |
a minute |
|
minimise the saturated field energy over the ion temperature |
minutes |
|
recover the drift speed from the growth rate with forward-mode derivatives |
minutes |
|
run time and energy error against resolution |
minutes |
Run any of them from the repository root, for example
python examples/Landau_damping.py
The scripts open matplotlib windows; set the environment variable MPLBACKEND=Agg
to run them without a display.