  We perform three-dimensional numerical relativity simulations of homogeneous
and inhomogeneous expanding spacetimes, with a view towards quantifying
non-linear effects from cosmological inhomogeneities. We demonstrate
fourth-order convergence with errors less than one part in 10^6 in evolving a
flat, dust Friedmann-Lemaitre-Roberston-Walker (FLRW) spacetime using the
Einstein Toolkit within the Cactus framework. We also demonstrate agreement to
within one part in 10^3 between the numerical relativity solution and the
linear solution for density, velocity and metric perturbations in the Hubble
flow over a factor of ~350 change in scale factor (redshift). We simulate the
growth of linear perturbations into the non-linear regime, where effects such
as gravitational slip and tensor perturbations appear. We therefore show that
numerical relativity is a viable tool for investigating nonlinear effects in
cosmology.
