Several simple steady flows generated by thermal convection are investigate
d, to determine which of them are able to generate a magnetic field through
dynamo action. For steady convection in a non-rotating layer of fluid in t
he form of a square or hexagonal pattern, no dynamo action is found. Howeve
r, spurious dynamo action can easily be obtained if the numerical resolutio
n used is inadequate. Such erroneous results occur both with a fully spectr
al method and with a mixed pseudo-spectral and finite-difference method.
For convection in a rotating layer, it is found that even the simplest form
of convection, two-dimensional rolls, can act as a dynamo, provided that t
he nonlinearity of the flow is taken into account. The dynamo operates most
efficiently for moderate values of the rotation rate and fails in the rapi
dly rotating limit. In the nonlinear regime a branch of steady equilibrated
dynamos is found, but dynamo action ceases when the thermal forcing become
s sufficiently strong.