A numerical model of peritectic transformation