betaFeedback

WorksPhysics and Astronomy

Mercury (Hg): a relativistic NN-body simulation for Horndeski gravity

Abstract

We present Mercury, a relativistic NN-body code for cosmological simulations in the αα-basis formulation of Horndeski gravity. Mercury extends a particle-mesh scheme by incorporating the dynamics of the additional scalar degree of freedom and the corresponding modified Einstein equations, expressed in terms of the time-dependent functions αK,αB,αM,αTα_{\rm K}, α_{\rm B}, α_{\rm M}, α_{\rm T} and the effective Planck mass M∗2M_*^2. This generalises our previous implementation of Horndeski subclass models, namely kk-essence and kinetic gravity braiding (KGB), to the general linear Horndeski αα-basis. The code evolves the additional scalar degree of freedom and its effective stress–energy tensor alongside the nonlinear matter and metric fields, so that nonlinear structure formation sources the scalar-field evolution and feeds back on the gravitational potentials. Through its interface with hi_class, Mercury supports both phenomenological αα-function parametrisations and covariant Horndeski theories; we demonstrate the latter using nKGB, the Cubic Galileon, and Brans–Dicke models. We validate the implementation against hi_class in the linear regime and recover the expected nonlinear kk-essence and KGB limits. For the luminal Horndeski models considered here, we show how a running effective Planck mass generates gravitational slip through the scalar anisotropic stress and modifies the friction terms governing the vector and tensor metric perturbations. The evolution of M∗2M_*^2 also modifies the normalisation and scale dependence of the effective dark-energy density contrast, leaving a corresponding imprint on its power spectrum. The present framework provides an intermediate step towards nonlinear Horndeski simulations, in which nonlinear scalar self-interactions and screening effects can be incorporated consistently within the same relativistic framework.

Introduction

Numerical tools have become an essential component in the study of cosmological perturbations and the interpretation of large-scale structure observations. Einstein–Boltzmann solvers such as CLASS [1] and CAMB [2] provide accurate predictions for the evolution of linear perturbations and the corresponding cosmological observables in the standard cosmological framework. Extensions such as hi_class [3, 4], mochi_class [5], and EFTCAMB [6] have generalised this framework to scalar–tensor theories by incorporating Horndeski gravity [7], allowing the evolution of the background and linear perturbations to be computed for a broad range of dark-energy and modified-gravity models. In particular, hi_class provides two complementary descriptions of Horndeski theories: one based on the α\alpha functions introduced within the effective field theory description of dark energy [8] and another based on the underlying covariant Lagrangian [4]. This has made it possible to confront a wide range of scalar–tensor theories with cosmological data.

While linear Einstein–Boltzmann calculations provide accurate predictions for a wide range of cosmological observables, current and forthcoming large-scale structure surveys, such as Euclid and DESI [9, 10], motivate the development of accurate predictions beyond the linear regime. In modified gravity theories, this requires numerical frameworks capable of following the coupled evolution of matter, metric perturbations, and additional degrees of freedom on nonlinear scales [11]. Relativistic NN-body simulations provide such a framework by extending conventional structure formation simulations with a consistent treatment of relativistic gravitational effects. The gevolution code [12, 13, 14] incorporates relativistic metric perturbations within a weak-field formulation of general relativity and provides a relativistic description of cosmological structure formation.

A number of NN-body frameworks have been developed to study nonlinear structure formation in modified-gravity and scalar–tensor theories, including recent implementations based on the effective field theory of dark energy and Galileon-type models [15, 16]. Building upon the relativistic gevolution framework, several extensions have incorporated additional scalar-field dynamics, including kk-essence in kk-evolution [17, 18] and scalar-field domain formation and associated relativistic signatures of the (a)symmetron model in Asimulation [19, 20, 21]. More recently, we extended this framework in KGB-evolution to kinetic gravity braiding (KGB) models, incorporating the braiding interaction into the relativistic simulation framework and studying its signatures in nonlinear structure formation and relativistic observables [22, 23]. The progression from kk-evolution to KGB-evolution established the numerical workflow that we generalise here towards a broader treatment of Horndeski gravity.

