How to carry out a CFD simulation for determining the stability derivatives of an aeroplane?
Make a list of the derivatives you want to determine. All of them will be derivations of some force or moment with respect to some parameter or control setting. Now set up your CFD such that you get lift, side force and drag as well as pitching, rolling and yawing moment relative to the center of gravity.

Next, make those forces and moments dimensionless. Forces are divided by a reference area (projection of the wing area in most cases) and the dynamic pressure (speed squared times air density divided by 2). Moments are in addition divided by a reference length (span or semi-span for rolling and yawing moment, mean wing chord for pitching moment). The results are called coefficients. Record those coefficients for a baseline configuration (say, level flight at cruise speed).

Now make a small change in the parameter (angle of attack or sideslip, speed, air density, pitch-, roll- or yaw-rate) or control setting (elevator, rudder or aileron angle, flap setting, power setting) and record the coefficients again. Only one change at a time and leave all others at their baseline position! The desired derivative is simply the gradient of the coefficient over the gradient of the parameter, as in 
$$c_{M\alpha} = \frac{c_{M1}-c_{M0}}{\alpha_1-\alpha_0}$$
with 0 denoting your baseline figures and 1 the changed ones. Use radians for all angles. The rotation rates you should make dimensionless by dividing the value by the flight speed and multiplying it with the respective reference length. And another thing: The really correct reference length for the pitching moment and -rate is the mean aerodynamic chord which is the integral of chord squared over span, divided by wing area.