A Model for Drying of Porous Materials: From Generality to Specific Applications