what are the similarities between thermal energy and electrical energy