Letter | Published:

General relativity and cosmic structure formation

Nature Physics volume 12, pages 346349 (2016) | Download Citation


Numerical simulations are a versatile tool for providing insight into the complicated process of structure formation in cosmology1. This process is mainly governed by gravity, which is the dominant force on large scales. At present, a century after the formulation of general relativity2, numerical codes for structure formation still employ Newton’s law of gravitation. This approximation relies on the two assumptions that gravitational fields are weak and that they originate from non-relativistic matter. Whereas the former seems well justified on cosmological scales, the latter imposes restrictions on the nature of the ‘dark’ components of the Universe (dark matter and dark energy), which are, however, poorly understood. Here we present the first simulations of cosmic structure formation using equations consistently derived from general relativity. We study in detail the small relativistic effects for a standard lambda cold dark matter cosmology that cannot be obtained within a purely Newtonian framework. Our particle-mesh N-body code computes all six degrees of freedom of the metric and consistently solves the geodesic equation for particles, taking into account the relativistic potentials and the frame-dragging force. This conceptually clean approach is very general and can be applied to various settings where the Newtonian approximation fails or becomes inaccurate, ranging from simulations of models with dynamical dark energy3 or warm/hot dark matter4 to core collapse supernova explosions5.

Access optionsAccess options

Rent or Buy article

Get time limited or full article access on ReadCube.


All prices are NET prices.


  1. 1.

    et al. Simulating the joint evolution of quasars, galaxies and their large-scale distribution. Nature 435, 629–636 (2005).

  2. 2.

    The field equations of gravitation. Sitz.ber. Preuss. Akad. Wiss. Berlin 1915, 844–847 (1915).

  3. 3.

    , & Relativistic scalar fields and the quasistatic approximation in theories of modified gravity. Phys. Rev. D 89, 023521 (2014).

  4. 4.

    et al. Cosmology with massive neutrinos III: the halo mass function and an application to galaxy clusters. JCAP 1312, 012 (2013).

  5. 5.

    Multiple physical elements to determine the gravitational-wave signatures of core-collapse supernovae. C. R. Phys. 14, 318–351 (2013).

  6. 6.

    & Connection between Newtonian simulations and general relativity. Phys. Rev. D 83, 123505 (2011).

  7. 7.

    & Newtonian and relativistic cosmologies. Phys. Rev. D 85, 063512 (2012).

  8. 8.

    & On the accuracy of N-body simulations at very large scales. Mon. Not. R. Astron. Soc. 446, 677–682 (2015).

  9. 9.

    & Beyond the linear-order relativistic effect in galaxy clustering: second-order gauge-invariant formalism. Phys. Rev. D 90, 023513 (2014).

  10. 10.

    Isolating relativistic effects in large-scale structure. Class. Quantum Gravity 31, 234002 (2014).

  11. 11.

    Self-consistent cosmological simulations of DGP braneworld gravity. Phys. Rev. D 80, 043001 (2009).

  12. 12.

    , , & ECOSMOG: an efficient COde for simulating modified gravity. JCAP 1201, 051 (2012).

  13. 13.

    , & Modified-Gravity-GADGET: a new code for cosmological hydrodynamical simulations of modified gravity models. Mon. Not. R. Astron. Soc. 436, 348–360 (2013).

  14. 14.

    , & ISIS: a new N-body cosmological code with scalar fields based on RAMSES. Code presentation and application to the shapes of clusters. Astron. Astrophys. 562, A78 (2014).

  15. 15.

    , , & General relativistic N-body simulations in the weak field limit. Phys. Rev. D 88, 103527 (2013).

  16. 16.

    , & N-body methods for relativistic cosmology. Class. Quantum Gravity 31, 234006 (2014).

  17. 17.

    , & Latfield2: a C++ library for classical lattice field theory. Preprint at (2015).

  18. 18.

    , & The Rockstar phase-space temporal halo finder and the velocity offsets of cluster cores. Astrophys. J. 762, 109 (2013).

  19. 19.

    , , & The cosmological background of vector modes. JCAP 0902, 023 (2009).

  20. 20.

    , & Computing general relativistic effects from Newtonian N-body simulations: frame dragging in the post-Friedmann approach. Phys. Rev. D 89, 044010 (2014).

  21. 21.

    , & Cosmological gravitational wave background from primordial density perturbations. Phys. Rev. D 75, 123518 (2007).

  22. 22.

    , , & Gravitational wave spectrum induced by primordial scalar perturbations. Phys. Rev. D 76, 084019 (2007).

  23. 23.

    & What galaxy surveys really measure. Phys. Rev. D 84, 063505 (2011).

  24. 24.

    , & Efficient computation of cosmic microwave background anisotropies in closed Friedmann–Robertson–Walker models. Astrophys. J. 538, 473–476 (2000).

  25. 25.

    , & The Cosmic Linear Anisotropy Solving System (CLASS). Part II: approximation schemes. JCAP 1107, 034 (2011).

Download references


We thank R. Teyssier and M. Bruni for discussions. This work was supported by the Swiss National Supercomputing Centre (CSCS) under project ID s546. The numerical simulations were carried out on Piz Daint at the CSCS and on the Baobab cluster of the University of Geneva. Financial support was provided by the Swiss National Science Foundation.

Author information


  1. Département de Physique Théorique & Center for Astroparticle Physics, Université de Genève, 24 Quai E. Ansermet, 1211 Genève 4, Switzerland

    • Julian Adamek
    • , David Daverio
    • , Ruth Durrer
    •  & Martin Kunz
  2. African Institute for Mathematical Sciences, 6 Melrose Road, Muizenberg 7945, South Africa

    • Martin Kunz


  1. Search for Julian Adamek in:

  2. Search for David Daverio in:

  3. Search for Ruth Durrer in:

  4. Search for Martin Kunz in:


J.A. worked out the equations in our approximation scheme and implemented the cosmological code gevolution. He also produced the figures. D.D. developed and implemented the particle handler for the LATfield2 framework. R.D. contributed to the development of the approximation scheme and the derivation of the equations. M.K. proposed the original idea. All authors discussed the research and helped with writing the paper.

Competing interests

The authors declare no competing financial interests.

Corresponding authors

Correspondence to Julian Adamek or David Daverio.

Supplementary information

PDF files

  1. 1.

    Supplementary information

    Supplementary information


  1. 1.

    Supplementary Movie 1

    Supplementary Movie

  2. 2.

    Supplementary Movie 2

    Supplementary Movie

About this article

Publication history