Skip to main content

A Particle-in-Cell framework with dynamic behavior modification through callbacks

Project description

Introduction

λPIC

λPIC is a callback-centric Particle-In-Cell framework. It enables the customization of simulation behavior through callbacks at various stages, even when the modifications are unphysical. The flexibility of λPIC makes it easy to implement plugins, allowing developers to extend functionality seamlessly without modifying the core simulation logic.

Visit the documentation for installation and usage instructions.

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
    MPIManager --> 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
    }

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Status

λPIC is currently in active development. The API may change without notice.

License

This project is licensed under the GPL-3.0 License.

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


Download files

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

Source Distribution

lambdapic-0.6.2.tar.gz (3.4 MB view details)

Uploaded Source

File details

Details for the file lambdapic-0.6.2.tar.gz.

File metadata

  • Download URL: lambdapic-0.6.2.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lambdapic-0.6.2.tar.gz
Algorithm Hash digest
SHA256 f2c772b710e06c94df92dada76f7f1000560c8c25e2034a0b2efd5a83530f286
MD5 e46cceb389fa5e72702b54b5d3f6d81a
BLAKE2b-256 a15e6e4ae604d80b879abb69b9b5c2af7193be86e725f24b8d3273f219cbb045

See more details on using hashes here.

Provenance

The following attestation bundles were made for lambdapic-0.6.2.tar.gz:

Publisher: python-publish.yml on xsgeng/lambdapic

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