Search arXivSearch

arXiv · 2609.23208

Diff-NekRS: A Scalable Differentiable Framework for Multi-Timestep Solver-in-the-Loop Training

Abstract

Hybrid physics-machine-learning solvers improve under-resolved simulations by embedding trainable corrections into the time integration. During autoregressive inference, repeated solver-model interactions can amplify small errors, motivating multi-timestep solver-in-the-loop training. However, production solvers rarely expose the derivatives needed to backpropagate through such rollouts. We introduce Diff-NekRS, a scalable differentiable framework that embeds neural corrections directly in the GPU-accelerated NekRS incompressible-flow solver. NekRS computes the authoritative forward trajectory, a manually implemented exact discrete adjoint differentiates the supported fully discrete timestep, and LibTorch supplies neural vector-Jacobian products and parameter gradients. End-to-end Taylor and centered finite-difference tests verify the assembled gradient for two-dimensional cylinder flow (2Dcyl) and the three-dimensional Taylor-Green vortex (3DTGV) across five horizons and 12-1,020 MPI ranks. At 1,020 ranks, optimizer-enabled post-setup training updates retain 54.5%-78.0% and 80.7%-81.9% weak-scaling efficiency for 2Dcyl and 3DTGV, respectively. In 200-step autoregressive inference, the M = 50 model reduces the three-seed median terminal relative L2 velocity error by 59.2% for 2Dcyl and 12.1% for 3DTGV relative to the uncorrected coarse-grid P = 2 baseline, and retains wall-clock speedups of 5.38x and 2.49x, respectively, relative to the corresponding P = 7 configurations for equal simulated-time intervals. These results establish a verified and scalable path for multi-timestep solver-in-the-loop training that improves coarse-grid trajectory accuracy while retaining a speed advantage over the high-order reference

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Junoh Jung, Riccardo Balin, Bethany Lusch, Emil Constantinescu. 2026-09-19. Diff-NekRS: A Scalable Differentiable Framework for Multi-Timestep Solver-in-the-Loop Training. https://arxiv.org/abs/2609.23208

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

A subcell-refined entropy-residual-driven limiting strategy for high-order discontinuous Galerkin methods

Fine-grained, subcell-level dissipation control is essential for achieving robust high-order discontinuous Galerkin (DG) simulations of nonlinear hyperbolic systems in under-resolved regimes while preserving accuracy. This paper proposes a subcell-refined entropy-residual-driven limiting strategy for DG on Legendre-Gauss-Lobatto nodes. The limiter introduces only nearest-neighbor pairwise dissipation within each element, with closed-form coefficients that supply the minimal dissipation required to restore the element entropy inequality. The strategy is a diagonal, locally stable approximation of classical entropy-stable methods, and a generalized subcell framework reveals split-form DG and residual-distribution-based entropy correction schemes as particular choices of the limiting coefficients. For the Euler equations, a physically consistent jump operator separately models thermal and shear entropy production while preserving velocity and pressure equilibrium; a subcell refinement of the Zhang-Shu positivity limiter ensures pointwise positivity. Extensive numerical tests confirm that the scheme maintains optimal high-order accuracy, strictly enforces entropy dissipation, and significantly reduces the difficulty of a posteriori positivity-preserving procedures.

physics.comp-ph

VNS Tokamak for Medical Isotope Production

The Volumetric Neutron Source (VNS) tokamak is a proposed fusion reactor for testing components under fusion neutron irradiation, and has potential use for radioisotope production. The VNS geometry is modeled in the Serpent 2.2.2 and OpenMC 0.15.2 neutronics codes. Coupled neutron-photon simulations compared fluxes, spectra, and selected reaction rates in the blanket and vacuum vessel. Good agreement was found overall, with the largest difference found in (n, 2n) reactions. On an HPC cluster, Serpent 2 was found to have shorter computation time in coupled simulations, while OpenMC was faster in neutron only simulations. Radioisotope production yields were simulated in Serpent 2.2.2 for capsule and Cobalt plate irradiation facilities. Results indicate potential for large volume production of 99Mo, 131I, 225Ac, 177Lu, 192Ir, 64Cu, 67Cu, 161Tb, and 153Sm while 203Pb indicates lower potential. 100Mo and LEU target heating was calculated, suggesting the LEU target mass or the cooling may need adjustment. Optimized 60Co production yielded 1.2 GBq/mg and 100,000 TBq after a 3-year irradiation period. Sensitivity to plant outage for 99Mo, 131I, 177Lu, and 60Co was simulated, suggesting irradiation can be restarted for the same isotope loading and demonstrated long-lived 60Co to be robust to long plant dwell-time.

physics.comp-ph

MadVfold: accelerating NLO event generation and reducing negative weights with SIMD vectorization and GPUs

NLO simulations are essential for LHC physics analyses but are expensive, as they are not only slow but also lead to negative weights, which imply the need to simulate much larger samples of events. Folding is a powerful technique to reduce negative weights but is itself expensive. In this paper I propose ``vectorized folding'' as a new idea to speed up these calculations using SIMD and GPUs, and I present its CUDACPP-based implementation for MG5aMC in MadVfold, including its extension for unfolded NLO event generation. Preliminary results show overall speedups around 6x to 9x with folding and 3x without it. This work is based on a test-centric, LLM-assisted software development process.

physics.comp-ph