Particle-in-cell library for plasma physics
Project description
PIC Simulation Library
Introduction
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
(will be released soon). Performance optimizations are achieved through the use of Numba JIT and Cython.
This project is under construction.
Project Roadmap
- 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
- unified pusher
- Interpolator
- sorter
- PML
- Remove dependence on numba.typed.List
- MPI
- 3D
- QED
- GPU acceleration
- Documentation
Installation
From PyPI:
pip install libpic
From source:
git clone https://github.com/xsgeng/libpic.git
pip install -e ./libpic
Core Classes
classDiagram
Patches --> Patch : contains
Patch --> ParticlesBase : contains
Patch --> Fields : contains
Patch --> PML : contains
Patch <|-- Patch2D~Patch~
Patch <|-- Patch3D~Patch~
RadiationBase --> Patches : contains
PairProductionBase --> Patches : contains
CurrentDeposition --> Patches : contains
PusherBase --> Patches : contains
FieldInterpolation --> Patches : contains
MaxwellSolver --> Patches : contains
Pydantic.BaseModel <|-- Species
Species <|-- XXX~Species~
Species <|-- Electron~Species~
Species --> ParticlesBase : creates
class Patch {
index: int
*_neighbor_index: int
}
class Patches {
sync_particles()
sync_guard_fields()
sync_currents()
}
class ParticlesBase {
x,y,z ...: NDArray[float]
is_dead: NDArray[bool]
}
class Fields {
ex, ey, ...: NDArray[float]
}
class Species {
name, q, m, ...
density: Callable
}
Acknowledgments
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file libpic-0.0.15.tar.gz
.
File metadata
- Download URL: libpic-0.0.15.tar.gz
- Upload date:
- Size: 104.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
3422e653d7bf2690838844913fbf663da459b7daec85a399409ddd3c6beeaf1b
|
|
MD5 |
699a6dfa33f11eb92be309dead5f21fc
|
|
BLAKE2b-256 |
17baf9a63ec18ae59b08fb23149da2838c2ca529677987d90230551b66a0680c
|
Provenance
The following attestation bundles were made for libpic-0.0.15.tar.gz
:
Publisher:
python-publish.yml
on xsgeng/libpic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
libpic-0.0.15.tar.gz
-
Subject digest:
3422e653d7bf2690838844913fbf663da459b7daec85a399409ddd3c6beeaf1b
- Sigstore transparency entry: 191960713
- Sigstore integration time:
-
Permalink:
xsgeng/libpic@b1ee0549607342f7043db6bf8eb9261f4d9f5214
-
Branch / Tag:
refs/tags/v0.0.15
- Owner: https://github.com/xsgeng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
python-publish.yml@b1ee0549607342f7043db6bf8eb9261f4d9f5214
-
Trigger Event:
release
-
Statement type: