A microscopic model for solidification