In this work, we introduce Mercury, extending the KGB-evolution code to the general linear Horndeski α-basis. The code incorporates the Horndeski background and perturbation dynamics, with the linear perturbation sector described by the time-dependent α\alpha functions αK\alpha_{\mathrm{K}}, αB\alpha_{\mathrm{B}}, αM\alpha_{\mathrm{M}} and αT\alpha_{\mathrm{T}}, together with the evolution of the effective Planck mass M∗2M_*^2. The corresponding scalar contribution is implemented as an effective stress–energy tensor source on the simulation lattice, while the evolution of the effective Planck mass is consistently incorporated into the gravitational sector. Following the approach adopted in KGB-evolution, the additional scalar degree of freedom is evolved using the linear Horndeski equations while remaining consistently coupled to the nonlinear matter and metric sectors. A key feature of Mercury is its direct connection to the linear Horndeski framework implemented in hi_class [3, 4]. Following the same model description, Mercury supports both approaches available in hi_class: the effective-theory approach, in which the α\alpha functions are parametrised directly, and the covariant-theory approach, in which the model is specified through its underlying Horndeski Lagrangian and the corresponding α\alpha functions are determined from the covariant dynamics. We validate the implementation by recovering the known kk-essence and KGB limits, comparing the linear regime with hi_class predictions, and testing the framework using both effective-theory and covariant descriptions of Horndeski models.

The paper is organised as follows. In § 2, we introduce the Horndeski framework and the description of the background and linear perturbation dynamics adopted in Mercury. § 3 presents the implementation of the Horndeski contributions within the relativistic simulation framework, including the construction of the effective scalar sources in real space and the solution of the equations in Fourier space. In § 4, we describe the numerical workflow of Mercury, from the specification of Horndeski models and the computation of the background evolution to the generation of initial conditions and the nonlinear evolution in the main simulation loop. § 5 presents the numerical validation of Mercury and the results for six representative Horndeski scenarios, comprising three phenomenological EFT parametrisations and three covariant Horndeski models, comparing the background evolution and perturbation spectra with hi_class and examining the deviations that emerge in the nonlinear regime. Finally, we summarise our results and discuss future perspectives in § 6.

Horndeski gravity

We consider the Horndeski class of scalar–tensor theories [7], which constitutes the most general covariant theory of a metric and a single scalar field whose equations of motion contain derivatives up to second order. This second-order structure avoids the additional unstable degree of freedom that generically arises in non-degenerate higher-derivative theories, commonly associated with the Ostrogradsky instability [24]. In the formulation used in this work, the equations are kept in the Jordan frame and organised such that the effects of the Horndeski scalar can be treated as effective dark-energy contributions to the metric equations. The scalar sector is therefore represented by an effective stress–energy tensor, while the non-minimal gravitational coupling is captured by the time-dependent effective Planck mass M∗2M_*^2. This representation is particularly convenient for the implementation in gevolution, since the Horndeski contributions can be incorporated as additional gravitational sources while retaining the overall structure of the existing metric solver. At the same time, the minimal coupling of matter in the Jordan frame allows the particle equations of motion to retain their standard gevolution form.

Horndeski action and α\alpha-basis description

Throughout this work we assume that the Einstein equivalence principle is respected. All matter species are therefore minimally and universally coupled to the same Jordan-frame metric gμνg_{\mu\nu}, with no direct coupling between the matter fields and the Horndeski scalar. Under these assumptions, the total action can be written as1

Stot=∫d4x−g[MPl2∑i=25Li+Lm(gμν,ψm)],(1)S_{\mathrm{tot}} = \int d^4 x \sqrt{-g} \left[ M_{\mathrm{Pl}}^2 \sum_{i=2}^{5} \mathcal{L}_i + \mathcal{L}_{\mathrm{m}}(g_{\mu\nu},\psi_{\mathrm{m}}) \right] , \tag*{(1)}

where Li\mathcal{L}_i are given by

