We present a general methodology for studying the hydrodynamic stability
of flows enclosed in cavities of complex geometry. To this aim, different tools
consisting of time integration of the unsteady equations, steady state solving,
computation of the most unstable eigenmodes of the Jacobian and its adjoint
have been developed . The methodology is applied to the classical differentially heated cavity, where the steady solution branch is followed for very
large values of the Rayleigh number and most unstable eigenmodes are computed at selected Rayleigh values. Its effectiveness for complex geometries
is illustrated on a configuration consisting of a cavity with internal heated
partitions. We finally propose to reduce the Navier-Stokes equations to a low
order differential system by expanding the unsteady solution as the sum of the
steady state solution and of a linear combination of the leading eigenmodes.
The principle of the method, which requires computing the eigenmodes of
the adjoint of the jacobian, is exposed and preliminary results are presented.