  We use two new hydrodynamical simulations of $\Lambda$CDM and $f(R)$ gravity
to test the methodology used by Wilcox et al. 2015 (W15) in constraining the
effects of a fifth force on the profiles of clusters of galaxies. We construct
realistic simulated stacked weak lensing and X-ray surface brightness cluster
profiles from these cosmological simulations, and then use these data projected
along various lines-of-sight to test the spherical symmetry of our stacking
procedure. We also test the applicability of the NFW profile to model weak
lensing profiles of clusters in $f(R)$ gravity. Finally, we test the validity
of the analytical model developed in W15 against the simulated profiles.
Overall, we find our methodology is robust and broadly agrees with these
simulated data. We also apply our full Markov Chain Monte Carlo (MCMC) analysis
from W15 to our simulated X-ray and lensing profiles, providing consistent
constraints on the modified gravity parameters as obtained from the real
cluster data, e.g. for our $\Lambda$CDM simulation we obtain $|f_{\rm{R}0}| <
8.3 \times 10^{-5}$ (95% CL), which is in good agreement with the W15
measurement of $|f_{\rm{R}0}| < 6 \times 10^{-5}$. Overall, these tests confirm
the power of our methodology which can now be applied to larger cluster samples
available with the next generation surveys.

Cosmology and Nongalactic Astrophysics