L2=G2(ϕ,X),\mathcal{L}_2 = G_2(\phi,X),
L3=−G3(ϕ,X)□ϕ,\mathcal{L}_3 = -G_3(\phi,X)\Box\phi,
L4=G4(ϕ,X)R+G4X[(□ϕ)2−(∇μ∇νϕ)2],\mathcal{L}_4 = G_4(\phi,X)R + G_{4X}\left[(\Box\phi)^2 - (\nabla_\mu\nabla_\nu\phi)^2\right],
L5=G5(ϕ,X)Gμν∇μ∇νϕ−16G5X[(□ϕ)3−3□ϕ(∇μ∇νϕ)2+2(∇μ∇νϕ)3].\mathcal{L}_5 = G_5(\phi,X)G_{\mu\nu}\nabla^\mu\nabla^\nu\phi- \frac{1}{6}G_{5X}\left[(\Box\phi)^3 - 3\Box\phi(\nabla_\mu\nabla_\nu\phi)^2 + 2(\nabla_\mu\nabla_\nu\phi)^3\right].

The freedom of the theory is encoded in the functions Gi(ϕ,X)G_i(\phi,X), which are arbitrary functions of the scalar field ϕ\phi and its canonical kinetic term X≡−12∇μϕ∇μϕX \equiv-\frac{1}{2}\nabla^\mu\phi\nabla_\mu\phi. We denote derivatives with respect to XX by a subscript, GiX≡∂Gi/∂XG_{iX} \equiv\partial G_i/\partial X.

Several well-known dark energy and modified gravity models are recovered as particular choices of the functions GiG_i. For instance, minimally coupled quintessence and kk-essence correspond to fixing G4=1/2G_4 = 1/2 and G3=G5=0G_3 = G_5 = 0, so that the scalar dynamics are entirely determined by G2(ϕ,X)G_2(\phi, X). Allowing in addition a non-vanishing G3(ϕ,X)G_3(\phi, X) while keeping G4=1/2G_4 = 1/2 and G5=0G_5 = 0 gives the kinetic gravity braiding (KGB) subclass, where the scalar kinetic structure mixes with the metric through the braiding interaction [25]. More general choices of G4G_4 and G5G_5 introduce non-minimal interactions between the scalar field and curvature, affecting the effective gravitational coupling and the dynamics of metric perturbations.

To describe cosmological perturbations, we work around a spatially flat Friedmann–Lemaître–Robertson–Walker (FLRW) background and adopt the Poisson gauge, which is the gauge used by gevolution. The line element is written as

ds2=a2(τ)[−e2Ψdτ2−2Bidxidτ+(e−2Φδij+hij)dxidxj],(2)ds^2 = a^2(\tau)\left[-e^{2\Psi}d\tau^2 - 2B_i dx^i d\tau+ \left(e^{-2\Phi}\delta_{ij} + h_{ij}\right)dx^i dx^j\right], \tag*{(2)}

where a(τ)a(\tau) is the scale factor and τ\tau denotes conformal time, related to cosmic time by dτ=dt/a(t)d\tau= dt/a(t). The scalar perturbations Ψ\Psi and Φ\Phi correspond to the temporal and spatial metric potentials, respectively. The vector perturbation BiB_i is transverse, ∂iBi=0\partial^i B_i = 0, while the tensor perturbation hijh_{ij} is transverse and traceless, ∂ihij=0\partial^i h_{ij} = 0 and hii=0h^i_i = 0.

The covariant metric equations and the scalar-field equation follow from the variation of the total action and form the starting point for the implementation. When expressed directly in terms of the GiG_i functions, these equations involve many different combinations of the functions and their derivatives with respect to ϕ\phi and XX. For cosmological applications, however, the linear perturbation dynamics can be organised more efficiently in terms of the effective Planck mass M∗2M_*^2 and the four dimensionless α\alpha functions αK\alpha_K, αB\alpha_B, αM\alpha_M and αT\alpha_T [3, 8, 26]. These quantities are evaluated on the homogeneous background and can either be derived from a specified covariant Horndeski action or supplied directly through a phenomenological parametrisation.

