Heating and cooling the reactor