Skip to main content

A Python library for particle-in-cell plasma simulation.

Project description


Actions Status PyPI version PyPI platforms

$\pi$-PIC (PIPIC, Python-controlled Interactive PIC) is an open-source collection of relativistic particle-in-cell solvers featuring

  • exact energy conservation;
  • absence of numerical dispersion.

The solvers provide a way to either suppress or eliminate numerical artefacts (instabilities, heating, numerical Cherenkov radiation, etc.) permitting larger space and time steps, as well as lower number of particles per cell. Because of reduced computational demands, the solvers can be found useful for quick tests of ideas, as well as for scanning parameter spaces. For a description of the underlying methods see Reference, the documentation or a presentation at PIF24.


Overview

$\pi$-PIC provides all tools necessary for designing 1D/2D/3D simulations and arbitrary outputs directly from Python. In addition, it has interfaces for incorporating extensions (read/modify field and particles, add/remove particles) that can be developed in Python, C/C++, Fortran or any other language that generate callable functions (see extensions for a list of extensions included in $\pi$-PIC installation). The project and its development are hosted on GitHub.

To get started, it should for most cases be sufficient to install $\pi$-PIC via pip (this requires: gcc, openmp and fftw3; for details and information on compilation via CMake see installation instructions):

pip install pipic

The basic layout of a simulation includes five elements:

  • creating a container with cells with given parameters
  • adding particles of all necessary types
  • setting initial electromagnetic field
  • defining output (via loops over particles and grid values of field)
  • advance and read the state of the defined physical system

We demonstrate the use of these elements in the tutorial. A complete list of all implemented Python interfaces functions can be found here. The development of extensions is detailed here and exemplified here.

The implementation of new solvers is exemplified here.

New in $\pi$-PIC v1.3

The following updates has been made for $\pi$-PIC v.3. For more details see Ref.[2].

  • extension for moving window simulations.
  • extension for absorbing boundaries.
  • Improved structure for handeling fields and particles in C++ extensions.
  • An energy conserving solver with improved momentum conservation emc.

New in $\pi$-PIC v1.2

  • options for energy correction routine in ec and ec2 (see docs/guides/INTERFACES.md)
  • extension for initializing arbitrary tightly focused pulses, e.g. dipole waves (focused_pulse)

New in $\pi$-PIC v1.1

  • extensions for QED-PIC simulations (qed_volokitin2023, qed_gonoskov2015)
  • extension for ensemble down-sampling (downsampler_gonoskov2022)

See all releases here.

Reference

[1] A. Gonoskov, Explicit energy-conserving modification of relativistic PIC method, J. Comput. Phys., 502, 112820; arXiv:2302.01893 (2024).
[2] F. Brogren, $\pi$-PIC: a framework for modular particle-in-cell developments and simulations, arXiv:2511.09950 (2025).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipic-1.3rc1.tar.gz (15.9 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pipic-1.3rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

pipic-1.3rc1-cp313-cp313-macosx_14_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

pipic-1.3rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pipic-1.3rc1-cp312-cp312-macosx_14_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

pipic-1.3rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pipic-1.3rc1-cp311-cp311-macosx_14_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

pipic-1.3rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pipic-1.3rc1-cp310-cp310-macosx_14_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

Details for the file pipic-1.3rc1.tar.gz.

File metadata

  • Download URL: pipic-1.3rc1.tar.gz
  • Upload date:
  • Size: 15.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pipic-1.3rc1.tar.gz
Algorithm Hash digest
SHA256 b19178187b438fc1775006fc6e5fc7ad5f06f5b1ad05380deff1bb0b72807bee
MD5 e46ea29b37af6193b21a5925e804352e
BLAKE2b-256 2e8fc501cc43acd46a5332ad70fa0233da97d3e2967f14dc21108f14e0575da4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipic-1.3rc1.tar.gz:

Publisher: deploy.yml on hi-chi/pipic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pipic-1.3rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pipic-1.3rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 68bce3126d5efd1331ee624479dd86ad89377ba09192eaa4c331ef3e64a65525
MD5 57fb64d7597f8b1b3ca496323f2ae9b9
BLAKE2b-256 4496d2115e16503eaac6ea1e18c7a7809a36bd1897e273dddda7abc1d1d9d77c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipic-1.3rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: deploy.yml on hi-chi/pipic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pipic-1.3rc1-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pipic-1.3rc1-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 8010c544ca4ecf191eaa0adb31fec756aafe315cc3ecf86e2e0b1a8d89ea88ba
MD5 ee1c509689f7f9fa3c0c71c7f337e949
BLAKE2b-256 59e7c135108340da00f4fcc9aaff48f9cbacec531f2983ccf6f23b0337560647

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipic-1.3rc1-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: deploy.yml on hi-chi/pipic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pipic-1.3rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pipic-1.3rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 133deec0f2a33c27a7e73f2d20d25a88aa27f81ed3078050e39c271ffd6bb293
MD5 8c8a5111092f4f8cab163d3290056da2
BLAKE2b-256 6f0ed1613d1e2cb987f5f6157705223efba2b45f2f5602d0ab2a8b02b8bc46a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipic-1.3rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: deploy.yml on hi-chi/pipic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pipic-1.3rc1-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pipic-1.3rc1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 327442dff188af37571a4bdc2f06ddec5ecae05003cd8926b5d539ce7bdbbad2
MD5 c6650aff3fc9c16e2386a1f6b7d54b80
BLAKE2b-256 12b8da9f1ceb24390e3f3b43887be7636fd2717aedd3bd10a00ddcda9ec2bb64

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipic-1.3rc1-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: deploy.yml on hi-chi/pipic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pipic-1.3rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pipic-1.3rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3e65179457ba55b5ed32d1ee12b0edd2bba94e20e27b9b9efd9b50a62a9b50f
MD5 ceb99e659083ae0a7906f9285b8a3927
BLAKE2b-256 ceffc27b039405401933c3215083ee3074dd57e0cb568ece823453b895ebae1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipic-1.3rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: deploy.yml on hi-chi/pipic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pipic-1.3rc1-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pipic-1.3rc1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 c7d94eb9aa4411b87071594eab1356f7da4cfc7af0be521a167215152feb0a8d
MD5 d38316eeab4499d6393e3c24cffc5bb5
BLAKE2b-256 b4717d71d50187e1a124f0bd7958e964aa3c5b2c8a4c567ec87c156bb0a96166

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipic-1.3rc1-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: deploy.yml on hi-chi/pipic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pipic-1.3rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pipic-1.3rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25a1e61ccd574c0a1022aaed8d53c965820ce57f2823a13d5d861eaca9cb303e
MD5 0a700c61f8285cb991b7b519b4933a2f
BLAKE2b-256 ff77cdf213e8e1f02a2f07203e0ffef536f34ba3706b6ac4b86927510e98b272

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipic-1.3rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: deploy.yml on hi-chi/pipic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pipic-1.3rc1-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pipic-1.3rc1-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 e6fee333ef882ffa6e282056d716688b1355d30a59dcc90348b0f4d75ac57875
MD5 6fc3b5bbb37263bbb4931cdd33e10f60
BLAKE2b-256 1d3be3362e4b907f3c11e95616161d76fa33fb3822e5c3667de1f36d13aa8dd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipic-1.3rc1-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: deploy.yml on hi-chi/pipic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page