Thermal processes in lava flowing in an open channel