AHKASH: a new Hybrid particle-in-cell code for simulations of astrophysical collisionless plasma

Radhika Achikanath Chirakkara,Christoph Federrath,Amit Seta
DOI: https://doi.org/10.1093/mnras/stae2188
2024-09-19
Abstract:We introduce $\texttt{A}$strophysical $\texttt{H}$ybrid-$\texttt{K}$inetic simulations with the $\texttt{flASH}$ code ($\texttt{AHKASH}$) -- a new Hybrid particle-in-cell (PIC) code developed within the framework of the multi-physics code $\texttt{FLASH}$. The new code uses a second-order accurate Boris integrator and a predictor-predictor-corrector algorithm for advancing the Hybrid-kinetic equations, using the constraint transport method to ensure that magnetic fields are divergence-free. The code supports various interpolation schemes between the particles and grid cells, with post-interpolation smoothing to reduce finite particle noise. We further implement a $\delta f$ method to study instabilities in weakly collisional plasmas. The new code is tested on standard physical problems such as the motion of charged particles in uniform and spatially varying magnetic fields, the propagation of Alfvén and whistler waves, and Landau damping of ion acoustic waves. We test different interpolation kernels and demonstrate the necessity of performing post-interpolation smoothing. We couple the $\texttt{TurbGen}$ turbulence driving module to the new Hybrid PIC code, allowing us to test the code on the highly complex physical problem of the turbulent dynamo. To investigate steady-state turbulence with a fixed sonic Mach number, it is important to maintain isothermal plasma conditions. Therefore, we introduce a novel cooling method for Hybrid PIC codes and provide tests and calibrations of this method to keep the plasma isothermal. We describe and test the `hybrid precision' method, which significantly reduces (by a factor $\sim1.5$) the computational cost, without compromising the accuracy of the numerical solutions. Finally, we test the parallel scalability of the new code, showing excellent scaling up to 10,000~cores.
Instrumentation and Methods for Astrophysics,Earth and Planetary Astrophysics,Computational Physics
What problem does this paper attempt to address?
The key problem that this paper attempts to solve is to develop a new Hybrid Particle - in - Cell (PIC) code, AHKASH, to simulate the behavior of collisionless or weakly - collisional plasmas in astrophysics. Specifically, this research aims to: 1. **Improve numerical simulation methods**: Traditional magnetohydrodynamics (MHD) methods have limitations when dealing with weakly - collisional or collisionless plasmas, because the continuous limit of fluid equations is no longer applicable under these conditions. Therefore, this research introduces a hybrid kinetic method, which combines the advantages of particle and fluid models and can more accurately simulate the plasma behavior in such a complex environment. 2. **Achieve efficient and accurate calculations**: In order to improve computational efficiency and ensure the accuracy of numerical solutions, researchers have developed a variety of techniques, such as using the Boris integrator for high - precision particle trajectory updates, adopting the predictor - predictor - corrector algorithm to advance the hybrid kinetic equations, ensuring that the divergence of the magnetic field is zero through the constrained transport method, and implementing post - interpolation smoothing to reduce particle noise, etc. 3. **Study turbulence and its effects**: Turbulence phenomena in weakly - collisional plasmas have an important impact on the thermodynamic properties of plasmas and the evolution of magnetic fields. For this purpose, this research couples the turbulence - driving module with the newly - developed Hybrid PIC code, tests its application in complex physical problems such as the turbulent dynamo effect, and introduces a novel cooling method to maintain isothermal conditions, thereby better studying the characteristics of turbulence. 4. **Verify and optimize code performance**: By testing standard physical problems (such as the motion of charged particles in uniform and non - uniform magnetic fields, the propagation of Alfvén waves and whistler waves, Landau damping, etc.), evaluating the effects of different interpolation kernels, demonstrating the advantages of the "mixed - precision" method, and testing the scalability of the code in a large - scale parallel computing environment, the effectiveness and superiority of the AHKASH code are proved. In summary, the main objective of this paper is to provide a powerful tool for studying the kinetic behavior of weakly - collisional or collisionless plasmas in astrophysical environments, especially those involving turbulence and magnetic field interactions, by developing this new Hybrid PIC code, AHKASH. This not only helps to deepen our understanding of these complex systems but also provides reliable technical support for future research.