An elastoplastic constitutive model for porous materials