Numerical simulation of heterogeneous nucleation and growth