  A fully discrete formalism is introduced to perform stability analysis of a
turbulent compressible flow whom dynamics is modeled with the Reynolds-Averaged
Navier-Stokes (RANS) equations. The discrete equations are linearized using
finite differences and the Jacobian is computed using repeated evaluation of
the residuals. Stability of the flow is assessed solving an eigenvalue problem.
The sensitivity gradients which indicate regions of the flow where a passive
control device could stabilize the unstable eigenvalues are defined within this
fully discrete framework. Second order finite differences are applied to the
discrete residual to compute the gradients. In particular, the sensitivity
gradients are shown to be linked to the Hessian of the RANS equations. The
introduced formalism and linearization method are generic: the code used to
evaluate the residual of the RANS equations can be used in a black box manner,
and the complex linearization of the Hessian is avoided. The method is tested
on a two dimensional deep cavity case, the flow is turbulent with a Reynolds
number equal to 860 000 and compressible with a Mach number of 0.8. Several
turbulence models and numerical schemes are used to validate the method.
Physical features of the flow are recovered, such as the fundamental frequency
of the natural flow as well as acoustic mechanisms, suggesting the validity of
the method. The sensitivity gradients are then computed and validated, the
error in predicting the eigenvalue variation being found less than 3\%. Control
maps using a small steady control device are finally obtained, indicating that
the control area should be chosen in the vicinity of the leading edge of the
cavity.
