Using ZPIC with python

ZPIC simulations can be run directly from a python environment, allowing detailed control over the simulation parameter, and easy access to simulation results. To get started with running ZPIC simulations be sure to check the Getting started page.

Documentation

Example notebooks

ZPIC also includes several Jupyter notebooks exemplifying code usage, be sure to check the examples section of the website.

Python API Reference

The ZPIC python modules are extensively documented using docstrings, you can acess the documentation using the python help() command:

>>> help( em2d.Density )
Help on class Density in module em2d:

class Density(builtins.object)
 |  Density(type='uniform', start=0.0, end=0.0, n=1.0, custom_x=None, custom_y=None)
 |  
 |  Class representing charge density profiles for particle species
 |  initialization
(...)

The complete API can also be consulted here:

  • em1d - 1D EM code (finite-difference)
  • em2d - 2D EM code (finite-difference)
  • em1ds- 1D EM code (spectral)
  • em2ds - 2D EM code (spectral)
  • es1d - 1D electrostatic code (spectral)