SearcharxivSearch

arXiv subjects

William Groger

Publications and source records attributed to William Groger.

2 recordsLinked to original sources

RAMSES-GPU: Cell-by-Cell Adaptive Mesh Refinement with Magneto-Hydrodynamics and Self-Gravity on Graphics Processing Units

We present the implementation and optimization of the cosmological simulation code RAMSES on Graphics Processing Units (GPUs) using CUDA Fortran. This accelerated version ports the main computational routines, including hydrodynamics, particle dynamics, and self-gravity, to multi-GPU architectures. We detail our strategy for managing cell-by-cell Adaptive Mesh Refinement (AMR) on the GPU, utilizing bucket sort with prefix sums for AMR level sorting, radix sort via the CUB library for Hilbert key ordering, and an fnv64 hash table with linear probing for fast spatial indexing. Portability across diverse hardware architectures is achieved via a dispatcher and C-Fortran wrappers, calling CUDA, HIP, and Metal kernels directly translated from the CUDA Fortran framework. Hydrodynamics updates are executed via a Godunov MUSCL-Hancock HLLC Riemann solver managed through a three-tier shared-memory kernel architecture (named rock, paper, and scissor). Particle mass deposition uses Cloud-in-Cell (CIC) interpolation optimized with atomic additions or prefix sums, combined with a kick-drift-kick time integration pusher. Self-gravity is handled via a Multigrid (MG) Poisson solver performing hierarchical V-cycles on individual levels. Performance benchmarks conducted on NVIDIA A100 and H200 GPUs demonstrate substantial accelerations compared to multi-core CPUs, yielding 10x up to a 100x speedup for standard test problems such as the Sedov blast wave, molecular core collapse, and cosmological simulations. Finally, we briefly discuss additional accelerated physics modules, including equilibrium cooling, polytropic equations of state, ideal and non-ideal magneto-hydrodynamics (MHD), and stellar feedback.

astro-ph.IM

Kinetic simulations of the Kruskal-Schwarzchild instability in accelerating striped outflows I: Dynamics and energy dissipation

Astrophysical relativistic outflows are launched as Poynting-flux-dominated, yet the mechanism governing efficient magnetic dissipation, which powers the observed emission, is still poorly understood. We study magnetic energy dissipation in relativistic "striped" jets, which host current sheets separating magnetically dominated regions with opposite field polarity. The effective gravity force $g$ in the rest frame of accelerating jets drives the Kruskal-Schwarzschild instability (KSI), a magnetic analogue of the Rayleigh-Taylor instability. By means of 2D and 3D particle-in-cell simulations, we study the linear and non-linear evolution of the KSI. The linear stage is well described by linear stability analysis. The non-linear stages of the KSI generate thin (skin-depth-thick) current layers, with length comparable to the dominant KSI wavelength. There, the relativistic drift-kink mode and the tearing mode drive efficient magnetic dissipation. The dissipation rate can be cast as an increase in the effective width $\Delta_{\rm eff}$ of the dissipative region, which follows $d\Delta_{\rm eff}/dt\simeq 0.05 \sqrt{\Delta_{\rm eff}\,g}$. Our results have important implications for the location of the dissipation region in gamma-ray burst and AGN jets.

astro-ph.HE