Calculation of heat released during a reaction