Radiative energy transport is of key importance for the dynamics of slender
magnetic flux tubes in the solar atmosphere, particularly so in connection
with the filamentation of the sunspot penumbra. In investigations using th
e thin-flux-tube approximation of the MHD equations, the radiative exchange
with the surrounding atmosphere has hitherto been described by the relaxat
ion-time approach, also called 'Newton's law of cooling'. The strongly nonl
inear temperature-dependence of the radiative absorption coefficient and la
rge temperature differences between the tube and its environment render thi
s concept questionable. As a simple model of a bright penumbral filament we
consider the cooling of a hot horizontal flux tube with a longitudinal flo
w, embedded in a non-stratified, homogeneous atmosphere at 4 800 K. We comp
are the results of the relaxation-time approach and of a nonlinear diffusio
n approximation with the numerical solution of the equation of (grey) radia
tive transfer. We find that the cooling times given by the relaxation-time
method compare well with the results from radiative transfer as long as the
initial temperature of the tube is below 7500 K and its lateral optical de
pth does not exceed unity. Under these conditions, the tube cools more or l
ess homogeneously over its cross section. For hotter and optically thick tu
bes, the strong temperature-dependence of the absorption coefficient leads
to the formation of a cooling front, which migrates radially inward at appr
oximately constant speed. Such inhomogeneous cooling is well represented by
the nonlinear diffusion approximation. The self-similar evolution of the c
ooling front permits an analytical estimate of the cooling time, which prov
ides a reasonable approximation of the result of the radiative transfer cal
culation. This estimate can be used to derive an improved radiative cooling
term in the framework of the thin-flux-tube approximation, so that both op
tically thin and optically thick flux tubes can be treated adequately. The
results of the radiative transfer calculations are applied to obtain an est
imate of the length and brightness of penumbral bright grains.