Modelling the microstructure of thermal barrier coatings