Equilibrium and Transfer in Porous Media 1: Equilibrium States