  The energy momentum tensor of perfect fluid is a simplified but successful
model in astrophysics. In this paper, assuming the particles driven by gravity
and moving along geodesics, we derived the functions of state in detail. The
results show that, these functions have a little correction for the usual
thermodynamics. The new functions naturally satisfy the causal condition and
consist with relativity. For the self potentials of the particles we introduce
an extra function $W$, which acts like negative pressure and can be used to
describe dark matter. The results are helpful to understand the relation and
interaction between space-time and matter.
