10 May 2019 in The Astrophysical Journal
By generalizing the theory of convection to any type of thermal and compositional source terms (diabatic processes), we show that thermohaline convection in Earth’s oceans, fingering convection in stellar atmospheres, and moist convection in Earth’s atmosphere are derived from the same general diabatic convective instability. We also show that “radiative convection” triggered by the CO/CH4 transition with radiative transfer in the atmospheres of brown dwarfs is analogous to moist and thermohaline convection. We derive a generalization of the mixing-length theory to include the effect of source terms in 1D codes. We show that CO/CH4“radiative” convection could significantly reduce the temperature gradient in the atmospheres of brown dwarfs similarly to moist convection in Earth’s atmosphere, thus possibly explaining the reddening in brown dwarf spectra. By using idealized 2D hydrodynamic simulations in the Ledoux unstable regime, we show that compositional source terms can indeed provoke a reduction of the temperature gradient. The L/T transition could be explained by a bifurcation between the adiabatic and diabatic convective transports and seen as a giant cooling crisis: an analog of the boiling crisis in liquid/steam-water convective flows. This mechanism, with other chemical transitions, could be present in many giant and Earth-like exoplanets. The study of the impact of different parameters (effective temperature, compositional changes) on CO/CH4radiative convection and the analogy with Earth moist and thermohaline convection is opening the possibility of using brown dwarfs to better understand some aspects of the physics at play in the climate of our own planet.
20 April 2019 in The Astrophysical Journal
Convection is an important physical process in astrophysics well-studied using numerical simulations under the Boussinesq and/or anelastic approximations. However, these approaches reach their limits when compressible effects are important in the high-Mach flow regime, e.g., in stellar atmospheres or in the presence of accretion shocks. In order to tackle these issues, we propose a new high-performance and portable code called “ARK” with a numerical solver well suited for the stratified compressible Navier–Stokes equations. We take a finite-volume approach with machine precision conservation of mass, transverse momentum, and total energy. Based on previous works in applied mathematics, we propose the use of a low-Mach correction to achieve a good precision in both low and high-Mach regimes. The gravity source term is discretized using a well-balanced scheme in order to reach machine precision hydrostatic balance. This new solver is implemented using the Kokkos library in order to achieve high-performance computing and portability across different architectures (e.g., multi-core, many-core, and GP-GPU). We show that the low-Mach correction allows to reach the low-Mach regime with a much better accuracy than a standard Godunov-type approach. The combined well-balanced property and the low-Mach correction allowed us to trigger Rayleigh–Bénard convective modes close to the critical Rayleigh number. Furthermore, we present 3D turbulent Rayleigh–Bénard convection with low diffusion using the low-Mach correction leading to a higher kinetic energy power spectrum. These results are very promising for future studies of high Mach and highly stratified convective problems in astrophysics.
9 September 2025 in Journal of Open Source Software
Gyselalib++ provides the mathematical building blocks to construct kinetic or gyrokinetic plasma simulation codes in C++, simulating a distribution function discretised in phase space on a fixed grid. It relies on the Discrete Domain Computation (DDC) library (Padioleau et al., 2025) to statically type the discretisation dimensions, thus preventing many common sources of errors. Via DDC, Gyselalib++ also leverages the Kokkos framework (Trott et al., 2022), ensuring performance portability across various CPU and GPU architectures. The library provides a variety of tools including semi-Lagrangian advection operators, quadrature rules, and solvers for elliptic and hyperbolic partial differential equations (PDEs). The majority of the operators are designed to work on non-orthonormal coordinate systems; those that don't use the static typing to raise compiler errors preventing their misuse.
30 July 2025 in Journal of Open Source Software
Kokkos-fft provides a unified, performance-portable interface for Fast Fourier Transforms (FFTs) within the Kokkos ecosystem (C. Trott et al., 2021). It seamlessly integrates with leading local FFT libraries including FFTW, cuFFT, rocFFT, and oneMKL. Designed for simplicity and efficiency, kokkos-fft offers a user experience akin to numpy.fft for in-place and out-of-place transforms, while leveraging the raw speed of vendor-optimized libraries. A demonstration solving 2D Hasegawa-Wakatani turbulence with the Fourier spectral method illustrates how kokkos-fft can deliver significant speedups over Python-based alternatives without drastically increasing code complexity, empowering researchers to perform high-performance FFTs simply and effectively.
25 April 2025 in Astronomy & Astrophysics
Numerical simulations of multidimensional astrophysical fluids present considerable challenges. However, the development of exascale computing has significantly enhanced computational capabilities, motivating the development of new codes that can take full advantage of these resources. In this article, we introduce HERACLES++, a new hydrodynamics code with high portability, optimized for exascale machines with different architectures and running efficiently both on CPUs and GPUs. The code is Eulerian and employs a Godunov finite-volume method to solve the hydrodynamics equations, which ensures accuracy in capturing shocks and discontinuities. It includes different Riemann solvers, equations of state, and gravity solvers. It works in Cartesian and spherical coordinates, either in 1D, 2D, or 3D, and uses passive scalars to handle gases with several species. The code accepts a user-supplied heating or cooling term to treat a variety of astrophysical contexts. In addition to the usual series of benchmarking tests, we use HERACLES++ to simulate the propagation of a supernova shock in a red-supergiant star envelope, from minutes after core collapse until shock emergence. In 1D, the results from HERACLES++ are in agreement with those of V1D for the same configuration. In 3D, the Rayleigh-Taylor instability develops and modifies the 1D picture by introducing density and composition fluctuations as well as turbulence. The focus on a wedge, rather than the full solid angle, and the ability to run HERACLES++ with a large number of GPUs allow for long-term simulations of 3D supernova ejecta with a sub-degree resolution. Future developments will extend HERACLES++ to a radiation-hydrodynamics code.
6 November 2025 in Journal of Open Source Software
The Discrete Domain Computation (DDC) library is a C++ library designed to provide highperformance, strongly-typed labelled multidimensional arrays. Inspired by Python's Xarray and built on top of performance-portable libraries like Kokkos, DDC enables expressive, safe, and efficient numerical computations. It provides a coherent ecosystem to work with labelled dimensions from data structures to algorithms. Additionally, DDC extends functionality through modules such as FFT (based on kokkos-fft), splines, and with a bridge to the PDI library. The library is actively used to modernize legacy scientific codes, such as the Fortran-based Gysela plasma simulation code (Grandgirard et al., 2016).