Diagnostics and failure analysis of advanced materials and product systems