A simple model of adsorption by swelling porous materials: application of a density functional approach