A model for the Kirkendall effect