PySCo: A fast Particle-Mesh -body code for modified gravity simulations in Python
arXiv:2410.20501 · doi:10.1051/0004-6361/202452770
Abstract
We present PySCo, a fast and user-friendly Python library designed to run cosmological -body simulations across various cosmological models, such as CDM and CDM, and alternative theories of gravity, including , MOND and time-dependent gravitational constant parameterisations. PySCo employs Particle-Mesh solvers, using multigrid or Fast Fourier Transform (FFT) methods in their different variations. Additionally, PySCo can be easily integrated as an external library, providing utilities for particle and mesh computations. The library offers key features, including an initial condition generator based on up to third-order Lagrangian Perturbation Theory (LPT), power spectrum estimation, and computes the background and growth of density perturbations. In this paper, we detail PySCo's architecture and algorithms and conduct extensive comparisons with other codes and numerical methods. Our analysis shows that, with sufficient small-scale resolution, the power spectrum at redshift remains independent of the initial redshift at the 0.1\% level for 125, 30, and 10 when using first, second, and third-order LPT, respectively. Although the seven-point Laplacian method used in multigrid also leads to power suppression on small scales, this effect can largely be mitigated when computing ratios. In terms of performance, PySCo only requires approximately one CPU hour to complete a Newtonian simulation with particles (and an equal number of cells) on a laptop. Due to its speed and ease of use, PySCo is ideal for rapidly generating vast ensemble of simulations and exploring parameter spaces, allowing variations in gravity theories, dark energy models, and numerical approaches. This versatility makes PySCo a valuable tool for producing emulators, covariance matrices, or training datasets for machine learning.
Accepted in A&A. 21 pages, 17 figures. The code can be found at https://github.com/mianbreton/pysco
References in corpus (41)
- Array Programming with NumPy
- The Astropy Project: Sustaining and Growing a Community-oriented Open-source Project and the Latest Major Release (v5.0) of the Core Package
- A Comprehensive Measurement of the Local Value of the Hubble Constant with 1 km/s/Mpc Uncertainty from the Hubble Space Telescope and the SH0ES Team
- Models of f(R) Cosmic Acceleration that Evade Solar-System Tests
- The Completed SDSS-IV extended Baryon Oscillation Spectroscopic Survey: Cosmological Implications from two Decades of Spectroscopic Surveys at the Apache Point observatory
- Transients from Initial Conditions in Cosmological Simulations
- Simulating cosmic structure formation with the GADGET-4 code
- Measuring the dark side (with weak lensing)
- New Perspective on Galaxy Clustering as a Cosmological Probe: General Relativistic Effects
- The Uchuu Simulations: Data Release 1 and Dark Matter Halo Concentrations
- Bimetric MOND gravity
- A new relativistic theory for Modified Newtonian Dynamics
- Non-linear evolution of f(R) cosmologies I: methodology
- Initial Conditions for Large Cosmological Simulations
- Large-scale dark matter simulations
- A simple multigrid scheme for solving the Poisson equation with arbitrary domain boundaries
- The modified Newtonian dynamics-MOND-and its implications for new physics
- The Cosmological -body Code
- How well is our universe described by an FLRW model?
- Accurate initial conditions for cosmological N-body simulations: Minimizing truncation and discreteness errors
- Phantom of RAMSES (POR): A new Milgromian dynamics N-body code
- Towards optimal parallel PM N-body codes: PMFAST
- Cosmological Structure Formation under MOND: a new numerical solver for Poisson's equation
- Lagrangian perturbations and the matter bispectrum I: fourth-order model for non-linear clustering
- Rings and shells of "dark matter" as MOND artifacts
- RAyMOND: An N-body and hydrodynamics code for MOND
- Speeding up -body simulations of modified gravity: Chameleon screening models
- Euclid. V. The Flagship galaxy mock catalogue: a comprehensive simulation for the Euclid mission
- -body simulations for parametrised modified gravity
- Fast full N-body simulations of generic modified gravity: conformal coupling models
- Fast full -body simulations of generic modified gravity: derivative coupling models
- The e-MANTIS emulator: fast predictions of the non-linear matter power spectrum in CDM cosmology
- Simulation techniques for modified gravity
- Generalizations of Quasilinear MOND (QUMOND)
- The RayGalGroupSims cosmological simulation suite for the study of relativistic effects: an application to lensing-matter clustering statistics
- The cosmological simulation code
- The anisotropy of the power spectrum in periodic cosmological simulations
- BullFrog: Multi-step perturbation theory as a time integrator for cosmological simulations
- Euclid preparation. Simulations and nonlinearities beyond CDM. 1. Numerical methods and validation
- Starting Cosmological Simulations from the Big Bang
- Fast particle-mesh code for Milgromian dynamics