libpic
is a high-performance Particle-In-Cell (PIC) simulation framework implemented in Python. The core functionalities of libpic
include electromagnetic field solvers, particle pushers, interpolators, and current depositors.
libpic
serves as the backend for λPIC
(not yet released). Performance optimizations are achieved through the use of Numba JIT and Cython.
This project is under construction.
- Functionalities
- Maxwell solver
- Particle pusher
- Interpolator
- Current depositor
- QED
- Photon emission
- Pair production
- CPML boundary
- Collision
- Nuclear physics
- Replace Numba JIT and Cython with C extensions
- Current depositor
- Patch synchronizer
- Maxwell solver
- Particle pusher
- Interpolator
- sorter
- Remove dependence on numba.typed.List
- MPI
- 3D
- GPU acceleration
- Documentation
From PyPI:
pip install libpic
From source:
git clone https://github.com/xsgeng/libpic.git
pip install -e ./libpic
classDiagram
Patches --> Patch : contains
Patch --> ParticlesBase : contains
Patch --> Fields : contains
Patch --> PML : contains
Patch <|-- Patch2D
Patch <|-- Patch3D
RadiationBase --> Patches : contains
PairProductionBase --> Patches : contains
CurrentDeposition --> Patches : contains
PusherBase --> Patches : contains
FieldInterpolation --> Patches : contains
MaxwellSolver --> Patches : contains
Pydantic.BaseModel <|-- Species
Species <|-- Electron
Electron <|-- Positron
Species <|-- proton
Species <|-- photon
Species --> ParticlesBase : creates
This work was supported by the National Natural Science Foundation of China (NSFC) under Grant No. 12304384.
This project was inspired by and adapted elements from the EPOCH and the Smilei projects.