  We consider homogeneous non-abelian vector fields with general potential
terms in an expanding universe. We find a mechanical analogy with a system of N
interacting particles (with N the dimension of the gauge group) moving in three
dimensions under the action of a central potential. In the case of bounded and
rapid evolution compared to the rate of expansion, we show by making use of a
generalization of the virial theorem that for arbitrary potential and
polarization pattern, the average energy-momentum tensor is always diagonal and
isotropic despite the intrinsic anisotropic evolution of the vector field. We
consider also the case in which a gauge-fixing term is introduced in the action
and show that the average equation of state does not depend on such a term.
Finally, we extend the results to arbitrary background geometries and show that
the average energy-momentum tensor of a rapidly evolving Yang-Mills fields is
always isotropic and has the perfect fluid form for any locally inertial
observer.
