How Is Thermal Energy Generated