Quenching, thermal and residual stress in plasma sprayed deposits: NiCrAlY and YSZ coatings