  We study numerically and analytically the instabilities associated with phase
separation in a solid layer on which an external material ux is imposed. The
first instability is localized within a boundary layer at the exposed free
surface by a process akin to spinodal decomposition. In the limiting static
case, when there is no material ux, the coherent spinodal decomposition is
recovered. In the present problem stability analysis of the time-dependent and
non-uniform base states as well as numerical simulations of the full governing
equations are used to establish the dependence of the wavelength and onset of
the instability on parameter settings and its transient nature as the patterns
eventually coarsen into a at moving front. The second instability is related to
the Mullins- Sekerka instability in the presence of elasticity and arises at
the moving front between the two phases when the ux is reversed. Stability
analyses of the full model and the corresponding sharp-interface model are
carried out and compared. Our results demonstrate how interface and bulk
instabilities can be analysed within the same framework which allows to
identify and distinguish each of them clearly. The relevance for a detailed
understanding of both instabilities and their interconnections in a realistic
setting are demonstrated for a system of equations modelling the
lithiation/delithiation processes within the context of Lithium ion batteries.
