A physical model for porosity reduction in sandstones