An h-adaptive finite element code for solving coupling Navier-Stokes and en
ergy equations is used to solve the thermally driven cavity problem. The bu
oyancy forces are represented using the Boussinesq approximation. The probl
em is characterised by very thin boundary layers at high values of Rayleigh
number (> 10(6)). However, steady state solutions are achievable with adeq
uate discretisation. This is where the auto-adaptive finite element method
provides a powerful means of achieving optimal solutions without having to
pre-define a mesh, which may be either inadequate or too expensive. Steady
state and transient results are given for six different Rayleigh numbers in
the range 10(3) to 10(8) for a Prandtl number of 0.71. The use of h-adapti
vity, based on a posteriori error estimation, is found to ensure a very acc
urate problem solution ar a reasonable computational cost.