FLEKS is a highly-optimized Particle-In-Cell (PIC) and particle tracker code built on top of the AMReX block-structured adaptive mesh refinement framework.
It natively serves as the PC (Particle-in-Cell) and PT (Particle Tracker) components within the SWMF (Space Weather Modeling Framework), heavily coupling with BATS-R-US via the MHD-AEPIC algorithm to provide hybrid kinetic resolution to global MHD models.
-
Implicit PIC: Semi-implicit
$\theta$ -scheme solvers leveraging AMReX GMRES and heavily optimized particle-push boundaries. - Particle Tracking: Massively parallel test particle tracking in turbulent MHD and PIC electromagnetic fields.
- MHD-AEPIC: True bi-directional coupling between global space weather MHD states and sub-grid PIC regimes.
- Adaptive Tracing: Utilizes AMReX regridding and dynamic load balancing.
FLEKS is designed to be built continuously alongside SWMF. See the SWMF documentation for environment requirements.
- CMake (Optional, for standalone builds)
- C++14/17 compatible compiler (e.g.,
g++8+,clang++9+, oricpc) - Fortran 90 compiler (e.g.,
gfortran,ifortforsrcInterface/) - MPI (MPICH or OpenMPI)
To compile the library and the SWMF integrated test scenario:
# Inside the SWMF root directory
make test16_3d_compile
make test16_3d- Algorithms & Physics: Please see
docs/Algorithm.texfor the mathematical foundations of the simulation engine. - Component Architecture: Every core directory contains an extensive
AGENT.mdfile describing layout, file purposing, and structure. - Coding Standards & Contributing: See
CONTRIBUTING.mdbefore making a pull request.
All outputs from FLEKS natively stream to AMReX block formats. Do not use generic NetCDF loaders. Please leverage the Python flekspy API via:
pip install flekspyApache 2.0 (University of Michigan)