added function calcHeat