Papers
Topics
Authors
Recent
Search
2000 character limit reached

CosmoLattice: Lattice Simulation in Cosmology

Updated 3 July 2026
  • CosmoLattice is a lattice-simulation package that models nonlinear scalar and gauge field dynamics on a cubic FLRW grid, addressing early-universe phenomena like preheating and defect formation.
  • It employs symplectic time integrators and specialized algorithms that preserve gauge constraints to high precision, enhancing long-term numerical accuracy.
  • The modular MPI-parallelized framework facilitates customizable studies of gravitational wave generation, axion dynamics, and other out-of-equilibrium processes in cosmology.

CosmoLattice is a public lattice-simulation package for real-time studies of nonlinear field dynamics in an expanding universe. It is formulated for interacting scalar and gauge fields on a cubic comoving grid, evolves the cosmological expansion self-consistently through the Friedmann equations, and is designed for regimes in which classical field theory is a good approximation because occupation numbers become large. In the literature it is presented both as a general lattice-cosmology framework and as a specialized engine for early-universe problems such as preheating, resonance, symmetry breaking, defect formation, oscillon dynamics, and gravitational-wave generation (Figueroa et al., 2021, Figueroa et al., 2023).

1. Historical position and scientific scope

CosmoLattice emerged from a line of work that systematized lattice techniques for scalar and gauge field dynamics in Minkowski and FLRW backgrounds and translated them into a general-purpose, MPI-based C++ codebase (Figueroa et al., 2020). The package is explicitly intended as a platform rather than a single-model code: users specify field content, interactions, and observables, while the framework supplies the discretization machinery, time integrators, Fourier transforms, diagnostics, and parallel infrastructure (Figueroa et al., 2021).

Its scientific niche is the non-perturbative regime of early-universe field theory. The documented use cases include preheating after inflation, parametric resonance, backreaction and rescattering, tachyonic growth, gauge-field production, phase transitions, defect formation, gravitational-wave sourcing, and related out-of-equilibrium processes (Figueroa et al., 2020, Figueroa et al., 2021). The same sources emphasize that many of these phenomena cannot be captured reliably with analytic methods alone and instead require a spatially resolved nonlinear treatment on an expanding background.

The package is also framed as a modern lattice-cosmology code in the more specific sense used by later descriptions: a “cutting-edge code for lattice simulations of non-linear dynamics of scalar-gauge field theories in an expanding background,” with an explicit roadmap toward axion-gauge systems, non-minimal gravity, cosmic defects, and magneto-hydro-dynamics (Figueroa et al., 2023). A plausible implication is that CosmoLattice occupies an intermediate position between narrowly specialized reheating codes and fully general numerical-relativity frameworks: broad within classical field theory on FLRW, but not automatically valid once metric dynamics beyond the background become essential.

2. Geometric formulation, lattice variables, and evolution algorithms

CosmoLattice evolves fields on a cubic lattice of comoving size LL with NN sites per dimension, so the lattice spacing is δx=L/N\delta x=L/N (Figueroa et al., 2023). The background spacetime is taken to be flat FLRW with adjustable “α\alpha-time” variable,

ds2=a2α(η)dη2+a2(η)δijdxidxj,ds^2 = -a^{2\alpha}(\eta)\,d\eta^2 + a^2(\eta)\,\delta_{ij}dx^i dx^j,

where α=0\alpha=0 corresponds to cosmic time and α=1\alpha=1 to conformal time (Figueroa et al., 2023, Figueroa et al., 2020). The expansion can be imposed externally or evolved self-consistently using the fields’ volume-averaged energy density and pressure, with the Friedmann constraint monitored as a numerical diagnostic (Figueroa et al., 2021, Figueroa et al., 2023).

For canonical singlet scalars {ϕa}\{\phi_a\}, CosmoLattice uses the action

S=d4xg(12bμϕbμϕb+V({ϕa})),S=-\int d^4x\,\sqrt{-g}\left(\frac12\sum_b \partial_\mu\phi_b\,\partial^\mu\phi_b + V(\{\phi_a\})\right),

leading to equations of motion of the form

ϕaa2(1α)2ϕa+(3α)Hϕa+a2αV,ϕa=0.\phi_a'' - a^{-2(1-\alpha)}\nabla^2\phi_a + (3-\alpha)\mathcal{H}\phi_a' + a^{2\alpha}V_{,\phi_a}=0.

This scalar sector underlies many reheating and post-inflationary studies (Figueroa et al., 2023).

