Magnetising the quokka code with fast, second-order accurate, error-correcting schemes for magnetohydrodynamics on GPUs
Abstract
We implement a second-order accurate constrained transport (CT) magnetohydrodynamics (MHD) module with first-order flux correction in the open-source, adaptive mesh refinement (AMR), GPU-accelerated code quokka, supporting both ideal and resistive (constant Ohmic) regimes. For computing and averaging the electromotive forces (EMFs) at cell edges, the basis of any CT-MHD method, we experiment with a wide range of recent, state-of-the-art schemes, together with different reconstruction schemes. Alongside these, we develop a new EMF compute scheme that requires fewer reconstruction steps than existing approaches. We evaluate these scheme combinations on the basis of accuracy, stability, and GPU throughput, and demonstrate that our new scheme achieves accuracy comparable to the best-in-class existing methods, together with greater stability in reconnection-dominated flows and roughly 25--60% higher GPU throughput. Using this scheme, quokka achieves excellent results across a wide range of MHD flow regimes, reaching >50 million cell updates per GPU per second, with >70% parallel efficiency out to >500 GPUs. Finally, we confirm that our CT implementation preserves divergence-free magnetic fields (to machine precision) under AMR.
Related
- Magnetohydrodynamics of charged interstellar dust. Multifluid models and study of the linear modes
- Chana: A GPU-Accelerated Adaptive-Mesh Code for General Relativistic Magnetohydrodynamics with Multigroup M1 Neutrino Transport
- Reduced magnetohydrodynamics with electron inertia in pseudodipole coordinates
- Relativistic Magnetohydrodynamics from Myers-Pospelov Lorentz-Violating Electrodynamics
- FUGUE: A New GPU-accelerated General Relativistic Magnetohydrodynamics Code with Weak-Field Multipole Self-Gravity and Quasi-Stationary Kerr Black Hole Evolution
BibTeX
@misc{kriel2026magnetising,
title = {{Magnetising the quokka code with fast, second-order accurate, error-correcting schemes for magnetohydrodynamics on GPUs}},
author = {Neco Kriel and Elizabeth Cole-Kodikara and Benjamin Wibking and Mark R. Krumholz and Chong-Chong He and Anish Sarkar and Pak Shing Li},
howpublished = {arXiv},
year = {2026},
month = sep,
doi = {10.48550/arxiv.2609.10816},
eprint = {2609.10816},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2609.10816},
note = {CC BY 4.0},
}
RIS
TY - UNPB
TI - Magnetising the quokka code with fast, second-order accurate, error-correcting schemes for magnetohydrodynamics on GPUs
AU - Neco Kriel
AU - Elizabeth Cole-Kodikara
AU - Benjamin Wibking
AU - Mark R. Krumholz
AU - Chong-Chong He
AU - Anish Sarkar
AU - Pak Shing Li
PY - 2026
DA - 2026/09/11
PB - arXiv
DO - 10.48550/arxiv.2609.10816
UR - https://arxiv.org/abs/2609.10816
AB - We implement a second-order accurate constrained transport (CT) magnetohydrodynamics (MHD) module with first-order flux correction in the open-source, adaptive mesh refinement (AMR), GPU-accelerated code quokka, supporting both ideal and resistive (constant Ohmic) regimes. For computing and averaging the electromotive forces (EMFs) at cell edges, the basis of any CT-MHD method, we experiment with a wide range of recent, state-of-the-art schemes, together with different reconstruction schemes. Alongside these, we develop a new EMF compute scheme that requires fewer reconstruction steps than existing approaches. We evaluate these scheme combinations on the basis of accuracy, stability, and GPU throughput, and demonstrate that our new scheme achieves accuracy comparable to the best-in-class existing methods, together with greater stability in reconnection-dominated flows and roughly 25--60% higher GPU throughput. Using this scheme, quokka achieves excellent results across a wide range of MHD flow regimes, reaching >50 million cell updates per GPU per second, with >70% parallel efficiency out to >500 GPUs. Finally, we confirm that our CT implementation preserves divergence-free magnetic fields (to machine precision) under AMR.
ER -