%0 Journal Article %T The art of simulating the early universe. Part I. Integration techniques and canonical cases %A Figueroa, D. G. %A Florio, A. %A Torrenti, F. %A Valkenburg, W. %J Journal of Cosmology and Astroparticle Physics %D 2021 %V 04 %N 4 %I Iop Publishing Ltd %@ 1475-7516 %G English %F Figueroa_etal2021 %O WOS:000644501000026 %O exported from refbase (https://references.ific.uv.es/refbase/show.php?record=4822), last updated on Wed, 26 May 2021 16:11:56 +0000 %X We present a comprehensive discussion on lattice techniques for the simulation of scalar and gauge field dynamics in an expanding universe. After reviewing the continuum formulation of scalar and gauge field interactions in Minkowski and FLRW backgrounds, we introduce the basic tools for the discretization of field theories, including lattice gauge invariant techniques. Following, we discuss and classify numerical algorithms, ranging from methods of O(delta t(2)) accuracy like staggered leapfrog and Verlet integration, to Runge-Kutta methods up to O(delta t(4)) accuracy, and the Yoshida and Gauss-Legendre higher-order integrators, accurate up to O(delta t(10)) We adapt these methods for their use in classical lattice simulations of the non-linear dynamics of scalar and gauge fields in an expanding grid in 3+1 dimensions, including the case of 'self-consistent' expansion sourced by the volume average of the fields' energy and pressure densities. We present lattice formulations of canonical cases of: i) Interacting scalar fields, ii) Abelian U(1) gauge theories, and iii) Non-Abelian SU(2) gauge theories. In all three cases we provide symplectic integrators, with accuracy ranging from O(delta t(2)) up to O(delta t(10)) For each algorithm we provide the form of relevant observables, such as energy density components, field spectra and the Hubble constraint. We note that all our algorithms for gauge theories always respect the Gauss constraint to machine precision, including when 'self-consistent' expansion is considered. As a numerical example we analyze the post-inflationary dynamics of an oscillating inflaton charged under SU(2) x U(1). We note that the present manuscript is meant to be part of the theoretical basis for the code CosmoLattice, a multi-purpose MPI-based package for simulating the non-linear evolution of field theories in an expanding universe, publicly available at http://www.cosrnolattice.net. %K particle physics – cosmology connection %K physics of the early universe %K cosmological phase transitions %K inflation %R 10.1088/1475-7516/2021/04/035 %U https://arxiv.org/abs/2006.15122 %U https://doi.org/10.1088/1475-7516/2021/04/035 %P 035-108pp