For gauge theories, the code implements lattice-gauge-invariant formulations based on link variables and plaquettes rather than naive finite differences. In the Abelian case the action is

NN0

with

NN1

and in the non-Abelian case

NN2

with the corresponding non-Abelian covariant derivative and field strength (Figueroa et al., 2023). A central design claim is that the gauge algorithms preserve the Gauss constraint to machine precision, including in self-consistent expansion (Figueroa et al., 2021, Figueroa et al., 2020).

Time evolution is based primarily on symplectic methods. The documented family includes staggered leapfrog and velocity-Verlet at NN3, together with higher-order Yoshida compositions NN4, NN5, NN6, and NN7, reaching NN8 (Figueroa et al., 2021, Figueroa et al., 2020). The rationale given in the theoretical literature is that symplecticness improves long-time conservation of the lattice Hamiltonian or, in the expanding case, the Hubble constraint (Figueroa et al., 2020). The code also works in dimensionless “program variables,”

NN9

with analogous rescalings for gauge fields, which are chosen to keep evolved quantities numerically well scaled (Figueroa et al., 2021).

3. Implemented modules, software architecture, and observables

The public codebase is organized around a separation between TempLat, which handles lattice algebra, field operations, Fourier transforms, and parallelization, and CosmoInterface, which supplies the physics layer for field evolution, initial conditions, and measurements (Figueroa et al., 2021). The implementation is written in C++, modularized, and parallelized with MPI; Fourier transforms are handled by FFTW and optionally by PFFT for multidimensional parallel decomposition (Figueroa et al., 2021, Figueroa et al., 2023). Later descriptions state that this permits runs on thousands of cores with nearly perfect scalability (Figueroa et al., 2023).

Current public capabilities cover three main classes of matter sectors. First, canonical singlet scalar theories are supported and have been widely used for reheating and post-inflationary scalar dynamics (Figueroa et al., 2023). Second, Abelian scalar-gauge systems with a complex scalar charged under δx=L/N\delta x=L/N0 are implemented, with the Gauss constraint

δx=L/N\delta x=L/N1

preserved to machine precision (Figueroa et al., 2023). Third, the code supports non-Abelian δx=L/N\delta x=L/N2 scalar-gauge theories, again with constraint-preserving evolution and the possibility of activating Abelian and non-Abelian sectors simultaneously (Figueroa et al., 2023).

A major extension is the tensor sector for gravitational waves. CosmoLattice evolves transverse-traceless perturbations δx=L/N\delta x=L/N3 according to

δx=L/N\delta x=L/N4

using a Fourier-space projection strategy based on auxiliary fields rather than applying the full TT projector at every step (Figueroa et al., 2023). Version 1.1 added gravitational waves sourced by scalar singlets, and version 1.2 added gravitational waves sourced by a δx=L/N\delta x=L/N5 gauge sector; an extension to δx=L/N\delta x=L/N6 gauge sectors is described as a future step (Figueroa et al., 2023). The associated stochastic background is characterized by

δx=L/N\delta x=L/N7

CosmoLattice provides volume averages, spectra, and full three-dimensional snapshots in HDF5 or text formats (Figueroa et al., 2023). The manual also defines discrete power spectra and occupation numbers for scalar and gauge observables, and it includes diagnostics for energy conservation, Hubble-constraint violation, and Gauss-law violation (Figueroa et al., 2021). Initial conditions are typically vacuum-like fluctuations with

δx=L/N\delta x=L/N8

while later roadmaps introduce support for arbitrary external input spectra δx=L/N\delta x=L/N9 and α\alpha0 (Figueroa et al., 2023).

4. Research applications and benchmark use cases

CosmoLattice has been used as the principal numerical engine in a wide range of early-universe studies. In reheating, it serves both as a direct field-theory solver and as a benchmark for reduced descriptions. A causal hydrodynamic model of reheating found that the predicted gravitational-wave spectrum agreed with CosmoLattice in the location of the spectral peak, the resonance-band position, and the early-time growth for the quartic inflaton model α\alpha1 with α\alpha2, even though the hydrodynamic description remained narrower and missed some late-time effects (Elía et al., 9 Oct 2025). This use positions the code as a reference standard for microscopic nonlinear dynamics in post-inflationary settings.

Domain wall dynamics form another major application class. Simulations of a α\alpha3-symmetric scalar field in radiation domination showed that the network reaches a scaling regime, with the wall area parameter

