---
title: 'ECOSMOG-EFT: Modified Gravity Simulations'
url: https://www.emergentmind.com/topics/ecosmog-eft
type: topic
---

# ECOSMOG-EFT: Modified Gravity Simulations

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 [2604.15434].

## 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 $c_{\rm GW}$ equals the speed of light (i.e., $\alpha_T=0$). The starting point is the EFT action for perturbations about a flat FLRW background, expressed in the Bellini & Sawicki $\alpha$-parametrization:
\[
S = \int d^4x\sqrt{-g} \left[ \frac{M^2(t)}{2}R - \Lambda(t) - c(t)\,g^{00} + \frac{1}{2}M^2(t)\alpha_K(t)(\delta g^{00})^2 - \frac{1}{2}M^2(t)\alpha_B(t)\delta g^{00}\delta K + \dots \right],
\]
where the EFT functions $\{\alpha_K(a),\alpha_B(a),\alpha_M(a)\}$ parameterize kinetic, braiding, and Planck-mass running effects. Enforcing $\alpha_T=0$ (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 $\{\Psi,\Phi,\chi\}$ (Newtonian potentials and scalar fluctuation). The governing action reads:
\[
S = S_m + S_g^{(2)} + S_g^{(3)},
\]
with explicit forms for $A_{ab}$ and $B_{abc}$ given in Eq. 6 and Eq. 9, enforcing all time-dependence of EFT functions and screening coefficients ($\mathcal{C}_2,\mathcal{C}_4$).

The resulting field equations (Eqs. 11–12) are:
\[
\nabla^2\Psi = \frac{\bar{\rho}_m a^2}{2M^2}\delta + (\alpha_M - \alpha_B)\nabla^2\chi,
\]
\[
\nabla^2\Phi = \frac{\bar{\rho}_m a^2}{2M^2}\delta + \nabla^2\chi,
\]
\[
(2-\alpha_B-\alpha_M-\mathcal{C}_2)\nabla^2\chi + (\alpha_B-\alpha_M)\left(\frac{\bar{\rho}_m a^2}{2M^2}\right)\delta - \frac{\mathcal{C}_4}{4H^2 a^2}\left[(\nabla^2\chi)^2 - (\nabla_i\nabla_j\chi)(\nabla^i\nabla^j\chi)\right]=0.
\]
The last equation encodes the non-linear Vainshtein screening, and $\mathcal{C}_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 $m_{\rm ref}=14$ (default), supporting up to six levels of refinement above the base $N_{\rm grid}=256^3$.

The solver for the non-linear $\chi$ equation uses operator-splitting and Full Approximation Storage (FAS) multigrid techniques. By recasting the $\chi$ equation as a local quadratic for $\Gamma\equiv\nabla^2\chi$ (Section 2.3.2), operator splitting (with $w=1/3$) is applied to make the discrete update for $\Gamma$ 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 $|{\rm residual}|<10^{-9}$ on the base grid and $<10^{-10}$ on refined levels.

Boundary conditions are periodic; refinement and mass resolution are tunable, with the standard configuration using $N_{\rm particle}=512^3$ in a box of $L_{\rm box}=328.125\,h^{-1}$ 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 ($\rho\propto r^{-2}$, $M=10^{12}M_\odot$), the $\chi$ solver matches analytic $\chi(r)$ to better than 0.2% for both $32^3$ and $64^3$ grids. The computed $\Psi$ (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-$\Lambda$CDM power spectrum boost $R(k) = P_{\rm EFT}/P_{\Lambda{\rm CDM}}$ to 0.4% agreement with linear theory at $k<0.05\,h\,{\rm Mpc}^{-1}$, and to within 1% code-to-code up to $k\approx3\,h\,{\rm Mpc}^{-1}$.

- **Nonlinear and Parameter Sensitivity (Appendix A/B):** Across mass resolutions ($64^3$ to $512^3$), box sizes, refinement thresholds, solver parameters, and starting redshifts, $R(k)$ varies by less than 1% at $k\lesssim3\,h\,{\rm Mpc}^{-1}$ and below 2% even at $k=10\,h\,{\rm Mpc}^{-1}$. Full $\chi$-solver runs confirm that Vainshtein screening suppresses $R(k)$ for $k\gtrsim0.3\,h\,{\rm Mpc}^{-1}$ whenever $\mathcal{C}_4\neq0$. For negligible $\mathcal{C}_4$, the linearized solver suffices; when $\mathcal{C}_4|_{z=0}\gtrsim0.5$, errors in the non-screened approach can exceed 10–30% by $k=2\,h\,{\rm Mpc}^{-1}$.

- **Science Runs (Sec 4.3):** Varying $\alpha_{B0}$ and $\alpha_{M0}$ demonstrates the boost $(D^+_{\rm EFT}/D^+_{\Lambda{\rm CDM}})^2$ rises with $|\alpha_{B0}|$ and the sign of $\alpha_{M0}$. Screening reduces $R(k)$ 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:
- $\alpha_{B0} = \langle{\rm value}\rangle$
- $\alpha_{M0} = \langle{\rm value}\rangle$

The time dependence is hard-coded as:
\[
\alpha_I(a) = \alpha_{I0} \frac{1-\Omega_m(a)}{1-\Omega_{m0}},
\]
pivoted at $z=0$. Including $\alpha_{K0}$ or arbitrary $\alpha_I(a)$ 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 $512^3$ particles and 6 AMR levels) is approximately 10 times that of $\Lambda$CDM RAMSES.

## 5. Output Products and Analysis

ECOSMOG-EFT outputs standard RAMSES-format snapshots containing particle positions, velocities, and optionally the scalar field $\chi$ 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 $R(k)$, 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 $k\lesssim3\,h\,{\rm Mpc}^{-1}$ and maintains sub-2% accuracy to $k=10\,h\,{\rm Mpc}^{-1}$ 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 $\Lambda$CDM including Vainshtein screening, and allows the field to constrain or falsify broad classes of modified gravity via direct simulation [2604.15434].

Source: https://www.emergentmind.com/topics/ecosmog-eft