  Viscous heating plays an important role in the dynamics of fluids with
strongly temperature-dependent viscosity because of the coupling between the
energy and momentum equations. The heat generated by viscous friction produces
a local temperature increase near the tube walls with a consequent decrease of
the viscosity which may dramatically change the temperature and velocity
profiles. These processes are mainly controlled by the Pecl\'et number, the
Nahme number, the flow rate and the thermal boundary conditions. The problem of
viscous heating in fluids was investigated in the past for its practical
interest in the polymer industry, and was invoked to explain some rheological
behaviours of silicate melts, but was not completely applied to study magma
flows. In this paper we focus on the thermal and mechanical effects caused by
viscous heating in tubes of finite lengths. We find that in magma flows at high
Nahme number and typical flow rates, viscous heating is responsible for the
evolution from Poiseuille flow, with a uniform temperature distribution at the
inlet, to a plug flow with a hotter layer near the walls. When the temperature
gradients induced by viscous heating are very pronounced, local instabilities
may occur and the triggering of secondary flows is possible. For completeness,
this paper also describes magma flow in infinitely long tubes both at steady
state and in transient phase.