The effective Planck mass and the four α\alpha functions characterise different aspects of the scalar–tensor dynamics. In the following, primes denote derivatives with respect to conformal time, H≡a′/a2\mathit{H} \equiv a'/a^2 is the physical Hubble rate, H≡a′/a=aH\mathcal{H} \equiv a'/a = aH is the conformal Hubble rate, and the background kinetic term is Xˉ=ϕˉ′2/(2a2)\bar{X} = \bar{\phi}'^2/(2a^2). All functions GiG_i and their derivatives are understood to be evaluated on the homogeneous background. We follow the hi_class convention in which M∗2M_*^2 is dimensionless and denotes the squared ratio of the cosmological effective Planck mass to the locally measured Planck mass M∗2≡Meff2/MPl2M_*^2 \equiv M_{\mathrm{eff}}^2/M_{\mathrm{Pl}}^2.

  • αK\alpha_K, kineticity, characterises the kinetic contribution of the scalar degree of freedom and contributes to the kinetic coefficient governing the propagating scalar mode. In the covariant formulation, αK\alpha_K can receive contributions from all four Horndeski functions G2G_2, G3G_3, G4G_4 and G5G_5:

References

  1. [1]D. Blas, J. Lesgourgues and T. Tram, The Cosmic Linear Anisotropy Solving System (CLASS) II: Approximation schemes, JCAP 07 (2011) 034 [1104.2933].
  2. [2]A. Lewis, CAMB 2: cosmological power spectra for high-precision surveys, JCAP 10 (2026) 013 [2607.14854].DOI
  3. [3]M. Zumalacárregui, E. Bellini, I. Sawicki, J. Lesgourgues and P.G. Ferreira, hi_class: Horndeski in the Cosmic Linear Anisotropy Solving System, JCAP 08 (2017) 019 [1605.06102].
  4. [4]E. Bellini, I. Sawicki and M. Zumalacárregui, hi_class: Background Evolution, Initial Conditions and Approximation Schemes, JCAP 02 (2020) 008 [1909.01828].
  5. [5]M. Cataneo and E. Bellini, mochi-class: Modelling Optimisation to Compute Horndeski In class, 2407.11968.DOI
  6. [6]B. Hu, M. Raveri, N. Frusciante and A. Silvestri, Effective Field Theory of Cosmic Acceleration: an implementation in CAMB, Phys. Rev. D 89 (2014) 103530 [1312.5742].DOI
  7. [7]G.W. Horndeski, Second-order scalar-tensor field equations in a four-dimensional space, Int. J. Theor. Phys. 10 (1974) 363.DOI
  8. [8]E. Bellini and I. Sawicki, Maximal freedom at minimum cost: linear large-scale structure in general modifications of gravity, JCAP 07 (2014) 050 [1404.3713].DOI
  9. [9]Euclid Collaboration, Y. Mellier, Abdurro’uf, J.A. Acevedo Barroso, A. Achúcarro, J. Adamek et al., Euclid: I. Overview of the Euclid mission, Astron. Astrophys. 697 (2025) A1 [2405.13491].
  10. [10]DESI collaboration, The DESI Experiment Part I: Science, Targeting, and Survey Design, 1611.00036.
  11. [11]K. Koyama, Cosmological Tests of Modified Gravity, Rept. Prog. Phys. 79 (2016) 046902 [1504.04623].DOI
  12. [12]J. Adamek, D. Daverio, R. Durrer and M. Kunz, General relativity and cosmic structure formation, Nature Phys. 12 (2016) 346 [1509.01699].DOI
  13. [13]J. Adamek, D. Daverio, R. Durrer and M. Kunz, gevolution: a cosmological N-body code based on General Relativity, JCAP 07 (2016) 053 [1604.06065].DOI
  14. [14]J. Adamek and Ø. Christiansen, gevolution 2.0: GPU-accelerated relativistic N-body simulations for cosmology, 2607.17929.arxiv.org/abs/2607.17929
  15. [15]H. Ganjoo et al., PySCo-EFT and ECOSMOG-EFT: a tandem of N-body simulation codes for the Effective Field Theory of Dark Energy, 2604.15434.arxiv.org/abs/2604.15434
  16. [16]L. Atayde, N. Frusciante and B. Li, N-body Simulations of Large-Scale Structure in the Generalized Cubic Covariant Galileon Model, 2608.06499.arxiv.org/abs/2608.06499
  17. [17]F. Hassani, J. Adamek, M. Kunz and F. Vernizzi, k-evolution: a relativistic N-body code for clustering dark energy, JCAP 12 (2019) 011 [1910.01104].DOI
  18. [18]F. Hassani, B. L’Huillier, A. Shafieloo, M. Kunz and J. Adamek, Parametrising non-linear dark energy perturbations, JCAP 04 (2020) 039 [1910.01105].DOI
  19. [19]Ø. Christiansen, F. Hassani, M. Jalilvand and D.F. Mota, Asevolution: a relativistic N-body implementation of the (a)symmetron, JCAP 05 (2023) 009 [2302.07857].DOI
  20. [20]Ø. Christiansen, F. Hassani and D.F. Mota, Asimulation: Domain formation and impact on observables in resolved cosmological simulations of the (a)symmetron, Astron. Astrophys. 689 (2024) A6 [2401.02410].
  21. [21]Ø. Christiansen, J. Adamek, F. Hassani and D. Mota, Gravitational waves from dark domain walls, JCAP 01 (2025) 149 [2401.02409].
  22. [22]A. Nouri-Zonoz, F. Hassani, E. Bellini and M. Kunz, KGB-evolution: a relativistic N-body code for kinetic gravity braiding models, JCAP 08 (2026) 011 [2511.04676].
  23. [23]A. Nouri-Zonoz, F. Hassani, J. Adamek, E. Bellini and M. Kunz, Signatures of kinetic gravity braiding in cosmological probes of the gravitational field, 2607.28207.
  24. [24]R.P. Woodard, Ostrogradsky’s theorem on Hamiltonian instability, Scholarpedia 10 (2015) 32243 [1506.02210].DOI
  25. [25]C. Deffayet, O. Pujolas, I. Sawicki and A. Vikman, Imperfect Dark Energy from Kinetic Gravity Braiding, JCAP 10 (2010) 026 [1008.0048].DOI
  26. [26]N. Frusciante and L. Perenon, Effective Field Theory of Dark Energy: a Review, Phys. Rept. 857 (2020) 1 [1907.03150].DOI
  27. [27]J. Lesgourgues, The Cosmic Linear Anisotropy Solving System (CLASS) I: Overview, 1104.2932.arxiv.org/abs/1104.2932
  28. [28]E. Hairer, C. Lubich and G. Wanner, Geometric numerical integration illustrated by the Störmer–Verlet method, Acta Numerica 12 (2003) 399–450.
  29. [29]M. Chevallier and D. Polarski, Accelerating universes with scaling dark matter, Int. J. Mod. Phys. D 10 (2001) 213 [gr-qc/0009008].DOI
  30. [30]E.V. Linder, Exploring the expansion history of the universe, Phys. Rev. Lett. 90 (2003) 091301 [astro-ph/0208512].pubmed.ncbi.nlm.nih.gov/12689209
  31. [31]A. Chudaykin, M. Kunz and J. Carron, Modified gravity constraints with Planck ISW-lensing bispectrum, 2503.08993.
  32. [32]G. Cusin, M. Lewandowski and F. Vernizzi, Nonlinear Effective Theory of Dark Energy, JCAP 04 (2018) 061 [1712.02782].DOI
  33. [33]F. Hassani, J. Adamek, M. Kunz, P. Shi and P. Wittwer, A generic instability in clustering dark energy?, Class. Quant. Grav. 40 (2023) 155009 [2204.13098].DOI
  34. [34]F. Hassani, P. Shi, J. Adamek, M. Kunz and P. Wittwer, New nonlinear instability for scalar fields, Phys. Rev. D 105 (2022) L021304 [2107.14215].DOI
  35. [35]J.-P. Eckmann, F. Hassani and H. Zaag, Instabilities appearing in cosmological effective field theories: when and how?, Nonlinearity 36 (2023) 4844 [2205.01055].

Paper details

vlnc:W_hbv58jqx
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 2

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents