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.
arXiv commentAccepted in A&A. 21 pages, 17 figures. The code can be found at https://github.com/mianbreton/pysco
References in corpus (88)
- 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
- Efficient Computation of CMB anisotropies in closed FRW models
- f(R) Theories Of Gravity
- 4D Gravity on a Brane in 5D Minkowski Space
- Exploring the Expansion History of the Universe
- Accelerating Universes with Scaling Dark Matter
- 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
- Cosmological Hydrodynamics with Adaptive Mesh Refinement: a new high resolution code called RAMSES
- Cosmological Perturbation Theory in the Synchronous and Conformal Newtonian Gauges
- Cosmological Perturbation Theory in the Synchronous vs. Conformal Newtonian Gauge
- Models of f(R) Cosmic Acceleration that Evade Solar-System Tests
- Chameleon Fields: Awaiting Surprises for Tests of Gravity in Space
- The Completed SDSS-IV extended Baryon Oscillation Spectroscopic Survey: Cosmological Implications from two Decades of Spectroscopic Surveys at the Apache Point observatory
- Modified Newtonian Dynamics (MOND): Observational Phenomenology and Relativistic Extensions
- Adaptive Refinement Tree - a new high-resolution N-body code for cosmological simulations
- Transients from Initial Conditions in Cosmological Simulations
- The linear power spectrum of observed source number counts
- What galaxy surveys really measure
- Simulating cosmic structure formation with the GADGET-4 code
- Measuring the dark side (with weak lensing)
- Dark Energy Survey Year 1 Results: Constraints on Extended Cosmological Models from Galaxy Clustering and Weak Lensing
- Multiscale Gaussian Random Fields for Cosmological Simulations
- Transients from Initial Conditions: A Perturbative Analysis
- Modified Newtonian Dynamics in the Milky Way
- New Perspective on Galaxy Clustering as a Cosmological Probe: General Relativistic Effects
- Tests of Chameleon Gravity
- Quasi-linear formulation of MOND
- The Uchuu Simulations: Data Release 1 and Dark Matter Halo Concentrations
- Correcting for the alias effect when measuring the power spectrum using FFT
- ECOSMOG: An Efficient Code for Simulating Modified Gravity
- Bimetric MOND gravity
- A new relativistic theory for Modified Newtonian Dynamics
- FastPM: a new scheme for fast simulations of dark matter and halos
- Effective Field Theory of Dark Energy: a Review
- Cosmological -body simulations with suppressed variance
- CFHTLenS: Testing the Laws of Gravity with Tomographic Weak Lensing and Redshift Space Distortions
- Modified Gravity-GADGET: A new code for cosmological hydrodynamical simulations of modified gravity models
- Initial conditions to cosmological N-body simulations, or how to run an ensemble of simulations
- 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
- MLAPM - a C code for cosmological simulations
- gevolution: a cosmological N-body code based on General Relativity
- Modified Gravity N-body Code Comparison Project
- The modified Newtonian dynamics-MOND-and its implications for new physics
- ISIS: a new N-body cosmological code with scalar fields based on RAMSES. Code presentation and application to the shapes of clusters
- The Cosmological -body Code
- Connection between Newtonian simulations and general relativity
- GreeM : Massively Parallel TreePM Code for Large Cosmological N-body Simulations
- How well is our universe described by an FLRW model?
- Accurate initial conditions for cosmological N-body simulations: Minimizing truncation and discreteness errors
- COLA with scale-dependent growth: applications to screened modified gravity models
- 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
- A Convenient Set of Comoving Cosmological Variables and Their Application
- Lagrangian perturbations and the matter bispectrum I: fourth-order model for non-linear clustering
- Dark matter statistics for large galaxy catalogs: power spectra and covariance matrices
- Modified Newtonian Dynamics of Large Scale Structure
- General relativistic corrections to -body simulations and the Zel'dovich approximation
- Rings and shells of "dark matter" as MOND artifacts
- The formation of cosmic structure with modified Newtonian dynamics
- Imprints of relativistic effects on the asymmetry of the halo cross-correlation function: from linear to non-linear scales
- Generating Cosmological Gaussian Random Fields
- Efficient simulations of large scale structure in modified gravity cosmologies with comoving Lagrangian acceleration
- RAyMOND: An N-body and hydrodynamics code for MOND
- Speeding up -body simulations of modified gravity: Chameleon screening models
- A QUMOND galactic N-body code I: Poisson solver and rotation curve fitting
- Euclid. V. The Flagship galaxy mock catalogue: a comprehensive simulation for the Euclid mission
- Relativistic Interpretation of Newtonian Simulations for Cosmic Structure Formation
- GRAMSES: a new route to general relativistic -body simulations in cosmology. Part I. Methodology and code description
- -body simulations for parametrised modified gravity
- Galactic Halos in MONDian Cosmological Simulations
- Fast full N-body simulations of generic modified gravity: conformal coupling models
- Fast full -body simulations of generic modified gravity: derivative coupling models
- Simulation techniques for modified gravity
- The e-MANTIS emulator: fast predictions of the non-linear matter power spectrum in CDM cosmology
- Generalizations of Quasilinear MOND (QUMOND)
- The large-scale general-relativistic correction for Newtonian mocks
- 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