From a macroscopic theory of the quantum vacuum in terms of conserved relativistic charges (generically denoted by q( a) with label a), we have obtained, in the low-energy limit, a particular type of f( R) model relevant to cosmology. The macroscopic quantum-vacuum theory allows us to distinguish between different phenomenological f( R) models on physical grounds.