Equilibrium phase transitions in a porous medium.