ECOSMOG-EFT: Modified Gravity Simulations
- ECOSMOG-EFT is a simulation code that implements the Effective Field Theory framework for dark energy and cubic Horndeski models using adaptive mesh refinement.
- It employs operator-splitting and multigrid methods to solve the non-linear scalar field equations, achieving sub-percent accuracy in reproducing large-scale structure formation.
- Validated against analytic and code benchmarks, the code delivers precise predictions for observables critical to next-generation cosmological surveys.
ECOSMOG-EFT is a RAMSES-based adaptive-mesh-refinement (AMR) N-body simulation code for models in the Effective Field Theory of Dark Energy (EFTofDE) framework, supporting the non-linear, cubic Horndeski class of modified gravity models with a luminal gravitational wave speed. ECOSMOG-EFT numerically evolves both the standard cosmological N-body equations and an additional scalar field governed by the non-linear Vainshtein screening mechanism, accurately capturing the impact of modified gravity on structure formation from linear to deeply non-linear scales. The code has been validated against both analytic and code-to-code benchmarks, and provides sub-percent-level accuracy in reproducing large-scale structure observables relevant for upcoming cosmological surveys (Ganjoo et al., 16 Apr 2026).
1. Theoretical Framework
ECOSMOG-EFT is constructed to simulate cosmologies governed by the cubic sector of Horndeski's theory in the effective-field-theory (EFT) formalism, specifically restricting to models where the gravitational wave speed equals the speed of light (i.e., ). The starting point is the EFT action for perturbations about a flat FLRW background, expressed in the Bellini & Sawicki -parametrization: where the EFT functions parameterize kinetic, braiding, and Planck-mass running effects. Enforcing (from GW170817 constraints) removes all non-trivial tensor speed contributions.
At the nonlinear level and in the quasi-static, subhorizon regime, the action up to third-order perturbations (Eqs. 3–5) involves only the cubic Horndeski operator, with the key dynamical fields (Newtonian potentials and scalar fluctuation). The governing action reads: with explicit forms for and given in Eq. 6 and Eq. 9, enforcing all time-dependence of EFT functions and screening coefficients (0).
The resulting field equations (Eqs. 11–12) are: 1
2
3
The last equation encodes the non-linear Vainshtein screening, and 4 parameterizes its strength. In supercomoving code units, the code implements these as Eqs. 17-18.
2. Numerical Algorithms and AMR Implementation
ECOSMOG-EFT extends the RAMSES and ECOSMOG-CVG AMR framework, with grid refinement triggered when the number of particles per cell exceeds 5 (default), supporting up to six levels of refinement above the base 6.
The solver for the non-linear 7 equation uses operator-splitting and Full Approximation Storage (FAS) multigrid techniques. By recasting the 8 equation as a local quadratic for 9 (Section 2.3.2), operator splitting (with 0) is applied to make the discrete update for 1 in each cell depend only on neighbouring cells, improving convergence properties on adaptive grids. The FAS V-cycle incorporates red-black Gauss-Seidel smoothing, restriction of residuals to coarser grids, and prolongation of corrections back to finer levels, ensuring high efficiency in the AMR environment.
Stringent convergence criteria are enforced: each V-cycle must reduce the residual by at least a factor of 2.5, with final tolerances of 2 on the base grid and 3 on refined levels.
Boundary conditions are periodic; refinement and mass resolution are tunable, with the standard configuration using 4 in a box of 5 Mpc. All variables are stored in supercomoving code units.
3. Validation and Numerical Performance
ECOSMOG-EFT underwent a suite of verification tests:
- Static Spherical Test (Sec 4.1): For a truncated, isothermal sphere (6, 7), the 8 solver matches analytic 9 to better than 0.2% for both 0 and 1 grids. The computed 2 (including Vainshtein screening) agrees to within 2.5% down to a four-cell core radius.
- Linear Regime (Sec 4.2): ECOSMOG-EFT and the companion PySCo-EFT (particle-mesh) code both reproduce the EFTofDE-to-3CDM power spectrum boost 4 to 0.4% agreement with linear theory at 5, and to within 1% code-to-code up to 6.
- Nonlinear and Parameter Sensitivity (Appendix A/B): Across mass resolutions (7 to 8), box sizes, refinement thresholds, solver parameters, and starting redshifts, 9 varies by less than 1% at 0 and below 2% even at 1. Full 2-solver runs confirm that Vainshtein screening suppresses 3 for 4 whenever 5. For negligible 6, the linearized solver suffices; when 7, errors in the non-screened approach can exceed 10–30% by 8.
- Science Runs (Sec 4.3): Varying 9 and 0 demonstrates the boost 1 rises with 2 and the sign of 3. Screening reduces 4 to unity at small scales in non-linear runs, where linearized results significantly diverge.
4. Input Parameters, Compilation, and Usage
ECOSMOG-EFT adopts the standard ECOSMOG/RAMSES parameter file interface, with two additional EFTofDE-specific entries:
- 5
- 6
The time dependence is hard-coded as: 7 pivoted at 8. Including 9 or arbitrary 0 requires minor code modifications.
Repository is available at
https://github.com/hganjoo/ecosmogeft.git
Compilation requires the RAMSES library, MPI, and HDF5, following ECOSMOG-CVG build instructions. The computational cost per EFTofDE run (with 1 particles and 6 AMR levels) is approximately 10 times that of 2CDM RAMSES.
5. Output Products and Analysis
ECOSMOG-EFT outputs standard RAMSES-format snapshots containing particle positions, velocities, and optionally the scalar field 3 on the AMR grid. Analysis pipelines (PKLibrary, Pylians) are compatible, supporting fast computation of power spectra via CIC-mesh density assignment and FFT, as well as boosted observables 4, bispectra, and halo catalogs via standard post-processing. Lightcone and weak lensing pipelines can be attached via the existing ECOSMOG modules.
6. Scientific Impact and Scope
ECOSMOG-EFT enables the generation of accurate predictions for the non-linear matter distribution in a broad range of modified gravity and dark energy models, as encoded in the cubic Horndeski/EFTofDE framework subject to luminal gravitational wave constraints. The code attains better than 1% numerical control at 5 and maintains sub-2% accuracy to 6 across varied initialization and refinement parameters. It directly supports the theoretical requirements of next-generation large-scale structure and weak lensing surveys, providing robust tools to explore parameterized departures from 7CDM including Vainshtein screening, and allows the field to constrain or falsify broad classes of modified gravity via direct simulation (Ganjoo et al., 16 Apr 2026).