Total Thermal Energy Formula