  Developing high fidelity quantitative models of solid state reaction systems
can be challenging, especially in deposition systems where, in addition to the
multiple competing processes occurring simultaneously, the solid interacts with
its atmosphere. In this work, we develop a model for the growth of a thin solid
film where species from the atmosphere adsorb, diffuse, and react with the
film. The model is mesoscale and describes an entire film with thickness on the
order of microns. Because it is stochastic, the model allows us to examine
inhomogeneities and agglomerations that would be impossible to characterize
with deterministic methods. We demonstrate the modeling approach with the
example of chalcopyrite Cu(InGa)(SeS)$_2$ thin film growth via precursor
reaction, which is a common industrial method for fabricating thin film
photovoltaic modules. The model is used to understand how and why through-film
variation in the composition of Cu(InGa)(SeS)$_2$ thin films arises and
persists. We believe that the model will be valuable as an effective
quantitative description of many other materials systems used in
semiconductors, energy storage, and other fast-growing industries.
