  We develop a model of a quantum field confined within a cavity with a movable
wall where the position of the wall is quantized. We obtain a full description
of the dynamics of both the quantum field and the confining wall depending on
the initial state of the whole system. Both the reaction and back-reaction of
the field on the wall, and the wall on the field, can be taken into account, as
well as external driving forces on both the cavity and the wall. The model
exactly reproduces the resonant cavity mode stimulation due to the periodic
motion of the mirror (dynamical Casimir effect), as well as the standard
radiation pressure effects on the quantized wall(optomechanics). The model also
accounts for the interplay of the two scenarios. Finally, the time evolution of
the radiation force shows the interplay between the static and dynamical
Casimir effect.
