Primarily, concentrations of specific substrates (e.g., acetate for methanogens and sucrose for acetogens) at different locations in the UASB reactor govern the presence of different bacterial species in the granules at those locations. The concentration of a substrate in a location within a granule is in turn governed by the intragranular diffusion and rate of formation (acetate by acetogen) or consumption (acetate by methanogen).