Text this: Modeling development of residual stresses in thermal spray coatings