Coupling of microscopic and phase transition models at boundary