α\alpha4

becoming approximately constant, and that the total area of closed walls is negligible compared to that of a single long wall stretching throughout the simulation box (Dankovsky et al., 2024). The same study used CosmoLattice to solve the sourced tensor equation and found a gravitational-wave spectrum with a peak near the Hubble scale, an exponential falloff at scales shorter than the wall width, and a plateau or bump at intermediate scales; it also isolated a spurious UV peak as a lattice-spacing artefact (Dankovsky et al., 2024). A later domain-wall study used α\alpha5, α\alpha6, and α\alpha7 grids to extract the equal-time correlator of the TT stress tensor, showed that scaling is reached in a few Hubble times after network formation, and identified a universal subhorizon ETC together with a universal UV gravitational-wave slope α\alpha8 under partial-coherence assumptions (Blasi et al., 20 Nov 2025).

The code has also been used to validate analytic mechanisms in scalar dynamics. In a study of exponential potentials without an external radiation bath, CosmoLattice evolved the full scalar field on a α\alpha9 lattice and confirmed the “self-tracker” picture in which the field’s own subhorizon perturbations behave as effective radiation and drive the system toward the usual radiation-tracker fixed point (Mosny et al., 5 Jul 2025). In all runs reported there, the relative Hubble-equation residual stayed below ds2=a2α(η)dη2+a2(η)δijdxidxj,ds^2 = -a^{2\alpha}(\eta)\,d\eta^2 + a^2(\eta)\,\delta_{ij}dx^i dx^j,0 (Mosny et al., 5 Jul 2025).

Beyond canonical scalar reheating, CosmoLattice has been adapted to non-Abelian axion-gauge dynamics and modified-gravity preheating. In an axion–ds2=a2α(η)dη2+a2(η)δijdxidxj,ds^2 = -a^{2\alpha}(\eta)\,d\eta^2 + a^2(\eta)\,\delta_{ij}dx^i dx^j,1 study without expansion, a numerical implementation on the CosmoLattice platform established exponential growth of low-momentum gauge modes, delayed damping of axion oscillations, and subsequent energy equipartition between axion and gauge ensembles, with a clear contrast between ds2=a2α(η)dη2+a2(η)δijdxidxj,ds^2 = -a^{2\alpha}(\eta)\,d\eta^2 + a^2(\eta)\,\delta_{ij}dx^i dx^j,2 and ds2=a2α(η)dη2+a2(η)δijdxidxj,ds^2 = -a^{2\alpha}(\eta)\,d\eta^2 + a^2(\eta)\,\delta_{ij}dx^i dx^j,3 behavior attributable to non-Abelian self-interactions (Berghaus et al., 14 Jan 2026). In a Palatini modified-gravity model, the code was used to follow fragmentation, oscillon formation, and gravitational-wave production, yielding an extended oscillon-dominated epoch with cycle-averaged equation of state ds2=a2α(η)dη2+a2(η)δijdxidxj,ds^2 = -a^{2\alpha}(\eta)\,d\eta^2 + a^2(\eta)\,\delta_{ij}dx^i dx^j,4 and a present-day peak near ds2=a2α(η)dη2+a2(η)δijdxidxj,ds^2 = -a^{2\alpha}(\eta)\,d\eta^2 + a^2(\eta)\,\delta_{ij}dx^i dx^j,5 (Upadhye et al., 1 May 2026). These examples indicate that the code’s practical reach extends well beyond textbook preheating models, although such applications may require custom kernels or approximations not yet fully reflected in the public baseline.

5. Inflationary limitations and the metric-perturbation problem

A central limitation of CosmoLattice concerns the treatment of gravity during inflation. The standard formulation approximates the spacetime as exact FLRW and neglects metric perturbations, an approximation that a 2026 analysis argues is usually harmless for many reheating applications but is not reliable during inflation, especially for superhorizon modes (Barker et al., 12 Jun 2026). The paper explicitly includes CosmoLattice among the widely used lattice inflation codes affected by this issue (Barker et al., 12 Jun 2026).

With first-order metric perturbations included in spatially flat gauge, the scalar mode equation reduces to the standard Mukhanov–Sasaki equation,

ds2=a2α(η)dη2+a2(η)δijdxidxj,ds^2 = -a^{2\alpha}(\eta)\,d\eta^2 + a^2(\eta)\,\delta_{ij}dx^i dx^j,6

which gives a frozen superhorizon curvature perturbation,

