We provide explicit formulas for the effective fluid approach of f(R)
theories, such as the Hu & Sawicki and the designer models. Using the latter
and simple modifications to the CLASS code, which we call EFCLASS, in
conjunction with very accurate analytic approximations for the background
evolution, we obtain competitive results in a much simpler and less error-prone
approach. We also derive the initial conditions in matter domination and we
find they differ from those already found in the literature for a constant w
model. A clear example is the designer model that behaves as ΛCDM in
the background, but has nonetheless dark energy perturbations. We then use the
aforementioned models to derive constraints from the latest cosmological data,
including supernovae, BAO, CMB, H(z) and growth-rate data, and find they are
statistically consistent to the ΛCDM model. Finally, we show that the
viscosity parameter cvis2 in realistic models is not constant as commonly
assumed, but rather evolves significantly over several orders of magnitude,
something which could affect forecasts of upcoming surveys.Comment: 24 pages, 12 figures, 5 tables. Changes match published version. The
codes used in the analysis can be found at
https://members.ift.uam-csic.es/savvas.nesseris/efclass.html and
https://github.com/wilmarcardonac/EFCLAS