A model for the penumbra of sunspots