Heat flow and energy calculations