The stability with respect to two- and three-dimensional perturbations
of natural-convection flow of air in a square enclosure with differen
tially heated vertical walls and periodic boundary conditions in the l
ateral direction has been investigated. The horizontal walls are eithe
r conducting or adiabatic. The solution is numerically approximated by
Chebyshev-Fourier expansions. In contrast to the assumption made in e
arlier studies, three-dimensional perturbations turn out to be less st
able than two-dimensional perturbations, giving a lower critical Rayle
igh number in the three-dimensional case for the onset of transition t
o turbulence. Both the line-symmetric and line-skew-symmetric three-di
mensional perturbations are found to be unstable. The most unstable wa
velengths in the lateral direction typically are of the same size as t
he enclosure. In the nonlinear solution new symmetry breaking occurs,
giving either a steady or an oscillating final state. The three-dimens
ional structures in the nonlinear saturated solution consist of counte
r-rotating longitudinal convection rolls along the horizontal walls. T
he energy balance shows that the three-dimensional instabilities have
a combined thermal and hydrodynamic nature. Besides the stability calc
ulations, two- and three-dimensional direct numerical simulations of t
he weakly turbulent flow were performed for the square conducting encl
osure at the Rayleigh number 10(8). In the two-dimensional case, the t
ime-dependent temperature shows different dominant frequencies in the
horizontal boundary layers, vertical boundary layers and core region,
respectively. In the three-dimensional case almost the same frequencie
s are found, except for the horizontal boundary layers. The strong thr
ee-dimensional mixing leaves no, or only very weak, three-dimensional
structures in the time-averaged nonlinear solution. Three-dimensional
effects increase the maximum of the time- and depth-averaged wall-heat
transfer by 15%.