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
- Getting started
- Initializing particle species
- Accessing simulation data
- Saving simulation output
- Using laser pulses
- Setting a moving simulation window
- Using electric current smoothing
- Setting initial EM fields
- Setting external EM fields
- Setting the EM field solver type in spectral codes
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: