  We construct a generally-covariant formulation of non-equilibrium
thermodynamics in General Relativity. We find covariant entropic forces arising
from gradients of the entropy density, and a corresponding non-conservation of
the energy momentum tensor in terms of these forces. We also provide a
Hamiltonian formulation of General Relativity in the context of non-equilibrium
phenomena and write the Raychaudhuri equations for a congruence of geodesics.
We find that a fluid satisfying the strong energy condition could avoid
collapse for a positive and sufficiently large entropic-force contribution. We
then study the forces arising from gradients of the bulk entropy of
hydrodynamical matter, as well as the entropy of boundary terms in the action,
like those of black hole horizons. Finally, we apply the covariant formulation
of non-equilibrium thermodynamics to the expanding universe and obtain the
modified Friedmann equations, with an extra term corresponding to an entropic
force satisfying the second law of thermodynamics.
