Struphy - HPC for Plasma Physics with Python

  • Possanner, Stefan (Max Planck IPP)
  • Lindqvist, Max (Max Planck IPP)
  • Na, Byung-Kyu (Max Planck IPP)

Please login to view abstract download link

Struphy [1] is an open-source Python package for plasma physics equations designed for high-performance computing (HPC), entirely written in Python. The computational backend of Struphy is based on vectorization (numpy), parallelization (mpi4py and OpenMP) and compilation (pyccel). Struphy provides a Python API for modeling PDEs based on finite element (FE), particle-in-cell (PIC) and smoothed-particle-hydrodynamics (SPH) methods. There are currently 16 plasma models ready for use off-the-shelf, with a simple Python workflow for adding new models. Heavy compute kernels are pre-compiled with pyccel [2], enabling C or Fortran speed while coding in the high-level Python framework. In this talk I will present our insights for designing a stable, user-friendly API based on Python classes with pre-compiled kernels. In addition, I will present some examples for running parallel Struphy simulations of Vlasov-Maxwell and MHD equations [3], and provide an overview of the current activities related to GPU porting with OpenMP. References: [1] https://github.com/struphy-hub/struphy [2] https://github.com/pyccel/pyccel [3] Byung-Kyu Na et al., "Structure-Preserving MHD-Driftkinetic Discretization for Wave-Particle Interactions", submitted to JCP, https://arxiv.org/abs/2510.04385