1: \begin{abstract}
2: We introduce the method and the implementation of a cosmological simulation of
3: a class of metric-variation $f(R)$ models that accelerate the cosmological expansion
4: without a cosmological constant and evade solar-system bounds of small-field
5: deviations to general relativity.
6: Such simulations are shown to reduce to solving a non-linear Poisson equation
7: for the scalar degree of freedom introduced by the $f(R)$ modifications.
8: We detail the method to efficiently solve the non-linear Poisson equation by using
9: a Newton-Gauss-Seidel relaxation scheme coupled with multigrid method to
10: accelerate the convergence.
11: The simulations are shown to satisfy tests comparing the simulated outcome to
12: analytical solutions for simple situations, and the dynamics of the simulations
13: are tested with orbital and Zeldovich collapse tests.
14: Finally, we present several static and dynamical simulations using realistic
15: cosmological parameters to highlight the differences between standard physics
16: and $f(R)$ physics.
17: In general, we find that the $f(R)$ modifications result in stronger
18: gravitational attraction that enhances the dark matter power spectrum
19: by $\sim 20\%$ for large but observationally allowed $f(R)$ modifications.
20: More detailed study of the non-linear $f(R)$ effects on the power spectrum
21: are presented in a companion paper.
22: \end{abstract}
23: