Convection in a compressible fiuid with an imposed vertical magnetic field is studied numerically in a three-dimensional Cartesian geometry with periodic lateral boundary conditions. Attention is restricted to the mildly nonlinear regime, with parameters chosen first so that convection at onset is steady, and then so that it is oscillatory.
Steady convection occurs in the form of two-dimensional rolls when the magnetic field is weak. These rolls can become unstable to a mean horizontal shear flow, which in two dimensions leads to a pulsating wave in which the direction of the mean flow reverses. In three dimensions a new pattern is found in which the alignment of the rolls and the shear flow alternates.
If the magnetic field is sufficiently strong, squares or hexagons are stable at the onset of convection. Both the squares and the hexagons have an asymmetrical topology, with upflow in plumes and downflow in sheets. For the squares this involves a resonance between rolls aligned with the box and rolls aligned digonally to the box. The preference for three-dimensional flow when the field is strong is a consequence of the compressibility of the layer- for Boussinesq magnetoconvection rolls are always preferred over squares at onset.
In the regime where convection is oscillatory, the preferred planform for moderate fields is found to be alternating rolls - standing waves in both horizontal directions which are out of phase. For stronger fields, both alternating rolls and two-dimensional travelling rolls are stable. As the amplitude of convection is increased, either by dcereasing the magnetic field strength or by increasing the temperature contrast, the regular planform structure seen at onset is soon destroyed by secondary instabilities.