ds2=a2α(η)dη2+a2(η)δijdxidxj,ds^2 = -a^{2\alpha}(\eta)\,d\eta^2 + a^2(\eta)\,\delta_{ij}dx^i dx^j,7

If the metric perturbations are instead set to zero, the equation is deformed: ds2=a2α(η)dη2+a2(η)δijdxidxj,ds^2 = -a^{2\alpha}(\eta)\,d\eta^2 + a^2(\eta)\,\delta_{ij}dx^i dx^j,8 On superhorizon scales during slow roll this leads to secular evolution rather than freezing, with the curvature power spectrum decaying as

ds2=a2α(η)dη2+a2(η)δijdxidxj,ds^2 = -a^{2\alpha}(\eta)\,d\eta^2 + a^2(\eta)\,\delta_{ij}dx^i dx^j,9

after horizon exit (Barker et al., 12 Jun 2026).

The consequences are both conceptual and phenomenological. During slow roll, evaluating modes deeper outside the horizon increases the error, with an approximate spectral-index shift

α=0\alpha=00

During ultra-slow roll the distortion becomes stronger: modes that should remain frozen can instead show an unphysical drop followed by growth once the USR phase begins, which can fake an enhancement of perturbations (Barker et al., 12 Jun 2026). The paper states that CosmoLattice in standard FLRW mode tracks the deformed Mukhanov–Sasaki equation, not the correct frozen behavior, when metric perturbations are omitted (Barker et al., 12 Jun 2026).

The practical recommendation is therefore not a simple threshold on slow-roll parameters, but an a posteriori validity test: recompute the observable of interest including first-order metric perturbations, and trust the FLRW result only if the change is negligible (Barker et al., 12 Jun 2026). This recommendation was implemented directly in CosmoLattice by adding a first-order metric source term to the lattice kernel,

α=0\alpha=01

The improved version restores superhorizon freezing in slow roll and greatly improves agreement with the correct Mukhanov–Sasaki result in USR (Barker et al., 12 Jun 2026).

The same work proposes a diagnostic based on reconstructed first-order metric perturbations α=0\alpha=02 and α=0\alpha=03. Their associated power spectra α=0\alpha=04 and α=0\alpha=05 should satisfy

α=0\alpha=06

for all relevant modes, but this is only a necessary condition: even when these spectra remain small, accumulated superhorizon errors can still be large (Barker et al., 12 Jun 2026). If first-order metric effects materially alter the result, the conclusion drawn there is that full numerical general relativity is required for genuine non-perturbative accuracy (Barker et al., 12 Jun 2026).

6. Planned extensions and broader significance

The published roadmap presents CosmoLattice as an expandable platform with both physics and numerical extensions in active development (Figueroa et al., 2023). The planned public physics modules include an axion sector with Chern–Simons interaction

α=0\alpha=07

intended for axion inflation and post-inflationary gauge production; non-minimal gravitational couplings such as α=0\alpha=08, motivated by Jordan-frame simulations of Ricci reheating and geometric preheating; a defect module for cosmic strings and potentially domain walls; and a magneto-hydro-dynamics fluid sector based on

α=0\alpha=09

with conformal-time fluid equations coupled to scalar and gauge sources (Figueroa et al., 2023).

The planned technical extensions address regimes that are awkward for the present symplectic canonical framework. These include non-canonical evolvers such as Runge–Kutta or Gauss–Legendre for kernels depending on conjugate momenta, arbitrary initial conditions supplied through external spectra, simulations in α=1\alpha=10 dimensions for long-runtime problems, and higher-accuracy spatial derivatives such as fourth-order finite differences (Figueroa et al., 2023). This suggests an effort to broaden the code from a canonical-scalar/gauge reheating tool into a more general engine for nonlinear cosmological field theory on expanding lattices.

Within lattice cosmology more broadly, CosmoLattice functions as an empirical and methodological reference point. It is repeatedly used either as the main solver or as the benchmark against which effective descriptions are calibrated (Elía et al., 9 Oct 2025). At the same time, the inflationary cautionary result fixes an important boundary on its interpretation: for many reheating observables the FLRW framework remains useful, but for inflationary perturbations the omission of metric perturbations can lead to qualitatively wrong answers unless first-order corrections are explicitly included (Barker et al., 12 Jun 2026). The resulting picture is not that of a universal cosmological simulator, but of a high-performance, modular, and extensively used FLRW lattice field theory package whose reliability depends sharply on the observable and epoch under study.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to CosmoLattice.