Résumé : We present a method based on dynamical nonequilibrium molecular dynamics (D-NEMD) that allows one to produce rigorous ensemble averages for the transient regimes. We illustrate the method by describing the formation of convective cells within a two-dimensional fluid system of soft disks in which a gravity field and a thermal gradient are present. We analyze two different physical settings, with the thermal gradient orthogonal or parallel to the gravity field. In both settings, we follow the formation of the convective flows from the initial time, when the perturbation is turned on, to the steady state. In the first setting (orthogonal fields) we investigate several different cases, varying the initial stationary ensemble and the perturbing field. We find that the final steady-state convective cell is independent of the specific sequence of perturbation fields, which only affects the transient behavior. In all cases, we find that the convective roll is formed through a sequence of damped oscillations of the local fields (density, temperature, and velocity), superimposed to an overall relaxation toward the local steady-state values. Then, we show how D-NEMD can be applied to the Rayleigh-B́nard (RB) setting (parallel fields). In these conditions, the convective flow only establishes above a threshold, without a preferred verse of rotation. We analyze only the response to the ignition of the gravity field in a stationary system under the action of a vertical thermal gradient. Also in this case we characterize the transient response by following the evolution of the density, temperature, and velocity fields until the steady-state RB convective cell is formed. The observed transients are similar to those observed in the case of orthogonal fields. However, the final steady states are quite different. Finally, we briefly discuss the conditions for the general applicability of the D-NEMD method. © 2009 American Institute of Physics.